Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function doPlayerHaveSafira(cid)
- for _,summon in pairs(getCreatureSummons(cid)) do
- if getCreatureName(summon) == "Safira" then
- return true
- break
- end
- end
- return false
- end
- function onUse(cid, item, pos, item2, topos)
- if doPlayerHaveSafira(cid) then
- for _,summon in pairs(getCreatureSummons(cid)) do
- if getCreatureName(summon) == "Safira" then
- doSendMagicEffect(getThingPos(summon), 11)
- doRemoveCreature(summon)
- end
- end
- doCreatureSay(cid, 'Back, Safira!')
- else
- local safira = doCreateMonster("Safira", getThingPos(cid))
- if safira then
- doConvinceCreature(cid, safira.uid)
- end
- doCreatureSay(cid, 'Go, Safira!')
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement