Guigobrt 0 Posted September 5, 2018 Report Share Posted September 5, 2018 Boa tarde, preciso de uma ajudinha em um script. Eu estou com um script de pet system, só que eu quero colocar para apenas uma Vocação consiga usar, ja tentei de tudo, e nao consigo! esse é o script que eu estou usando: function onUse(cid, item, frompos, item2, topos) local dolls = { [9955] = {pet = "pet aniquilador"}, [2353] = {pet = "pet giant"}, [6579] = {pet = "pet jurema"}, [9019] = {pet = "pet gremilie"}, [2354] = {pet = "pet gladiador"}, } local go = dolls[item.itemid] local summon = getCreatureSummons(cid) --------------------------------------------------- if #summon >= 1 then for _, pid in ipairs(summon) do doRemoveCreature(pid) doCreatureSay(cid, "Can go rest ["..go.pet.."]", TALKTYPE_ORANGE_1) end return true end doConvinceCreature(cid, doSummonCreature(go.pet, getCreaturePosition(cid))) doCreatureSay(cid, "Let battle ["..go.pet.."]", TALKTYPE_ORANGE_1) return true end Link to comment https://xtibia.com/forum/topic/248159-pro/ Share on other sites More sharing options...
Gengo 202 Posted September 5, 2018 Report Share Posted September 5, 2018 Tenta ai: Spoiler local dolls = { [9955] = {pet = "pet aniquilador"}, [2353] = {pet = "pet giant"}, [6579] = {pet = "pet jurema"}, [9019] = {pet = "pet gremilie"}, [2354] = {pet = "pet gladiador"}, } function onUse(cid, item, frompos, item2, topos) if ( not isKnight(cid) ) then return doPlayerSendCancel(cid, "Só cavaleiros são dignos de usar os Pets") end local go = dolls[item.itemid] local summon = getCreatureSummons(cid) if #summon >= 1 then for _, pid in ipairs(summon) do doRemoveCreature(pid) doCreatureSay(cid, "Can go rest ["..go.pet.."]", TALKTYPE_ORANGE_1) end return true end doConvinceCreature(cid, doSummonCreature(go.pet, getCreaturePosition(cid))) doCreatureSay(cid, "Let battle ["..go.pet.."]", TALKTYPE_ORANGE_1) return true end Link to comment https://xtibia.com/forum/topic/248159-pro/#findComment-1743414 Share on other sites More sharing options...
Recommended Posts