Ir para conteúdo

hiquezerah

Membro
  • Registro em

  • Última visita

Tudo que hiquezerah postou

  1. .Qual servidor ou website você utiliza como base? OTX Qual o motivo deste tópico? Estou com uma ideia para uma spell de criar um item temporario que dê algum atribudo ao jogador por determinado tempo. Tentei colocar um decayto no item.xml e fazer por conjure mas não da para colocar exhaust por que vai exhaustar a cura do proprio jogador como: <conjure name="create item" words="createitem" lvl="300" mana="20" soul="1" conjureId="7382" conjureCount="10" aggressive="0" exhaustion="1000" needlearn="0" event="function" value="conjureItem"> </conjure> Então pensei em fazer por criação através de script, mas com o script que estou utilizando o item está sendo criado, mas o decayto não está funcionando. Eu precisaria que no proprio script removesse o item e colocasse um exhaust para conseguir a spell no proprio script, alguém poderia me ajudar por favor? No script abaixo eu precisaria que ele tivesse a função de remover o item do player após 10 segundos e uma exhaust para usar a spell novamente de 1 minuto. Alguém me ajuda por favor? Você tem o código disponível? Se tiver publique-o aqui: local cfg = { item = {7590, 3}, infinite = true, --Poderá pegar o item infinitas vezes? [true/sim] [false/não] } local storage = 91838 function onCastSpell(cid, var) if cfg.infinite then doPlayerAddItem(cid, cfg.item[1], cfg.item[2]) else if getPlayerStorageValue(cid, storage) < 1 then doPlayerAddItem(cid, item[1], item[2]) setPlayerStorageValue(cid, storage, 1) else return doPlayerSendCancel(cid, "Você já pegou seu item.") end end return true end
  2. hiquezerah postou uma resposta no tópico em Suporte Tibia OTServer
    @Orientalz tenta assim <globalevent name="othersboss" interval="1000" event="script" value="othersboss.lua"/>
  3. @Shiuns Olá, acabei de testar seu script e ele não está funcionando, não acontece nenhum erro, mas também não acontece nada.
  4. @Sun Sim, a spell é um buff que ja está registrada na vocation o spell.xml coloquei ela apenas para testar se funcionaria, está funcionando porém ocorre o erro da spell not found
  5. @FlameArcixt Desculpe-me a demora para responder mano, mas não consegui entender o que você quis dizer. Baixei o spell creator, o que necessariamente eu deveria fazer?
  6. .Qual servidor ou website você utiliza como base? OTX Qual o motivo deste tópico? Bom dia rapazeada do tk, alguém poderia me ajudar a solucionar esse erro que está ocorrendo com esse script? Acabei achando esse script aqui mesmo no tk e tentei adaptalo para assim que o player chegar a certa porcentagem de vida irá ativar uma spell. o script está funcionando, a spell está sendo ativada, porém mostra esse erro na distro "spell not found". Alguém poderia me ajudar por favor? Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: local config = { vocations = {10,11, 22}, --IDs das vocações. percent = 95, -- porcentagem de sair a magia (50 = 50% de chance) valorvida = 100, --quanto deve ser o valor minimo de vida a perder para executar o script storage = 112993, time = 1, spell = "shikai" } function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS and value >= config.valorvida and isInArray(config.vocations, getPlayerVocation(cid)) then if math.random (1,100) <= config.percent and getPlayerStorageValue(cid, 112993) < os.time() then doCreatureCastSpell(cid, config.spell) setPlayerStorageValue(cid, 112993, os.time() + config.time * 20) end end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  7. hiquezerah postou uma resposta no tópico em Suporte OTServer Derivados
    .Qual servidor ou website você utiliza como base? otx Qual o motivo deste tópico? estou tentando implementar um sistema de task por client module no otc. Adicionei os modules no client, mas está ocorrendo um erro ao ler a lib da task, alguém poderia verificar pra mim e ver se tem algum erro? Você tem o código disponível? Se tiver publique-o aqui: TABLE_RANKS_OTC = { [-1] = {"D"}, [0] = {"D","C"}, [1] = {"D","C","B"}, [2] = {"D","C","B","A"}, [3] = {"D","C","B","A","S"} } TABLE_RANK_LEVEL = { ["D"] = {{1,49}, -1, points = 1}, ["C"] = {{50,79}, 0, points = 25}, ["B"] = {{80,129}, 1, points = 999}, ["A"] = {{130,199}, 2, points = 999}, ["S"] = {{200,math.huge}, 3, points = 999} } TABLE_RANKS = {"D","C","B","A","S"} TABLE_DELAY_SAMPLER = 59*10 -- 10 minutos TABLE_TASKS = { ["rat"] = {id = 0, level = 01, count = 040, exp = 550, point = 1, delay = (59*1), lookType = {327}, msg = "You can kill the boss Big Rat in the sewer of Goa Kingdom." }, ["beggar"] = {id = 1, level = 01, count = 040, exp = 600, point = 1, delay = (59*3), lookType = {256,153,273}}, ["joker bee/god wind"] = {id = 2, level = 05, count = 070, exp = 900, point = 3, delay = (59*3), lookType = {51,53}, msg = "You can kill the Amethite in one of the mountains of Goa Kingdom." }, ["spider"] = {id = 3, level = 05, count = 080, exp = 1000, point = 3, delay = (59*5), lookType = {276}}, ["slug"] = {id = 4, level = 05, count = 080, exp = 1150, point = 3, delay = (59*5), lookType = {34}}, ["hedgehog"] = {id = 5, level = 05, count = 060, exp = 900, point = 2, delay = (59*5), lookType = {283}}, ["rotworm"] = {id = 6, level = 10, count = 080, exp = 1350, point = 3, lookType = {287, 288}}, ["rocky boar"] = {id = 7, level = 10, count = 100, exp = 1850, point = 4, lookType = {302}, msg = "You can kill the Enraged Rocky Boar in one of the mountains of Goa Kingdom." }, ["arboreal spectrum"] = {id = 8, level = 20, count = 150, exp = 4500, point = 10, lookType = {322}}, ["salamander"] = {id = 9, level = 20, count = 150, exp = 3000, point = 9, lookType = {283}}, ["slime"] = {id = 10, level = 25, count = 070, exp = 3000, point = 6, lookType = {357}, msg = "You can kill the Goome in the slime cave of Shell Town."}, ["imp"] = {id = 11, level = 25, count = 070, exp = 3500, point = 6, lookType = {317}, msg = "You can kill the Dharkos in the imp cave of Shell Town."}, ["ladybug"] = {id = 12, level = 15, count = 200, exp = 3100, point = 8, lookType = {433}, msg = "You can kill the Cydaea in the ladybug mountain of Shell Town."}, ["boar"] = {id = 13, level = 25, count = 300, exp = 10000, point = 17, lookType = {291}, msg = "You can kill the Hunger in the florest of Orange Town."}, ["crocodile"] = {id = 14, level = 25, count = 300, exp = 10000, point = 17, lookType = {309}}, ["crypt shambler"] = {id = 15, level = 25, count = 200, exp = 12000, point = 19, lookType = {414}}, ["dwarves"] = {id = 16, level = 20, count = 350, exp = 8500, point = 14, lookType = {447, 448, 449}, msg = "You can kill the Grief in the mine of Orange Town."}, ["giant lobster"] = {id = 17, level = 30, count = 200, exp = 14500, point = 22, delay = (59*15), lookType = {102}, msg = "You can kill the Yaomo in a cave of Syrup Village."}, ["spikeshell tortoise"] = {id = 18, level = 30, count = 200, exp = 17000, point = 24, delay = (59*15), lookType = {415}}, ["coryms"] = {id = 19, level = 25, count = 500, exp = 15000, point = 30, lookType = {451, 452, 453}}, ["tremor"] = {id = 20, level = 45, count = 150, exp = 18000, point = 35, delay = (59*20), lookType = {436}, msg = "You can kill the Laken in the rock mountain of Syrup Village."}, ["wyvern"] = {id = 21, level = 30, count = 150, exp = 15500, point = 26, delay = (59*20), lookType = {361}, msg = "You can kill the Toxic Fiend in the rock mountain of Cocoyashi Village."}, ["dragon"] = {id = 22, level = 50, count = 300, exp = 23500, point = 1, delay = (59*30), lookType = {313,459}}, ["gosme"] = {id = 23, level = 10, count = 300, exp = 5600, point = 9, lookType = {83}}, ["cobra"] = {id = 24, level = 15, count = 150, exp = 3150, point = 9, lookType = {81}}, ["tortoise"] = {id = 25, level = 20, count = 200, exp = 3500, point = 10, lookType = {461}, msg = "You can kill the boss Dahu below the mountain of Syrup Village." }, ["poisonous toad"] = {id = 26, level = 20, count = 200, exp = 4500, point = 13, lookType = {297}}, ["orcs"] = {id = 27, level = 20, count = 250, exp = 4500, point = 14, lookType = {380, 381, 379, 382, 386}}, ["buffalo"] = {id = 28, level = 25, count = 300, exp = 10000, point = 17, lookType = {80}}, ["grotesque"] = {id = 29, level = 25, count = 200, exp = 14500, point = 22, lookType = {419}, msg = "You can kill the boss Greek in the undeads of Orange Town." }, ["scarlet widow"] = {id = 30, level = 30, count = 150, exp = 14500, point = 28, delay = (59*20), lookType = {315}}, ["fierce crab"] = {id = 31, level = 40, count = 200, exp = 21000, point = 35, delay = (59*20), lookType = {416}, msg = "You can kill the boss Karkinos in the Fierce Crab cave of Syrup Village." }, ["venom spider"] = {id = 32, level = 45, count = 250, exp = 18000, point = 33, delay = (59*20), lookType = {465}}, ["necromancer"] = {id = 33, level = 50, count = 500, exp = 25000, point = 50, delay = (59*30), lookType = {418}, msg = "You can kill the boss Mergos in the undeads of Orange Town." }, ["giant spider"] = {id = 34, level = 50, count = 200, exp = 23000, point = 1, delay = (59*30), lookType = {316}, msg = "You can kill the boss Freja the Queen in the Giant Spider cave of Loguetown." }, ["bonebeast"] = {id = 35, level = 50, count = 100, exp = 15000, point = 1, delay = (59*30), lookType = {90}, msg = "You can kill the boss Tibicena in the undeads cave of Orange Town." }, ["trolls"] = {id = 36, level = 50, count = 500, exp = 24000, point = 1, delay = (59*30), lookType = {352, 353, 354, 355}, msg = "You can kill the boss Kappa in the trolls cave of Loguetown." }, ["swamp thing"] = {id = 37, level = 50, count = 225, exp = 22000, point = 1, delay = (59*30), lookType = {483}}, ["swamp monster"] = {id = 38, level = 55, count = 225, exp = 23500, point = 1, delay = (59*30), lookType = {484}, msg = "You can kill the boss Amygdala in the swamp mountain of Loguetown." }, ["fishmans"] = {id = 39, level = 55, count = 500, exp = 26000, point = 1, delay = (59*30), lookType = {408, 405, 404, 406, 407}, msg = "You can kill the boss Rom the Fishman in the fishman cave of Cocoyashi Village." }, ["ducksheep"] = {id = 40, level = 60, count = 150, exp = 17000, point = 1, delay = (59*30), lookType = {400}, msg = "You can kill the boss Orthrus in the Island of Rare Animals." }, ["zebird"] = {id = 41, level = 60, count = 150, exp = 20500, point = 1, delay = (59*30), lookType = {395}}, ["rhinoroo"] = {id = 42, level = 60, count = 300, exp = 26000, point = 1, delay = (59*30), lookType = {402}, msg = "You can kill the boss Panes in the Rhinoroo cave of the Island of Rare Animals." }, } TABLE_TASKS_MONSTERS = { -- NOME DOS BIXOS MINUSCULO !!!!!!!!!!!!! ["shabby beggar"] = "beggar", ["crazed beggar"] = "beggar", ["god wind"] = "joker bee/god wind", ["joker bee"] = "joker bee/god wind", ["big rotworm"] = "rotworm", ["dwarf miner"] = "dwarves", ["dwarf warrior"] = "dwarves", ["dwarf brave"] = "dwarves", ["corym charlatan"] = "coryms", ["corym skirmisher"] = "coryms", ["corym vanguard"] = "coryms", ["dragon"] = "dragon", ["dirt dragon"] = "dragon", ["orc"] = "orcs", ["orc warrior"] = "orcs", ["orc creeper"] = "orcs", ["orc shaman"] = "orcs", ["orc rider"] = "orcs", ["troll"] = "trolls", ["troll warrior"] = "trolls", ["troll berserker"] = "trolls", ["troll commander"] = "trolls", ["fishman punk"] = "fishmans", ["fishman bandit"] = "fishmans", ["fishman thug"] = "fishmans", ["sabresword fishman"] = "fishmans", ["fishman lancer"] = "fishmans", } TABLE_TASK_UNDEAD_SOPHIA = { -- ['nome do bixo minusculo'] = pontos_que_da_na_task_da_sophia, ['vielmond skeleton'] = 1, ['vielmond ghost'] = 1, ['vielmond shambler'] = 1, ['vielmond raise'] = 1, ['vielmond grotesque'] = 1, } TABLE_TASK_BUSINESS_AROUND_THE_WORLD = { ['troll'] = {count = 30, storage_multiplier = 1000000}, ['troll warrior'] = {count = 20, storage_multiplier = 10000}, ['troll berserker'] = {count = 10, storage_multiplier = 100}, ['troll commander'] = {count = 2, storage_multiplier = 1}, } TOTAL_VALUE_FROM_TASK_BUSINESS_AROUND_THE_WORLD = table.foldr(TABLE_TASK_BUSINESS_AROUND_THE_WORLD, 0, function (acc, task) return acc + task.count * task.storage_multiplier end) TABLE_TASK_SAVING_BUGGY_BIRDS = { ['baby bird'] = {count = 250, storage_multiplier = 1}, ['big bird'] = {count = 80, storage_multiplier = 1000}, } TOTAL_VALUE_FROM_TASK_SAVING_BUGGY_BIRDS = table.foldr(TABLE_TASK_SAVING_BUGGY_BIRDS, 0, function (acc, task) return acc + task.count * task.storage_multiplier end) -------------------------------------------------------------------------------- task = { avaiable = function(cid, taskname) return true end, getStorage = function(index, offset) return STORAGE_TASK.START + (index * STORAGE_TASK.CONST.OFFSET_COUNT) + offset end, finished = function(cid, taskname) -- se matou all e ja reportou no npc return getPlayerStorageValue(cid, task.getStorage(TABLE_TASKS[taskname].id, STORAGE_TASK.CONST.OFFSET.FINISHED)) == 1 end, kills = function(cid, taskname) -- quantidade de vezes que ja matou determinado bixo return getPlayerStorageValue(cid, task.getStorage(TABLE_TASKS[taskname].id, STORAGE_TASK.CONST.OFFSET.KILLS)) end, killedNeededCount = function(cid, taskname) return task.kills(cid, taskname) >= TABLE_TASKS[taskname].count end, slot = function(cid, number) -- tem no maximo "STORAGE_TASK.CONST.MAX_TASKS_TOGETHER" de slots if number > STORAGE_TASK.CONST.MAX_TASKS_TOGETHER then print("[ERROR] lib_Tasks.lua excedeu o limite de slots!!!!!!!!!!!!!!!!!!!!!!") end return getPlayerStorageValue(cid, STORAGE_TASK.ACTIVE_NAMES + number) end, doing = function(cid, taskname) -- ve se essa task ja nao esta sendo feita por mim for i = 1, STORAGE_TASK.CONST.MAX_TASKS_TOGETHER do if task.slot(cid, i) == taskname then return true end end return false -- nao esta fazendo esta task end, doEraseSlot = function(cid, taskname) for i = 1, STORAGE_TASK.CONST.MAX_TASKS_TOGETHER do if task.slot(cid, i) == taskname then setPlayerStorageValue(cid, STORAGE_TASK.ACTIVE_NAMES + i, "") break end end end, doSaveSlot = function(cid, taskname) if task.doing(cid, taskname) then -- ja esta fazendo essa task em algum slot return false end for i = 1, STORAGE_TASK.CONST.MAX_TASKS_TOGETHER do if not TABLE_TASKS[ task.slot(cid, i) ] then -- linha vazia setPlayerStorageValue(cid, STORAGE_TASK.ACTIVE_NAMES + i, taskname) return true end end return false -- nao encontrou nenhum slot disponivel end, doSetKills = function(cid, taskname, count) -- define a quantidade de monstros matados em determinado slot setPlayerStorageValue(cid, task.getStorage(TABLE_TASKS[taskname].id, STORAGE_TASK.CONST.OFFSET.KILLS), count) task.doParseTask(cid, taskname) end, doSetBossKill = function(cid, taskname, count) setPlayerStorageValue(cid, task.getStorage(TABLE_TASKS[taskname].id, STORAGE_TASK.CONST.OFFSET.KILLED_BOSS), count) end, doSetFinished = function(cid, taskname, count) -- define se ja terminou (-1 = nunca tentou, 0 = não terminou, 1 = terminou) setPlayerStorageValue(cid, task.getStorage(TABLE_TASKS[taskname].id, STORAGE_TASK.CONST.OFFSET.FINISHED), count) end, doParseTask = function(cid, taskname) local __buffer = {} local rank = ((getPlayerStorageValue(cid,STORAGE_TASK.VIEW) == -1) and "D" or getPlayerStorageValue(cid,STORAGE_TASK.VIEW)) local avaiableTasks = getAvaiableTasks(cid) for creature, taskInfo in pairs(avaiableTasks) do if taskInfo.lookType then if TABLE_RANK_LEVEL[rank] then if getPlayerStorageValue(cid, STORAGE_TASK.RANK) >= TABLE_RANK_LEVEL[rank][2] then if getPlayerLevel(cid) >= TABLE_RANK_LEVEL[rank][1][1] and taskInfo.level >= TABLE_RANK_LEVEL[rank][1][1] and taskInfo.level <= TABLE_RANK_LEVEL[rank][1][2] then if creature == taskname then __buffer[1] = {} __buffer[1].id = creature __buffer[1].level = taskInfo.level __buffer[1].lookType = taskInfo.lookType __buffer[1].reward = taskInfo.exp.." Experience and "..taskInfo.point.." Point(s)." __buffer[1].doing = task.doing(cid, creature) if taskInfo.msg then __buffer[1].msg = taskInfo.msg end __buffer[1].count = taskInfo.count __buffer[1].kills = (task.kills(cid, creature) == -1) and 0 or task.kills(cid, creature) break end end end end end end doSendPlayerExtendedOpcode(cid, GameServerOpcodes.TaskModule, table.tostring(__buffer)) end, doParseTasks = function(cid) function compare(a,b) return a.level < b.level end local __buffer = {} local __resetBuffer = {} local rank = ((getPlayerStorageValue(cid,STORAGE_TASK.VIEW) == -1) and "D" or getPlayerStorageValue(cid,STORAGE_TASK.VIEW)) local avaiableTasks = getAvaiableTasks(cid) for creature, taskInfo in pairs(avaiableTasks) do if taskInfo.lookType then if TABLE_RANK_LEVEL[rank] then if getPlayerStorageValue(cid, STORAGE_TASK.RANK) >= TABLE_RANK_LEVEL[rank][2] then if getPlayerLevel(cid) >= TABLE_RANK_LEVEL[rank][1][1] and taskInfo.level >= TABLE_RANK_LEVEL[rank][1][1] and taskInfo.level <= TABLE_RANK_LEVEL[rank][1][2] then local bufferid = #__buffer + 1 __buffer[bufferid] = {} __buffer[bufferid].id = creature __buffer[bufferid].level = taskInfo.level __buffer[bufferid].lookType = taskInfo.lookType __buffer[bufferid].reward = taskInfo.exp.." Experience and "..taskInfo.point.." Point(s)." __buffer[bufferid].doing = task.doing(cid, creature) if taskInfo.msg then __buffer[bufferid].msg = taskInfo.msg end __buffer[bufferid].count = taskInfo.count __buffer[bufferid].kills = (task.kills(cid, creature) == -1) and 0 or task.kills(cid, creature) table.sort(__buffer, compare) end end end end end doSendPlayerExtendedOpcode(cid, GameServerOpcodes.TaskModule, "[resetList]") doSendPlayerExtendedOpcode(cid, GameServerOpcodes.TaskModule, table.tostring(__buffer)) end, doParsePlayer = function(cid) local ranks = TABLE_RANKS_OTC[getPlayerStorageValue(cid, STORAGE_TASK.RANK)] local __buffer = {} __buffer["[pointsHave]"] = getPlayerStorageValue(cid, STORAGE_TASK.POINTS) if ranks then __buffer["[unlockedRanks]"] = ranks end doSendPlayerExtendedOpcode(cid, GameServerOpcodes.TaskModule, table.tostring(__buffer)) end, doCancel = function(cid, taskname) -- cancelar slot de task (ou por cancelar ou quando termina mesmo) if task.doing(cid, taskname) then task.doEraseSlot(cid, taskname) task.doSetBossKill(cid, taskname, 0) task.doSetFinished(cid, taskname, 0) task.doSetKills(cid, taskname, 0) return true end return false end, doStart = function(cid, taskname) -- se o storage == 0, entao ele ja comecou essa task alguma vez na vida task.doSetFinished(cid, taskname, 0) setPlayerStorageValue(cid, STORAGE_TASK.APPEAR_QUESTLOG, 0) -- aparecer na quest log task.doSetKills(cid, taskname, 0) end, doComplete = function(cid, taskname) if not TABLE_TASKS[taskname].delay then TABLE_TASKS[taskname].delay = TABLE_DELAY_SAMPLER end doPlayerAddExp(cid, TABLE_TASKS[taskname].exp) setPlayerStorageValue(cid, task.getStorage(TABLE_TASKS[taskname].id, STORAGE_TASK.CONST.OFFSET.DELAY), os.time() + TABLE_TASKS[taskname].delay) setPlayerStorageValue(cid, STORAGE_TASK.POINTS, TABLE_TASKS[taskname].point + getPlayerStorageValue(cid, STORAGE_TASK.POINTS)) if TABLE_TASKS[taskname].msg ~= nil then doPlayerSendTextMessage(cid, 20, TABLE_TASKS[taskname].msg) end task.doCancel(cid, taskname) task.doSetFinished(cid, taskname, 1) task.doParsePlayer(cid) end, getTaskTableByTarget = function(cid, targetname) --for index, v in pairs(TABLE_TASKS) do -- if isInArray(v.creatures, targetname) then -- return v -- end --end --return nil -- daqui pra cima era o metodo antigo if TABLE_TASKS[targetname] then return targetname, TABLE_TASKS[targetname] elseif TABLE_TASKS_MONSTERS[targetname] then -- da mesma especie mas tem nome diferente Ex: dragon lord return TABLE_TASKS_MONSTERS[targetname], TABLE_TASKS[ TABLE_TASKS_MONSTERS[targetname] ] end return nil end, } -------------------------------------------------------------------------------- --[[ old function getAvaiableTasks(cid) local retorno = "" for index, v in pairs(TABLE_TASKS) do if task.avaiable(cid, index) then -- index de string retorno = retorno .. "{" .. index .. "}, " end end return string.sub(retorno, 1, string.len(retorno)-2) -- pra retirar o ultimo caracter (virgula) da string end ]] function getAvaiableTasks(cid) local retorno = {} for index, v in pairs(TABLE_TASKS) do if task.avaiable(cid, index) then -- index de string retorno[index] = v end end return retorno end function getDoingTasks(cid) local retorno = "" for indexName, v in pairs(TABLE_TASKS) do if task.doing(cid, indexName) then -- index de string retorno = retorno .. "{" .. indexName .. "}, " end end return string.sub(retorno, 1, string.len(retorno)-2) -- pra retirar o ultimo caracter (virgula) da string end -------------------------------------------------------------------------------- local function doGenerateTaskQuestLog() local questxml = ' <quest name="Tasks" startstorageid="' .. STORAGE_TASK.APPEAR_QUESTLOG .. '" startstoragevalue="0" endstoragevalue="1"> \n' for name, task_line in pairs(TABLE_TASKS) do -- gerar cada quest log local storage = task.getStorage(task_line.id, STORAGE_TASK.CONST.OFFSET.FINISHED) questxml = questxml .. ' <mission name="' .. name .. '" storageid="' .. storage .. '" startvalue="0" endvalue="1"> \n' .. ' <missionstate id="0" description="Kill ' .. task_line.count .. ' ' .. name .. 's and report to take you prize."/> \n' .. ' </mission> \n ' end questxml = questxml .. ' </quest>\n' local file = io.open("data\\XML\\quests.xml", "w") file:write(questxml) file:close() end --doGenerateTaskQuestLog()
  8. @Pisces Muito obrigado mano, estou começando a conseguir fazer algumas coisas do zero agora, então ta um pouco dificil ainda, mas com certeza irei utilizar o seu codigo e estudar ele um pouco, estou tendo uma grande dificuldade para criar tabelas mas muito obrigado
  9. .Qual servidor ou website você utiliza como base? Otx Qual o motivo deste tópico? Olá rapazeada do Tibiaking, Boa noite!! Fiz esse script simples para o meu servidor com o intuinto de colocar um pouco mais de rpg em clicar em alguns lugares diferentes no cenário. Existe varios lugares que eu precisarei utilizar esse script, e seria muito melhor utilizar apenas um script para todos os locais ao envés de criar vários scripts, sabe? Alguém poderia me ajudar a colocar uma actionid para cada teleport dentro do mesmo script? ex: poder repetir o script dentro dele mesmo e mudar os locais e a actionid local teleport1 = {x=283, y=984, z=6} local teleport2 = {x=284, y=985, z=6} if isPlayer(cid) then -- actionid 222 doTeleportThing(cid, teleport1) doSendMagicEffect(getPlayerPosition(cid), 12) end else if isPlayer(cid) then -- actionid 111 doTeleportThing(cid, teleport2) doSendMagicEffect(getPlayerPosition(cid), 12) end end Você tem o código disponível? Se tiver publique-o aqui: function onUse(cid, item, fromPosition, item2, toPosition) local teleport = {x=283, y=984, z=6} if isPlayer(cid) then doTeleportThing(cid, teleport) doSendMagicEffect(getPlayerPosition(cid), 12) end end Olá rapazeada, desculpe-me a minha preguiça e não ter tentado ir um pouco mais no script, acabei fazendo alguns teste e consegui resolver, postarei o resultado embaixo caso alguém precise. function onUse(cid, item, fromPosition, item2, toPosition) local teleport1 = {x=283, y=984, z=6} local teleport2 = {x=291, y=976, z=7} -- Pos que irá teleportar, repita um desses caso queira adicionar mais algum teleport -- if isPlayer(cid) and item.uid == 12222 then -- mude o "12222" para cada teleport e adicione ao item no remeres doTeleportThing(cid, teleport1) doPlayerSendTextMessage(cid,25,"Passagem Secreta") doSendMagicEffect(getPlayerPosition(cid), 12) end -- Se quiser adicionar mais teleportes repita apenas até o end if isPlayer(cid) and item.uid == 12223 then -- mude o "12223" para cada teleport e adicione ao item no remeres doTeleportThing(cid, teleport2) -- mude de acordo com o local criado la encima doPlayerSendTextMessage(cid,25,"Succes") doSendMagicEffect(getPlayerPosition(cid), 12) end -- este aqui end Em action.xml adicione as tags <action uniqueid = "12222" event = "script" value = "teleportes/goa1.lua" /> <action uniqueid = "12223" event = "script" value = "teleportes/goa1.lua" />
  10. Boa noite, desculpe-me reviver o tópico, mas seria possivel editar esse script para aumentar o dano do personagem permanent? Por exemplo, colocar pra usar um item, exemplo "mastermind potion", ao usar o item o jogador ganhará 5% de dano a mais tanto em atk basico quanto em magia, alguém poderia me ajudar por favor?
  11. hiquezerah postou uma resposta no tópico em Websites
    @ Pedro. Oii boa noite mano, não estou conseguindo baixar, você poderia upa-lo novamente no mediafire? por favor
  12. .Qual servidor ou website você utiliza como base? otx Qual o motivo deste tópico? Olá rapazeada do Tibiaking, bom dia! bom... eu tive uma ideia sobre "Online Bonus", antes de vir até aqui eu procurei e não consegui encontrar o que eu queria. Encontrei varios "Online Bonus" mas eles são de farmar pontos online e ganhar P.a quando pegar uma certa quantidade de pontos. Eu pensei no seguinte, o script verificar quantas pessoas está online no servidor e ele da uma bonificação. Exemplo abaixo 10 players online = 1% de exp para todos que estão online 50 players online = 5% de exp para todos que estão online 100 players online = 7% de exp para todos que estão online (e assim sucessivamente). Esse é o essencial do script, mas se der para adicionar para os players ganharem uma quantidade de Magic level (configuravel). Exemplo: Apartir de 100 players online todos players que estiverem online vão ganhar 7% de exp e 2 magic level. mas se 1 player deslogar e ficar 99 players online o bonus volta a ser apenas os 5% de (50 players online) Esqueci de mencionar uma coisa, se possivel adicionar uma tabela para os players verificarem qual é o bonus que está acontecendo no momento, uma talkaction. Por exemplo !online bonus: e mostrar as bonificação de cada nivel de players online e qual está ativa no momento. Agradeço desde ja se alguém conseguir me ajudar com esse sistema!
  13. Claro, sem pressa mano, quando puder tudo bem. Obrigado pela ajuda!
  14. Boa noite @Vodkart, estava testando até agora, o script funcionou. Mas está dando um erro na distro e ele não está removendo os itens do basin, poderia da uma olhada pra mim por favor? Seria possivel adicionar um tempo para poderem fazer essa quest? por exemplo dias ou horas? seria de grande importancia!
  15. Olá, desculpa reviver o tópico. Estou com uma tentativa de criar uma quest parecida, esse script iria me ajudar muito, mas ta acontecendo um error, alguém poderia me ajudar por favor? @Vodkart poderia me ajudar com esse problema por favor?
  16. .Qual servidor ou website você utiliza como base? Otx Qual o motivo deste tópico? Estou precisando de ajuda para criar um evento no meu servidor, tive uma ideia para os jogadores não ficarem tão parado durante o momento jogado no servidor, alguns jogadores terão que se juntar pra irem dropar alguns itens e sacrificar nos "basins". Bom, os jogadores terão que arrastar o item "x" para cima do basin normal e o item irá sumir, então o basin normal irá se transformar no outro, aquele com fogo encima. os jogadores terão que sacrificar 8 itens diferentes ou pode ser iguais mesmo, o importante é que seja sacrificado um item por vez. Arrastar item "x" pra cima do basin e o sacrificio continuar, quando sacrificar todos os items, no sqm cinza irá aparecer um teleport para levar todos os jogadores há um local onde haverá varios itens no chão. Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  17. hiquezerah postou uma resposta no tópico em Suporte OTServer Derivados
    acabei de testar amigo, não aconteceu nenhum erro na distro. porém não funcionou
  18. hiquezerah postou uma resposta no tópico em Suporte OTServer Derivados
    .Qual servidor ou website você utiliza como base? OTX Qual o motivo deste tópico? estou precisando de ajuda para arrumar um script. No caso eu estou precisando de ajuda de como adicionar mais tabelas de monstro no mesmo script. O script atual estar funcionando perfeitamente, porém eu tenho ideias para adicionar o script em mais uns três monstros e não estou conseguindo adicionar mais tabelas para outros monstros, alguém poderia me ajudar por favor? Você tem o código disponível? Se tiver publique-o aqui: -- Coded by Zoom. local bosses = { ["Ogre"] = { {itemid = 12663, count = {min = 1, max = 1}}, {itemid = 12682, count = {min = 1, max = 1}}, {itemid = 12696, count = {min = 1, max = 1}}, {itemid = 2160, count = {min = 2, max = 5}} } } -- functions.. function getRotate(uid) local pos = getCreaturePosition(uid) return { {x = pos.x, y = pos.y - 3, z = pos.z}, {x = pos.x + 3, y = pos.y - 2, z = pos.z}, {x = pos.x + 2, y = pos.y, z = pos.z}, {x = pos.x - 1, y = pos.y - 3, z = pos.z} } end function onKill(cid, target) local bid = bosses[getCreatureName(target)] if isMonster(target) and bid and getStorage(33975) <= os.time() then doCreatureSetDropLoot(target, nil) for _, v in ipairs(bid) do doCreateItem(v.itemid, math.random(v.count.min, v.count.max), getRotate(target)[_]) doSendMagicEffect(getRotate(target)[_], 6) end doSetStorage(33975, os.time() + 5) end return true end function onLogin(cid) return registerCreatureEvent(cid, "droptable") end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  19. hiquezerah postou uma resposta no tópico em Suporte Tibia OTServer
    .Qual servidor ou website você utiliza como base? Otx Qual o motivo deste tópico? estou com meu servidor online, mas estou sofrendo com alguns bugs inesperado. Acontece que algumas pessoas quando morrem perde itens mesmo com o aol ou blesses. eu fui obrigado a adicionar esse script abaixo quando o personagem está com bless, mas ainda fica surgindo esse error. Alguém por favor poderia me ajudar com esse erro do script ou resolver todo o problema? Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: function onDeath(cid, corpse, deathList) for b = 1, 5 do if isPlayer(cid) and getPlayerBlessing(cid, b) and getCreatureSkullType < 4 then doSetCreatureDropLoot(cid, false) end end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  20. .Qual servidor ou website você utiliza como base? Otx Qual o motivo deste tópico? Estou com um projeto em mãos e ao meu ponto de vista estava tudo perfeito sem bug algum! Mas faz um dia que peguei uma VPS da LGV HOST e coloquei o servidor online, estou enfrentando um grande problema no qual a distro crasha (não respondendo) depois de um certo tempo online. Não mostra nenhum erro na distro para eu ao menos tentar arrumar. Alguém que tenha conhecimento nessa area ou até mesmo nesse bug que possa estar acontecendo poderia me ajudar? A VPS que estou usando tem essas configurações abaixo: 16GB RAM Localização: Dallas - TXvCPU: 4 vCPU - 5GHzHD: 100GB SSDSistema Operacional: Windows Server 2012 R2 - 64bit Tamanho do mapa que eu estou utilizando é de 27mb, acredito que não seja problema de RAM Por favor alguém me ajuda
  21. .Qual servidor ou website você utiliza como base? TFS 0.4 Qual o motivo deste tópico? Estou precisando de uma ajuda para terminar um sistema que eu tinha ideia e acabei encontrando aqui no tk. Porém não atende as minhas necessidades, o script atual qualquer "vocação" consegue pegar outfits diferentes. Eu preciso que o script verifique a vocation do player, Exemplo: se o vocation goku estiver o item "1111" e ele realmente for a vocation entre 1-10 ele irá ganhar a outfit "10". Mas se for um trunks e ele estiver o item "1111" não irá funcionar, irá retornar uma mensagem, "você não pode usar essa skin" Você tem o código disponível? Se tiver publique-o aqui: local config = { ["goku"] = { itemId = 1111, storage = 6970, outfitId = 134}, ["trunks"] = { itemId = 2158, storage = 6971, outfitId = 152}, ["vegeta"] = { itemId = 2156, storage = 6972, outfitId = 151} } function onSay(cid, words, param) if param == '' then local texto = '' for i,k in pairs(config) do if ( getPlayerStorageValue(cid, config[i].storage) ~= -1 ) then texto = texto..i..' - Sim\n' else texto = texto..i..' - Nao\n' end end doPlayerPopupFYI(cid, texto) return true end if config[param] then if ( getPlayerItemCount(cid, config[param].itemId) > 0 ) then doCreatureChangeOutfit(cid, {lookType = config[param].outfitId}) setPlayerStorageValue(cid, config[param].storage, 0) else doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, 'MENSAGEM') end end return false end
  22. @Guilherme HP "morrer" significa relogar também, você deve ter alguma pasta com o script adicionado com outro nome, olhe todos os seus creaturescripts...
  23. @Nightowl Obrigado por ter ajudado mano, vlw mesmo!
  24. @LeoTK O script funciona da seguinte forma, quando o player morrer aparecer um "corpo" apenas para ele. Um exemplo seria quando o "naruto" morrer, um corpo do naruto ficaria no chão, assim como funciona no tiba, so que cada vocação teria o seu próprio corpo, e a segunda parte do script é: Se a vocation "1" morrer, qual será a vocation que ela irá se transformar. [2] = {1, 2, 121}, [3] = {1, 2, 121}, [4] = {1, 2, 121}, [5] = {1, 2, 121} [2] quando essa vocation morrer, ela irá voltar para a vocation 1 que no caso é o naruto ainda. Os servidores derivados existe muitas transformações para apenas uma vocação, então esse script é necessario para não haver o erro que está acontecendo com o pessoal acima. Em outras palavras, esse script serve para voltar transformações, a cada 50 level por exemplo o player tem uma transformação nova, se por acaso o player pegou o level 100 e morreu, ele voltou pro 99 então ele iria perder a transformação do level 100. Pois ele iria voltar para primeira vocation e teria que transformar novamente. acho que não devo ter explicado muito bem, mas espero que consiga entender.
  25. @Jodes , @Guilherme HP , @NTO Adventure Vocês ainda estão com o mesmo problema? Vai em CreatureScript e depois em Niwdeath verifica se todas as vocações estão com os corpos certos e as vocations para qual elas vão voltar após morrer. local table = { --_Naruto_-- [1] = 12788, [2] = 12788, [3] = 12788, [4] = 12788, [5] = 12835 } local config = { --[vocation id] = { level, nova voc, looktype, efeito} -- Naruto [2] = {1, 2, 121}, [3] = {1, 2, 121}, [4] = {1, 2, 121}, [5] = {1, 2, 121} } local function transform(pos, id, voc) local item = getTileItemById(pos, id) if item and item.uid > 1 then doTransformItem(item.uid, table[voc]) doDecayItem(item.uid or 0) end end function onDeath(cid, corpse) --setPlayerStamina(cid, getPlayerStorageValue(cid, 34442)) local voc = config[getPlayerVocation(cid)] if voc then doPlayerSetVocation(cid, voc[1]) local outfit = {lookType = voc[2]} doCreatureChangeOutfit(cid, outfit) else end if not isPlayer(cid) or not table[getPlayerVocation(cid)] then return true end addEvent(transform, 1, getThingPos(cid), corpse.itemid, getPlayerVocation(cid)) return true end Um exemplo acima de como ficaria, todos devem está com o ID da vocation certa, caso contrario irá mudar de vocação. local config = { --[vocation id] = { level, nova voc, looktype, efeito} -- Naruto [2] = {200, 2, 121}, [3] = {32, 2, 121}, [4] = {42, 2, 121}, [5] = {52, 2, 121}, O exemplo acima é um exemplo que talvez esteja acontecendo com vocês, quando a vocation "2" morre ela irá mudar para a vocation 200 que certamente não é mais o naruto, e assim sucessivamente.

Informação Importante

Confirmação de Termo