Advertisement
Prawdziwynrtn

Untitled

Jul 22nd, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. local summons = getCreatureSummons(cid)
  2. local pos = getThingPos(cid)
  3. if #summons < 1 then
  4. doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, 'You can\'t use this spell without a frog pet.')
  5. doSendMagicEffect(pos, CONST_ME_POFF)
  6. return true
  7. end
  8.  
  9. local level = math.max(1, tonumber(getCreatureStorage(cid, basicStorage + 1)))
  10. for _, uid in pairs(summons) do
  11. if getCreatureName(uid):lower() == storage then
  12. level = nil
  13. end
  14. end
  15.  
  16. if not level then
  17. doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, 'You can\'t use this spell without a frog pet.')
  18. doSendMagicEffect(pos, CONST_ME_POFF)
  19. return true
  20. end
  21.  
  22. if param == '' then
  23. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Command param required.')
  24. doSendMagicEffect(pos, CONST_ME_POFF)
  25. return true
  26. end
  27.  
  28. if getPlayerStorageValue(cid,5000) == "snake" or getPlayerStorageValue(cid,5000) == "snail" then
  29. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You must have frog pet not another.')
  30. doSendMagicEffect(pos, CONST_ME_POFF)
  31. return false
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement