Advertisement
alamiku

pvp reward

Sep 28th, 2011
589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. ----Credits----
  2. --By AlaMiku--
  3. ---------------
  4.  
  5. print("Honor Kill Token Script Initiated...")
  6. function OnKillPlr(event, pPlayer, pVictim)
  7. local pLevel = pPlayer:GetPlayerLevel()
  8. local vicLevel = pVictim:GetPlayerLevel()
  9. local RandNum1 = math.random(1,3) --Adjust to Increase/Decrease chance of getting a token.
  10.  
  11. local modedLevel = vicLevel + 10
  12.  
  13. if(pLevel > modedLevel) then
  14. pPlayer:SendAreaTriggerMessage("Player "..pVictim:GetName().." is too low of a level to grant a token.")
  15. else
  16. if(RandNum1 == 2) then
  17. pPlayer:AddItem(ITEMID, 1) --Obviously the token's itemid.
  18. end
  19. end
  20.  
  21. end
  22.  
  23. RegisterServerHook(2, "OnKillPlr")
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement