Postado Abril 30, 2018 7 anos <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Guild For Arena Event" version="8.6" author="Vodkart" contact="" enabled="yes"> <config name="gfae_config"><![CDATA[ config = { positions = { {{x=44, y=279, z=7}, {x=21, y=480, z=7}}, {{x=45, y=279, z=7}, {x=21, y=480, z=7}}, {{x=44, y=280, z=7}, {x=21, y=480, z=7}}, {{x=45, y=280, z=4}, {x=21, y=480, z=7}}, }, positions2 = { {{x=47, y=279, z=7}, {x=78, y=448, z=7}}, {{x=48, y=279, z=7}, {x=78, y=448, z=7}}, {{x=47, y=280, z=7}, {x=78, y=448, z=7}}, {{x=48, y=280, z=7}, {x=78, y=448, z=7}}, }, money = 500,-- em k hours = 5, -- para voltar a arena storage = 889757, a = {x= 14, y=442, z=7}, -- pos começo da arena b = {x=87, y=492, z=7}, -- pos final da arena exit_pos = {x=154, y=160, z=7} } function getPlayersWithGuildInArena(from, to) local t = {} for _, pid in pairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), from, to) then t[#t+1] = pid end end return t end function endArenaEvent(cid, p1, p2) for _, ret in pairs(getPlayersWithGuildInArena(p1, p2)) do if getPlayerGuildId(cid) ~= getPlayerGuildId(ret) then return false end end return true end ]]></config> <event type="login" name="GuildForArenaLogin" event="script"><![CDATA[ domodlib('gfae_config') function onLogin(cid) registerCreatureEvent(cid, "GuildForArenaDeath") if getCreatureName(cid) ~= "Account Manager" and isInRange(getPlayerPosition(cid), config.a, config.b) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true end]]></event> <event type="preparedeath" name="GuildForArenaDeath" event="script"><![CDATA[ domodlib('gfae_config') function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) if isPlayer(cid) and isInRange(getPlayerPosition(cid), config.a, config.b) then doTeleportThing(cid, config.exit_pos) if endArenaEvent(deathList[1], config.a, config.b) then -- qndo acaba o evento for _, ret in pairs(getPlayersWithGuildInArena(config.a, config.b)) do doPlayerAddItem(ret, 1999, 1) -- premio doTeleportThing(ret, config.exit_pos) end doBroadcastMessage("A guild "..getPlayerGuildName(deathList[1]).." Foi a vencedora da arena!") end end return true end]]></event> <action actionid="7124" event="script"><![CDATA[ domodlib('gfae_config') function onUse(cid, item, fromPosition, item2, toPosition) if #getPlayersWithGuildInArena(config.a, config.b) > 0 then return doPlayerSendCancel(cid, "espere, atualmente ha guilds batalhando.") and doSendMagicEffect(getThingPos(cid), 2) end for i = 1, #config.positions do local creature = getTopCreature(config.positions[1]).uid if not isPlayer(creature) then return doPlayerSendCancel(cid, "Nao existe players em todas as posicoes.") and doSendMagicEffect(getThingPos(cid), 2) end local guild1 = getPlayerGuildId(getTopCreature(config.positions[1][1]).uid) if getPlayerGuildId(creature) ~= guild1 then return doPlayerSendCancel(cid, "Algum player nao e da guild correta.") and doSendMagicEffect(getThingPos(cid), 2) end if getPlayerStorageValue(creature, config.storage) - os.time() > 0 then return doPlayerSendTextMessage(cid, 25, "o Jogador "..getPlayerName(creature) .." Você só poderá voltar na arena em "..os.date("%d %B %Y %X ", getPlayerStorageValue(creature, config.storage))..".") end if getPlayerMoney(creature) < (config.money * 1000) then return doPlayerSendCancel(cid, "Algum player nao tem "..config.money.."k.") and doSendMagicEffect(getThingPos(cid), 2) end end -- Checando posições 2 for i = 1, #config.positions2 do local creature = getTopCreature(config.positions2[1]).uid if not isPlayer(creature) then return doPlayerSendCancel(cid, "Not enough players.") and doSendMagicEffect(getThingPos(cid), 2) end local guild2 = getPlayerGuildId(getTopCreature(config.positions2[1][1]).uid) if getPlayerGuildId(creature) ~= guild2 then return doPlayerSendCancel(cid, "Algum player nao e da guild correta.") and doSendMagicEffect(getThingPos(cid), 2) end if getPlayerStorageValue(creature, config.storage) - os.time() > 0 then return doPlayerSendTextMessage(cid, 25, "o Jogador "..getPlayerName(creature) .." Você só poderá voltar na arena em "..os.date("%d %B %Y %X ", getPlayerStorageValue(creature, config.storage))..".") end if getPlayerMoney(creature) < (config.money * 1000) then return doPlayerSendCancel(cid, "Algum player nao tem "..config.money.."k.") and doSendMagicEffect(getThingPos(cid), 2) end end doBroadcastMessage("Começou uma batalha entre ".. getPlayerGuildName(getTopCreature(config.positions[1][1]).uid) .." e ".. getPlayerGuildName(getTopCreature(config.positions2[1][1]).uid)..".") -- Teleportando posições 1 for i = 1, #config.positions do local creature = getTopCreature(config.positions[1]).uid doTeleportThing(creature, config.positions[2]) doPlayerSendTextMessage(creature, 27, "You started the quest.") doSendMagicEffect(getThingPos(creature), 33) doPlayerRemoveMoney(creature, (config.money * 1000)) setPlayerStorageValue(creature, config.storage, os.time() + config.hours * 60 * 60) end -- Teleportando posições 2 for i = 1, #config.positions2 do local creature = getTopCreature(config.positions2[1]).uid doTeleportThing(creature, config.positions2[2]) doPlayerSendTextMessage(creature, 27, "You started the quest.") doSendMagicEffect(getThingPos(creature), 33) doPlayerRemoveMoney(creature, (config.money * 1000)) setPlayerStorageValue(creature, config.storage, os.time() + config.hours * 60 * 60) end return true end]]></action> </mod>? seu serve existe a função isInRange? [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Abril 30, 2018 7 anos Autor 2 minutos atrás, Vodkart disse: <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Guild For Arena Event" version="8.6" author="Vodkart" contact="" enabled="yes"> <config name="gfae_config"><![CDATA[ config = { positions = { {{x=44, y=279, z=7}, {x=21, y=480, z=7}}, {{x=45, y=279, z=7}, {x=21, y=480, z=7}}, {{x=44, y=280, z=7}, {x=21, y=480, z=7}}, {{x=45, y=280, z=4}, {x=21, y=480, z=7}}, }, positions2 = { {{x=47, y=279, z=7}, {x=78, y=448, z=7}}, {{x=48, y=279, z=7}, {x=78, y=448, z=7}}, {{x=47, y=280, z=7}, {x=78, y=448, z=7}}, {{x=48, y=280, z=7}, {x=78, y=448, z=7}}, }, money = 500,-- em k hours = 5, -- para voltar a arena storage = 889757, a = {x= 14, y=442, z=7}, -- pos começo da arena b = {x=87, y=492, z=7}, -- pos final da arena exit_pos = {x=154, y=160, z=7} } function getPlayersWithGuildInArena(from, to) local t = {} for _, pid in pairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), from, to) then t[#t+1] = pid end end return t end function endArenaEvent(cid, p1, p2) for _, ret in pairs(getPlayersWithGuildInArena(p1, p2)) do if getPlayerGuildId(cid) ~= getPlayerGuildId(ret) then return false end end return true end ]]></config> <event type="login" name="GuildForArenaLogin" event="script"><![CDATA[ domodlib('gfae_config') function onLogin(cid) registerCreatureEvent(cid, "GuildForArenaDeath") if getCreatureName(cid) ~= "Account Manager" and isInRange(getPlayerPosition(cid), config.a, config.b) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true end]]></event> <event type="preparedeath" name="GuildForArenaDeath" event="script"><![CDATA[ domodlib('gfae_config') function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) if isPlayer(cid) and isInRange(getPlayerPosition(cid), config.a, config.b) then doTeleportThing(cid, config.exit_pos) if endArenaEvent(deathList[1], config.a, config.b) then -- qndo acaba o evento for _, ret in pairs(getPlayersWithGuildInArena(config.a, config.b)) do doPlayerAddItem(ret, 1999, 1) -- premio doTeleportThing(ret, config.exit_pos) end doBroadcastMessage("A guild "..getPlayerGuildName(deathList[1]).." Foi a vencedora da arena!") end end return true end]]></event> <action actionid="7124" event="script"><![CDATA[ domodlib('gfae_config') function onUse(cid, item, fromPosition, item2, toPosition) if #getPlayersWithGuildInArena(config.a, config.b) > 0 then return doPlayerSendCancel(cid, "espere, atualmente ha guilds batalhando.") and doSendMagicEffect(getThingPos(cid), 2) end for i = 1, #config.positions do local creature = getTopCreature(config.positions[1]).uid if not isPlayer(creature) then return doPlayerSendCancel(cid, "Nao existe players em todas as posicoes.") and doSendMagicEffect(getThingPos(cid), 2) end local guild1 = getPlayerGuildId(getTopCreature(config.positions[1][1]).uid) if getPlayerGuildId(creature) ~= guild1 then return doPlayerSendCancel(cid, "Algum player nao e da guild correta.") and doSendMagicEffect(getThingPos(cid), 2) end if getPlayerStorageValue(creature, config.storage) - os.time() > 0 then return doPlayerSendTextMessage(cid, 25, "o Jogador "..getPlayerName(creature) .." Você só poderá voltar na arena em "..os.date("%d %B %Y %X ", getPlayerStorageValue(creature, config.storage))..".") end if getPlayerMoney(creature) < (config.money * 1000) then return doPlayerSendCancel(cid, "Algum player nao tem "..config.money.."k.") and doSendMagicEffect(getThingPos(cid), 2) end end -- Checando posições 2 for i = 1, #config.positions2 do local creature = getTopCreature(config.positions2[1]).uid if not isPlayer(creature) then return doPlayerSendCancel(cid, "Not enough players.") and doSendMagicEffect(getThingPos(cid), 2) end local guild2 = getPlayerGuildId(getTopCreature(config.positions2[1][1]).uid) if getPlayerGuildId(creature) ~= guild2 then return doPlayerSendCancel(cid, "Algum player nao e da guild correta.") and doSendMagicEffect(getThingPos(cid), 2) end if getPlayerStorageValue(creature, config.storage) - os.time() > 0 then return doPlayerSendTextMessage(cid, 25, "o Jogador "..getPlayerName(creature) .." Você só poderá voltar na arena em "..os.date("%d %B %Y %X ", getPlayerStorageValue(creature, config.storage))..".") end if getPlayerMoney(creature) < (config.money * 1000) then return doPlayerSendCancel(cid, "Algum player nao tem "..config.money.."k.") and doSendMagicEffect(getThingPos(cid), 2) end end doBroadcastMessage("Começou uma batalha entre ".. getPlayerGuildName(getTopCreature(config.positions[1][1]).uid) .." e ".. getPlayerGuildName(getTopCreature(config.positions2[1][1]).uid)..".") -- Teleportando posições 1 for i = 1, #config.positions do local creature = getTopCreature(config.positions[1]).uid doTeleportThing(creature, config.positions[2]) doPlayerSendTextMessage(creature, 27, "You started the quest.") doSendMagicEffect(getThingPos(creature), 33) doPlayerRemoveMoney(creature, (config.money * 1000)) setPlayerStorageValue(creature, config.storage, os.time() + config.hours * 60 * 60) end -- Teleportando posições 2 for i = 1, #config.positions2 do local creature = getTopCreature(config.positions2[1]).uid doTeleportThing(creature, config.positions2[2]) doPlayerSendTextMessage(creature, 27, "You started the quest.") doSendMagicEffect(getThingPos(creature), 33) doPlayerRemoveMoney(creature, (config.money * 1000)) setPlayerStorageValue(creature, config.storage, os.time() + config.hours * 60 * 60) end return true end]]></action> </mod>? poxa nao concheço essa funçao seu serve existe a função isInRange? seu serve existe a função isInRange? Nao sei te informar se tem essa funçao onte eu onlho para te informar?? agora deu esse erro aki o ADM has logged in. [Error - CreatureScript Interface] domodlib('gfae_config') function onLogin(cid) registerCreatureEvent(cid, "GuildForArenaDeath") if getCreatureName(cid) ~= "Account Manager" and isInRange(getPlayerPosition(cid), config.a, config.b) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true end:onLogin Description: data/lib/032-position.lua:2: attempt to index local 'fromPosition' (a nil value) stack traceback: data/lib/032-position.lua:2: in function 'isInRange' [string "LuaInterface::loadBuffer"]:4: in function <[string "LuaInterface::loadBuffer"]:2> ADM has logged out.
Postado Abril 30, 2018 7 anos adc na sua lib: function isInRange(pos, fromPosition, toPosition) return (position.x >= fromPosition.x and position.y >= fromPosition.y and position.z >= fromPosition.z and position.x <= toPosition.x and position.y <= toPosition.y and position.z <= toPosition.z) end dps fecha e abre o server [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Abril 30, 2018 7 anos 2 horas atrás, Vodkart disse: #REMOVIDO CÓDIGO BUGADO Só não esqueça na arena de colocar PVP TOOL e AREA NO LOGOUT vodkart tem que ver como ADms no Forum , pq qui tb ta assim , quando pego script dentro do Code[ ] ele ta vindo cheio de ??????/ pelo script....e uns acento em alguns numeros tb... Meus topicos.[Gesior]Layout pokemon vrs1.0[854]OtServer Digimon Vrs.1.1 Spoiler http://free.timeanddate.com/countdown/i48ub0vi/n213/cf11/cm0/cu4/ct0/cs0/ca0/cr0/ss0/cac009/cpc000/pcf90/tcfff/fs100/szw448/szh189/tatTempo%20Para%20Resetar/tac000/tptDigimon%20World%20Cerberus%20Online/tpc000/matDigimon%20World%20Cerberus%20Online/mac000/mptEstá%20Online%20à/mpc000/iso2014-07-19T00:01:00/bas3/bat8/bac00f/pa3 Meu Servidor Digimon World Cerberus OnlineDigimon World Cerberus Online Agradecer sempre a todos que ajudaram, o server a ficar pronto deis de Sprites que não conheço,scripts, etc....como o jogo esta na internet e para todos usarem vlw a todos bjus...
Postado Abril 30, 2018 7 anos Autor 7 minutos atrás, Vodkart disse: adc na sua lib: function isInRange(pos, fromPosition, toPosition) return (position.x >= fromPosition.x and position.y >= fromPosition.y and position.z >= fromPosition.z and position.x <= toPosition.x and position.y <= toPosition.y and position.z <= toPosition.z) end dps fecha e abre o server function isInRange(position, fromPosition, toPosition) return (position.x >= fromPosition.x and position.y >= fromPosition.y and position.z >= fromPosition.z and position.x <= toPosition.x and position.y <= toPosition.y and position.z <= toPosition.z) end tem issu na primeira linha pode add o seu asim memo?
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.