Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
Vendor Gold
|
Author |
Message |
Lightsource
Apprentice
Posts: 9
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Dec 2013
Reputation: 0
|
Vendor Gold
Hey, im trying to make my vendors buy houses from players that cost 30k gp, but they keep saying that they can't afford it. I have given GPs through @NPCRestock, put gold in their banks, bought stuff to see if their purchase limit would rise, but no success in any case.
After a little debugging I came across this at CContain.cpp (which is the limit I'm facing right now):
Code:
case LAYER_BANKBOX:
// Restock petty cash.
if ( !m_itEqBankBox.m_Check_Restock )
m_itEqBankBox.m_Check_Restock = 10000;
if ( m_itEqBankBox.m_Check_Amount < m_itEqBankBox.m_Check_Restock )
m_itEqBankBox.m_Check_Amount = m_itEqBankBox.m_Check_Restock;
return;
Is there anyway I can override this line m_itEqBankBox.m_Check_Restock by scripts? or should I change my source code?
Thanks in advance
edit:
also when I change this in source code and it starts buying houses, it shows the wrong price at the Vendor Gump than what he actually pays. At the gump it shows 36.928gps, but he pays when I click accept 168.000gps
(This post was last modified: 02-14-2017 03:06 AM by Lightsource.)
|
|
02-14-2017 02:31 AM |
|
|
Lightsource
Apprentice
Posts: 9
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Dec 2013
Reputation: 0
|
RE: Vendor Gold
(02-14-2017 05:05 AM)Coruja Wrote: m_itEqBankBox.m_Check_Restock is an alias for MORE2, so maybe you can use "RESTOCK + MORE2 = 123456789" on scripts
on source code you also must take care with variable types like char/short/int/long/etc. Each type have its signal or max limits, so if you use 'unsigned short' to store signed values this will return wrong value, or storing values like 160.000 on unsigned short (max value = 65.535) will also make it return wrong value, etc
Thanks for your reply! I have just found out that info about MORE2.
Now, about that gump price, at grayproto.h it says at ln 2754:
Code:
NWORD m_price; // Hmm what if price is > 65K?
So this basically means that it is really a short and I can't by any means send prices over 65.535gp to the client at a Sell Operation?
|
|
02-14-2017 05:51 AM |
|
|
User(s) browsing this thread: 1 Guest(s)