Achei esse erro dentro do script:
soSendMagicEffect(getThingPos(cid),2)
correto:
doSendMagicEffect(getThingPos(cid),2)
info
Grupo: Barão
Registrado: 16/11/16
Posts: 215
Reputação: +52
Gênero: Masculino

Achei esse erro dentro do script:
soSendMagicEffect(getThingPos(cid),2)
correto:
doSendMagicEffect(getThingPos(cid),2)
local vocs_id = {3,7} function onUse(cid, item, frompos, item2, topos) if not isInArray(vocs_id,getPlayerVocation(cid)) then doPlayerSendCancel(cid,"Sua vocacao nao pode summonar esse pet.") doSendMagicEffect(getThingPos(cid),2) return false end if getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendCancel(cid,"Esse monstro nao pode ser sumonado em protect zone!.") return TRUE end if #getCreatureSummons(cid) >= 1 then local pet = getCreatureSummons(cid)[1] doRemoveCreature(pet) return doPlayerSendCancel(cid,"Voce removeu seu pet!") end if (getPlayerStorageValue(cid, 11548) >= os.time()) then doPlayerSendTextMessage(cid, 6,"Voce so pode sumonar seu pet novamente em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.") return true end storage = 11548 if getPlayerStorageValue(cid,storsol) == 1 then local z = getCreatureSummons(cid)[1] doSendMagicEffect(getCreaturePosition(z), 2) doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3) return true end local summons = getCreatureSummons(cid) local pet = { ["Wolf lvl 1"] = {1,150}, ["Wolf lvl 2"] = {151,250}, ["Wolf lvl 3"] = {251,350}, ["Wolf lvl 4"] = {351,450}, ["Wolf lvl 5"] = {451,550}, ["Wolf lvl 6"] = {551,650}, ["Wolf lvl 7"] = {651,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,11548,os.time()+30) doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2) end end end end return true end
Tenta assim.
Editado Setembro 1 por lazarocp
18 horas atrás, lazarocp disse:local vocs_id = {3,7} function onUse(cid, item, frompos, item2, topos) if not isInArray(vocs_id,getPlayerVocation(cid)) then doPlayerSendCancel(cid,"Sua vocacao nao pode summonar esse pet.") doSendMagicEffect(getThingPos(cid),2) return false end if getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendCancel(cid,"Esse monstro nao pode ser sumonado em protect zone!.") return TRUE end if #getCreatureSummons(cid) >= 1 then local pet = getCreatureSummons(cid)[1] doRemoveCreature(pet) return doPlayerSendCancel(cid,"Voce removeu seu pet!") end if (getPlayerStorageValue(cid, 11548) >= os.time()) then doPlayerSendTextMessage(cid, 6,"Voce so pode sumonar seu pet novamente em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.") return true end storage = 11548 if getPlayerStorageValue(cid,storsol) == 1 then local z = getCreatureSummons(cid)[1] doSendMagicEffect(getCreaturePosition(z), 2) doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3) return true end local summons = getCreatureSummons(cid) local pet = { ["Wolf lvl 1"] = {1,150}, ["Wolf lvl 2"] = {151,250}, ["Wolf lvl 3"] = {251,350}, ["Wolf lvl 4"] = {351,450}, ["Wolf lvl 5"] = {451,550}, ["Wolf lvl 6"] = {551,650}, ["Wolf lvl 7"] = {651,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,11548,os.time()+30) doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2) end end end end return true endTenta assim.
Nossa irmão, funcionou certinho!!!
Muito obrigado !!!
Deixa eu perguntar só mais uma coisa, tipo quando eu uso o pet e subo uma escada ele fica la moscando e não me segue
seria possível algum script que fizesse ele teleportar junto quando subisse escada, quando eu entrar em um teleport ou ficar muito longe dele, tipo um pokemon mesmo hahaha
Se não for possivel de buenas, muito obrigado tmj !
info
Grupo: Campones
Registrado: 11/08/07
Posts: 4
Reputação: 0
Olá pessoal, gostaria que alguem me ajudasse no script desse actions.
É um pet system bem simples, você clika em um item e o monstro sai... oq eu gostaria é que ao clicar no item novamente o monstro voltasse..
Se alguem puder ajudar agradeço, segue script:
local vocs_id = {3,7}
function onUse(cid, item, frompos, item2, topos)
if not isInArray(vocs_id,getPlayerVocation(cid)) then
doPlayerSendCancel(cid,"Sua vocacao nao pode summonar esse pet.")
soSendMagicEffect(getThingPos(cid),2)
return false
end
if getTilePzInfo(getCreaturePosition(cid)) then
doPlayerSendCancel(cid,"Esse monstro nao pode ser sumonado em protect zone!.")
return TRUE
end
if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, 6,"Voce so pode sumonar seu pet novamente em " ..
(getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return true
end
storage = 11548
if #getCreatureSummons(cid) >= 1 then
return doPlayerSendCancel(cid,"Voce ja chamou seu pet!")
end
if getPlayerStorageValue(cid,storsol) == 1 then
local z = getCreatureSummons(cid)[1]
doSendMagicEffect(getCreaturePosition(z), 2)
doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)
return true
end
local summons = getCreatureSummons(cid)
local pet = {
["Wolf lvl 1"] = {1,150},
["Wolf lvl 2"] = {151,250},
["Wolf lvl 3"] = {251,350},
["Wolf lvl 4"] = {351,450},
["Wolf lvl 5"] = {451,550},
["Wolf lvl 6"] = {551,650},
["Wolf lvl 7"] = {651,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,11548,os.time()+30)
doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
end
end
end
return true
end