adrianoswatt

StaminaUpByTraining [ClassicBRTibia]

Oct 14th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. local storage = 19387
  2. local damage = 580
  3.  
  4. function onAttack(cid, target)
  5.     if isMonster(target) and getCreatureName(target):lower() == 'training monk' then
  6.         getSto = getPlayerStorageValue(cid, storage)
  7.         if isNumber(getSto) then
  8.             doPlayerSetStorageValue(cid, storage, getSto+1)
  9.             if getSto+1 >= damage then
  10.                 doPlayerSetStamina(cid, getPlayerStamina(cid) + 1)
  11.                 doPlayerSetStorageValue(cid, storage, 0)
  12.             end
  13.         else
  14.             doPlayerSetStorageValue(cid, storage, 0)
  15.         end
  16.     end
  17. return true
  18. end
Advertisement
Add Comment
Please, Sign In to add comment