- Joined
- Jun 19, 2009
- Messages
- 1,852
- Reaction score
- 5
Hello!
Could some1 make this action script to spell script?
Script by Cykotitan
thanks!
Could some1 make this action script to spell script?
Code:
local t = {
name = 'Kalle',
limit = 2,
vocation = 'Paladin'
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local full_mp = getCreatureMaxMana(cid)
local foo = _G['is' ..t.vocation]
if foo and foo(cid) then
if #getCreatureSummons(cid) < t.limit then
if getCreatureMana(cid) == full_mp then
doCreatureAddMana(cid, -full_mp)
local ret = doSummonMonster(cid, t.name)
doCreatureSay(cid,"Summon: Kalle!",TALKTYPE_ORANGE_1)
if ret ~= RETURNVALUE_NOERROR then
doPlayerSendDefaultCancel(cid, ret)
end
end
else
doPlayerSendCancel(cid, "You cannot summon more creatures.")
end
else
doPlayerSendCancel(cid, "Only Paladins can summon me.")
end
return true
end
Script by Cykotitan
thanks!