Detecting a PC dropping gold
Quilistan
Member Posts: 186
It is my understanding that dropping gold does not fire the OnUnAcquireItem Event
Is there a way to detect when gold is dropped?
Is there a way to prevent gold being dropped on the ground, or in a placeable?
Is there a way to detect when gold is dropped?
Is there a way to prevent gold being dropped on the ground, or in a placeable?
0
Comments
How quickly do you need to know that the PC has tried to drop gold?
For placeables, if you give them all a custom OnDisturbed script, it will detect the addition of gold (see Lexicon for caveats).
If this is a large existing module, that script could be populated by SetEventScript (but see Lexicon warning for the OnDisturbed event timing) or moneo (which is permanent and reliable).
As for dropping gold on the ground, you could have a pseudo-heartbeat running on the module at, say, 1 second intervals, which checks whether the PC's current gold matches a value saved on a local integer. When the gold changes, scan the objects in the area to detect dropped gold.
This assumes you don't have gold items lying around on the ground for some other reason, but, if you do, they can be mapped upfront and excluded from the scan.
That method should be fine in single player, but might be too resource-hungry for larger PWs.
It is one thing for players to help each other, but I am not a fan of a single player using multiple characters to power level one (meta-gaming I think it is called?).
I don't want to limit the server to 1 character per player.
I do have a script in place that prevents muling, or transferring items between a players characters. (this can be done via a merchant which is fine since the second character must purchase the item)
I now have the issue of them dropping the gold on the ground, defeating the anti-muling script.
I would like to either:
- detect the gold drop and prevent it all together
- or be able to detect the gold drop, and possibly have a rogue or creature spawn somewhere close, hide/sneak in and "steal" the gold while the player is relogging. Then this rogue/creature can move to a guild or lair where the gold can be transferred. I like this route because it opens up an event. the character would have a chance to get his gold back, or the weaker character could attempt to recover it also (though I am sure I would make this difficult).
I spent most of my time on a server that had a bank for pooling all the gold of all characters of any one player. Gold could not buy any items that were amazingly powerful. You needed tokens for that. Really, gold ended up being mostly good for rezing or buying potions to keep you alive. Coming from that environment, I wouldn't last long on your server if you implemented your counter measures—but that's just from my trained mentality.
And now I circle it back to the main question.
The reason the server was probably setup like it was, with the token system, was to counter exactly what you're trying to counter. (They also had item level restrictions enabled, but that had it's own draw-backs.) There was so much time spent on power balancing, I would not be surprised to learn that the reason for the token system in the first place was because there were too many uncounterable exploits with the gold system.
I don't have powerful items as standard purchases, players have to find those or be rewarded those.
Your statements above are why I like the idea of a rogue spawning to steal it. Players could still attempt it but with a risk, and a little cat and mouse adventure if they succeed in tracking the rogue.
I don't like the item level restriction either, for the fact that if I as a DM wanted to give them an especially powerful item, I would want them to be able to use it. Funny thing is if these players wouldn't try to abuse an exploit, I as a DM would probably reward them more with items that support their characters..... lol
On another server, there was a NPC who was scripted to walk around certain areas just doing various animations in different places, but if something was dropped on the ground then he'd walk over to it and pick it up. On that server, he was scripted so that when he next visited a particular container, he'd put whatever he collected in that container, but you could script any activity you want, including putting items into a container but putting gold into some kind of storage system where it could be recovered later, maybe by completing a mission where the difficulty is chosen by class and level. So any player can get the gold, but only if they work for it.