Postado Abril 1, 2019 6 anos Bom dia, o player invoca o monstro, e o monstro o ataca como se fosse o monstro wild, e nao da erro nenhum no console 1° spell Spoiler function onCastSpell(cid, var) local from,to = {x=962, y=885, z=7},{x=973, y=892, z=7} -- começo e final do mapa local from2,to2 = {x=979, y=901, z=7},{x=991, y=905, z=7} -- começo e final do mapa local playerpos = getPlayerPosition(cid) local position2 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} local MaximoSummon = 2 --- Maximo de Monstros Sumonados!! local summons = getCreatureSummons(cid) if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) then doPlayerSendCancel(cid, "Você não pode usar Summons Aqui!") return true end if(table.maxn(summons) < MaximoSummon) then -- no summons local clone = doCreateMonster("Dragon Frost", playerpos) doConvinceCreature(cid, clone) doSendMagicEffect(position2, 103) doPlayerSendTextMessage(cid,27,'Go Dragon.') return TRUE end end 2° spell Spoiler function onUse(cid, item, frompos, item2, topos) local dolls = { [8982] = {pet = "Dragon Frost"}, [8982] = {pet = "Dragon Frost"}, } 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 if getPlayerStorageValue(cid, 212193) > os.time() then return doPlayerSendCancel(cid, "Espere " .. getPlayerStorageValue(cid, 212193) - os.time() .. " segundos.") end doConvinceCreature(cid, doCreateMonster(go.pet, getCreaturePosition(cid))) doCreatureSay(cid, "Let battle ["..go.pet.."]", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, 212193, os.time() + 100) -- tempo em segundos. return true end Editado Abril 1, 2019 6 anos por Platinun (veja o histórico de edições) Projects are being developed....
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.