Postado Janeiro 26, 2015 10 anos Autor Ai infelizmente já não posso lhe ajudar :\. Só o amigo @zipter98 mesmo. Pois como ja tinha dito antes, minha "Lib" não está igual ao seu. Eu te Ajudei? Então solta aquele REP+ !! Meus Tutoriais: [Tutorial] Bug "Temple position is wrong" (MySql) Outros: [Meu Show OFF | Mapa próprio 8.6]
Postado Janeiro 26, 2015 10 anos Vou tentar ajudar um de cada vez, pra não ficar muito sobrecarregado. olokomeu, vamos tentar assim: troque seu killboss por esse: function onKill(cid, target) if isPlayer(cid) and getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then local new_wave = getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) + 1 if ARENA.WAVES[new_wave] then setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, new_wave) doWave(cid, new_wave) else local tp = doCreateTeleport(ARENA.TELEPORT.tpId, ARENA.TELEPORT.tpToPos, ARENA.TELEPORT.tpPos) doItemSetAttribute(tp, "aid", ARENA.TELEPORT.aid) end end return true end function onLogout(cid) if isPlayer(cid) then if getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then doPlayerSendCancel(cid, "You can't logout now.") return false end end return true end function onPrepareDeath(cid) if getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then setGlobalStorageValue(1000, -1) clearArena() end return true end Depois, no seu login.lua, adicione em baixo do callback onLogin: if getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, -1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end ficando: function onLogin(cid) if getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, -1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end @glacialot Aquele erro na distro que você informou no começo desta página continua? E achei um erro na sua lib. Você esqueceu de configurar os items da wave 3. Como pode ver: items = { {item_id, count}, --{ID do item, quantidade}, {item_id, count}, }, Editado Janeiro 26, 2015 10 anos por zipter98 (veja o histórico de edições) não respondo pms solicitando suporte em programação/scripting
Postado Janeiro 26, 2015 10 anos Não, agora nao da mais o erro, só que eu mato os 4 demons da Wave 1 e ele nao pula para a Wave 2 Olha como ta o script, eu editei oque voce foi falando ali, menos esse ultimo post que tu fez para o @olokomeu Script: ARENA = { WAVES = { [1] = { monsters = { {"Demon", {x = 617, y = 2086, z = 6}}, --{nome_do_monstro, {posição_que_vai_nascer}}, {"Demon", {x = 617, y = 2089, z = 6}}, {"Demon", {x = 627, y = 2086, z = 6}}, {"Demon", {x = 627, y = 2089, z = 6}}, }, prize = { cash = 500000, --Coloque false se não for receber cash nessa wave. items = false, --Coloque false se não for receber item(s) nessa wave. }, }, [2] = { monsters = { {"Hellfire Figher", {x = 617, y = 2086, z = 6}}, --{nome_do_monstro, {posição_que_vai_nascer}}, {"Hellfire Figher", {x = 617, y = 2089, z = 6}}, {"Hellfire Figher", {x = 627, y = 2086, z = 6}}, {"Hellfire Figher", {x = 627, y = 2089, z = 6}}, }, prize = { cash = 1000000, items = false, }, }, [3] = { monsters = { {"Orshabaal", {x = 617, y = 2086, z = 6}}, --{nome_do_monstro, {posição_que_vai_nascer}}, {"Orshabaal", {x = 617, y = 2089, z = 6}}, {"Orshabaal", {x = 627, y = 2086, z = 6}}, {"Orshabaal", {x = 627, y = 2089, z = 6}}, }, prize = { cash = 1000000, items = { {item_id, count}, --{ID do item, quantidade}, {item_id, count}, }, }, }, }, NPC = { price = 2000, --Preço para entrar na arena. position = {x = 623, y = 2084, z = 6}, --Para onde o jogador será teleportado ao falar com o NPC. }, TELEPORT = { tpId = 1387, --ID do teleporte. tpPos = {x = 622, y = 2084, z = 6}, --Onde o teleporte será criado, ao matar o último boss. tpToPos = {x = 622, y = 2081, z = 5}, --Para onde o teleporte levará. aid = 1307, }, STORAGES = { storage = 90190, wave_sto = 90191, }, toPos = {x = 630, y = 2092, z = 6}, --Coordenadas da posição superior esquerda da arena. fromPos = {x = 614, y = 2082, z = 6}, --Coordenadas da posição inferior direita da arena. delay = 15, --Segundos para o boss aparecer. level = 100, --Level mínimo. } function doWave(cid, wave) if not isPlayer(cid) then return true elseif not ARENA.WAVES[wave] then return true elseif getPlayerStorageValue(cid, ARENA.STORAGES.storage) > -1 then return true end local monster = ARENA.WAVES[wave] local m = monster.monsters doPlayerSendTextMessage(cid, 27, "Em "..ARENA.delay.." segundos, começa seu desafio. [Wave: "..wave.."]") addEvent(function() for i = 1, #m do doCreateMonster(m[i][1], m[i][2]) end end, ARENA.delay * 1000) end function clearArena() for x = ARENA.fromPos.x, ARENA.toPos.x do for y = ARENA.fromPos.y, ARENA.toPos.y do for z = ARENA.fromPos.z, ARENA.toPos.z do local area = {x = x, y = y, z = z} local creature = getTopCreature(area).uid if isCreature(creature) then doRemoveCreature(creature) end end end end end function newWave() for x = ARENA.fromPos.x, ARENA.toPos.x do for y = ARENA.fromPos.y, ARENA.toPos.y do for z = ARENA.fromPos.z, ARENA.toPos.z do local area = {x = x, y = y, z = z} local creature = getTopCreature(area).uid if isCreature(creature) and isMonster(creature) then return false end end end end return true end
Postado Janeiro 26, 2015 10 anos Falta configurar aquela parte que mencionei, sobre os itens. items = { {item_id, count}, --{ID do item, quantidade}, {item_id, count}, }, Isso na wave 3. E troca sua função newWave() por essa: function newWave() for x = ARENA.fromPos.x, ARENA.toPos.x do for y = ARENA.fromPos.y, ARENA.toPos.y do for z = ARENA.fromPos.z, ARENA.toPos.z do local area = {x = x, y = y, z = z} local creature = getTopCreature(area).uid if isCreature(creature) and isMonster(creature) then return false end end end end return true end Editado Janeiro 26, 2015 10 anos por zipter98 (veja o histórico de edições) não respondo pms solicitando suporte em programação/scripting
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.