Page 1 of 1
The vendor says it cannot afford anymore of that... why??
Posted: Tue Oct 07, 2008 4:43 am
by Marzullo63
How is this implemented?
I kept my pg selling platemail gloves for hours and now the vendor complains...
How is implemented this check?
How could I avoid it?
Thanks.
Re: The vendor says it cannot afford anymore of that... why??
Posted: Sun Oct 19, 2008 10:34 pm
by Yukiko
I didn't find any reference to merchants affording things in the 0.97 Distro but in the 0.95 Distro you will find the check of vendor's available gold in \pol\scripts\ai\merchant.src starting near line 78. Following is the section where that is handled. Note line 2 in the code snippet below
if(GetObjProperty(inv_rs, "MyGold") >= 1000).
Code: Select all
elseif(txt["sell"])
if(GetObjProperty(inv_rs, "MyGold") >= 1000)
TurnToward(ev.source);
var count := ModifyPCSellList(merchant_type, (ev.source));
if(count >= 1)
var res := SendSellWindow(ev.source, me, inv_fs, inv_pb, inv_1c);
else
PrintTextAbovePrivate(me, "You dont have anything I would be interested in.", ev.source);
endif
else
PrintTextAbovePrivate(me, "I cannot afford any more of that", ev.source );
endif
This was implemented to make the game more "realistic" because in real life stores that buy second hand merchandise don't have unlimited funds. So someone has to buy stuff from the vendor to replenish her gold funds. I didn't check to see if the gold restocks itself like inventory does.