Okay, im almost TWO hours trying to set vocation on this simple talkaction, ive looked every where, in my scripts, google and lookin for help in otland was my last option, so here it goes:
i found thoses lines on google, i tried to putin but all i got is expeted end and so on, in console.
i thin its not hard, but i got 0 on scripting :/
so thanks
EDIT:
solve it, made it by onCastSpell, setup the vocations on spells.xml
thanks anyway
Code:
local waittime = 120 -- 120 Segundos = 2 minutos
local storage = 7594
function onSay(cid, words, param)
if exhaustion.get(cid, storage) == FALSE then
v = 7594
y = "Rat"
local summons = getCreatureSummons(cid)
if(table.maxn(summons) < 1) then
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
doSendMagicEffect(getThingPosition(cid), 2)
return true
end
x = doCreateMonster(y, getCreaturePosition(cid))
doConvinceCreature(cid, x)
if v == 7594 then
exhaustion.set(cid, storage, waittime)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Plase Wait " .. exhaustion.get(cid, storage) .. " seconds.")
end
if #getCreatureSummons(cid) >= 1 then
return doPlayerSendCancel(cid, 1)
end
return true
end
i found thoses lines on google, i tried to putin but all i got is expeted end and so on, in console.
Code:
voc = {1,2,3,4,5,6,7,8,9,10,11,12},
Code:
elseif not isInArray(i.voc, getPlayerVocation(cid)) and doPlayerSendCancel(cid, " Your vocation can not create summons.") then return true
i thin its not hard, but i got 0 on scripting :/
so thanks

EDIT:
solve it, made it by onCastSpell, setup the vocations on spells.xml
thanks anyway

Last edited: