Heya
Was just wandering if it is at all possible to access players banks through an xmdialong, in order to add/remove items from their bank instead of their packs?
I'm trying to create an NPC, that hands out bounty orders but on completion of the bounty, I would like the gold reward deducted from the issuing players bank account...
Is this at all possible?
the TAKE and TAKEBYTYPE keywords can take things out of banks
QUOTE |
- added an argument to TAKEBYTYPE and TAKE keywords allowing bankboxes to be included in the searched items. The syntax is "TAKE,probability,quantity,true/itemname" and "TAKEBYTYPE,probability,quantity,true/itemtype"
|
but the search will not be restricted to the bankbox, it will just include it.
There is not a direct way of adding things to a bankbox, but you can do it indirectly, using the SET keyword and the SetItem property of the spawner.
First assign the SetItem property to point to the triggering players bankbox.
Then use SET to add to it.
So put these two entries into a subgroup
SETONTHIS/setitem/GETONTRIGMOB,bankbox.serial
SET/ADD/gold,500
I'll think about adding a keyword that would allow you to refer to bankboxes directly.
It would probably be something like
SETONEQUIPPED,,bankbox/ADD/gold,500
where a new SETONEQUIPPED keyword would allow you access equipped items and not just carried items like SETONCARRIED
actually, I decided to just add an optional argument to the existing SETONCARRIED keyword that would allow you to access the bankbox. The new syntax is
SETONCARRIED,itemname[,itemtype][,equippedonly]/prop/value/prop2/value...
where specifying 'true' for the equipped only arg will only look at items that are directly equipped on the mobile, and that would include bankboxes.
So to add something to the bankbox you would do
SETONCARRIED,,bankbox,true/ADD/gold,500
That is something that you could use directly in questnpc actions.
I'll put the updated basexmlspawner.cs with support for the new arg into the 3.15 beta
shouldnt something like SET,{GETONTRIGMOB.layer.lastvalid}/add/gold
work?