Advertisement
DoctorX13

XKillDrop

Oct 3rd, 2019
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. ItemDrop = 0; //Insert the id of the item you want to drop
  2. ItemNoDrop = 0; //Insert the id of the item you want to no drop
  3. Possibility = 10; //Insert a random number to set the chance to drop, 1 = 100%
  4. Randomize = true; //Only values true and false
  5. Drop = true; //Only values true and false
  6. NoDrop = false; //Only values true and false
  7.  
  8. event onPlayerDeath(player, cause, murdererId){
  9. if(Drop == true){
  10. if(Randomize == true and random.int(0, Possibility) == 4){
  11. player.inventory.addItem(ItemDrop, 1);
  12. player.inventory.addItem(ItemDrop, 1); //You can delete this line, this is only for add other item
  13. return;
  14. }
  15. if(Randomize == false){
  16. player.inventory.addItem(ItemDrop, 1);
  17. }
  18. }
  19. if(NoDrop == true);
  20. player.inventory.removeItem(ItemNoDrop, 1);
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement