Elbereth Posted May 5, 2011 Author Share Posted May 5, 2011 Hello everyone! I looked for a long time for one of these, but could not find one that functions properly. So, I made one myself. Thanks to Robin for explaining that pesky final piece of code. (he's awesome) Anyway, adding this in will cause all items in a players possession (equipped or otherwise) to be dropped on death.Enjoy,~Elbereth**In Server:modPlayer:On Death:** **REPLACE THIS:** (which does not work by the way)>! ' Drop all worn items For i = 1 To Equipment.Equipment_Count - 1 If GetPlayerEquipment(index, i) > 0 Then PlayerMapDropItem index, GetPlayerEquipment(index, i), 0 End If NextWith this.**THE CODE:**>! 'Drop inventory items For i = 1 To MAX_INV PlayerMapDropItem index, i, GetPlayerInvItemValue(index, i) Next>! 'Send all equiped items to the inventory to be dumped. For i = 1 To Equipment.Equipment_Count - 1 If GetPlayerEquipment(index, i) > 0 Then PlayerMapDropItem index, GetPlayerEquipment(index, i), 0 End If 'Send Weapon GiveInvItem index, GetPlayerEquipment(index, Weapon), 0 SetPlayerEquipment index, 0, Weapon 'Send Armor GiveInvItem index, GetPlayerEquipment(index, Armor), 0 SetPlayerEquipment index, 0, Armor 'Send Shield GiveInvItem index, GetPlayerEquipment(index, Shield), 0 SetPlayerEquipment index, 0, Shield 'Send Helmet GiveInvItem index, GetPlayerEquipment(index, Helmet), 0 SetPlayerEquipment index, 0, Helmet Next>! 'Drop *equipped* inventory items For i = 1 To MAX_INV PlayerMapDropItem index, i, 0 Next Link to comment Share on other sites More sharing options...
erkro1 Posted May 5, 2011 Share Posted May 5, 2011 It isn't a script but a piece of code, nice work btw. ;) Link to comment Share on other sites More sharing options...
Elbereth Posted May 5, 2011 Author Share Posted May 5, 2011 lol…idk the difference? i changed the name Link to comment Share on other sites More sharing options...
erkro1 Posted May 5, 2011 Share Posted May 5, 2011 @Elbereth:> lol…idk the difference? i changed the nameScripting is SadscriptProgramming is Vb6 ;) Link to comment Share on other sites More sharing options...
Elbereth Posted May 5, 2011 Author Share Posted May 5, 2011 oh cool! i used XtremeWorlds and HAAAATTTE sadscript… Link to comment Share on other sites More sharing options...
erkro1 Posted May 5, 2011 Share Posted May 5, 2011 @Elbereth:> oh cool! i used XtremeWorlds and HAAAATTTE sadscript…Who don't.I've tested your code and it works. :cheesy: Link to comment Share on other sites More sharing options...
Craselin Posted May 5, 2011 Share Posted May 5, 2011 Nice work :] i will use this. (btw, nice c2 avatar) Link to comment Share on other sites More sharing options...
Elbereth Posted May 6, 2011 Author Share Posted May 6, 2011 thanks! =) Link to comment Share on other sites More sharing options...
Link Posted May 6, 2011 Share Posted May 6, 2011 Nice code and contribution, hope you can make bigger things(Note:this is big but I mean bigger than this) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now