Líderes
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 01/29/17 em %
-
[TFS 1.x] AutoLoot System
1 pontoSCREENSHOT http://3.1m.yt/Zwo99Sdx.png http://4.1m.yt/oG_cwli8u.png ______________________________________________ COMANDOS !autoloot add, itemId ou name -- Adicionando um item na lista !autoloot remove, itemId or name -- Remover um item da lista !autoloot show -- Mostrar a lista do autoLoot !autoloot clear -- Limpar a lista do autoLoot ______________________________________________ SCRIPT data/global.lua -- AutoLoot config AUTO_LOOT_MAX_ITEMS = 5 -- Reserved storage AUTOLOOT_STORAGE_START = 10000 AUTOLOOT_STORAGE_END = AUTOLOOT_STORAGE_START + AUTO_LOOT_MAX_ITEMS -- AutoLoot config end talkactions/talkactions.xml <talkaction words="!autoloot" separator=" " script="autoloot.lua"/> talkactions/scripts/autoloot.lua function onSay(player, words, param) local split = param:split(",") local action = split[1] if action == "add" then local item = split[2]:gsub("%s+", "", 1) local itemType = ItemType(item) if itemType:getId() == 0 then itemType = ItemType(tonumber(item)) if itemType:getId() == 0 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "There is no item with that id or name.") return false end end local itemName = tonumber(split[2]) and itemType:getName() or item local size = 0 for i = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do local storage = player:getStorageValue(i) if size == AUTO_LOOT_MAX_ITEMS then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "The list is full, please remove from the list to make some room.") break end if storage == itemType:getId() then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, itemName .." is already in the list.") break end if storage <= 0 then player:setStorageValue(i, itemType:getId()) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, itemName .." has been added to the list.") break end size = size + 1 end elseif action == "remove" then local item = split[2]:gsub("%s+", "", 1) local itemType = ItemType(item) if itemType:getId() == 0 then itemType = ItemType(tonumber(item)) if itemType:getId() == 0 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "There is no item with that id or name.") return false end end local itemName = tonumber(split[2]) and itemType:getName() or item for i = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do if player:getStorageValue(i) == itemType:getId() then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, itemName .." has been removed from the list.") player:setStorageValue(i, 0) return false end end player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, itemName .." was not founded in the list.") elseif action == "show" then local text = "-- Auto Loot List --\n" local count = 1 for i = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do local storage = player:getStorageValue(i) if storage > 0 then text = string.format("%s%d. %s\n", text, count, ItemType(storage):getName()) count = count + 1 end end if text == "" then text = "Empty" end player:showTextDialog(1950, text, false) elseif action == "clear" then for i = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do player:setStorageValue(i, 0) end player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "The autoloot list has been cleared.") else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Use the commands: !autoloot {add, remove, show, clear}") end return false end creaturescripts/creaturescripts.xml <event type="kill" name="AutoLoot" script="autoloot.lua" /> creaturescripts/scripts/autoloot.lua local function scanContainer(cid, position) local player = Player(cid) if not player then return end local corpse = Tile(position):getTopDownItem() if not corpse then return end if corpse:getType():isCorpse() and corpse:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) == cid then for i = corpse:getSize() - 1, 0, -1 do local containerItem = corpse:getItem(i) if containerItem then for i = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do if player:getStorageValue(i) == containerItem:getId() then containerItem:moveTo(player) end end end end end end function onKill(player, target) if not target:isMonster() then return true end addEvent(scanContainer, 100, player:getId(), target:getPosition()) return true end creaturescripts/scripts/login.lua player:registerEvent("AutoLoot") ______________________________________________ CRÉDITOS Printer1 ponto
-
[8.6] Task System 4.0! (Task system + Daily Task System)
Removido: *Boss Room *Rank Task *Prêmios para os 10 primeiros a terminar todas as tasks Adicionado: *Daily Task System (Sistema exclusivo de Task diario, podendo pegar 1x a cada 24 hrs, irei explicar mais depois.) *Task agora é por progresso, você não pode sair e voltar, terá que terminar a task 1 para avançar para a task 2, assim sucessivamente. *Task Points *Level para realizar a task *Nova talkaction que mostra uma janela de informações sobre o level da task, premios que irá receber, progresso, etc... *Items para entrega(Se o jogador deverá levar algum item junto com a quantidade de monstro morta) para finalizar a task *Sistema de look Task (Varia de acordo com a sua quantidade de Task Points, podendo ficar por exemplo como "Huntsman", "Ranger", etc...(alterável) *Mods e npc mais "clean", várias linhas removidas e o sistema está mais rápido *Vou Adicionar "scripts extras" Como: --> Tile que só passa quem tiver permissão depois de finalizar determinada quest --> Npc de Boss Room para entrar e enfrentar o monstro quem fez determinada quest [+] Resumo do Task system + Daily Task System [+] Task System: É o sistema de task "original", onde consiste em matar determinada quantidade de monstros(E entregar certo itens <- é configurável), para receber recompensas como Exp, Money e Items. Algumas mudanças do simple task 3.0 para o 4.0 foram: [+] O sistema agora é por progresso, isso quer dizer que você terá que ir terminando a quest para avançar para a seguinte. [+] O sistema Também recebeu uma alteração, fazendo com que as Tasks precisem que o jogador tenha um level determinado [+] A tabela para edição está mais fácil, fazendo com que você adicione ou remova monstros com mais tranquilidade, inclusive alterações das Rewards da Task. Daily Task System: É um sistema que desenvolvi para que os jogadores sempre estejam se comunicando com o npc de Task, no caso da Task Diaria, vária de acordo com o level do jogador, por exemplo: Jogadores entre level 6 ao 49 poderá cair em uma dessas 3 Task Diarias: Orcs, Tarantulas ou Wyverns Jogadores entre level 50 ao 79 poderá cair em uma dessas 3 Task Diarias: Dragons, Wailing Widows ou Ancient Scarabs E por ai vai, claro que você poderá aumentar as Task Diarias dependendo do level, eu fiz 3 para cada level que é pra postar, mas tudo isso você pode aumentar! Dependendo do seu servidor. E sim, você pode fazer a TASK "ORIGINAL" e a TASK "DIARIA" ao mesmo tempo! Ambas são distintas e possuem Rewards diferenciadas! No caso da Task diaria, levando em conta que você começou a fazer ela no dia 08/01 ás 20:00 Hrs, você tem até o dia 09/01 ás 20:00Hrs para termina-la e receber a recompensa, caso termine antes, a Task diaria só irá ficar disponível para repetição a partir desta mesma data 09/01 20:00 Hrs; [+] Caso você não termine a tempo, não tem problema, basta esperar este horário e começar uma nova Task. [+] Caso você começou a Daily Task e terminou antes desta data. mas por algum motivo esqueceu de entregar e a mesma passou do prazo, não tem importância, caso você tenha matado todos os monstros até 09/01 20:00 Hrs, você poderá entregar está Task em qualquer horário para receber suas Rewards e começar uma task a partir do momento em que você entregou! (INJUSTIÇA AQUI NÃO CARALHO). [+] Comandos Adicionais [+] /task -- Mostra as informações da sua Task Atual, como Nome da Task, Level, Rewards, Monstros que você poderá matar, Se tem que entregar algum Item junto, etc... /task daily -- É basicamente mostra a mesma informação da Task Principal, porém mostra também qual o prazo limite para entrega da task. /task counter -- É um comando que ATIVA ou DESATIVA o contador de monstros mortos na task no seu Channel. [+] Imagens [+] Cline neste link para ver algumas imagens da Task : http://imgur.com/a/eLIY3 ------------------------------------------------ // -------------------------------------------------------------- [+] Instalação do Sistema [+] Requisitos: Nível Médio de conhecimento em scripting LUA Pasta Mods Simple Task.xml https://pastebin.com/raw/P5hqMC3j NPC: Ludger.xml https://pastebin.com/raw/R56yLWHw simple_task.lua https://pastebin.com/raw/1mRzJ6aJ ---------------------------------------------- // ---------------------------------- [+] configuração [+ ] Task System Principal task_sys = { [1] = {name = "Trolls", start = 176201, monsters_list = {"Troll","Troll champion"}, level = 8, count = 40, points = 0, items = {}, reward = {}, exp = 2000, money = 2000} } [1] --> O número entre os colchetes [] significa a ordem da Task, como a Task é por progresso sempre começará no 1 e irá pro [2], assim sucessivamente. name --> É o nome da task que o jogador irá fazer. start --> é a storage que indicará se o jogador começou a Task monster_list ={} --> É o nome dos monstros em que o jogador deverá caçar para completar a Task level --> É o level necessário para dar inicio á Task count --> É o número de monstros que o jogador tem que matar para completar a Task points --> Aqui determinada quantos Task points o jogador irá receber ao completar a Task items = {} --> Aqui determinada se além de matar os monstros, o jogador terá que entregar item também! Caso tenha só colocar o {ITEM_ID, QUANTIDADE} EX: items = {{2173,1},{2160,10},{2493,2}} rewad --> Aqui determinada se o jogador irá receber itens ao terminar a Task, mesma formula do items /\ reward = {{2520,1},{2173,1}} exp --> Se o jogador irá receber Exp ao terminar a task. 0 ou quantidade de exp Money --> Se o jogador irá receber dinheiro ao terminar a task. 0 ou quantidade de dinheiro Daily Task System daily_task = { [1] = {name = "Orcs" ,monsters_list = {"Orc Berserker","Orc Rider","Orc Leader","Orc Warlord"}, count = 100, points = 0, reward = {}, exp = 5000, money = 10000} } Segue o padrão da Task original, exceto que não precisa entregar items para o npc! Como funciona A randomização de level de acordo com a Daily task? Procure por está tabela em MODS local t = { [{6,49}] = {1,3}, [{50,79}] = {4,6}, [{80,129}] = {7,9}, [{130,math.huge}] = {10,12} } entre as chaves e colchetes é o level do jogador para as Daily Task, Você pode adicionar quantas você quiser! Digamos que: [{6,49}] = {1,3} --> Quer dizer que entre o level 6 ao 49 o jogador poderá cair na Daily Task número 1(Orcs), 2(Tarantulas) ou 3(Wyvern)! [{50,79}] = {4,6} --> Quer dizer que entre o level 50 ao 79 o jogador poderá cair na Daily Task número 4(Dragons), 5(Wailing Widows) ou 6(Ancient Scarabs)! ... [{130,math.huge}] = {10,12} --> Quer dizer que o jogador level 130 ou MAIS poderá cair na Daily Task número 10(Undead Dragons), 11(HydraS) ou 12(Ghastly Dragons)! Look Rank System Procure por está tabela em MODS local ranks = { [{1, 20}] = "Huntsman", [{21, 50}] = "Ranger", [{51, 100}] = "Big Game Hunter", [{101, 200}] = "Trophy Hunter", [{201, math.huge}] = "Elite Hunter" } Entre 1-20 Task points o Rank será Huntsman Entre 21-50 Task posints o Rank será Ranger Entre 51-100 Task Points o rank será Big Game Hunter etc... Altere como quiser!1 ponto
-
(pedido) Compilar 10.98
1 pontoExiste esse tutorial aqui mesmo: Boa Sorte1 ponto
-
Sourcers De NTO??
Sourcers De NTO??
Lammorn123 reagiu a DarkWore por uma resposta no tópico
1 pontoTalvez uma source da versão do seu NTO de Tibia normal funcione, mais se foi feito alguma modificação ou adicionado funções, você terá que adaptar á base para o NTO Funcionar Corretamente, Á Melhor coisa que você pode fazer é testar uma source adaptada. Tente essa: Source do NTO White De Qualquer forma eu dei uma olhada na base do NTO Hero, ela é derivada da base do shinobi, então tente á source do shinobi também. Boa Sorte1 ponto -
Sourcers De NTO??
Sourcers De NTO??
Lammorn123 reagiu a Adventure por uma resposta no tópico
1 pontoNormalmente não existe diferença das souces de Nto dbo tíbia é quase tudo a mesma coisa o que vai muda é a pasta pack quem vem com os dados do mapa e etc... Se você pegar uma souces na versão do seu servidor uma souces estável esta ótimo. Depois de compilar só coloca no seu servidor e pronto.1 ponto -
TFS 0.3.6 e 0.4 Qual melhor?
1 pontoOlá novamente @acesso123 a melhor distro é a 0.4 devido as inúmeras vantagens que ela oferece e segundo alguns é a mais estável, mas eu sempre encontrei problemas na sua compilação. Mas sem duvidas você deve escolher uma 0.4 para dar mais conteúdo ao seu OT! REP+ se eu te ajudei!1 ponto
-
Erro com comando table.insert
Erro com comando table.insert
Dom Matteo reagiu a Vodkart por uma resposta no tópico
1 pontot = {} local m = getThingPosWithDebug(cid) for x = -7, 7 do for y = -7, 7 do local pos = {x = m.x + x, y = m.y + y, z = m.z, stackpos = 0} if getTileThingByPos(pos).itemid > 0 then t[#t+1] = pos end end end local function doEarthquake(cid, pos) if not isCreature(cid) then return true end if not isSightClear(getThingPosWithDebug(cid), pos, false) then return true end if not canWalkOnPos(pos, false, false, false, false, true) then return true end doAreaCombatHealth(cid, GROUNDDAMAGE, pos, 0, -min, -max, 255) doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 127) end if #t > 0 then for a = 1, #t do local random = math.random(1, #t) addEvent(doEarthquake, a * 24, cid, t[random]) t = doRemoveElementFromTable(t, t[random]) -- pra que essa função? existe table.insert e table.remove kk end end teste desse jeito1 ponto -
[8.6] Task System 4.0! (Task system + Daily Task System)
já fiz!! está na 2° página do tópico rsrsrs abre o MODS e antes de </mod> adicione <movevent type="StepIn" actionid ="45250" event="script"><![CDATA[ domodlib('task_func') function onStepIn(cid, item, position, fromPosition) local amount = 30 if getTaskPoints(cid) < amount then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, 25, "Você só pode passar se tiver " .. amount .. " Task Points.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end return true end]]></movevent> ai no tile coloca AID = 452501 ponto
-
(Resolvido)[PEDIDO] Ao dar x pontos de dano a um monstro ganhar 1 item apos o monstro morre
<?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Item_Bonus" version="1.0" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="itembonus_func"><![CDATA[ monsters = { ["apocalypse"] = {s = 487541, min = 5000, item = {2160,10}}, ["ghazbaran"] = {s = 487542, min = 6000, item = {2173,1}}, ["infernatil"] = {s = 487543, min = 6000, item = {2173,1}}, ["dragon"] = {s = 487544, min = 200, item = {2159,10}} } ]]></config> <event type="login" name="ItemBonusRegister" event="script"><![CDATA[ domodlib('itembonus_func') function onLogin(cid) registerCreatureEvent(cid, "ItemBonusCombat") registerCreatureEvent(cid, "ItemBonusStats") for _, v in pairs(monsters) do -- when die or relog setPlayerStorageValue(cid, v.s, 0) end return true end]]></event> <event type="combat" name="ItemBonusCombat" event="script"><![CDATA[ domodlib('itembonus_func') if isPlayer(cid) and isMonster(target) and monsters[getCreatureName(target):lower()] then registerCreatureEvent(target, "ItemBonusStats") registerCreatureEvent(target, "ItemBonusDeath") end return true]]></event> <event type="statschange" name="ItemBonusStats" event="script"><![CDATA[ domodlib('itembonus_func') if type == STATSCHANGE_HEALTHLOSS and isPlayer(attacker) and isMonster(cid) and monsters[getCreatureName(cid):lower()] then local v = monsters[getCreatureName(cid):lower()] if getPlayerStorageValue(attacker, v.s) < v.min then setPlayerStorageValue(attacker, v.s, (getPlayerStorageValue(attacker, v.s) <= 0 and value or getPlayerStorageValue(attacker, v.s)+value)) end end return true]]></event> <event type="death" name="ItemBonusDeath" event="script"><![CDATA[ domodlib('itembonus_func') function onDeath(cid, corpse, deathList) local x = monsters[getCreatureName(cid):lower()] if x then for _, pid in ipairs(deathList) do if isCreature(pid) and isPlayer(pid) then if getPlayerStorageValue(pid, x.s) >= x.min then doPlayerAddItem(pid,x.item[1],x.item[2]) end setPlayerStorageValue(pid, x.s, 0) end end end return true end]]></event> </mod>1 ponto
-
(Resolvido)Não consigo ativar o PVP
olá tudo bem com vc ? espero que sim! Você tentou verificar em vocations.xml remover as proteções ? boa sorte com teu projeto, ve se não para!1 ponto
-
Como Arumma Splash??
Como Arumma Splash??
Lammorn123 reagiu a L3K0T por uma resposta no tópico
1 pontoopa, tudo bem com você? espero que sim, seu problema é via source, pois isso é alterado lá em game.cpp, isso são as raças do seus monstros! sem efeito quando o monstro morre. abre teu game.cpp e ache as Raça do seus monstro ctrl+f Race, enfim após as alterações, deve recompilar sua source. se caso não entenda de programação, recomendo que não tente, amenos que você queria de qualquer jeito. case RACE_VENOM: textColor = TEXTCOLOR_LIGHTGREEN; magicEffect = MAGIC_EFFECT_DRAW_BLOOD; break;1 ponto -
(Resolvido)[Resolvido] Storage por x tempo
function onCastSpell(cid, var) if getPlayerStorageValue(cid, 15000) - os.time() <= 0 then doPlayerSendCancel(cid, "You can/'t cast this spell.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end return doCombat(cid, combat, var) end function onSay(cid, words, param, channel) local store,exausted = 156201,30 -- exaust na talk if getPlayerStorageValue(cid, store) >= os.time() then doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, store) - os.time() .. " seconds to use this command again.") return true end setPlayerStorageValue(cid, 15000, os.time()+10) setPlayerStorageValue(cid, store, os.time()+exausted) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ativado 10 segundos.") return true end1 ponto
-
(Resolvido)[Anunciar Spawn]
(Resolvido)[Anunciar Spawn]
Yago Blind. reagiu a gobr por uma resposta no tópico
1 pontohey o cara posto o codigo q tinha no link que te passei? isso pode?1 ponto -
Max Level
function doPlayerRemoveLevel(cid, level) if isPlayer(cid) == true and level >= 1 then local experience = getPlayerRequiredExperience(cid, getPlayerLevel(cid)-level) return doPlayerRemoveExp(cid, experience) end return false end mais funções https://github.com/opentibia-xx/data/blob/master/functions.lua1 ponto
-
(Resolvido)[Anunciar Spawn]
(Resolvido)[Anunciar Spawn]
Yago Blind. reagiu a gobr por uma resposta no tópico
1 pontohttp://pastebin.com/wWSEzjQm1 ponto -
Pedidos de Script
Pedidos de Script
Yago Blind. reagiu a Pepeco por uma resposta no tópico
1 ponto@Yago Blind. desculpa, expliquei com pressa, é assim vou dar um outro exemplo, voce vai no raids, cria um arquivo e coloca isso dentro dele <raid> <announce delay="1000" type="event" message="Scouts report a barbarian army gathering near Svargrond" /> <announce delay="4000" type="event" message="Some invaders might try to access Svargrond via the ice to the North." /> <announce delay="8000" type="event" message="Raiders are attacking Svargrond!" /> <!--Area Spawns--> <areaspawn delay="10000" fromx="32199" fromy="31063" fromz="5" tox="32251" toy="31084" toz="5"> <monster name="Barbarian Bloodwalker" amount="35" /> <monster name="Barbarian Brutetamer" amount="22" /> <monster name="Barbarian Headsplitter" amount="22" /> <monster name="Barbarian Skullhunter" amount="28" /> <monster name="Ice Witch" amount="15" /> </areaspawn> </raid> depois dentro do raids.xml voce coloca essa linha <raid name="Barbarian" file="Barbarian.xml" interval2="30" margin="1800" enabled="yes"/> sim, voce nao precisa colocar o spawn no map, isso é uma raid, quando tiver a raid, vai alertar o server.1 ponto -
Pedidos de Script
Pedidos de Script
Yago Blind. reagiu a Pepeco por uma resposta no tópico
1 ponto@Yago Blind. vai em raids/scripts e coloque isso <raid> <announce delay="1000" type="event" message="Citizens of Yalahar, beware! Harbingers of vampiric blood thirst are appearing in the city. Fight them or take your chance to flee while you still can." /> <announce delay="36000" type="event" message="Harbingers of vampiric blood thirst are appearing now in Yalahar!." /> <!--Area Spawns--> <areaspawn delay="36000" fromx="605" fromy="548" fromz="7" tox="599" toy="648" toz="7"> <monster name="Vampire" amount="100" /> </areaspawn> </raid> só configurar agr1 ponto -
Pedidos de Script
Pedidos de Script
Yago Blind. reagiu a Pepeco por uma resposta no tópico
1 pontoJá faço isso, mas nao frequentemente, eu nao estou com muito tempo, entao sempre alguem responde primeiro que eu e se nao responde, eu ajudo u.u1 ponto -
[8.60] Baiak Source (exclusivo)
[8.60] Baiak Source (exclusivo)
matheus13 reagiu a Yago Blind. por uma resposta no tópico
1 pontoUma ótima base. Obrigado pela contribuição . REP+1 ponto -
Alguem Pode Me Ajuda Numa Script de fly
Alguem Pode Me Ajuda Numa Script de fly
Ottpr reagiu a Mathias Kenfi por uma resposta no tópico
1 pontoTroca seu sistema por este. function onSay(cid, words, param) local config = { pz = true, -- players precisam estar em protection zone para usar? (true or false) battle = false, -- players deve estar sem battle (true or false) custo = false, -- se os teleport irão custa (true or false) need_level = false, -- se os teleport irão precisar de level (true or false) vip = true, -- somente vip players poderam usar o comando? ("yes" or "no") storage = 13500 -- Storage Id da sua vip account caso for usar somente vips } --[[ Config lugares]]-- local lugar = { ["depot"] = { -- nome do lugar pos = {x=1016, y=1045, z=7},level = 8,price = 0}, ["temple"] = { -- nome do lugar pos = {x=1032, y=1016, z=7},level = 8, price = 0}, ["arena"] = { -- nome do lugar pos = {x=1016, y=1052, z=8},level = 8,price = 0}, ["viparea"] ={ -- nome do lugar pos = {x=701, y=1015, z=7},level = 8,price = 0}, ["trainer"] ={ -- nome do lugar pos = {x=965, y=1057, z=7},level = 8,price = 0} } --[[ Lista de Viagem (Não mexa) ]]-- if (param == "lista") then local str = "" str = str .. "lista de viagem :\n\n" for name, pos in pairs(lugar) do str = str..name.."\n" end str = str .. "" doShowTextDialog(cid, 6579, str) return TRUE end local a = lugar[param] if not(a) then doPlayerSendTextMessage(cid, 25, "desculpe,este lugar não existe") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE elseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.") return TRUE elseif config.premium == true and not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas players com premium account podem teleportar.") return TRUE elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder teleportar.") return TRUE elseif config.need_level == true and getPlayerLevel(cid) < a.level then doPlayerSendTextMessage(cid, 25, "Desculpe,Voce não tem level. voce precisa "..a.level.." level ou mais para ser teleportado.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE elseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE then doPlayerSendTextMessage(cid, 25, "Desculpe,voce nao tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE elseif config.vip == true and getPlayerStorageValue(cid, tonumber(config.storage)) - os.time() <= 0 then doPlayerSendTextMessage(cid, 25, "Desculpe,voce nao e Player vip Para Usar o !fly!.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE end doTeleportThing(cid, a.pos) doSendMagicEffect(a.pos, CONST_ME_TELEPORT) doBroadcastMessage("" .. getPlayerName(cid) .. " has flown to " .. param .. " using !fly." ,MESSAGE_INFO_DESCR) return TRUE end1 ponto -
[TFS 1.X] getExperienceForLevel
1 pontoE aí galera do TK.... Estou passando meu OT para TFS 1.2 (OTXSERVER) e estou criando algumas funções para suprir a necessidade de alguns scripts.... Segue a função function getExperienceForLevel(level) level = level - 1 return ((50 * level * level * level) - (150 * level * level) + (400 * level)) / 3 end1 ponto
-
(Resolvido)Account Manager Invalid Password
(Resolvido)Account Manager Invalid Password
Thenebrozo reagiu a Peemello por uma resposta no tópico
1 pontoNada ve esses bagui ai de trocar a distro, tudo vocês querem trocar mesmo. Se sabe compilar ? é em protocolgame.cpp da sua source - procure por: if(!IOLoginData::getInstance()->getPassword(id, hash, salt, character) || !encryptTest(salt + password, hash)) { ConnectionManager::getInstance()->addAttempt(getIP(), protocolId, false); disconnectClient(0x14, "Invalid password."); return false; } e apague tudo. pronto!, feche e compile. Créditos: Caronte Te Ajudei? +REP1 ponto -
(Resolvido)[PEDIDO] Hp / Mp por porcentagem %%
(Resolvido)[PEDIDO] Hp / Mp por porcentagem %%
ruanvioto reagiu a Fir3element por uma resposta no tópico
1 pontoprotocolgame.cpp, procure por: msg->put<uint16_t>(player->getHealth()); msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MAXHEALTH)); troque por: if (player->getPlayerInfo(PLAYERINFO_MAXHEALTH) > 0) { msg->put<uint16_t>(uint16_t(player->getHealth() * 100 / player->getPlayerInfo(PLAYERINFO_MAXHEALTH))); msg->put<uint16_t>(100); } else { msg->put<uint16_t>(0); msg->put<uint16_t>(0); } procure por: msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MANA)); msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MAXMANA)); troque por: if (player->getPlayerInfo(PLAYERINFO_MAXMANA) > 0) { msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MANA) * 100 / player->getPlayerInfo(PLAYERINFO_MAXMANA)); msg->put<uint16_t>(100); } else { msg->put<uint16_t>(0); msg->put<uint16_t>(0); }1 ponto -
(Resolvido)[Action] itens por Alavanca
(Resolvido)[Action] itens por Alavanca
tirso reagiu a PriisioneR por uma resposta no tópico
1 pontolocal config = { removeItem = {id = 2671, count = 1}, addItem = {id = 2401, count = 1}, } function onUse(cid, item) if not(doPlayerRemoveItem(cid, config.removeItem.id, config.removeItem.count)) then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You dont have "..config.removeItem.count.." "..getItemNameById(config.removeItem.id)..".") end doPlayerAddItem(cid, config.addItem.id, config.addItem.count) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You gained "..config.addItem.count.." "..getItemNameById(config.addItem.id)..".") end Esse script ele troca um item por outro removeItem = {id = 2671, count = 1}, addItem = {id = 2401, count = 1}, item que o player precisa para usar item que ele vai ganhar após usar1 ponto -
[Resolvido] Efeitos de spells
[Resolvido] Efeitos de spells
Thenebrozo reagiu a Kimoszin por uma resposta no tópico
1 pontoCONST_ME_DRAWBLOOD = 0 CONST_ME_LOSEENERGY = 1 CONST_ME_POFF = 2 CONST_ME_BLOCKHIT = 3 CONST_ME_EXPLOSIONAREA = 4 CONST_ME_EXPLOSIONHIT = 5 CONST_ME_FIREAREA = 6 CONST_ME_YELLOW_RINGS = 7 CONST_ME_GREEN_RINGS = 8 CONST_ME_HITAREA = 9 CONST_ME_TELEPORT = 10 CONST_ME_ENERGYHIT = 11 CONST_ME_MAGIC_BLUE = 12 CONST_ME_MAGIC_RED = 13 CONST_ME_MAGIC_GREEN = 14 CONST_ME_HITBYFIRE = 15 CONST_ME_HITBYPOISON = 16 CONST_ME_MORTAREA = 17 CONST_ME_SOUND_GREEN = 18 CONST_ME_SOUND_RED = 19 CONST_ME_POISONAREA = 20 CONST_ME_SOUND_YELLOW = 21 CONST_ME_SOUND_PURPLE = 22 CONST_ME_SOUND_BLUE = 23 CONST_ME_SOUND_WHITE = 24 CONST_ME_BUBBLES = 25 CONST_ME_CRAPS = 26 CONST_ME_GIFT_WRAPS = 27 CONST_ME_FIREWORK_YELLOW = 28 CONST_ME_FIREWORK_RED = 29 CONST_ME_FIREWORK_BLUE = 30 CONST_ME_STUN = 31 CONST_ME_SLEEP = 32 CONST_ME_WATERCREATURE = 33 CONST_ME_GROUNDSHAKER = 34 CONST_ME_HEARTS = 35 CONST_ME_FIREATTACK = 36 CONST_ME_ENERGYAREA = 37 CONST_ME_SMALLCLOUDS = 38 CONST_ME_HOLYDAMAGE = 39 CONST_ME_BIGCLOUDS = 40 CONST_ME_ICEAREA = 41 CONST_ME_ICETORNADO = 42 CONST_ME_ICEATTACK = 43 CONST_ME_STONES = 44 CONST_ME_SMALLPLANTS = 45 CONST_ME_CARNIPHILA = 46 CONST_ME_PURPLEENERGY = 47 CONST_ME_YELLOWENERGY = 48 CONST_ME_HOLYAREA = 49 CONST_ME_BIGPLANTS = 50 CONST_ME_CAKE = 51 CONST_ME_GIANTICE = 52 CONST_ME_WATERSPLASH = 53 CONST_ME_PLANTATTACK = 54 CONST_ME_TUTORIALARROW = 55 CONST_ME_TUTORIALSQUARE = 56 CONST_ME_MIRRORHORIZONTAL = 57 CONST_ME_MIRRORVERTICAL = 58 CONST_ME_SKULLHORIZONTAL = 59 CONST_ME_SKULLVERTICAL = 60 CONST_ME_ASSASSIN = 61 CONST_ME_STEPSHORIZONTAL = 62 CONST_ME_BLOODYSTEPS = 63 CONST_ME_STEPSVERTICAL = 64 CONST_ME_YALAHARIGHOST = 65 CONST_ME_BATS = 66 CONST_ME_SMOKE = 67 CONST_ME_INSECTS = 68 CONST_ME_NONE = 255 CONST_ME_LAST = CONST_ME_INSECTS CONST_ANI_SPEAR = 0 CONST_ANI_BOLT = 1 CONST_ANI_ARROW = 2 CONST_ANI_FIRE = 3 CONST_ANI_ENERGY = 4 CONST_ANI_POISONARROW = 5 CONST_ANI_BURSTARROW = 6 CONST_ANI_THROWINGSTAR = 7 CONST_ANI_THROWINGKNIFE = 8 CONST_ANI_SMALLSTONE = 9 CONST_ANI_DEATH = 10 CONST_ANI_LARGEROCK = 11 CONST_ANI_SNOWBALL = 12 CONST_ANI_POWERBOLT = 13 CONST_ANI_POISON = 14 CONST_ANI_INFERNALBOLT = 15 CONST_ANI_HUNTINGSPEAR = 16 CONST_ANI_ENCHANTEDSPEAR = 17 CONST_ANI_REDSTAR = 18 CONST_ANI_GREENSTAR = 19 CONST_ANI_ROYALSPEAR = 20 CONST_ANI_SNIPERARROW = 21 CONST_ANI_ONYXARROW = 22 CONST_ANI_PIERCINGBOLT = 23 CONST_ANI_WHIRLWINDSWORD = 24 CONST_ANI_WHIRLWINDAXE = 25 CONST_ANI_WHIRLWINDCLUB = 26 CONST_ANI_ETHEREALSPEAR = 27 CONST_ANI_ICE = 28 CONST_ANI_EARTH = 29 CONST_ANI_HOLY = 30 CONST_ANI_SUDDENDEATH = 31 CONST_ANI_FLASHARROW = 32 CONST_ANI_FLAMMINGARROW = 33 CONST_ANI_SHIVERARROW = 34 CONST_ANI_ENERGYBALL = 35 CONST_ANI_SMALLICE = 36 CONST_ANI_SMALLHOLY = 37 CONST_ANI_SMALLEARTH = 38 CONST_ANI_EARTHARROW = 39 CONST_ANI_EXPLOSION = 40 CONST_ANI_CAKE = 41 CONST_ANI_WEAPONTYPE = 254 CONST_ANI_NONE = 255 CONST_ANI_LAST = CONST_ANI_CAKE1 ponto