royalrocks

Druid Protection (Soul)

Jul 20th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. function onSay(cid, words, param, channel)      
  2.         if isDruid(cid) then
  3.                 if getPlayerSoul(cid) == 100 then
  4.                     local maxh = getCreatureMaxHealth(cid)
  5.         doCreatureAddHealth(cid, maxh)     
  6.         doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
  7.         doPlayerAddSoul(cid, -100)
  8.         doPlayerSendTextMessage(cid, 22, 'You used your soul successfully!')
  9.         else
  10.                 doPlayerSendCancel(cid, "You dont have 100 soul.")
  11. end
  12.         else
  13.         doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_POFF)
  14.         doPlayerSendTextMessage(cid, 21, 'You are not druid, as punishment, the ancient gods will punish you removing you life.')
  15.         doPlayerSendTextMessage(cid, 21, 'Dont try this again!')
  16.         doCreatureAddHealth(cid, -5)
  17. end
  18.         return true
  19. end
Advertisement
Add Comment
Please, Sign In to add comment