Deu um erro No meu servidor :'( tentei arruma só piorava + kkk
Meu Data/Action/Scripts/petsis.lua
function onUse(cid, item, frompos, item2, topos)
storage = 4191
storsol = 1203
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid,"Your Demonio is already summoned.")
end
if getPlayerStorageValue(cid,storsol) == 1 then
local z = getCreatureSummons(cid)[1]
addEvent(setPlayerStorageValue,100,cid,storsol,-1)
doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(z), 2)
doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)
doRemoveCreature(z)
end
local summons = getCreatureSummons(cid)
local pet = {
["Seguranca"] = {1,10000},
}
for k,v in pairs(pet) do -- 1
if getPlayerStorageValue(cid,storsol) < 1 then
if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2
if (table.maxn(summons) < 1)then -- 3
x = doSummonCreature(k, getCreaturePosition(cid))
doConvinceCreature(cid, x)
setPlayerStorageValue(cid,4194,1)
setPlayerStorageValue(cid,storsol,1)
doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
end
end
end
return true
end