Tudo que JcA postou
-
Os 30 dias donates não está funcionando!!
Qual é o seu sistema de points?
-
Npc Auction Versão 1.0 [Atualizado]
Erro resolvido. hi trade armor yes
- DUCA: o melhor evento para otserv (8.60)
-
(Resolvido)A conversão ficou certa? Ajuda com erro
CONVERSÃO DO MYSQL: CREATE TABLE IF NOT EXISTS `snowballwar` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `score` int(11) NOT NULL, `data` varchar(255) NOT NULL, `hora` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ALTER TABLE `players` ADD `sbw_points` int(11); PARA SQLITESTUDIO CREATE TABLE snowballwar ( id INTEGER (11) NOT NULL, name VARCHAR (255) NOT NULL, score INTEGER (11) NOT NULL, data VARCHAR (255) NOT NULL, hora VARCHAR (255) NOT NULL, PRIMARY KEY ( id ) ); ALTER TABLE `players` ADD `sbw_points` int(11); Pois deu esse erro no distro no final do evento (anexo) function onTime() function isInWallArray(pos) for k = 0, table.getn(SBW_WALLSID) do if (getTileItemById(pos, SBW_WALLSID[k]).itemid == SBW_WALLSID[k]) then return true end end return false end function endsnowball() local score = {} if not SBW_USEWAIT then doRemoveItem(getTileItemById(SBW_TP, 1387).uid) end for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, SBW_INEVENT) > 0 then table.insert(score, {getCreatureName(pid), getPlayerStorageValue(pid, SBW_SCORE)}) doPlayerSetStorageValue(pid, SBW_INEVENT, 0) doPlayerSetStorageValue(pid, SBW_SCORE, 0) doPlayerSetStorageValue(pid, SBW_AMMO, 0) doTeleportThing(pid, SBW_TPEND) end end table.sort(score, function(a, b) return a[2] > b[2] end) --local random_item = SBW_REWARDS[math.random(1, #SBW_REWARDS)] local hora = os.date("%X") local data = os.date("%x") if table.getn(score) > 0 then if SBW_ADDREWARD then for _, pid in ipairs(getPlayersOnline()) do if getCreatureName(pid) == score[1][1] then for op,ad in pairs(SBW_REWARDS) do doPlayerAddItem(pid, ad[1], ad[2]) end break end end end db.query("INSERT INTO `snowballwar` VALUES ('', ".. db.escapeString(score[1][1]) .. ",".. score[1][2] ..", ".. db.escapeString(data) ..", ".. db.escapeString(hora) ..");") db.query("UPDATE `players` SET `sbw_points`=`sbw_points`+".. score[1][2] .." WHERE `name` = " .. db.escapeString(score[1][1]) .. ";") doBroadcastMessage("[SNOWBALL EVENT] encerrou-se, parabens ao jogador "..score[1][1].." que venceu o SnowBall Event com "..score[1][2].." pontos.") end return true end local t_l = SBW_AREA[1] local b_r = SBW_AREA[2] function moveToEvent() for _, pid in ipairs(getPlayersOnline()) do if isInRange(getCreaturePosition(pid), SBW_WAITROOM[1], SBW_WAITROOM[2]) then local posti = {} local isPossibleToTeleportPlayer = false while (isPossibleToTeleportPlayer == FALSE) do doTeleportThing(pid, {x=math.random(t_l.x,b_r.x), y=math.random(t_l.y, b_r.y), z=math.random(t_l.z, b_r.z)}) if (isInWallArray(posti) == FALSE) then isPossibleToTeleportPlayer = TRUE end end doTeleportThing(pid, posti) doPlayerSetStorageValue(pid, SBW_INEVENT, 1) doPlayerSetStorageValue(pid, SBW_AMMO, SBW_MINAMMO) doPlayerSetStorageValue(pid, SBW_SCORE, 0) doPlayerSendTextMessage(pid, 27, "[SNOWBALL WAR] Seja bem vindo, aqui estao os comandos que voce vai usar durante o evento\n!snowball atirar --Atirar uma bola de neve.\n!snowball info --Isso mostra seus pontos de jogos e a quantia de bolas de neve que voce tem. Tambem mostra o ranking de pontos do evento.\n Recarregue suas bolas de neve clicando em frente ao gerador no centro do campo.\nAltamente recomendado adicionar estes comandos a sua hotkeys.") end end doRemoveItem(getTileItemById(SBW_TP, 1387).uid) addEvent(endsnowball, SBW_DURATION*1000*60) doBroadcastMessage(SBW_MSGSTART) end local time = os.date("*t") local timeopen1 = math.ceil(SBW_TIMEWAIT / 4) local timeopen2 = math.ceil(SBW_TIMEWAIT / 2) if (SBW_STARTAUTO) and (isInArray(SBW_DAYS,time.wday)) then doBroadcastMessage(SBW_MSGWARNING) if SBW_USEWAIT then addEvent(doBroadcastMessage, timeopen1*1000*60, "[SNOWBALL WAR] - Resta(m) ".. timeopen2 .." minuto(s) para iniciar o evento!") if (timeopen2 ~= timeopen1) then addEvent(doBroadcastMessage, timeopen2*1000*60, "[SNOWBALL WAR] - Resta(m) ".. timeopen1 .." minuto(s) para iniciar o evento!") end addEvent(moveToEvent, SBW_TIMEWAIT*1000*60) local tp = doCreateItem(1387, SBW_TPGO, SBW_TP) doItemSetAttribute(tp, "aid", 2880) else if SBW_TFS == "0.4" then doSetItemActionId(doCreateItem(tp, SBW_TP), 2880) else doSetItemActionId(doCreateItem(tp, SBW_TP), 2880) end if(SBW_DURATION > 0) then addEvent(endsnowball, SBW_DURATION*1000*60) end end end return true end
-
(Resolvido)Script Inteligente de Invasão para Evento
O que script precisa fazer? Avisar com antecedência, 5 minutos antes da invasão que ocorrera o mesmo. [BOSS EVENT XP] - O evento de invasão começa em 5 minutos, se direcione para sala de Eventos. Nesse tempo, aparece um teleport no local X (Sala de Eventos), com uma destinação X, e exibe uma mensagem. [BOSS EVENT XP] - O Teleport permanecera aberto até o Boss aparecer, depois, ele ira desaparecer. Depois desses 5 minutos da primeira mensagem, o boss nasce, fecha o teleport. Depois do Boss morrer, aparece um teleport com time de 30 segs que redireciona para outro local, onde vai ter a sala de recompensa (vou usar outro script). Aqueles que não entrarem no teleport, automaticamente tomam kick pro templo, e o evento acaba. O Script precisa ser configuravel, digo, assim: days = { ["Monday"] = { ["18:31"] = {nome = "Uchiha Madara", pos = {fromPosition = {x=1022, y=1039, z=7}
-
[CTF] Capture The Flag 2.0(Automático)
Script Perfeito, rep +. Aos cabeças de mandioca que não sabe o que é townid, façam o seguinte. DESENHAM O MAPA APÓS COLOCAR OS CODIGOS. NO MAPA, PRECISA TER 3 PONTOS: 1 PONTO É A SALA DE ESPERA, ONDE VOCE VAI CONFIGURAR NA LIB PARA IREM TODOS DE UMA VEZ, E AGUARDAR O TIME DE COMEÇAR O EVENTO. AGORA VOCÊ VAI NA MERDA NO RME, ABRE O MAPA, APERTA CTRL T, E CRIA 2 TOWNID, NESSAS TOWNID, VOCE VAI POR A POSIÇÃO DO TEMPLO VERMELHO E DO TEMPLO VERDE QUE IRAM CRIAR. 1 POSIÇÃO POR TOWN. DEPOIS E SO IR NA LIB, POR AS POSIÇÕES CRIADA NO TIME RESPECTIVO, E O SEU TOWNID RESPECTIVO
-
DUCA: o melhor evento para otserv (8.60)
Entendi a questão do horário, só que ainda não funciona a destinação. Por exemplo, removi o actionid no chão, porque assim que começa o evento, o proprio script faz um teleport com a actionid nele, e envia os players paras posições configuradas. POREM, é isso que não ocorre, nasce o teleport, e eu entro em cima dele, e não envia para as posições. [1] = {color = "Black", temple = {x = 2248, y = 1251, z = 7}}, [2] = {color = "White", temple = {x = 2206, y = 1192, z = 7}},
- SNOWBAL EVENT TIBIA
-
DUCA: o melhor evento para otserv (8.60)
1 Problema e 1 Dúvida. 1 Problema - Quando nasce o teleport na localização que eu determinei, ele esta nascendo sem destino, digo... não envia o player para o templo "Black" ou "White. Eu achei que era porque eu não coloquei o ActionID 48000 no chão, então o mesmo eu fiz, só que, ainda sim, não funcionou, e não permitiu minha entrada no TP e exibiu essa mensagem: 11:49 The tile seems to be protected against unwanted intruders. 1 Dúvida - Como coloco no Global Events para ocorrer o evento todos os dias em 1 determinado horário? <globalevent name="Duca" time="19:00:00" script="DUCA_globalevents.lua" /> Agora a LIB. -- DUCA EVENTO by luanluciano93 DUCA = { EVENT_MINUTES = 2, TELEPORT_POSITION = {x = 1102, y = 987, z = 7}, STORAGE_TEAM = 27000, TOTAL_PONTOS = 27001, TOTAL_PLAYERS = 27003, -- global storage LEVEL_MIN = 500, REWARD_FIRST = {11773, 1}, REWARD_SECOND = {9971, 15}, TEAMS = { [1] = {color = "Black", temple = {x = 2248, y = 1251, z = 7}}, [2] = {color = "White", temple = {x = 2206, y = 1192, z = 7}}, [3] = {color = "Red"}, [4] = {color = "Green"}, }, } local conditioBlack = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditioBlack, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditioBlack, {lookType = 128, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114}) local conditioWhite = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditioWhite, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditioWhite, {lookType = 128, lookHead = 19, lookBody = 19, lookLegs = 19, lookFeet = 19}) local conditioRed = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditioRed, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditioRed, {lookType = 134, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94}) local conditioGreen = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditioGreen, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditioGreen, {lookType = 134, lookHead = 101, lookBody = 101, lookLegs = 101, lookFeet = 101}) -- function DUCA.teleportCheck() DUCA.teleportCheck = function() local item = getTileItemById(DUCA.TELEPORT_POSITION, 1387).uid if item > 0 then doRemoveItem(item) DUCA.finishEvent() print(">>> Duca Event was finished. <<<") else doBroadcastMessage("Duca Event was started and will close in ".. DUCA.EVENT_MINUTES .." minutes.") print(">>> Duca Event was started. <<<") local teleport = doCreateItem(1387, 1, DUCA.TELEPORT_POSITION) doItemSetAttribute(teleport, "aid", 48000) setGlobalStorageValue(DUCA.TOTAL_PLAYERS, 0) addEvent(DUCA.teleportCheck, DUCA.EVENT_MINUTES * 60 * 1000) end end -- function DUCA.addPlayerinTeam(cid, team) DUCA.addPlayerinTeam = function(cid, team) doRemoveCondition(cid, CONDITION_OUTFIT) doRemoveCondition(cid, CONDITION_INVISIBLE) if team == 1 then doAddCondition(cid, conditioBlack) elseif team == 2 then doAddCondition(cid, conditioWhite) elseif team == 3 then doAddCondition(cid, conditioRed) elseif team == 4 then doAddCondition(cid, conditioGreen) end setPlayerStorageValue(cid, DUCA.STORAGE_TEAM, team) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You will join the " .. DUCA.TEAMS[team].color .. " Team.") doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) end -- function DUCA.balanceTeam() DUCA.balanceTeam = function() local time1, time2 = 0, 0 for _, cid in pairs(getPlayersOnline()) do if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == 1 then time1 = time1 + 1 elseif getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == 2 then time2 = time2 + 1 end end return (time1 <= time2) and 1 or 2 end -- function DUCA.removePlayer(cid) DUCA.removePlayer = function(cid) doRemoveCondition(cid, CONDITION_OUTFIT) --doRemoveCondition(cid, CONDITION_HUNTING) --doRemoveCondition(cid, CONDITION_INFIGHT) --doRemoveCondition(cid, CONDITIONID_COMBAT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are dead in Duca Event and your Duca points is set to 0!") doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) setPlayerStorageValue(cid, DUCA.STORAGE_TEAM, 0) setPlayerStorageValue(cid, DUCA.TOTAL_PONTOS, 0) unregisterCreatureEvent(cid, "Duca-Death") unregisterCreatureEvent(cid, "Duca-Combat") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) setGlobalStorageValue(DUCA.TOTAL_PLAYERS, getGlobalStorageValue(DUCA.TOTAL_PLAYERS) - 1) end -- function DUCA.updateRank() DUCA.updateRank = function() local participantes = {} for _, uid in pairs(getPlayersOnline()) do if getPlayerStorageValue(uid, DUCA.STORAGE_TEAM) > 0 then table.insert(participantes, uid) end end table.sort(participantes, function(a, b) return getPlayerStorageValue(a, DUCA.TOTAL_PONTOS) > getPlayerStorageValue(b, DUCA.TOTAL_PONTOS) end) for x = 1, #participantes do if getPlayerStorageValue(participantes[x], DUCA.STORAGE_TEAM) >= 3 then DUCA.addPlayerinTeam(participantes[x], DUCA.balanceTeam()) end end if (#participantes >= 1) then DUCA.addPlayerinTeam(participantes[1], 4) end if (#participantes >= 11) then for i = 2, 11 do DUCA.addPlayerinTeam(participantes[i], 3) end end end -- function DUCA.finishEvent() DUCA.finishEvent = function() DUCA.updateRank() for _, uid in pairs(getPlayersOnline()) do if getPlayerStorageValue(uid, DUCA.STORAGE_TEAM) == 4 then local winner = getCreatureName(uid) doBroadcastMessage("Congratulation ".. winner .."!! Duca Event is finish. ".. winner .." win reward.") doPlayerAddItem(uid, DUCA.REWARD_FIRST[1], DUCA.REWARD_FIRST[2]) elseif getPlayerStorageValue(uid, DUCA.STORAGE_TEAM) == 3 then doPlayerAddItem(uid, DUCA.REWARD_SECOND[1], DUCA.REWARD_SECOND[2]) end if getPlayerStorageValue(uid, DUCA.STORAGE_TEAM) > 0 then DUCA.removePlayer(uid) end end end
- Sistema: Cassino Slots.
-
(Resolvido)Incrementar função ao script e 2 pedido
Consegui com esse Movements, e a Action esta perfeita, agr: function onStepIn(cid) if isPlayer(cid) then setPlayerStorageValue(cid, 98543, -1) doSendAnimatedText(getPlayerPosition(cid), "Boa Sorte!", TEXTCOLOR_YELLOW) end return true end E esse outro script para porta, tem como?
-
(Resolvido)Npc Points Event e Item Points
@Dwarfer Funcionou, mas você poderia dar uma olhada? Eu esqueci de citar uma função, então incrementei uma linha que mostra uma mensagem exibindo a quantidade de pontos que ganha, porém só mostra que ganhou "5 pontos", sendo que não tem essa quantidade kkkkk local points = {15, 30, 50, 75, 100} function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 92431) == -1 then setPlayerStorageValue(cid, 92431, 0) end doPlayerAddEventPoints(cid, points[math.random(1, #points)]) doCreatureSay(cid, "Parabéns! Você recebeu ".. #points .." Event Points!", TALKTYPE_ORANGE_1) doRemoveItem(item.uid) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_STUN) return true end function doPlayerAddEventPoints(cid, amount) local current = getPlayerStorageValue(cid, 92431) setPlayerStorageValue(cid, 92431, current + amount) return true end
-
(Resolvido)Incrementar função ao script e 2 pedido
Onde eu configuro essa action para ir para determinada posição?
-
(Resolvido)Npc Points Event e Item Points
Um npc que venda itens determinados a partir de X quantidade de um sistema de points eventos. Um action que possa ser usado em um item para ganhar points, pontos de eventos, e que a quantidade seja aleatória, Podendo ganhar entre. (o item some com um efeito no char) 15, 30, 50, 75 e 100 pontos. (Eu não tenho um sistema de pontos de eventos, então se puder fazer uma coisa básica), até porque esse item só sera dado aos vencedores dos eventos
-
(Resolvido)Respawn de Item?
A dúvida é a seguinte, tenho um quadrado, com varios sqms dentro, e em cima desses sqm tem um item, certo? É possivel fazer um script de respawn, para todos os sqms dentro desse quadrado, e cada sqm nasce um item? Ou preciso fazer um processo manual (um script que tenho que colocar a posição de onde nascera cada item)?
-
(Resolvido)Incrementar função ao script e 2 pedido
Tendo esse seguinte script abaixo, se possível incrementar, mais uma coluna "de charges" para que eu use aols, etc... e ao usar essa mesma action, teleportar para X posição, e quando chegar nessa X posição, sai um effect e ganha uma storage. --[numeração] = {id = ID DO ITEM, count = QUANTIDADE DO ITEM, c = CHANCE, char = charges} local items = { --[numeração] = {id = ID DO ITEM, count = QUANTIDADE DO ITEM, c = CHANCE} [1]={id=8884, count=1, c=10}, -- item 1 [2]={id=8890, count=1, c=10}, -- item 2 [3]={id=8888, count=1, c=10}, -- item 3 [4]={id=8905, count=1, c=10}, -- item 4 [5]={id=10511, count=1, c=10}, -- item 5 [6]={id=10515, count=1, c=10}, -- item 6 [7]={id=10514, count=1, c=10}, -- item 7 [8]={id=10139, count=1, c=10}, -- item 8 [9]={id=10719, count=1, c=10}, -- item 9 [10]={id=12608, count=75, c=10}, -- item 9 } function getRandomItem(t) local i = math.random(1, #t) i = t[i] if math.random(1, 100) <= i.c then return i end return getRandomItem(t) end function onUse(cid, item, fromPosition, itemEx, toPosition) local i = getRandomItem(items) doPlayerAddItem(cid, i.id, i.count) doSendAnimatedText(getPlayerPosition(cid), "Magic Box!", TEXTCOLOR_YELLOW) doPlayerSendTextMessage(cid, 27, "You opened a chest event and won "..i.count.."x "..getItemNameById(i.id)..(i.count > 1 and "s" or "")..".") doRemoveItem(item.uid, 1) return true end Pedido de 2 scripts: 1 - Uma action Ao clicar na porta, (contendo um actionid), você é teleportado para uma posição X, e terá 15 segundos para fazer uma ação, após esse tempo, é teleportado para outra posição, mas, se tiver uma X storage temporária, ele não é teleportado. 2 - Movements que remove uma storage.
-
Script Médio de Evento
Olá, peço a ajuda de vocês para desenvolver um evento, preciso de um script com base nessa seguinte conformidade: O evento é assim, vai ser programado em dias e horas para ocorrer. Chegando no horário/dia certo, o teleport aparece no local especifico, e começa exibir mensagens avisando que fecharam em X minutos, essa mensagem aparecera até acabar o tempo, e o teleport de entrada sumir. Exemplo: 15:31 Zombie event starting in 5 minutes! The teleport will be closed when the event start! 15:32 Zombie event starting in 4 minutes! The teleport will be closed when the event start! 15:33 Zombie event starting in 3 minutes! The teleport will be closed when the event start! 15:34 Zombie event starting in 2 minutes! The teleport will be closed when the event start! 15:35 Zombie event starting in 1 minutes! The teleport will be closed when the event start! concomitantemente , fara isso: - Até o último player entrar no evento, ficam mandando broadcast dizendo quanto players faltam para dar inicio ao jogo. - Se o evento abrir e não atingir a meta de players colocada, o evento é finalizado e os players voltam para o templo. - Estando a quantidade minima no evento, desaparecera 2 items em determinadas posições (como descrito na variavel em 30 segundos para começar o evento). Feito tudo isso, após as barreiras desaparecer, todos os participantes recebem uma mensagem no defaultdizendo que terão 900000 milisegundos que equivalem a 15 mins para terminar o evento, e no fim desse tempo vão para o templo, e recebem a premiação "rewards" descrita no exemplo \/, e as barreiras removidas no PASSO acima, voltam novamente. E por fim, uma simples mensagem broadcast para todos do server dizendo "Parabéns aos jogadores por participarem do evento". E uma mensagem individual, "Parabéns, você ganhou tal item (rewards) por participar do evento". (proibir a passagem de mcs) Evento_Config = { storages = {XXXX, XXXX}, -- storage Count players = {min = 30, max = 50}, -- min, max players no evento minLevel = 500, -- level minimo para entrar no event rewards = {{10503,1},{9971,15}}, -- premios que todos os participantes receberam ao terminar o evento timeToStartEvent = 30, -- segundos para começar o evento CheckTime = 5, -- tempo para sumir o teleporte e não permite mais entradas de players no evento teleport = {{x=1110, y=977, z=7}, {x=1632, y=1454, z=7}}, -- posição do teleport, posição para onde o jogador vai barreiras1 = ["id"] {{x=1110, y=977, z=7}, {x=1632, y=1454, z=7}}, -- id e posição da primeira barreira barreiras2 = ["id"] {{x=1110, y=977, z=7}, {x=1632, y=1454, z=7}}, -- id e posição da segunda barreira } Evento_Days = { ["Monday"] = {"09:00","11:00","13:00","15:00","17:00","19:00","21:00","23:00","01:00"}, ["Tuesday"] = {"09:00","11:00","13:00","15:00","17:00","19:00","21:00","23:00","01:00"}, ["Wednesday"] = {"09:00","11:00","13:00","15:00","17:00","19:00","21:00","23:00","01:00"}, ["Thursday"] = {"09:00","11:00","13:00","15:00","17:00","19:00","21:00","23:00","01:00"}, ["Friday"] = {"09:00","11:00","13:00","15:00","17:00","19:00","21:00","23:00","01:00"}, ["Saturday"] = {"09:15","09:00","11:00","13:00","15:00","17:00","19:00","21:00","23:00","01:00"}, ["Sunday"] = {"09:00","11:00","13:00","15:00","17:00","19:00","21:00","23:00","01:00"} }
-
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
Aqui no meu, funcionou em partes, com alguns erros: 1 - Como fazer nascer mais Zombies? Pois nasceu no máximo 5. De 7 a 10 seria ótimo. 10:47 A zombie has spawned! There is currently 1 zombies in the zombie event! 10:47 A zombie has spawned! There is currently 2 zombies in the zombie event! 3 - Como remover essa premiação de trophy do script? rewards = {items ={{10503,1},{9971,15}}, trophy = 6573}, <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Perfect Zombie System" version="8.6" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="zombie_config"><![CDATA[ zombie_config = { storages = {172100, 172101, 172102}, -- n edite players = {min = 2, max = 30}, -- min, max players no evento rewards = {items ={{10503,1},{9971,15}}, trophy = 6573}, timeToStartEvent = 30, -- segundos para começar o evento CheckTime = 2, -- tempo que o TP fica aberto para os jogadores adrentarem o evento teleport = {{x=1114, y=979, z=7}, {x=1839 , y=1188, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp arena = {{x=1825,y=1130,z=7},{x=1872,y=1192,z=7}}, -- area positions monster_name = "Zombie Event", timeBetweenSpawns = 30, min_Level = 500 } zombie_days = { ["Monday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"}, ["Tuesday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"}, ["Wednesday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"}, ["Thursday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"}, ["Friday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"}, ["Saturday"] = {"10:45","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"}, ["Sunday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"} } function removeZombieTp() local t = getTileItemById(zombie_config.teleport[1], 1387).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(zombie_config.teleport[1], CONST_ME_POFF) end function ZerarStoragesZombie() for _, stor in pairs(zombie_config.storages) do setGlobalStorageValue(stor, 0) end end function getPlayersInZombieEvent() local t = {} for _, pid in pairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), zombie_config.arena[1], zombie_config.arena[2]) and getPlayerAccess(pid) < 3 then t[#t+1] = pid end end return t end function getZombieRewards(cid, items) local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID for _, i_i in ipairs(items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(backpack, item, amount) else for i = 1, amount do doAddContainerItem(backpack, item, 1) end end end end function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function HaveCreatureZombie(area, remove) for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do local pos = {x=x, y=y, z=area[1].z} local m = getTopCreature(pos).uid if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end end end end function spawnZombie() if #getPlayersInZombieEvent() > 1 then local pos = {x=math.random(zombie_config.arena[1].x, zombie_config.arena[2].x), y=math.random(zombie_config.arena[1].y,zombie_config.arena[2].y), z=zombie_config.arena[1].z} if not isWalkable(pos, false, false, false) then spawnZombie() else doSummonCreature(zombie_config.monster_name, pos) doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, CONST_ANI_FIRE) addEvent(doSendMagicEffect, 150, pos, CONST_ME_HITBYFIRE) addEvent(doSendMagicEffect, 150, pos, CONST_ME_FIREAREA) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(zombie_config.storages[2], getGlobalStorageValue(zombie_config.storages[2]) <= 0 and 1 or getGlobalStorageValue(zombie_config.storages[2])+1) doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(zombie_config.storages[2]) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, zombie_config.timeBetweenSpawns *1000) end end end function CheckZombieEvent(delay) if getGlobalStorageValue(zombie_config.storages[1]) ~= (zombie_config.players.max+1) then if delay > 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.max then doBroadcastMessage("Zombie event starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.min then for _, cid in pairs(getPlayersInZombieEvent()) do doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end removeZombieTp() doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. zombie_config.players.min .. " players is needed!", MESSAGE_STATUS_WARNING) ZerarStoragesZombie() elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) >= zombie_config.players.min then removeZombieTp() doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1]) .. " players]! The event will soon start.") for _, var in pairs(getPlayersInZombieEvent()) do doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!") end addEvent(spawnZombie, zombie_config.timeToStartEvent*1000) end addEvent(CheckZombieEvent, 60000, delay-1) end end]]></config> <event type="statschange" name="ZombieStats" event="script"><![CDATA[ domodlib('zombie_config') if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then if #getPlayersInZombieEvent() > 1 then doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED) local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(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) if #getPlayersInZombieEvent() == 1 then local winner = getPlayersInZombieEvent()[1] doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!') local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.") getZombieRewards(winner, zombie_config.rewards.items) doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false) doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT) doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!") HaveCreatureZombie(zombie_config.arena, true) ZerarStoragesZombie() end else doBroadcastMessage("No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE) HaveCreatureZombie(zombie_config.arena, true) ZerarStoragesZombie() end return false end end return true]]></event> <globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[ domodlib('zombie_config') function onThink(interval, lastExecution) if zombie_days[os.date("%A")] then local hrs = tostring(os.date("%X")):sub(1, 5) if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then local tp = doCreateItem(1387, 1, zombie_config.teleport[1]) doItemSetAttribute(tp, "aid", 45110) CheckZombieEvent(zombie_config.CheckTime) setGlobalStorageValue(zombie_config.storages[1], 0) setGlobalStorageValue(zombie_config.storages[2], 0) HaveCreatureZombie(zombie_config.arena, true) end end return true end]]></globalevent> <event type="login" name="Zombie_Login" event="script"><![CDATA[ domodlib('zombie_config') function onLogin(cid) registerCreatureEvent(cid, "ZombieBattle") registerCreatureEvent(cid, "ZombieStats") if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true end]]></event> <event type="combat" name="ZombieBattle" event="script"><![CDATA[ domodlib('zombie_config') if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then doPlayerSendCancel(cid, "You may not attack this player.") return false end return true ]]></event> <movevent type="StepIn" actionid ="45110" event="script"><![CDATA[ domodlib('zombie_config') function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, zombie_config.teleport[2]) end if getPlayerLevel(cid) < zombie_config.min_Level then doTeleportThing(cid, fromPosition, true) doPlayerSendCancel(cid, "You need to be at least level " .. zombie_config.min_Level .. ".") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end if getGlobalStorageValue(zombie_config.storages[1]) <= zombie_config.players.max then doTeleportThing(cid, zombie_config.teleport[2]) setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1) doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(zombie_config.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED) if getGlobalStorageValue(zombie_config.storages[1]) == zombie_config.players.max then setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1) removeZombieTp() doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1])-1 .. " players]! The event will soon start.") for _, var in pairs(getPlayersInZombieEvent()) do doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!") end addEvent(spawnZombie, zombie_config.timeToStartEvent*1000) end end return true end]]></movevent> <talkaction words="/zombiestart;!zombiestart" access="5" event="buffer"><![CDATA[ domodlib('zombie_config') if getGlobalStorageValue(zombie_config.storages[3]) > 0 then doPlayerSendCancel(cid, "The event is already starting.") return true elseif not param or not tonumber(param) then doPlayerSendCancel(cid, "Use only numbers.") return true end local param = tonumber(param) <= 0 and 1 or tonumber(param) local tp = doCreateItem(1387, 1, zombie_config.teleport[1]) doItemSetAttribute(tp, "aid", 45110) CheckZombieEvent(tonumber(param)) ZerarStoragesZombie() setGlobalStorageValue(zombie_config.storages[3], 1) HaveCreatureZombie(zombie_config.arena, true) ]]></talkaction> <globalevent name="ZombieDebug-Start" type="start" event="buffer"><![CDATA[ domodlib('zombie_config') ZerarStoragesZombie() return true]]></globalevent> </mod>
-
[MODS] [8.6] Fire Storm Event - Automático
òtimo script, funcionou certinho aqui, teve alguns bugs, mais foram erros meus, consertei.
-
OLD TK
E a Anne Mota, era homem ou mulher? IUSHuHSuAISsssui
- [Floresta Encantada] New Event - Exclusivo
-
[Demo] Auction Npc
?
- [Sistema] Battlefield Event! V.1
-
(Resolvido)Npc de Task Points e 1 movements
Obrigado, funcional
-
(Resolvido)Npc de Task Points e 1 movements
Primeiramente, um script de movements, que funciona-se com um item que seria equipado no slot de ring, a finalidade seria, a cada 10 hits, a vitima teria a possibilita dele anular 1 hit, e converter em dano ao oponente, só funcionaria com o ring equipado é claro. E um npc, que entendesse os task points desse script abaixo (task do vodkart), e vendesse alguns itens em troca de X quantidade de pontos.