o da auria:
<talkaction words="!rest" event="script" value="conjure.lua" />
--- Script by mock
local vocations = {
1,5, -- sorcerer
2,6, -- druid
3,7, -- paladin
4,8, -- knight
}
local interval = 0.5
local ef_types = {
['normal'] = 65,
['heal'] = 11,
}
local heals = {
['hp'] = 4,
['mana'] = 5,
}
local soul = 1
----
interval = interval*1000
local function rot(cid,n,old) --- Script by mock
local tb_rot = {{0,2},{6,5},{1,3},{7,4},false}
if isPlayer(cid) == FALSE or tb_rot[n] == nil or getPlayerSoul(cid) < soul or old.x ~= getCreaturePosition(cid).x or old.y ~= getCreaturePosition(cid).y then
return false
end
if tb_rot[n] == false then
doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][1]) , ef_types['normal'])
doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][2]) , ef_types['normal'])
doPlayerAddSoul(cid, -soul)
doCreatureAddHealth(cid, heals['hp'])
doCreatureAddMana(cid, heals['mana'])
doSendMagicEffect(getCreaturePosition(cid), ef_types['heal'])
addEvent(rot, interval,cid,2,old)
return false
end
doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][1]) , ef_types['normal'])
doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][2]) , ef_types['normal'])
n = n+1
addEvent(rot, interval,cid,n,old)
end
function onSay(cid, words, param)--- Script by mock
if getPlayerSoul(cid) < 10 then
doPlayerSendCancel(cid,"You need 10 soul points or more.")
return FALSE
elseif isInArray(vocations,getPlayerVocation(cid)) == FALSE then
doPlayerSendCancel(cid,"You dont have the required vocation.")
return FALSE
end
doPlayerAddSoul(cid, -soul)
doSendMagicEffect(getCreaturePosition(cid),ef_types['normal'])
addEvent(rot, interval,cid,1,getCreaturePosition(cid))
return FALSE
end
--- Script by mock