Skip to content

Detecting a PC dropping gold

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?

Comments

  • ForSeriousForSerious Member Posts: 446
    Unless they exposed functionality for that in the last update, no to all those questions.
  • ProlericProleric Member Posts: 1,281
    Why do you want to prevent this, anyway?

    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.
  • QuilistanQuilistan Member Posts: 177
    I run a PW and have a problem with a few players using their higher level characters (normally clerics) to get gold, then drop the gold on the ground so they can relog with their lower level characters to pick it up. These lower character then end up with overpowered items.

    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).


  • ForSeriousForSerious Member Posts: 446
    This gives me so many derailing-to-the-question thoughts.
    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.
  • QuilistanQuilistan Member Posts: 177
    basically I would like each character to "earn their keep". I guess even If I implemented my idea there are ways around it. I can think of one off the top of my head for sure. It would however take two players/accounts and be more difficult. They would also have to figure out how to exploit it.

    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
  • MelkiorMelkior Member Posts: 181
    edited June 2023
    I currently play on a server with a limited item-level restriction in place. It's scripted by-player rather than by-character so if a player gets any character up to a level where they can use higher level items, all their characters can use those higher level items. But you could probably implement a by-character version. It's just a matter of having the right scripting in on-equip and on-used events. That's one option.

    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.
  • QuilistanQuilistan Member Posts: 177
    Thanks for the examples Melkior, they get the mind going for sure.
Sign In or Register to comment.