xCookie 1 Postado Janeiro 21, 2014 Share Postado Janeiro 21, 2014 queria saber como coloco para por pra 3 ganhadores e ganhar os 3 tipos de trofeu com dinheiro aleatorio !! alguem me ajuda ai porrfavor vai levar rep++ alguem me ajuda???? Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/ Compartilhar em outros sites More sharing options...
0 Killua 389 Postado Janeiro 21, 2014 Share Postado Janeiro 21, 2014 Vc já tem um zombie event aí que tá funcionando certinho? Se tiver posta aqui o arquivo dele no creturescripts/scripts que eu mudo pra vc. Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1606032 Compartilhar em outros sites More sharing options...
0 xCookie 1 Postado Janeiro 21, 2014 Autor Share Postado Janeiro 21, 2014 eu essa script no data/creaturescripts/script : local config = { playerCount = 2001, -- Global storage for counting the players left/entered in the event goblet = 5805, -- id of the gold goblet you'll get when finishing the event. rewards = {2159}, -- You will get this + a gold goblet with your name on. -- {moneyId, count, using? 1 for using moneyReward, 0 for not using.} moneyReward = {2159, 15, 1}, -- Should be same as in the globalevent! -- The zombies will spawn randomly inside this area fromPosition = {x = 1137, y = 1020, z = 7}, -- top left cornor of the playground toPosition = {x = 1168, y = 1038, z = 7}, -- bottom right cornor of the playground } function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isMonster(attacker) then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then if getGlobalStorageValue(config.playerCount) >= 2 then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") foi morto pelos zumbis!", MESSAGE_STATUS_CONSOLE_BLUE) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce reconhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) elseif getGlobalStorageValue(config.playerCount) == 1 then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") venceu o evento 'Zumbi' em 1º lugar, Parabéns! e recebeu 1 troféu de ouro e 15 event coins.", 22) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Ganhador: (" .. getPlayerName(cid) .. ") por vencer em 1º lugar no evento 'Zumbi'.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce conhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end end for x = config.fromPosition.x, config.toPosition.x do for y = config.fromPosition.y, config.toPosition.y do for z = config.fromPosition.z, config.toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getMonsters = getThingfromPos(areapos) if isMonster(getMonsters.uid) then doRemoveCreature(getMonsters.uid) end end end end end return false end end return true end porfavor tentar por pra vim 3 ganhadores se consegue ja ta com rep+ garantido Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1606149 Compartilhar em outros sites More sharing options...
0 Killua 389 Postado Janeiro 22, 2014 Share Postado Janeiro 22, 2014 Testa ai pra nois local config = { playerCount = 2001, -- Global storage for counting the players left/entered in the event goblet = 5805, -- id of the gold goblet you'll get when finishing the event. rewards = {2159}, -- You will get this + a gold goblet with your name on. -- {moneyId, count, using? 1 for using moneyReward, 0 for not using.} moneyReward = {2159, 15, 1}, -- Should be same as in the globalevent! -- The zombies will spawn randomly inside this area fromPosition = {x = 1137, y = 1020, z = 7}, -- top left cornor of the playground toPosition = {x = 1168, y = 1038, z = 7}, -- bottom right cornor of the playground } local trofeu3lugar = 123 -- id do trofeu pro terceiro ganhador local trofeu2lugar = 111 -- id do trofeu pro segundo ganhador function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isMonster(attacker) then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then if getGlobalStorageValue(config.playerCount) > 3 then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") foi morto pelos zumbis!", MESSAGE_STATUS_CONSOLE_BLUE) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce reconhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) elseif getGlobalStorageValue(config.playerCount) == 3 then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") venceu o evento 'Zumbi' em 3º lugar, Parabéns! e recebeu XXXXX.", 22) local trof = doPlayerAddItem(cid, trofeu3lugar, 1) doItemSetAttribute(trof, "description", "Ganhador: (" .. getPlayerName(cid) .. ") por vencer em 3º lugar no evento 'Zumbi'.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce conhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end elseif getGlobalStorageValue(config.playerCount) == 2 then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") venceu o evento 'Zumbi' em 2º lugar, Parabéns! e recebeu XXXXX.", 22) local trofe = doPlayerAddItem(cid, trofeu2lugar, 1) doItemSetAttribute(trofe, "description", "Ganhador: (" .. getPlayerName(cid) .. ") por vencer em 2º lugar no evento 'Zumbi'.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce conhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end elseif getGlobalStorageValue(config.playerCount) == 1 then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") venceu o evento 'Zumbi' em 1º lugar, Parabéns! e recebeu XXXXX.", 22) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Ganhador: (" .. getPlayerName(cid) .. ") por vencer em 1º lugar no evento 'Zumbi'.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce conhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end end for x = config.fromPosition.x, config.toPosition.x do for y = config.fromPosition.y, config.toPosition.y do for z = config.fromPosition.z, config.toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getMonsters = getThingfromPos(areapos) if isMonster(getMonsters.uid) then doRemoveCreature(getMonsters.uid) end end end end end return false end end return true end Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1606594 Compartilhar em outros sites More sharing options...
0 xCookie 1 Postado Janeiro 23, 2014 Autor Share Postado Janeiro 23, 2014 vou ver aqui se funcionar eu falo aqui deu ganhou normal so que msg fico nos 3 lugar e nao ganharao premio tente arrumar ai mano Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1606961 Compartilhar em outros sites More sharing options...
0 GuuhMaster 7 Postado Janeiro 23, 2014 Share Postado Janeiro 23, 2014 Amoeba, o script funcionou tudo certo... mas ele ganha só ganha o troféu e também as 3 mensagem diz que o jogador ganho em 3º lugar. Teria como fazer assim 1º lugar - 15 a 10 evento coin (2159) + Golden Trophy. 2º lugar - 10 a 6 evento coin (2159) + Silver Trophy 3º lugar - 6 a 1 evento coin (2159) + Bronze Trophy OBS: tomei a liberade de postar nesse tópico porque o xCookie é meu amigo. Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1606992 Compartilhar em outros sites More sharing options...
0 Killua 389 Postado Janeiro 23, 2014 Share Postado Janeiro 23, 2014 (editado) Tranquilo. Eu fiz esse aí pelo cel pq estou viajando. Daqui algas horas chego em casa faço certinho Aqui. Não testei. local config = { playerCount = 2001, -- Global storage for counting the players left/entered in the event goblet = 5805, -- id of the gold goblet you'll get when finishing the event. rewards = {2159}, -- You will get this + a gold goblet with your name on. -- {moneyId, count, using? 1 for using moneyReward, 0 for not using.} moneyReward = {2159, 15, 1}, -- Should be same as in the globalevent! -- The zombies will spawn randomly inside this area fromPosition = {x = 1137, y = 1020, z = 7}, -- top left cornor of the playground toPosition = {x = 1168, y = 1038, z = 7}, -- bottom right cornor of the playground } local trofeu3lugar = 123 local trofeu2lugar = 123 function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isMonster(attacker) then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then if getGlobalStorageValue(config.playerCount) >= 4 then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") foi morto pelos zumbis!", MESSAGE_STATUS_CONSOLE_BLUE) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce reconhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) elseif getGlobalStorageValue(config.playerCount) == 3 then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") venceu o evento zombie em terceiro lugar!", MESSAGE_STATUS_CONSOLE_BLUE) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce reconhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) doPlayerAddItem(cid, 2159, math.random(1, 6)) local trof = doPlayerAddItem(cid, trofeu3lugar, 1) doItemSetAttribute(trof, "description", "Ganhador: (" .. getPlayerName(cid) .. ") por vencer em 3º lugar no evento 'Zumbi'.") elseif getGlobalStorageValue(config.playerCount) == 2 then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") venceu o evento zombie em segundo lugar!", MESSAGE_STATUS_CONSOLE_BLUE) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce reconhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) doPlayerAddItem(cid, 2159, math.random(6, 10)) local trofe = doPlayerAddItem(cid, trofeu2lugar, 1) doItemSetAttribute(trofe, "description", "Ganhador: (" .. getPlayerName(cid) .. ") por vencer em 2º lugar no evento 'Zumbi'.") elseif getGlobalStorageValue(config.playerCount) == 1 then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") venceu o evento 'Zumbi' em 1º lugar, Parabéns! e recebeu 1 troféu de ouro e 15 event coins.", 22) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Ganhador: (" .. getPlayerName(cid) .. ") por vencer em 1º lugar no evento 'Zumbi'.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce conhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) doPlayerAddItem(cid, 2159, math.radom(10, 15)) setGlobalStorageValue(config.playerCount, 0) for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end end for x = config.fromPosition.x, config.toPosition.x do for y = config.fromPosition.y, config.toPosition.y do for z = config.fromPosition.z, config.toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getMonsters = getThingfromPos(areapos) if isMonster(getMonsters.uid) then doRemoveCreature(getMonsters.uid) end end end end end return false end end return true end Editado Janeiro 23, 2014 por amoeba13 Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1606994 Compartilhar em outros sites More sharing options...
0 xCookie 1 Postado Janeiro 25, 2014 Autor Share Postado Janeiro 25, 2014 vou testar aqui qlq coisa eu digo se funcionou certinho funfo certinho obrigado a na msg queria aparece assim doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") venceu o evento zombie em terceiro lugar! e ganhou 1 troféu de bronze + ? event coins.", MESSAGE_STATUS_CONSOLE_BLUE) ali no ? queria mostrasse quantidade de event coins que ganhase entende? se puder me ajuda vc ajuda! Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1608025 Compartilhar em outros sites More sharing options...
0 Killua 389 Postado Janeiro 25, 2014 Share Postado Janeiro 25, 2014 (editado) Assim local config = { playerCount = 2001, -- Global storage for counting the players left/entered in the event goblet = 5805, -- id of the gold goblet you'll get when finishing the event. rewards = {2159}, -- You will get this + a gold goblet with your name on. -- {moneyId, count, using? 1 for using moneyReward, 0 for not using.} moneyReward = {2159, 15, 1}, -- Should be same as in the globalevent! -- The zombies will spawn randomly inside this area fromPosition = {x = 1137, y = 1020, z = 7}, -- top left cornor of the playground toPosition = {x = 1168, y = 1038, z = 7}, -- bottom right cornor of the playground } local trofeu3lugar = 123 local trofeu2lugar = 123 function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isMonster(attacker) then if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then if getGlobalStorageValue(config.playerCount) >= 4 then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") foi morto pelos zumbis!", MESSAGE_STATUS_CONSOLE_BLUE) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce reconhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) elseif getGlobalStorageValue(config.playerCount) == 3 then local ab = math.random(1, 6) doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") venceu o evento zombie em terceiro lugar e ganhous " .. ab .. " event coins!", MESSAGE_STATUS_CONSOLE_BLUE) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce reconhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) doPlayerAddItem(cid, 2159, ab) local trof = doPlayerAddItem(cid, trofeu3lugar, 1) doItemSetAttribute(trof, "description", "Ganhador: (" .. getPlayerName(cid) .. ") por vencer em 3º lugar no evento 'Zumbi'.") elseif getGlobalStorageValue(config.playerCount) == 2 then local ab = math.random(6, 10) doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") venceu o evento zombie em segundo lugar e ganhou " .. ab .. " event coins!", MESSAGE_STATUS_CONSOLE_BLUE) local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce reconhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1) doPlayerAddItem(cid, 2159, ab) local trofe = doPlayerAddItem(cid, trofeu2lugar, 1) doItemSetAttribute(trofe, "description", "Ganhador: (" .. getPlayerName(cid) .. ") por vencer em 2º lugar no evento 'Zumbi'.") elseif getGlobalStorageValue(config.playerCount) == 1 then local ab = math.random(10, 15) if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doBroadcastMessage("O jogador (".. getPlayerName(cid) .. ") venceu o evento 'Zumbi' em 1º lugar, Parabéns! e recebeu 1 troféu de ouro e " .. ab .. " event coins.", 22) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Ganhador: (" .. getPlayerName(cid) .. ") por vencer em 1º lugar no evento 'Zumbi'.") local corpse = doCreateItem(3058, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "Voce conhece " .. getCreatureName(cid) .. ". Ele foi morto por "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) doPlayerAddItem(cid, 2159, ab) setGlobalStorageValue(config.playerCount, 0) for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end end for x = config.fromPosition.x, config.toPosition.x do for y = config.fromPosition.y, config.toPosition.y do for z = config.fromPosition.z, config.toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getMonsters = getThingfromPos(areapos) if isMonster(getMonsters.uid) then doRemoveCreature(getMonsters.uid) end end end end end return false end end return true end Editado Janeiro 25, 2014 por Killua Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1608057 Compartilhar em outros sites More sharing options...
0 xCookie 1 Postado Janeiro 25, 2014 Autor Share Postado Janeiro 25, 2014 vou testar aqui ja falo ! funfo certinho quero saber tipo quando entra uma pessoa no evento aparece essa mensagem : 13:35 O jogador (Kinazu) entrou no evento 'Zumbi'! Atualmente 1 jogadores entraram! queria aparece uma mensagem assim em baixo dela : restando (TAls) jogadores para entrar! entende tipo uma contagem so isso meu zumbi fica 100%% vou te agradeçer muito se me ajuda mano ^^ Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1608060 Compartilhar em outros sites More sharing options...
0 Killua 389 Postado Janeiro 25, 2014 Share Postado Janeiro 25, 2014 Beleza manda pra mim o script que ta em data/movements/scripts Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1608082 Compartilhar em outros sites More sharing options...
0 xCookie 1 Postado Janeiro 25, 2014 Autor Share Postado Janeiro 25, 2014 local config = { playerCount = 2001, -- Global storage for counting the players in the event maxPlayers = 3, -- Max players who can participate } function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getGlobalStorageValue(config.playerCount) < config.maxPlayers then setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)+1) if getGlobalStorageValue(config.playerCount) == config.maxPlayers then doBroadcastMessage("O evento 'Zumbi' foi lotado! E começerá em alguns instantes.", MESSAGE_STATUS_CONSOLE_BLUE) else doBroadcastMessage("O jogador (" .. getPlayerName(cid) .. ") entrou no evento 'Zumbi'! Atualmente " .. getGlobalStorageValue(config.playerCount) .. " jogadores entraram!", MESSAGE_STATUS_CONSOLE_BLUE) end else addEvent(tpBack, 1000, cid, fromPosition) doPlayerSendCancel(cid, "") doBroadcastMessage("[EVENTO ZUMBI MENSAGEM] está cheio. Já existe " .. config.maxPlayers .. " jogadores participando.", MESSAGE_STATUS_CONSOLE_ORANGE) return false end print(getStorage(config.playerCount) .. " Players in the zombie event.") return true end function tpBack(cid, fromPosition) doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end tenta arruma ai pra mim pf msm , agradeço !! Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1608146 Compartilhar em outros sites More sharing options...
0 zipter98 1102 Postado Janeiro 25, 2014 Share Postado Janeiro 25, 2014 (editado) local config = { playerCount = 2001, -- Global storage for counting the players in the event maxPlayers = 3, -- Max players who can participate } function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getGlobalStorageValue(config.playerCount) < config.maxPlayers then setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)+1) if getGlobalStorageValue(config.playerCount) == config.maxPlayers then doBroadcastMessage("O evento 'Zumbi' foi lotado! E começerá em alguns instantes.", MESSAGE_STATUS_CONSOLE_BLUE) else doBroadcastMessage("O jogador (" .. getPlayerName(cid) .. ") entrou no evento 'Zumbi'! Atualmente " .. getGlobalStorageValue(config.playerCount) .. " jogadores entraram!", MESSAGE_STATUS_CONSOLE_BLUE) doBroadcastMessage("Jogadores restantes para o evento começar: "..config.maxPlayers - getGlobalStorageValue(config.playerCount)..".", MESSAGE_STATUS_CONSOLE_BLUE) end else addEvent(tpBack, 1000, cid, fromPosition) doPlayerSendCancel(cid, "") doBroadcastMessage("[EVENTO ZUMBI MENSAGEM] está cheio. Já existe " .. config.maxPlayers .. " jogadores participando.", MESSAGE_STATUS_CONSOLE_ORANGE) return false end print(getStorage(config.playerCount) .. " Players in the zombie event.") return true end function tpBack(cid, fromPosition) doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end Editado Janeiro 25, 2014 por zipter98 Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1608152 Compartilhar em outros sites More sharing options...
0 xCookie 1 Postado Janeiro 25, 2014 Autor Share Postado Janeiro 25, 2014 Vlw tópico sanada Resolvido !!!!!!!!!! Obrigado Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1608505 Compartilhar em outros sites More sharing options...
0 zipter98 1102 Postado Janeiro 25, 2014 Share Postado Janeiro 25, 2014 Tópico movido para a seção de dúvidas e pedidos resolvidos. Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1608514 Compartilhar em outros sites More sharing options...
0 xCookie 1 Postado Fevereiro 9, 2014 Autor Share Postado Fevereiro 9, 2014 TEM UM BUG QUE QUANDO OS 3 GANHADORES GANHAM OS 3 ZOMBIE QUE SOBRA PROS GANHADORES PERMANECE LA NO EVENTO INVES DE DESAPARECER , ME AJUDA ARRUMAR ISSO PORFAVOR !!! Link para o comentário https://xtibia.com/forum/topic/227482-evento-zombie/#findComment-1612619 Compartilhar em outros sites More sharing options...
Pergunta
xCookie 1
queria saber como coloco para por pra 3 ganhadores e ganhar os 3 tipos de trofeu com dinheiro aleatorio !!
alguem me ajuda ai porrfavor vai levar rep++
alguem me ajuda????
Link para o comentário
https://xtibia.com/forum/topic/227482-evento-zombie/Compartilhar em outros sites
15 respostass a esta questão
Posts Recomendados