Tenta assim:
function onUse(cid, item, frompos, item2, topos)
local monstro = getItemAttribute(item.uid, "corpse")
local health = getItemAttribute(item.uid, "health")
local name = getItemAttribute(item.uid, "monstro")
local vocationUse = {4, 8} -- poem a vocação e a promotion
if getCreatureSummons(cid) > 3 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ja esta usando uma reencarnação ou um pet")
return true
end
if getPlayerMana(cid) < health/100*70 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem chakra suficiente")
return true
end
if getPlayerStorageValue(cid, 24436) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode invocar mais de reanimação junto.")
return true
end
if getPlayerVocation(cid) ~= 4 or getPlayerVocation(cid) ~= 8 then
doPlayerSendTextMessage(cid,22,"Você não tem a vocação apropriada")
return TRUE
end
t = doCreateMonster(monstro, getThingPos(cid))
doConvinceCreature(cid, t)
setCreatureMaxHealth(t, health)
doCreatureAddHealth(t, health)
doPlayerAddMana(t, -getItemAttribute(item.uid, "health")/90)
setPlayerStorageValue(cid, 24436, name)
return true
end
Aqui você edita a vocação que irá usar:
local vocationUse = {4, 8} -- poem a vocação e as promotions
E aqui:
if getPlayerVocation(cid) ~= 4 or getPlayerVocation(cid) ~= 8 then










info
Grupo: Campones
Registrado: 01/02/13
Posts: 47
Reputação: +4
Preciso que alguém me ajude a modificar esse script, para que so a vocação de id "x" possa da use nele, script abaixo.