Advertisement
LordVandor1

Simple Gold Spider - CNPC JS

Jun 24th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Simple Gold critter for increasing a gold for a player. To see the effects use the Simple Gold Counter
  2.  
  3. var givenGold = 3;
  4. function died(event) {
  5.     if(event.source.getType() == EntityType_PLAYER){
  6.         if(event.npc.world.getStoreddata().has(event.source.getDisplayName() + "Gold")) {event.npc.world.getStoreddata().put((event.source.getDisplayName() + "Gold"),(event.npc.world.getStoreddata().get(event.source.getDisplayName() + "Gold") + givenGold));}
  7.         else{event.npc.world.getStoreddata().put((event.source.getDisplayName() + "Gold"),givenGold);}
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement