Rock Drop!

coersum

Plugin Developer
Plugin Developer
Oct 9, 2014
77
5
8
47
Parts Unknown
I made that function so I could call it before loading a kit, it checks for a rock and then drops it next to the player. It could be easily changed for a "drop all" and if needed change the all.ItemID to all.Name

I didn't make it return as soon as it dropped one in case there is more than one.. shouldn't happen but never know if someone looted another :)

Python:
    def dropRock(self, Player):
        for all in Player.Inventory.AllItems():
            if all.ItemID == 13844:
                all.Drop(Player.Location, Vector3(5, 5, 5))
ID's can be found here: http://radmin.elasticbeanstalk.com/item/list/approved/consumable/
the ItemID is the last number in an item URL (ie 13844 for rock: http://radmin.elasticbeanstalk.com/item/edit/13844/)

PS: make sure your kit replaces the rock with something to hit/gather with!
 

balu92

Retired Staff
Retired Staff
Trusted Member
Jul 11, 2014
338
75
28
34
For information about items you can also use: Util.Items()
that will create an ini file containing information about all the items.

If you want to apply a kit instead of the rock right on respawn, you can set the GiveDefault property of the respawn event to false.
 

coersum

Plugin Developer
Plugin Developer
Oct 9, 2014
77
5
8
47
Parts Unknown
I was trying to teleport respawned players (for Jail plugin, incase they /kill to get out) but the teleport would only work when clicking respawn in sleeping bag. Just wondering if you knew why, was thinking maybe the respawn in the wild taking longer than respawning in the sleeping bag was the cause.

and thank you for the info above.
 

balu92

Retired Staff
Retired Staff
Trusted Member
Jul 11, 2014
338
75
28
34
you can specify a location in the respawn event, where they will respawn, that works when they respawn in the wild, I'm not sure if it works if they spawn in a sleeping bag