Líderes
-
-
-
xWhiteWolf
HéroiPontos3605Total de itens -
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 02/17/17 em todas áreas
-
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
Admin Ghonim e 3 outros reagiu a Vodkart por uma resposta no tópico
4 pontosQual dúvida ou erro poste no tópico que estarei respondendo. Obs: Antes que me falem besteiras, coloquei para os GM'S, CM'S E GOD'S não contarem no evento, então testem apenas com jogadores. Zombie.xml <?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 ={{2160,10},{2494,1}}, trophy = 5805}, timeToStartEvent = 30, -- segundos para começar o evento CheckTime = 5, -- tempo que o TP fica aberto para os jogadores adrentarem o evento teleport = {{x=147, y=55, z=7}, {x=125 , y=304, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp arena = {{x=110,y=297,z=7},{x=145,y=321,z=7}}, -- area positions monster_name = "Zombie Event", timeBetweenSpawns = 20, min_Level = 20 } zombie_days = { ["Monday"] = {"13:00","18:00","20:00","22:00"}, ["Tuesday"] = {"13:00","18:00","22:50","22:00"}, ["Wednesday"] = {"21:57","18:00","20:00","23:17"}, ["Thursday"] = {"13:00","18:00","20:00","22:00"}, ["Friday"] = {"13:00","18:00","21:45","22:00"}, ["Saturday"] = {"13:00","18:00","20:00","22:00"}, ["Sunday"] = {"13:00","18:00","20:00","22:00"} } 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> OBS: Quem serve em milesegundos, mude essa parte: <globalevent name="Zombie_Start" interval="60" event="script"><![CDATA[ para <globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[ ----------------------------------------------------- // -------------------------------------------------- o monstro você instala em data/monsters zombie event.xml <?xml version="1.0" encoding="UTF-8"?> <monster name="Zombie Event" nameDescription="an zombie event" race="undead" experience="280" speed="100" manacost="0"> <health now="500" max="500"/> <look type="311" corpse="9875"/> <targetchange interval="5000" chance="50"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="0"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" min="-35000" max="-35000"/> </attacks> <defenses armor="15" defense="10"/> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="You wont last long!"/> <voice sentence="Mmmmh.. braains!"/> </voices> <loot> <item id="2148" countmax="1" chance="100000"/><!-- gold coin --> </loot> </monster> e a tag em monsters.xml <monster name="Zombie Event" file="zombie event.xml"/> Configuração Sistema zombie_config = { storages = {172100, 172101}, -- não edite players = {min = 2, max = 30}, -- número minimo e máximo para jogadores no evento rewards = {items ={{2160,10},{2494,1}}, trophy = 5805}, -- premiações do jogador timeToStartEvent = 30, -- segundos para começar o evento após dar start CheckTime = 5, -- tempo que o TP fica aberto para os jogadores adrentarem o evento teleport = {{x=145, y=50, z=7}, {x=176 , y=54, z=5}}, -- posiçãodo tp onde aparece, posição para onde o jogador vai ao entrar no tp arena = {{x=173,y=52,z=5},{x=179,y=56,z=6}}, -- posição começo e final da area do evento monster_name = "Zombie Event", -- nome do monstro que será sumonado timeBetweenSpawns = 20, -- a cada quantos segundos é dado o respaw time do zombie no evento min_Level = 20 -- level minimo para participar do evento } Dia e Horário zombie_days = { ["Monday"] = {"13:00","18:00","20:00","22:00"}, ["Tuesday"] = {"13:00","18:00","20:00","22:00"}, ["Wednesday"] = {"13:00","18:00","20:00","22:00"}, ["Thursday"] = {"13:00","18:00","20:00","22:00"}, ["Friday"] = {"13:00","18:00","20:00","22:00"}, ["Saturday"] = {"13:00","18:00","20:00","22:00"}, ["Sunday"] = {"13:00","18:00","20:00","22:00"} } ["Dia em inglês"] = {"horário do evento"} Configurando a área: zombie lua.rar4 pontos -
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
Yago Blind. e 2 outros reagiu a Vodkart por uma resposta no tópico
3 pontospronto3 pontos -
[8;6] Premium Paper [Talk] + [Action]
[8;6] Premium Paper [Talk] + [Action]
ernaix69 e um outro reagiu a Vodkart por uma resposta no tópico
2 pontosFiz o código a pedidos do membro @Micheel15, onde o sistema funciona da seguinte maneira: você usa o comando !sellpoints quantidade quando usar esse comando, os seus pontos do site são passados para um paper, com esse paper você pode trocar ou vender no servidor. BENEFICIOS : Vender ou transferir pontos. IMAGEM A BAIXO : Ai quando você der use, os pontos são passados para sua conta. lib adicione function getPremiumPoints(cid) local query = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = "..getPlayerAccountId(cid)) return query:getDataInt("premium_points") <= 0 and 0 or query:getDataInt("premium_points") end function setPremiumPoints(cid, amount) return db.executeQuery("UPDATE `accounts` SET `premium_points` = "..amount.." WHERE `id` = "..getPlayerAccountId(cid)) end talk sell_points.lua function onSay(cid, words, param) local var,points = "[Sell Point System] Este documento vale %s points para você usar no site.",getPremiumPoints(cid) local min,max = 5, 100 if param == "" or not tonumber(param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, use somente numeros.") return true elseif tonumber(param) < min or tonumber(param) > max then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, Minimo "..min.." e Maximo "..max.." points.") return true elseif points < tonumber(param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, mas você só possui "..points.." Premium Points.") return true end local item = doPlayerAddItem(cid, 7702,1) doItemSetAttribute(item, "description", var:format(tonumber(param))) setPremiumPoints(cid, points-tonumber(param)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Sell Point System] Você recebeu um paper com "..param.." Premium Points.") return true end tag <talkaction words="!sellpoints;/sellpoints" event="script" value="sell_points.lua"/> actions paper_points.lua function onUse(cid, item, frompos, item2, topos) local var = getItemAttribute(item.uid, "description") if var == nil then return true end local x = var:match("%b[]") if x == "[Sell Point System]" then local ret = var:match("%d+") doPlayerSendTextMessage(cid, 22,"você recebeu "..ret.." Premium Points.") setPremiumPoints(cid, getPremiumPoints(cid)+ret) doRemoveItem(item.uid) end return true end tag <action itemid="7702" script="paper_points.lua"/>2 pontos -
[Sistema] Battlefield Event! V.1
1 pontoMapa BattleField Feito Por AnneMotta : Mapa Battlefield.rar Scan: https://www.virustot...sis/1346548669/ Imagens do mapa Descrição: - O evento é automático e acontece em determinado dia e hora da semana - Logo após é aberto um teleport então apenar um número limitado de players entra no evento - São formados por dois times, os "Black Assassins" e os "Red Barbarians" - Os times são balanceados automaticamente, quando o último jogador entra, esse teleport é fechado e depois de 5 minutos o evento começa, os 5 minutos são para os players ter tempo de planejar um ataque. - O sistema tem por finalidade matar todos do time inimigo, e os players que sobreviverem recebem um prêmio. Bônus: - Durante o evento é mostrado na tela somente dos jogadores que estão no evento um placar de times. - 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. Lembre-se: - De colocar Pvp Tool na área - De colocar área NoLogout Imagens: Instalação: Data > Lib Data > CreatureScript > Script Data > GlobalEvents > Scripts Data > Movements > Script Configurações do evento1 ponto
-
Comando "Spy" Players
1 pontoOlá pessoal do TK, venho aqui trazer um script que não fui eu quem o criou, somente coloquei-o em português (e daí?).. Achei em um fórum e no final do tópico estarei disponibilizando o nome do criador. Utilidade do Script: Bom, o script serve para você com um character com acesso de GOD (configurável) possa ver quais itens um certo player está utilizando no momento. PS: Inclusive os itens presentes dentro da backpack do Player. Como funciona: Você digita a talkaction /spy seguida do nome do player a ser "espionado". Por Exemplo: /spy Rusherzin /spy Tibia King Testado em: Versão 8.54 Imagem: Agora vamos ao script: Vá em data/talkactions/scripts/ copie e cole um arquivo .lua qualquer, renomeie para spy e cole isso dentro: E adicione essa tag no talkactions.xml: Créditos: Azi1 ponto
-
New Library v. 1.2
New Library v. 1.2
Underewar reagiu a xWhiteWolf por uma resposta no tópico
1 pontoFala galera, hoje vim trazer pra vocês uma nova biblioteca de funções que eu venho desenvolvendo, pretendo ir atualizando esse tópico constantemente sempre adicionando funções novas e explicando a utilização delas. Algumas funções que eu coloquei aqui estão presentes na OTAL também, porém algumas eu fiz pequenas correções de forma que essa lib poderia facilmente substituir a OTAL sem grandes problemas (pelo menos se você utilizava apenas as funções básicas da otal) Todas as funções que não tem -- nome do autor do lado dela foram feitas por mim, xWhiteWolf ou Night Wolf (NW). O restante delas são créditos dos devidos autores, apenas coloquei pois considero funções vitais no server de cada um. Crie um arquivo em data/lib chamado 075 - White Wolf Functions.lua e coloque o seguinte código dentro: Agora eu vou explicar oque cada função faz porque de nada adianta lançar uma lib e não explicar oque ela faz não é mesmo? hahaha Obs inicial: quando uma função tiver em seus parametros um [] significa que oque está dentro do colchetes não é um parâmetro obrigatório. Como usar: doShowTimeByPos(cid, getCreaturePosition(cid), 20, 20) Irá fazer uma contagem regressiva na posição que o player se encontra começando de 20 e mandando a mensagem na mesma cor da fala dos monstros. Essa função é bem útil em actions/spells para fazer contagem de tempo em runas como a magic wall e ver quanto tempo falta pra magic wall sumir) Obs: Espero que ajude bastante pessoas a entender sobre funções, eu utilizei cid como o principal uid das funções nos exemplos mas você pode muito bem utilizar outros uids, fica a critério seu. Qualquer dúvida comentem abaixo que eu vou tentar ajudar da melhor maneira. Ahhh, isso daí foi testado em 8.54 mas deve funcionar em quase todas as versões que tenham as funções básicas do TFS. EDIT: Pessoal, agora é sério, essa lib tem fácil umas 600 linhas, das quais umas 500 eu devo ter codado sozinho (na mão, linha por linha). Eu tive todo o trabalho de testar cada uma delas e oque eu peço é o mínimo de gratidão e respeito. Se eu te ajudei clique em Gostei, se você tiver alguma dúvida eu to me colocando a disposição de responder qualquer coisa relacionada ao tópico, mesmo que você não saiba nem oque é uma lib apenas venha aqui e escreva sua dúvida. EDIT 2: Duas novas funções adicionas, espero que gostem! EDIT 3: Três novas funções adicionadas juntamente com suas respectivas explicações.1 ponto -
[Tutorial] Arrumando o bug do status offline Gesior Tfs 1.0
Bom, eu passei por um problema quando estava testando o Gesior no meu OTServer: mesmo com o server online e portas liberadas o site continuava mostrando como offline. Eu vi que algumas pessoas sugeriram trocar no arquivo layout.php isto: if($config['status']['serverStatus_online'] == 1) por isto: if($config['status']['serverStatus_online'] >= 0) mas eu vi que estava errado, pois ele iria mostrar o server como online mesmo que não estivesse. Então eu andei olhando os códigos, mexendo nos arquivos e acabei achando o erro. No arquivo load.compat.php, dentro da pasta system, na linha #254 (pelo menos aqui) eu encontrei o seguinte código: $statusInfo = new ServerStatus($config['server']['ip'], $config['server']['statusPort'], 1); onde está escrito 'statusPort' eu percebi que no config.lua não tinha isto, pois lá estava 'statusProtocolPort'. Então basta trocar esta linha por: $statusInfo = new ServerStatus($config['server']['ip'], $config['server']['statusProtocolPort'], 1); Espero ter ajudado!1 ponto
-
Tutorial Mod OtClient
1 pontoOlá, amigos esta muito tempo parado e sem tempo para meche no meu otserv por isso esto liberando um sistema meu de tutorial client. Oque ele faz, ele abre uma janela com menus e seus texto para ajudar os player a ter uma boa jogabilidade ao o game. -versão:todas Opcodes: Nao precisa de opcodes, roda em qual quer versão otclient. 1- abra a pasta do otclient>mods>game_tutorial.zip 2- abra a pasta do otclient>mods>game_tutorial>configs.lua 2.1 em configs.lua voce vai configura todo os text que a no seu tutorial. 3- Menu texto tutorialsIndex = { "1. Exp", "2. Exp", "3. Exp" } 4- oque a no menu texto }, {name = "1.2 Exp", text = [[EXP: - EXP - HEXP - EXP - EXP Tibia King:100 ]] }, {name = "1.3 Exp", text = [[EXP: - EXP - HEXP - EXP - EXP Tibia King:100 ]] } } Se gosto mais rep.1 ponto
-
Naruto Hero V2 - 8.60
1 pontoOlá usuários do Tibia King, eu peguei esse servidor aki mesmo do TK, e editei um pouco, coloquei ele na versão 8.60, e adicionei uma coisas a mais também, esse servidor é a base do Nto Hero, que um membro postou aki esses dias atras. vocations Account Manager Vocations Vip Vocations De Quest Quests Adicionei: Cast System Hp e Mana por % Pode usar mais de 255 effect no servidor - Graças ao Kotzlety que disponibilizou os tutoriais pro TK Entrar na area de proteção sai o pz Client pode por mais sprites, falta uns 15 mil ainda para atingir o limite Player Morre e não perde itens Anti Divulgação Bixo nace com o player na tela Imagens Bom Galera é isso :D Download Server Hero + Client Scan - Não sei por que todos esses vírus, mais eu deixo o avast ativado e ele não acusa poha nenhuma Créditos1 ponto
-
Peça sua Script.!
Peça sua Script.!
robi123 reagiu a Gustavo Ntos por uma resposta no tópico
1 pontoPeça sua script nesse post, Não venha com pedidos fodas, pois essem são pagos e não é do meu nivel de scripting. Scripts Disponiveis: Tfs Versão 0.3.6 e 0.4 Caso eu te ajude de REP+1 ponto -
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
19:58 Good luck in the zombie event people! The teleport has closed! E nada acontece... Será que é algo com o mapa? algum pz ou sei la... @EDIT Estava fazendo "cagada"... Na parte da posição começo e final da area do evento! Agora está tudo certo! Obrigado Sekk REP + pela força! E obrigado ao dono do tópico Vodkart pelo belo trabalho, paciência e atenção! REP +1 ponto
-
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
Tenta mudando o max players pra 31 ponto
-
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
@tirso Deixe essa linha <globalevent name="Zombie_Start" interval="60" event="script"> assim <globalevent name="Zombie_Start" interval="60000" event="script">1 ponto
-
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
@Vodkart ah ok, jaja eu testo de volta e ja edito _____ deu certo ;))))))))))))1 ponto
-
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
Yago Blind. reagiu a Vodkart por uma resposta no tópico
1 ponto@Zzyzx NÃO ESQUECE DE INSTALAR O MONSTRO "ZOMBIE EVENT" QUE POSTEI NO TÓPICO, NÃO USE O MESMO MONSTRO QUE OS OUTROS ZOMBIE SYSTEM.1 ponto -
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
Yago Blind. reagiu a Vodkart por uma resposta no tópico
1 ponto@Zzyzx me passa seu mods pelo http://pastebin.com/index.php deixa eu ver como ficou sua configuração. Outra coisa, você não instalou o monstro que eu coloquei no tópico, está acusando que ele não pode ser summonado.1 ponto -
[8;6] Premium Paper [Talk] + [Action]
Muito bom, 100% aqui no 8.541 ponto
-
ajuda por um Script Raro
ajuda por um Script Raro
Thiago Clayton reagiu a Biinhow por uma resposta no tópico
1 pontoEm weapons.xml adicione essa tag: Em weapons/scripts crie um arquivo .lua e adicione isso dentro: Em items.xml procure pelo id do item e adicione isso embaixo de "weight"1 ponto -
GesiorACC 2019 8.60 UPDATE 29/06/2019
GesiorACC 2019 8.60 UPDATE 29/06/2019
Altair Junior reagiu a Natanael Beckman por uma resposta no tópico
1 pontoVocê pode editar pela database na tabela z_shop_offer.1 ponto -
ajuda por um Script Raro
ajuda por um Script Raro
Thiago Clayton reagiu a Saymon Kopolsky por uma resposta no tópico
1 pontoAcho que vai ter que criar um .lua e dps colocar no weapons.xml, assim como funciona com os itens distance, tipo viper star, poison arrow..1 ponto -
(Resolvido)Sistema de loot por baús / chest loot system
(Resolvido)Sistema de loot por baús / chest loot system
Saymon Kopolsky reagiu a Vodkart por uma resposta no tópico
1 pontolocal chest_areas = { [8001] = {name = 'Hunt Spider', time = 60, monster = {'Demon', 100}, storage = 178740, container = 1988, items = {{100,2160,1},{50,2173,1},{5,2494,1},{30,2466,1},{80,2495,1},{100,2148,15}}}, [8002] = {name = 'Hunt Spider', time = 60, monster = {'Demon', 100},storage = 178741, container = 1988, items = {{100,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1}}}, [8003] = {name = 'Hunt Dragon', time = 60, monster = {'Demon', 100},storage = 178742, container = 1988, items = {{100,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1}}} } function onUse(cid, item, frompos, item2, topos) local v = chest_areas[item.actionid] if not v then return true end if getPlayerStorageValue(cid, v.storage) >= os.time() then doPlayerSendTextMessage(cid,22,'você só pode pegar outro premio em '..os.date("%d %B %Y %X", getPlayerStorageValue(cid, v.storage))..'.') return true end local items, quest_container, str = v.items, doPlayerAddItem(cid, v.container, 1), 'BackPack from '..v.name..', Your Rewards:\n' for i = 1, table.maxn(items) do local chance, item_id, amount = items[i][1], items[i][2], items[i][3] if chance >= math.random(1, 100) then str = str .. amount .. ' ' .. getItemNameById(item_id) .. ' '..(i ~= table.maxn(items) and ', ' or '.') if isItemStackable(item_id) or amount == 1 then doAddContainerItem(quest_container, item_id, amount) else for i = 1, amount do doAddContainerItem(quest_container, 1) end end end end if v.monster[2] >= math.random(1, 100) then doSummonCreature(v.monster[1], getPlayerPosition(cid)) doCreatureSay(cid, "você não roubará meu tesouro!!", TALKTYPE_ORANGE_1) end doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) setPlayerStorageValue(cid, v.storage, os.time()+v.time*60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'You have found a '..str) return true end1 ponto -
(Resolvido)Sistema de loot por baús / chest loot system
(Resolvido)Sistema de loot por baús / chest loot system
Saymon Kopolsky reagiu a Vodkart por uma resposta no tópico
1 pontopara deixar só a hr faz assim: doPlayerSendTextMessage(cid,22,'você só pode pegar outro premio as '..os.date("%X", getPlayerStorageValue(cid, v.storage))..'.') return true Outra coisa, seria dificil colocar para ter uma chance de "spawnar" uma criatura ? no caso seria um globalevents? ou quando matar a criatura? acho que não... mto fácil na vdd, vai ser 1 criature só na area? digamos que criou a criatura as 9:30 se for 10 hrs e a criatura ainda está la, vai ser summonada ficando 2? ou só uma por area ?1 ponto -
(Resolvido)Spell - Mina Terrestre
(Resolvido)Spell - Mina Terrestre
elipe reagiu a xWhiteWolf por uma resposta no tópico
1 pontolib: -- 4º function setItemAid(uid, value) return doItemSetAttribute(uid, 'aid', value) end -- 5º function removeBomba(pos, id) local item = getTileItemById(pos, id) if item.uid > 0 then doRemoveItem(item.uid) end return true end movements: <movevent type="StepIn" actionid="13245" event="script" value="ativbomb.lua"/> local config = { effect1 = 4, -- efeito ao pisar effect2 = 5, -- efeito ao explodir msg = "Você foi acertado pela bomba.", -- msg que manda pra quem for acertado mindmg = 100, -- dmg minimo que tira (nao é necessariamente o dano que vai sair do cara pois precisa desconsiderar as defesas dele antes) maxdmg = 300, -- dmg maximo que tira (nao é o dano que vai sair do cara) self = true -- true/false pra ativar/desativar dano no cara que colocou a bomba caso ele mesmo passe na bomba. } local arr = { {0, 1, 0}, {1, 3, 1}, -- area que vai acertar ao explodir a bomba {0, 1, 0}, } local area = createCombatArea(arr) function onStepIn(cid, item, position) local player = getPlayerByNameWildcard(getItemAttribute(item.uid, 'ref')) doSendMagicEffect(position, config.effect1) if isCreature(player) then doAreaCombatHealth(player, COMBAT_FIREDAMAGE, position, area, -config.mindmg, -config.maxdmg, config.effect2) end if ((cid == player and config.self) or (not isPlayer(cid)) or (not isCreature(player))) then doCreatureAddHealth(cid, -1 * math.random(config.mindmg, config.maxdmg)) doSendMagicEffect(position, config.effect2) end if isPlayer(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msg) end doRemoveItem(item.uid) return true end spell: <instant name="testeTK" words="bomb1" lvl="16" mana="500" prem="1" aggressive="1" exhaustion="1000" needlearn="0" event="script" value="especiais/bombarob.lua"> </instant> local config = { itemid = 2180, -- id da bomba duration = 10, -- duration antes de ser removida actionid = 13245, -- actionid que sera setado na bomba (pro movements) effect = 3, -- efeito que sai ao colocar a bomba msg = "Bomba ativada!" -- mensagem que sai ao ser colocado a bomba } function onCastSpell(cid, var) local position = getCreaturePosition(cid) local item = doCreateItem(config.itemid, 1, position) setItemAid(item, config.actionid) doItemSetAttribute(item, 'ref', getCreatureName(cid)) doCreatureSay(cid, config.msg, 20) doSendMagicEffect(position, config.effect) addEvent(removeBomba, config.duration * 1000, position, config.itemid) return true end1 ponto -
(Resolvido)Sistema de loot por baús / chest loot system
(Resolvido)Sistema de loot por baús / chest loot system
Saymon Kopolsky reagiu a Vodkart por uma resposta no tópico
1 pontolocal chest_areas = { [8001] = {name = 'Hunt Spider', time = 60, storage = 178740, container = 1988, items = {{100,2160,1},{50,2173,1},{5,2494,1},{30,2466,1},{80,2495,1},{100,2148,15}}}, [8002] = {name = 'Hunt Spider', time = 60, storage = 178741, container = 1988, items = {{100,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1}}}, [8003] = {name = 'Hunt Dragon', time = 60, storage = 178742, container = 1988, items = {{100,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1}}} } function onUse(cid, item, frompos, item2, topos) local v = chest_areas[item.actionid] if not v then return true end if getPlayerStorageValue(cid, v.storage) >= os.time() then doPlayerSendTextMessage(cid,22,'você só pode pegar outro premio em '..os.date("%d %B %Y %X", getPlayerStorageValue(cid, v.storage))..'.') return true end local items, quest_container, str = v.items, doPlayerAddItem(cid, v.container, 1), 'BackPack from '..v.name..', Your Rewards:\n' for i = 1, table.maxn(items) do local chance, item_id, amount = items[i][1], items[i][2], items[i][3] if chance >= math.random(1, 100) then str = str .. amount .. ' ' .. getItemNameById(item_id) .. ' '..(i ~= table.maxn(items) and ', ' or '.') if isItemStackable(item_id) or amount == 1 then doAddContainerItem(quest_container, item_id, amount) else for i = 1, amount do doAddContainerItem(quest_container, 1) end end end end doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) setPlayerStorageValue(cid, v.storage, os.time()+v.time*60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'You have found a '..str) return true end a tag eu uso assim: <action actionid="8001;8002;8003" event="script" value="nome do seu script.lua"/> configuração tentei deixar pratica p/ você! [8001] = {name = 'Hunt Spider', time = 60, storage = 178740, container = 1988, items = {{100,2160,1},{50,2173,1},{5,2494,1},{30,2466,1},{80,2495,1},{100,2148,15}}}, [ACTION ID DO BAU] = { name -- é o nome da hunt que ele ta pegando o bau time -- tempo para voltar a abrir a chest, em minutos storage -- escolhe uma mas n repita container -- eu coloquei para dar dentro de uma bag ou bp, achei melhor agora o items é assim: items = {{chance, item id, quantidade}} exemplo: items = {{100,2160,10},{50,2173,1},{20,2494,1}}1 ponto -
(Resolvido)Sistema de loot por baús / chest loot system
(Resolvido)Sistema de loot por baús / chest loot system
Saymon Kopolsky reagiu a Vodkart por uma resposta no tópico
1 pontomas no caso eu posso abrir os 4 bau da hunt? claro que cada um teria sua horapara voltar a abrir a chest... ou eu escolho um dos 4 bau? que no caso vai ser a mesma configuração(mesmo loot)1 ponto -
(Resolvido)Sistema de loot por baús / chest loot system
(Resolvido)Sistema de loot por baús / chest loot system
Saymon Kopolsky reagiu a Vodkart por uma resposta no tópico
1 pontosão 4 baús na msm hunt? não entendi direito essa parte... ou é 4 bau dividida em 4 hunt tbm?1 ponto -
NPC Mendigo
NPC Mendigo
frank007 reagiu a Bruno Minervino por uma resposta no tópico
1 pontoExplicação: É um npc que pede ajuda para quem passa, se a pessoa o ajudar ela será teleportada pra um lugar configurável, e nesse lugar a pessoa coloca o que quiser. Vá em data/npc e crie um arquivo chamado Mendigo.xml e coloque o seguinte conteúdo: Agora vá em data/npc/scripts e crie um arquivo chamado mendigo.lua e coloque o seguinte conteúdo:1 ponto -
Listão de NPCs, Monsters & Raids
1 pontoListão de NPCs, Monsters & Raids Nome do Tópico: NPC Mount Autor: Trypox Link do Tópico: http://tibiaking.com/forum/topic/7814-npc-mount/ Comentário: Nome do Tópico: Outfit Maker Autor: ThalesMesquita Link do Tópico: http://tibiaking.com/forum/topic/7731-outfit-maker/ Comentário: Nome do Tópico: NPC BLESS Autor: DevilMoon Link do Tópico: http://tibiaking.com/forum/topic/7675-npc-bless/ Comentário: Nome do Tópico: [NPC] Mission Autor: Dudu Ruller Link do Tópico: http://tibiaking.com/forum/topic/7582-npc-mission/ Comentário: Nome do Tópico: Pet system Autor: Fox B. Link do Tópico: http://tibiaking.com/forum/topic/4339-pet-system-by-delyria/ Comentário: Nome do Tópico: Aprendar a criar e postar um NPC no seu Map Autor: JhonatanCWest Link do Tópico: http://tibiaking.com/forum/topic/2414-aprenda-a-criar-e-postar-um-npc-no-seu-map/ Comentário: Nome do Tópico: [NPC] Mate o monstro e complete sua tarefa Autor: thalia Link do Tópico: http://tibiaking.com/forum/topic/2094-npc-mate-o-monstro-e-complete-sua-tarefa/ Comentário: Nome do Tópico: [NPC] Apostador de Vegas Autor: thalia Link do Tópico: http://tibiaking.com/forum/topic/2066-npc-apostador-de-vegas/ Comentário: OBSERVAÇÃO: Como há muitos tópicos apenas os das primeiras páginas serão adicionados, os que não forem atualizados ou os autores de seus tópicos abandonar o tópico, será excluido dando chance a outro tópico. A ultima atualização ocorreu: 18/10/2011 ás 22:15 Você não está com seu tópico em nossa lista? Comentem em nosso tópico que atualizaremos no ato!1 ponto
-
[NPC] Apostador de Vegas
1 pontoNome: NPC Apostador Las Vegas Versão: Testada na 8.54, mais provavelmente funfa 8.5+ Créditos: 100% by me (: Como "fanuncia"? È um npc de apostar, ele possuiu "por inquanto" dois jogos 21 e Jogo dos 6. ~~> Explicando o 21 <~~ O 21 funciona assim: Você ira ganhar 1 número e o número tem quer ser 21, ou chegar o mais próximo possível sem ultrapassar esse valor. E a mesma coisa será feita com o npc, ele ganhará 1 número. Você pode ir comprando mais números dizendo [comprar] e se quiser parar é só dizer [parar]. Se seu número for maior que o do npc, você leva o triplo do dinheiro apostado. ~~> Explicando o Jogo do 6 <~~ O Jogo do 6 funciona assim: O npc vai rodar um dado, e se cair no número 6 você ganha o sêxtuplo (6 vezes) do valor apostado. Caso não caia no 6, você perde apenas o dinheiro da aposta. Legal né? Instalando o npc -> Vá até a pasta data/npc e crie um arquivo xml com o nome lasvegas.xml e cole esse codigo dentro: <?xml version="1.0" encoding="UTF-8"?> <npc name="Apostador" script="data/npc/scripts/apostador_la.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="138" head="96" body="95" legs="0" feet="95" addons="0"/> <parameters> <parameter key="message_greet" value="Como vai? |PLAYERNAME|, Quer {apostar} comigo?" /> <parameter key="module_keywords" value="1" /> </parameters> </npc> -> Vá até a pasta data/npc/scripts e crie um arquivo lua com o nome apostador_la.lua e cole esse codigo dentro: -- Preços das apostas -- price_21 = 1000 -- 1k ou 1000gold price_jogo6 = 5000 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, 'apostar')) then selfSay('Eu faço 2 jogos: {21},{Jogo do 6} escolha um deles!', cid) talkState[talkUser] = 5 elseif (msgcontains(msg, 'Jogo do 6') and talkState[talkUser] == 5) then selfSay('O Jogo do 6 funciona assim: Eu vou rodar um dado, e se cair no número 6 você ganha o sêxtuplo (6 vezes) do valor apostado.', cid) selfSay('Caso não caia no 6, você perde apenas o dinheiro da aposta.', cid) selfSay('Está pronto para {começar}?.', cid) talkState[talkUser] = 3 elseif(msgcontains(msg, 'começar') and talkState[talkUser] == 3) then selfSay('Você possui o {dinheiro} da aposta ('..price_jogo6..')golds ?', cid) if doPlayerRemoveMoney(cid, price_jogo6) == TRUE then talkState[talkUser] = 2 else selfSay('Desculpe, mais você não tem dinheiro para apostar comigo.',cid) end elseif(msgcontains(msg, 'dinheiro') and talkState[talkUser] == 2) then sorteio6 = math.random(1,6) if sorteio6 == 6 then talkState[talkUser] = 3 selfSay('Parábens, o número sorteado foi 6 e você acaba de ganhar '..(price_jogo6*6) ..'golds, mais o dinheiro que você pagou da aposta.',cid) doPlayerAddMoney(cid,price_jogo6*6) else talkState[talkUser] = 2 selfSay('Que azar, o número sorteado foi '..sorteio6..', mais sorte na proxima.',cid) end elseif(msgcontains(msg, '21') and talkState[talkUser] == 5) then selfSay('O 21 funciona assim: Você ira ganhar 1 número e o número tem quer ser 21, ou chegar o mais próximo possível sem ultrapassar esse valor.', cid) selfSay('E a mesma coisa será feita comigo, ganharei 1 número.', cid) selfSay('Você pode ir comprando mais números dizendo [comprar] e se quiser parar é só dizer [parar].', cid) selfSay('Se você ganhar de mim, você leva o triplo do dinheiro apostado.', cid) selfSay('Está pronto para {começar}?.', cid) talkState[talkUser] = 0 elseif(msgcontains(msg, 'começar') and talkState[talkUser] == 0) then selfSay('Você possui o {dinheiro} da aposta ('..price_21..')golds ?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'dinheiro') and talkState[talkUser] == 1) then if doPlayerRemoveMoney(cid, price_21) == TRUE then talkState[talkUser] = 0 local mpn = math.random(1,21) setPlayerStorageValue(cid, 55411,mpn) local pn = getPlayerStorageValue(cid, 55411) selfSay('Seu número é '..pn..', quer comprar mais ou parar?',cid) else selfSay('Desculpe, mais você não tem dinheiro para apostar comigo.',cid) end elseif(msgcontains(msg, 'comprar') and talkState[talkUser] == 0) then local cp = math.random(1,10) setPlayerStorageValue(cid, 55411, (getPlayerStorageValue(cid, 55411))+cp) selfSay('Seu número é '..getPlayerStorageValue(cid, 55411)..', quer comprar mais ou parar?',cid) talkState[talkUser] = 0 elseif(msgcontains(msg, 'parar') and talkState[talkUser] == 0) then local npcn = math.random(15,21) setPlayerStorageValue(cid, 2224, npcn) if getPlayerStorageValue(cid, 55411) < getPlayerStorageValue(cid, 2224)then selfSay('Meu número é '..getPlayerStorageValue(cid, 2224)..'.',cid) selfSay('Seu número final é '..getPlayerStorageValue(cid, 55411)..'.',cid) selfSay('Ganhei, mais sorte na proxima vez.',cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, 55411) == getPlayerStorageValue(cid, 2224) then selfSay('Meu número é '..getPlayerStorageValue(cid, 2224)..'.',cid) selfSay('Seu número final é '..getPlayerStorageValue(cid, 55411)..'.',cid) selfSay('Empato, portanto ninguem ganha nada.',cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, 55411) > getPlayerStorageValue(cid, 2224) then selfSay('Meu número é '..getPlayerStorageValue(cid, 2224)..'.',cid) selfSay('Seu número final é '..getPlayerStorageValue(cid, 55411)..'.',cid) local somag = (price_21*3) selfSay('Você ganhou '..somag..'golds, mais os seus '..price_21..'golds de volta. Parábens !!!',cid) doPlayerAddMoney(cid, somag) doPlayerAddMoney(cid, price_21) talkState[talkUser] = 1 else selfSay('Desculpe, mais você não possui dinheiro está aposta',cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Pronto, npc instalado. Qualquer dúvida, tamo ae. Gostou? REP +1 ponto
-
OTNaruto Earth V1
1 pontoOTNaruto - Earth (Version 8.54) [+] Informações sobre o server (Versão base - PedroSTT) [+]BUGS (Versão base - PedroSTT) [+] Minhas alterações [+] Notificações sobre o servidor PRINTS Download (Cliente) Scan(CLIENTE) Download (server) Scan(SERVER) Verificação(AVAST) Oque é Narutibia? servidor baseado no anime Naruto Shippuden na versão MMORPG 2D Tibia. [+] Contatos Lembre-se se ti fui útil deixe aquele rep+ Sua mão não cairá e ainda vai deixar uma criança feliz e ela ajudará cada vez mais -Family Okumura1 ponto
-
Contagem regressiva no site
Contagem regressiva no site
Kagador reagiu a BetterWar ATS por uma resposta no tópico
1 pontooi @noobdemoreno encontrei este topico, e como quase todos os topicos dos foruns de tibia, quase ninguem mais estão respondendo! Eu acabei de colocar um contador regressivo.. site:https://countingdownto.com Configura a data certinho, o nome do evento, depois clica em "add to my website" copia o codigo e cola em latestnews.php antes do primeiro "<?PHP" em cima de tudo...1 ponto -
[8.60] Martins War!
1 ponto
-
Página de ChangeLog
1 pontoInformações Add change log (Precisa de Admin acess) Delete change log (Precisa de Admin acess) View change log (ID, Type, Where, Date, Description) Tutorial Em htdocs, crie uma pasta chamada changelog Baixe o arquivo: changelog.rar - Scan: VirusTotal Coloque as imagens baixadas na pasta que você criou. Adicione isso na sua database: CREATE TABLE IF NOT EXISTS `z_changelog` ( `id` int(11) NOT NULL auto_increment, `type` varchar(255) NOT NULL default '', `where` varchar(255) NOT NULL default '', `date` int(11) NOT NULL default '0', `description` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ; Agora vamos criar o arquivo changelog.php: <?PHP $page = $_REQUEST['page']; $action = $_REQUEST['action']; $id = $_REQUEST['id']; $limit = 30; $offset = $page * $limit; $change_data = $SQL->query('SELECT * FROM z_changelog ORDER BY id DESC LIMIT '.$limit.' OFFSET '.$offset.''); $change_data1 = $SQL->query('SELECT * FROM z_changelog'); $change = 0; $change1 = 0; if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { $description = trim($_POST['description']); $where = trim($_POST['where']); $type = trim($_POST['type']); if (!empty($action) AND !empty($id)) { $select = $SQL->query('SELECT * FROM z_changelog WHERE date = '.$id.'')->fetch(); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change log removed</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><table border=0 cellspacing=1 cellpadding=4 width=100%><tr bgcolor="#505050"><td width="1%"><font class=white>ID</font></td><td width="21"><font class=white>Type</font></td><td width="21"><font class=white>Where</font></td><td width="50"><font class=white>Date</font></td><td><font class=white>Description</font></td></tr> <tr bgcolor="#F1E0C6"><td align="center">'.$select['id'].'.</td><td align="center"><img src="changelog/'.$select['type'].'.png" title="added"/></td><td align="center"><img src="changelog/'.$select['where'].'.png" title="ots"/><td>'.date("j.m.Y",$select['date']).'</td><td>'.$select['description'].'</td></tr> '; $main_content .= '</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=changelog" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; $SQL->query('DELETE FROM z_changelog WHERE date = '.$id.''); } if(empty($description) AND empty($where) AND empty($type)) { $main_content .= '<form action="index.php?subtopic=changelog" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Add Changelog</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" > <tr> <td class="LabelV" ><span >Type:</span></td> <td style="width:90%;" > <SELECT NAME=type> <OPTION>Add</OPTION> <OPTION>Remove</OPTION> </SELECT> </td> </tr> <tr> <td class="LabelV" ><span >Where:</span></td> <td style="width:90%;" > <SELECT NAME=where> <OPTION>Server</OPTION> <OPTION>Website</OPTION> </SELECT> </td> </tr> <tr> <td class="LabelV" ><span >Description:</span></td> <td style="width:90%;" > <textarea type="text" name="description" size="50" maxlength="150" rows="5" cols="60"></textarea> </td> </tr> </table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=changelog" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } else { if(empty($description)){ $show_msgs[] = "Description field is empty!."; } if(!empty($show_msgs)){ //show errors $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($show_msgs as $show_msg) { $main_content .= '<li>'.$show_msg; } $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; //show form $main_content .= '<form action="index.php?subtopic=changelog" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Add Changelog</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" > <tr> <td class="LabelV" ><span >Type:</span></td> <td style="width:90%;" > <SELECT NAME=type> <OPTION>Add</OPTION> <OPTION>Remove</OPTION> </SELECT> </td> </tr> <tr> <td class="LabelV" ><span >Where:</span></td> <td style="width:90%;" > <SELECT NAME=where> <OPTION>Server</OPTION> <OPTION>Website</OPTION> </SELECT> </td> </tr> <tr> <td class="LabelV" ><span >Description:</span></td> <td style="width:90%;" > <textarea type="text" name="description" size="50" maxlength="150" rows="10" cols="60"></textarea> </td> </tr> </table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=changelog" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } else { $SQL->query('INSERT INTO `z_changelog` (`id`,`type`, `where`,`date`, `description`) VALUES (NULL, "'.$type.'", "'.$where.'", '.time().', "'.$description.'");'); $id = $SQL->query('SELECT * FROM z_changelog WHERE `description` = "'.$description.'";')->fetch(); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change log added</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><table border=0 cellspacing=1 cellpadding=4 width=100%><tr bgcolor="#505050"><td width="1%"><font class=white>ID</font></td><td width="21"><font class=white>Type</font></td><td width="21"><font class=white>Where</font></td><td width="50"><font class=white>Date</font></td><td><font class=white>Description</font></td></tr> <tr bgcolor="#F1E0C6"><td align="center">'.$id['id'].'.</td><td align="center"><img src="changelog/'.$type.'.png" title="added"/></td><td align="center"><img src="changelog/'.$where.'.png" title="ots"/><td>'.date("j.m.Y",$id['date']).'</td><td>'.$description.'</td></tr> '; $main_content .= '</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=changelog" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } } } foreach($change_data1 as $log) { $change1++; } foreach($change_data as $log) { $change++; if(is_int($change / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder']; $change_rows .= ' <tr bgcolor="'.$bgcolor.'"><td align="center">'.$log['id'].'.</td><td align="center"><img src="changelog/'.$log['type'].'.png" title="added"/></td><td align="center"><img src="changelog/'.$log['where'].'.png" title="ots"/><td>'.date("j.m.Y",$log['date']).'</td><td>'.$log['description'].''; if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { $change_rows .= '<a href="index.php?subtopic=changelog&action=delete&id='.$log['date'].'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>'; } $change_rows .= '</td></tr>'; if ($change < $limit) { } else $show_link_to_next_page = TRUE; } if($change == 0) { $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>There is no change logs for the moment.</TD></TR></TABLE></TD></TR></TABLE><BR>'; } else { $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Change logs</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>Currently '.$change1.' change logs in total.</TD></TR></TABLE></TD></TR></TABLE><BR>'; $main_content .= '<table border=0 cellspacing=1 cellpadding=4 width=100%><tr bgcolor="#505050"><td width="1%"><font class=white>ID</font></td><td width="21"><font class=white>Type</font></td><td width="21"><font class=white>Where</font></td><td width="50"><font class=white>Date</font></td><td><font class=white>Description</font></td></tr>'.$change_rows.'</table>'; if($page > 0) { $main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=changelog&page='.($page - 1).'" CLASS="size_xxs">Previous Page</A></TD></TR>'; } if($show_link_to_next_page) { $main_content .= ' | <TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=changelog&page='.($page + 1).'" CLASS="size_xxs">Next Page</A></TD></TR>'; } } ?> Agora em index.php, adicione: case "changelog"; $topic = "Changelogs"; $subtopic = "changelog"; include("changelog.php"); break; Créditos: Pitufo1 ponto
-
Como Editar WebSite
Como Editar WebSite
Cdaniel.oliveira reagiu a HellMaster por uma resposta no tópico
1 pontoconfig.lua serverName = "Mude aqui para o Nome do seu server" - > Vai aparece esse nome na aba do seu site. se ajudei clique em gostei1 ponto -
[NPC Guard] Ataca Skulls e Monsters, Invasores
[NPC Guard] Ataca Skulls e Monsters, Invasores
Shadow.Styller reagiu a lordefmorte por uma resposta no tópico
1 pontoacredito que fiz ago errado por favo ver se tem ago errado aqui no data\npc criei um arquivo xml como o nome de defender dentro dele botei isso <?xml version="1.0"?> <npc name="Defender" script="defender.lua" access="5" lookdir="2" autowalk="25"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="131" head="116" body="94" legs="78" feet="115" addons="3"/> </npc> local level = 10 -- Quanto o NPC irar tirar. local maglevel = 10 -- Quanto o NPC Irar tirar. local min_multiplier = 2.1 -- Quanto o NPC Irar tirar. local max_multiplier = 4.2 -- Quanto o NPC Irar tirar. local Attack_message = "An Invader, ATTACK!!!" -- A mensagem queo NPC irar falar quanto detectar um invasor. dentro de data\npc\scripts criei um arquivo lua como o nome de defender detro botei isso local level = 10 ----- change this to make the npc hit more/less---------------------|damage_min = (level * 2 + maglevel * 3) * min_multiplier | local maglevel = 10 ----- change this to make the npc hit more/less -----------------|damage_max = (level * 2 + maglevel * 3) * max_multiplier | local min_multiplier = 2.1 ----- change this to make the npc hit more/less ----------|damage_formula = math.random(damage_min,damage_max) | local max_multiplier = 4.2 ----- change this to make the npc hit more/less --------------------------------------------------------------------- local check_interval = 5 ----- change this to the time between checks for a creature (the less time the more it will probably lag :S) local radiusx = 7 ----- change this to the amount of squares left/right the NPC checks (default 7 so he checks 7 squares left of him and 7 squares right (the hole screen) local radiusy = 5 ----- change this to the amount of squares left/right the NPC checks (default 5 so he checks 5 squares up of him and 5 squares down (the hole screen) local Attack_message = "An Invader, ATTACK!!!" ----- change this to what the NPC says when he sees a monster(s) local town_name = "Archgard" ----- the name of the town the NPC says when you say "hi" local Attack_monsters = TRUE ----- set to TRUE for the npc to attack monsters in his area or FALSE if he doesnt local Attack_swearers = TRUE ----- set to TRUE for the npc to attack players that swear near him or FALSE if he doesnt local Attack_pkers = TRUE ----- set to TRUE for the npc to attack players with white and red skulls or FALSE if he doesnt local health_left = 10 ----- set to the amount of health the npc will leave a player with if they swear at him (ie at 10 he will hit the player to 10 health left) local swear_message = "Take this!!!" ----- change this to what you want the NPC to say when he attackes a swearer local swear_words = {"shit", "fuck", "dick", "cunt"} ----- if "Attack_swearers" is set to TRUE then the NPC will attack anyone who says a word in here. Remember to put "" around each word and seperate each word with a comma (,) local hit_effect = CONST_ME_MORTAREA ----- set this to the magic effect the creature will be hit with, see global.lua for more effects local shoot_effect = CONST_ANI_SUDDENDEATH ----- set this to the magic effect that will be shot at the creature, see global.lua for more effects local damage_colour = TEXTCOLOR_RED ----- set this to the colour of the text that shows the damage when the creature gets hit ------------------end of config------------------ local check_clock = os.clock() ----- leave this local focus = 0 ----- leave this function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) health = getCreatureHealth(cid) - health_left if ((string.find(msg, '(%a*)hi(%a*)'))) and getDistanceToCreature(cid) < 4 then selfSay('Hello ' .. creatureGetName(cid) .. '! I am a defender of '..town_name..'.') doNpcSetCreatureFocus(cid) focus = 0 end if msgcontains(msg, 'time') then selfSay('The time is ' .. getWorldTime() .. '.') end if messageIsInArray(swear_words, msg) then if Attack_swearers == TRUE then selfSay('' .. swear_message ..' ') doCreatureAddHealth(cid,-health) doSendMagicEffect(getThingPos(cid),17) doSendAnimatedText(getThingPos(cid),health,180) doNpcSetCreatureFocus(cid) focus = 0 end end end function getMonstersfromArea(pos, radiusx, radiusy, stack) local monsters = { } local starting = {x = (pos.x - radiusx), y = (pos.y - radiusy), z = pos.z, stackpos = stack} local ending = {x = (pos.x + radiusx), y = (pos.y + radiusy), z = pos.z, stackpos = stack} local checking = {x = starting.x, y = starting.y, z = starting.z, stackpos = starting.stackpos} repeat creature = getThingfromPos(checking) if creature.itemid > 0 then if isCreature(creature.uid) == TRUE then if isPlayer(creature.uid) == FALSE then if Attack_monsters == TRUE then table.insert (monsters, creature.uid) check_clock = os.clock() end elseif isPlayer(creature.uid) == TRUE then if Attack_pkers == TRUE then if getPlayerSkullType(creature.uid) > 0 then table.insert (monsters, creature.uid) check_clock = os.clock() end end end end end if checking.x == pos.x-1 and checking.y == pos.y then checking.x = checking.x+2 else checking.x = checking.x+1 end if checking.x > ending.x then checking.x = starting.x checking.y = checking.y+1 end until checking.y > ending.y return monsters end function onThink() if (Attack_monsters == TRUE and Attack_pkers == TRUE) or (Attack_monsters == TRUE and Attack_pkers == FALSE) or (Attack_monsters == FALSE and Attack_pkers == TRUE) then if (os.clock() - check_clock) > check_interval then monster_table = getMonstersfromArea(getCreaturePosition(getNpcCid( )), radiusx, radiusy, 253) if #monster_table >= 1 then selfSay('' .. Attack_message ..' ') for i = 1, #monster_table do doNpcSetCreatureFocus(monster_table[i]) local damage_min = (level * 2 + maglevel * 3) * min_multiplier local damage_max = (level * 2 + maglevel * 3) * max_multiplier local damage_formula = math.random(damage_min,damage_max) doSendDistanceShoot(getCreaturePosition(getNpcCid( )), getThingPos(monster_table[i]), shoot_effect) doSendMagicEffect(getThingPos(monster_table[i]),hit_effect) doSendAnimatedText(getThingPos(monster_table[i]),damage_formula,damage_colour) doCreatureAddHealth(monster_table[i],-damage_formula) check_clock = os.clock() focus = 0 end elseif table.getn(monster_table) < 1 then focus = 0 check_clock = os.clock() end end end focus = 0 end1 ponto