Poem algumas fotos de como é, e se possível um mapa bom pro evento .
parabéns !
Poem algumas fotos de como é, e se possível um mapa bom pro evento .
parabéns !
Editado Abril 22 por Luquinh4
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Muito obrigado cara, o download do mapa já está no final do tópico ![]()
info
Grupo: Banidos
Registrado: 11/01/13
Posts: 576
Reputação: +109
Char no Tibia: Darashia del Shee

function onTime ()
if #getPlayersInArea(torneio.area) > 1 then
doBroadcastMessage("The tournament this time had no winner, try next time!") return true end
for _, pid in ipairs(getPlayersInArea(torneio.waitArea)) do
doTeleportThing(pid, torneio.tournamentFight)
doPlayerSendTextMessage(pid, 21, "The tournament started, and the best will win warrior! Hahaha.")
end
return true
end
Action.
function onUse(cid, item)
if #getPlayersInArea(torneio.area) > 1 then
doPlayerSendTextMessage(cid, 20 ,"Finish with others first, young warrior!")
return true
end
doTeleportThing(cid, torneio.playerTemple)
doPlayerSendTextMessage(cid, 21, "Young warrior Congratulations, you won the tournament, and won one "..getNameById(torneio.awardTournament).." as a reward.")
doPlayerAddItem(cid, torneio.awardTournament, torneio.awardAmount)
return true
end
Acho meio que 'bobeira' adicionar variaveis globais na lib, mas isso ai, melhorou da v1.
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Obrigado cara, mas não foi bobeira, na versão anterior tinha que configurar arquivo por arquivo ;p
info
Grupo: Visconde
Registrado: 22/11/12
Posts: 267
Reputação: +26
Gênero: Masculino
Char no Tibia: ADM Kabo

as schedules do not put my plus 1?
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

I do not understand, you're in doubt at times? You can ask at will! startHour is the time it starts and endHour ending.
info
Grupo: Artesão
Registrado: 15/03/13
Posts: 126
Reputação: +34
Char no Tibia: No Have

Cara Quando Eu Acho Que Você ja Me Impressionou Você Vem Com Outra . Por Isso Sou Seu Fã!
info
Grupo: Visconde
Registrado: 24/11/12
Posts: 474
Reputação: +98
Gênero: Masculino

Agora Sim Em Roksas Continue Assim Amigão, Rep + Parceiro !!
Abraços!
info
Grupo: Visconde
Registrado: 22/11/12
Posts: 267
Reputação: +26
Gênero: Masculino
Char no Tibia: ADM Kabo

Error...
[24/04/2013 00:10:41] [Error - LuaScriptInterface::loadFile] cannot open data/actions/scripts/default.lua: No such file or directory
[24/04/2013 00:10:41] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/default.lua)
[24/04/2013 00:10:41] cannot open data/actions/scripts/default.lua: No such file or directory
[24/04/2013 00:10:41] [Warning - Actions::registerEvent] Duplicate registered item uid: 5015
[24/04/2013 00:10:45] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament.lua)
[24/04/2013 00:10:45] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament1.lua)
[24/04/2013 00:10:45] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament2.lua)
[24/04/2013 00:10:45] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament3.lua)
[24/04/2013 00:10:45] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament4.lua)
[24/04/2013 00:10:45] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament5.lua)
[24/04/2013 00:10:45] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament6.lua)
[24/04/2013 00:10:45] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament7.lua)
[24/04/2013 00:10:45] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament8.lua)
[24/04/2013 00:10:45] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament9.lua)
[24/04/2013 00:10:45] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament10.lua)
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Why tournament1.lua created until tournament10.lua? In tag team globalevents.xml must be = "" instead of interval = "."
info
Grupo: Campones
Registrado: 02/02/13
Posts: 77
Reputação: +1

Roksas fiz tudo certinho coloquei as posições certas so que os player estão esperando na area de espera certinho quando da o horario eles nao estao sendo mandado para a area do torneio . Porque ?
esseerro ao carregar [25/04/2013 14:55:38] [Warning - Event::loadScript] Event onTimer not found (data/globalevents/scripts/tournament.lua)
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Cara verifica se o arquivo que você pos em globalevents/scripts, a primeira linha dele é:
function onTimer()
info
Grupo: Campones
Registrado: 02/02/13
Posts: 77
Reputação: +1

Sim mano e esse mesmo
Instalei de novo agora nao da mais nenhum erro na distro mais ainda os player nao estao sendo teleportado para area do torneio
@Edit tentei de novo e for teleportado , Mais ele manda todos os player para a mesma posição ? nao teria como escolhe mais posição para os player ficar ?
e so arrumar esse erro [25/04/2013 15:41:15] [Error - Action Interface]
[25/04/2013 15:41:15] data/actions/scripts/tournament.lua:onUse
[25/04/2013 15:41:15] Description:
[25/04/2013 15:41:15] data/actions/scripts/tournament.lua:7: attempt to call global 'getNameById' (a nil value)
[25/04/2013 15:41:15] stack traceback:
[25/04/2013 15:41:15] data/actions/scripts/tournament.lua:7: in function <data/actions/scripts/tournament.lua:1>
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino
Sistema de Torneio V2.0
Saudações galera, tudo de bão e do mió?
Recebi alguns pedidos e vim trazer hoje para vocês o V2.0 do meu sistema de Torneio.
Changelog:
Instalação:
Siga para data/lib, nessa mesma pasta crie um arquivo chamado tournament.lua e adicione dentro:
torneio = { awardTournament = 2148, awardAmount = 2, playerTemple = {x = 1008, y = 1018, z = 7}, tournamentFight = {x = 1017, y = 1026, z = 7}, area = {fromx = 1008, fromy = 1018, fromz = 7, tox = 1024, toy = 1033, toz= 7}, waitPlace = {x = 1017, y = 1044, z = 7}, waitArea = {fromx = 1010, fromy = 1040, fromz = 7, tox = 1024, toy = 1050, toz= 7}, startHour = "17:40:00", endHour = "17:50:00", price = 10000, revivePoke = 2494, } function getPlayersInArea(area) local players = {} for x = area.fromx,area.tox do for y = area.fromy,area.toy do for z = area.fromz,area.toz do local m = getTopCreature({x=x, y=y, z=z}).uid if m ~= 0 and isPlayer(m) then table.insert(players, m) end end end end return players endEm data/npc/ crie um arquivo chamado Tournament.xml e adicione dentro:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Tournament" script="tournament.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="128" head="20" body="100" legs="50" feet="99" corpse="2212"/>] <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. If you want to participate in the tournament say: {torneio} or {enter}."/> </parameters> </npc>Entre na pasta scripts dentro de data/npc/ e crie um arquivo chamado tournament.lua e adicione dentro:
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'torneio') or msgcontains(msg, 'enter') then if getPlayerItemCount(cid, torneio.revivePoke) >= 1 then selfSay('You can not enter the tournament with {revives}, please throw them out.', cid) return true end selfSay('You want to participate in the tournament by '..torneio.price..' gps / dollars?', cid) talkState[talkUser] = 2 elseif talkState[talkUser] == 2 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then if os.date("%X") < torneio.startHour or os.date("%X") > torneio.endHour then selfSay('Registration for the tournament finished, come back later.', cid) return true end if doPlayerRemoveMoney(cid, torneio.price) then doTeleportThing(cid, torneio.waitPlace) doPlayerSendTextMessage(cid, 21, "Welcome, this is the waiting room, you wait here while the tournament does not start. Start time: {"..torneio.endHour.."}.") else selfSay('You do not have enough money ('..torneio.price..').', cid) end else selfSay('Sure you do not want to participate? Okay, see you next time!', cid) talkState[talkUser] = 0 end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())Agora vá para a pasta data/globalevents/scripts, dentro dela crie um arquivo chamado tournament.lua e adicione dentro:
function onTime () if #getPlayersInArea(torneio.area) > 1 then doBroadcastMessage("The tournament this time had no winner, try next time!") return true end for _, pid in ipairs(getPlayersInArea(torneio.waitArea)) do doTeleportThing(pid, torneio.tournamentFight) doPlayerSendTextMessage(pid, 21, "The tournament started, and the best will win warrior! Hahaha.") end return true endEm globalevents.xml adicione essa tag:
Em data/actions/scripts, crie um arquivo chamado tournament.lua e adicione dentro:
Abra com o bloco de notas o arquivo actions.xml e adicione a seguinte tag:
Configuração:
O arquivo que instalamos na pasta data/lib (tournament.lua), abra-o com o bloco de notas e vamos configurar esta parte:
torneio = { awardTournament = 2148, awardAmount = 2, playerTemple = {x = 1008, y = 1018, z = 7}, tournamentFight = {x = 1017, y = 1026, z = 7}, area = {fromx = 1008, fromy = 1018, fromz = 7, tox = 1024, toy = 1033, toz= 7}, area2 = {x = 1008, y = 1018, z = 7}, {x = 1024, y = 1033, z = 7}, waitPlace = {x = 1017, y = 1044, z = 7}, waitArea = {fromx = 1010, fromy = 1040, fromz = 7, tox = 1024, toy = 1050, toz= 7}, startHour = "17:40:00", endHour = "17:50:00", price = 10000, revivePoke = 2494, }Prontinho, agora é só ir no RME Map Editor e colocar UNIQUE ID 18279 em uma alavanca ou item dentro da Arena, isso serve para o player que ganhar ir embora com seu prêmio
Finalizações:
Bom galera, é isso por hoje, espero que façam um bom e ótimo uso. Estou disposto a aceitar DICAS/SUGESTÕES/CRÍTICAS & BUGS! Muito obrigado pela atenção!
Editado Abril 30 por Roksas