I need help with a summon script and i hope you can help me.
im trying to edit a script wich i found it summons a creature , but i want it to remove the creature after 30 seconds
but somehow it wont remove the creature , dous any1 know howto? il rep u for it
im trying to edit a script wich i found it summons a creature , but i want it to remove the creature after 30 seconds
but somehow it wont remove the creature , dous any1 know howto? il rep u for it
Code:
function onSay(cid, words, param, channel)
local level = 50
local mana = 200
local vocsCanUse = {2}
local canBeSummoned = {"Guardian"}
if getPlayerLevel(cid) < level then
doPlayerSendCancel(cid, "Your level is too low.")
return TRUE
end
if getCreatureMana(cid) < mana then
doPlayerSendCancel(cid, "You do not have enough mana.")
return TRUE
end
if getCreatureMana(cid) < mana then
doPlayerSendCancel(cid, "You do not have enough mana.")
return TRUE
end
if(not isInArray(vocsCanUse, getPlayerVocation(cid))) then
doPlayerSendCancel(cid, "Your vocation cannot use this spell.")
return TRUE
end
if getCreatureCondition(cid, condition) == FALSE then
doPlayerSendCancel(cid, "You need to be drunked to use this spell.")
return TRUE
end
if(not isInArray(canBeSummoned, param)) then
doPlayerSendCancel(cid, "You cannot summon this creature.")
return TRUE
end
doSummonCreature(param, getCreaturePosition(cid), FALSE)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
return TRUE
end