SphereCommunity
Item creation after monsters death - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Item creation after monsters death (/Thread-Item-creation-after-monsters-death)



Item creation after monsters death - Leonidas - 01-26-2014 06:03 PM

Hello, I'm trying to create an item generator. For example, there is a stone in the middle with monsters surrounding it. If a player double clicks this stone before all the monsters are killed, it will do nothing. But after all the monsters are killed, and he double clicks the stone, it will put an item in his bag. Then setting a timer on the stone after the monsters are killed for them to re spawn and resetting the stone back to step 1. I'm not asking for a full script (although that'd be nice) just a good head start on how to put this into play.

Only thing I'm stuck on is how to link the stone to the monsters, after they spawn. I thought of linking their UIDs but they change after they respawn, so that wouldnt work i dont think.

Any help is greatly appreciated, thank you!


RE: Item creation after monsters death - Alaric - 01-26-2014 09:40 PM

If you are using default respawn items, link the stone item with spawn item and get info from it.

on=@dclick
info from ui.<link>.amount/more2

t_spawn_char
AMOUNT = The maximum amount of NPCs the spawner should create
MORE2 = The current number of creatures spawned from this point

Or store these informations + spawn time and template in the stone itself and make your own typedef.

There will be other options too.