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?
The vendor says it cannot afford anymore of that... why??
-
Marzullo63
- New User
- Posts: 3
- Joined: Tue Oct 07, 2008 4:41 am
Re: The vendor says it cannot afford anymore of that... why??
Likely you'd want to see what your AI script says. There's a point where your vendor waits for the sell speech event and responds to that event.
-
Marzullo63
- New User
- Posts: 3
- Joined: Tue Oct 07, 2008 4:41 am
Re: The vendor says it cannot afford anymore of that... why??
Yes but isn't there a default implementation?
Maybe my server owners have changed it, I cannot have access to it...
Thanks.
Maybe my server owners have changed it, I cannot have access to it...
Thanks.
Re: The vendor says it cannot afford anymore of that... why??
Nothing is done by default in POL especially when it comes to NPCs. The POL default is to stand there and do nothing no matter what happens. Every action is up to the scripts and how the scripts handle it. POL just passes the events that are happening to the AI script (ie: speech events "buy" and "sell") and the script picks it up and creates the NPC reaction to it.
Re: The vendor says it cannot afford anymore of that... why??
The only way to see what is causing this is to look in the scripts that you do not have access to right now. If you want to see what is causing this you will have trace out the AI for the merchant to see what allows them to buy items.
Re: The vendor says it cannot afford anymore of that... why??
From the reply I gave in Development Discussion to this question:
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).
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.
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