Ir para conteúdo

Vodkart

Héroi
  • Registro em

Tudo que Vodkart postou

  1. Esqueceu uma coisa. Dentro dessa sala, ao matar o boss, esse mesmo boss vai dar uma storage? é pq o jogador não poderá ir novamente se já matou o boss, certo?
  2. @grillo1995 fico no aguardo.
  3. @poko360 vou refazer de outra forma hoje e testar ai posto aqui. mas é mto estranho tenta assim: https://pastebin.com/raw/WC7ADAYs se não der, eu pesquisei um pouco e um cara da OTLand disse o seguinte: "Change the database to use INT instead of var for storage values." aqui está o tópico dele: https://otland.net/threads/attempt-to-compare-number-with-string.266160/
  4. @hiquezerah está sendo verificado sim amigo, na área que escolheu, está tudo sendo no mapper editor? vc consegue criar o monstro lá nessa area com o /m? usa assim: local create_tab = { area = {{x=2795,y=879,z=7}, {x=2799,y=886,z=7}}, -- começo e fim items = { {chance = 50, itemid = 2173, amount = 1}, {chance = 10, itemid = 2494, amount = 1}, {chance = 100, itemid = 2159, amount = 20}, {chance = 100, itemid = 2160, amount = 100}, {chance = 100, name = "Gerador"}, -- monster name {chance = 100, itemid = 1111, amount = 1, actionID = 26008} -- uma chest por exemplo } } function isWalkable(pos) -- by Nord / editado por Omega if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false elseif isCreature(getTopCreature(pos).uid) then return false elseif getTileInfo(pos).protection then return false elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then return false end return true end function doAddItenFromMap() local pos = {x= math.random(create_tab.area[1].x,create_tab.area[2].x), y=math.random(create_tab.area[1].y,create_tab.area[2].y), z=create_tab.area[1].z} local var = create_tab.items[math.random(#create_tab.items)] if isWalkable(pos) and var.chance > math.random(1, 100) then if var.name ~= nil then doCreateMonster(var.name, pos, false, true) 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) else local ret = doCreateItem(var.itemid, var.amount, pos) if var.actionID ~= nil then doItemSetAttribute(ret, "aid", var.actionID) end end else doAddItenFromMap() end end function onThink(cid, interval, lastExecution) doAddItenFromMap() return true end
  5. @grillo1995 é que tem um bug no forum nessas code box. copia daqui o código: https://pastebin.com/raw/YJkD17pD
  6. tenta usar doSummonCreature(var.name, pos) e esse monstro vc consegue criar pelo /m ?
  7. @hiquezerah local create_tab = { area = {{x=2795,y=879,z=7}, {x=2799,y=886,z=7}}, -- começo e fim items = { {chance = 50, itemid = 2173, amount = 1}, {chance = 10, itemid = 2494, amount = 1}, {chance = 100, itemid = 2159, amount = 20}, {chance = 100, itemid = 2160, amount = 100}, {chance = 100, name = "Gerador"}, -- monster name {chance = 100, itemid = 1111, amount = 1, actionID = 26008} -- uma chest por exemplo } } function isWalkable(pos) -- by Nord / editado por Omega if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false elseif isCreature(getTopCreature(pos).uid) then return false elseif getTileInfo(pos).protection then return false elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then return false end return true end function doAddItenFromMap() local pos = {x= math.random(create_tab.area[1].x,create_tab.area[2].x), y=math.random(create_tab.area[1].y,create_tab.area[2].y), z=create_tab.area[1].z} local var = create_tab.items[math.random(#create_tab.items)] if isWalkable(pos) and var.chance > math.random(1, 100) then if var.name ~= nil then doCreateMonster(var.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) else local ret = doCreateItem(var.itemid, var.amount, pos) if var.actionID ~= nil then doItemSetAttribute(ret, "aid", var.actionID) end end else doAddItenFromMap() end end function onThink(cid, interval, lastExecution) doAddItenFromMap() return true end
  8. @poko360 é qndo termina a task? ou em algum monstro especifico? testei aqui e não apareceu esse erro... vc não está usando as mesmas storages da task antiga né?
  9. local create_tab = { area = {{x=2795,y=879,z=7}, {x=2799,y=886,z=7}}, -- começo e fim items = { {chance = 50, itemid = 2173, amount = 1}, {chance = 10, itemid = 2494, amount = 1}, {chance = 100, itemid = 2159, amount = 20}, {chance = 100, itemid = 2160, amount = 100}, {chance = 100, itemid = 1111, amount = 1, actionID = 26008} -- uma chest por exemplo } } function isWalkable(pos) -- by Nord / editado por Omega if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false elseif isCreature(getTopCreature(pos).uid) then return false elseif getTileInfo(pos).protection then return false elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then return false end return true end function doAddItenFromMap() local pos = {x= math.random(create_tab.area[1].x,create_tab.area[2].x), y=math.random(create_tab.area[1].y,create_tab.area[2].y), z=create_tab.area[1].z} local var = create_tab.items[math.random(#create_tab.items)] if isWalkable(pos) and var.chance > math.random(1, 100) then local ret = doCreateItem(var.itemid, var.amount, pos) if var.actionID ~= nil then doItemSetAttribute(ret, "aid", var.actionID) end else doAddItenFromMap() end end function onThink(cid, interval, lastExecution) doAddItenFromMap() return true end quando quiser adicionar actionID você adiciona um novo parametro na tabela, está assim: items = { {chance = 50, itemid = 2173, amount = 1}, {chance = 10, itemid = 2494, amount = 1}, {chance = 100, itemid = 2159, amount = 20}, {chance = 100, itemid = 2160, amount = 100}, {chance = 100, itemid = 1111, amount = 1, actionID = 26008} -- uma chest por exemplo } e vc quer adicionar outro bau com id '2222' por exemplo com actionID 26010, basta fazer assim: items = { {chance = 50, itemid = 2173, amount = 1}, {chance = 10, itemid = 2494, amount = 1}, {chance = 100, itemid = 2159, amount = 20}, {chance = 50, itemid = 2222, amount = 1, actionID = 26010}, -- botei outra actionID {chance = 100, itemid = 1111, amount = 1, actionID = 26008} -- uma chest por exemplo }
  10. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    Castle.desde = {x = 1027, y = 914, z = 7, stackpos = 1} Castle.empePos = {x = 312, y = 377, z = 6, stackpos = 253}
  11. mas dentro desse bau, teria itens dentro? ou caso fosse uma bag, já teria itens dentro da bag? ou é somente itens aleatorios? digamos, uma solar axe por exemplo no chao
  12. function getGuildMembers(GuildId) local players,query = {},db.getResult("SELECT `name` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. GuildId .. ");") if (query:getID() ~= -1) then repeat table.insert(players,query:getDataString("name")) until not query:next() query:free() end return #players > 0 and players or false end function onSay(cid, words, param, channel) local time, storage = 10,786974 local min_player = 20 local level_min = 250 if getPlayerGuildId(cid) <= 0 or getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "você precisa ser lider de uma guild") return true elseif #getGuildMembers(getPlayerGuildId(cid)) < min_player then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua guild precisa ter no min "..min_player.." players") return true elseif getPlayerLevel(cid) < level_min then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce precisa ser level "..min_player.."ou mais para mandars mensagens") return true elseif getPlayerStorageValue(cid, storage) - os.time() > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to wait " .. os.time() - getPlayerStorageValue(cid, storage) .. " seconds.") return true end for _, pid in ipairs(getPlayersOnline()) do if(getPlayerGuildLevel(pid) == GUILDLEVEL_LEADER) then doPlayerSendTextMessage(pid, MESSAGE_EVENT_ADVANCE, getCreatureName(cid) .. ": " .. param) end end doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Mensagem enviada com sucesso") setPlayerStorageValue(cid, storage, os.time()+time*60) return true end
  13. mas como esse cassino funciona? tem algum video?
  14. @poko360 entendi, então eu fiz de forma individual, para colocar na propria tabela...: <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Automatic Simple Task" version="1.0" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="auto_stask"><![CDATA[ automatic_task = { [1] = {name = "Trolls", storage = 761000, monsters_list = {"Troll","Troll champion"}, can_repeat = true, level_min = 10, count = 5, reward = {{2173,1}}, exp = 2000, money = 2000}, [2] = {name = "rotworms", storage = 761001, monsters_list = {"rotworm","carrion worm","Rotworm Queen"}, can_repeat = true, level_min = 11, count = 6, reward = {{2173,1},{2159,10}}, exp = 2500, money = 3000}, [3] = {name = "cyclops", storage = 761002, monsters_list = {"cyclops","cyclops smith","cyclops drone"}, can_repeat = true, level_min = 12, count = 7, reward = {{2173,2},{2159,50}}, exp = 3000, money = 3000}, [4] = {name = "ORSHABAAL BOSS", storage = 761003, monsters_list = {"orshabaal"}, can_repeat = false, level_min = 15, count = 1, reward = {{2173,2},{2159,100}}, exp = 10000, money = 10000} } automatic_task_config = { reward_type = MESSAGE_STATUS_CONSOLE_BLUE, defeat_type = MESSAGE_STATUS_CONSOLE_ORANGE, defeat_storage = 963850, lvl_advance_control = 963851 } function getItemsFromList(items) local str = '' if table.maxn(items) > 0 then for i = 1, table.maxn(items) do str = str .. items[i][2] .. ' ' .. getItemNameById(items[i][1]) if i ~= table.maxn(items) then str = str .. ', ' end end end return str end function getMonsterFromList(monster) local str = '' if #monster > 0 then for i = 1, #monster do str = str .. monster[i] if i ~= #monster then str = str .. ', ' end end end return str end function GiveRewardsTask(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 ]]></config> <event type="advance" name="TaskAutAdvance" event="script"><![CDATA[ domodlib('auto_stask') function onAdvance(cid, skill, oldLevel, newLevel) if (skill == SKILL__LEVEL) then if getPlayerStorageValue(cid, automatic_task_config.lvl_advance_control) < newLevel then for k, v in pairs(automatic_task) do if v.level_min == newLevel then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[Task System] Voce Desbloqueou a "..v.name.." Task! Parabéns!") end end setPlayerStorageValue(cid, automatic_task_config.lvl_advance_control, newLevel) end end return true end]]></event> <talkaction words="/task;!task" event="buffer"><![CDATA[ domodlib('auto_stask') param, str = param:lower(),"Task(s) Disponiveis:\n\n" if isInArray({"counter","contador","count"},param) then setPlayerStorageValue(cid, automatic_task_config.defeat_storage, getPlayerStorageValue(cid, automatic_task_config.defeat_storage) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Task System] O contador foi "..(getPlayerStorageValue(cid, automatic_task_config.defeat_storage) <= 0 and "ativado" or "desativado")..".") return true end for k, v in pairs(automatic_task) do if getPlayerLevel(cid) >= v.level_min and getPlayerStorageValue(cid, v.storage) < v.count then local amount = getPlayerStorageValue(cid, v.storage) <= 0 and 0 or getPlayerStorageValue(cid, v.storage) str = str.."[+] "..v.name .." Task [+]\n\nMonster Count: ["..amount.."/"..v.count.."]\n\nMonsters Killing: "..getMonsterFromList(v.monsters_list)..".\n\nLevel: "..v.level_min.." or More.\n\nCan repeat: ".. ( v.can_repeat == true and "yes" or "no" )..".\n\nRewards: ".. (table.maxn(v.reward) > 0 and getItemsFromList(v.reward) or "Nothing") ..".\n\nExp: ".. (v.exp > 0 and v.exp or 0) ..".\n\nMoney: ".. (v.money > 0 and v.money or 0) ..".\n\n" end end return doShowTextDialog(cid, 8983, str) ]]></talkaction> <event type="login" name="TaskAutLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "KillAutTask") registerCreatureEvent(cid, "TaskAutAdvance") return true end]]></event> <event type="kill" name="KillAutTask" event="script"><![CDATA[ domodlib('auto_stask') function onKill(cid, target) local str = "" if isPlayer(cid) and isMonster(target) then for task , info in pairs(automatic_task) do if isInArray(info.monsters_list, getCreatureName(target):lower()) and getPlayerLevel(cid) >= info.level_min then local ret = getPlayerStorageValue(cid, info.storage) <= 0 and 0 or getPlayerStorageValue(cid, info.storage) if ret < info.count then setPlayerStorageValue(cid, info.storage, getPlayerStorageValue(cid, info.storage) <= 0 and 1 or (getPlayerStorageValue(cid, info.storage)+1)) if getPlayerStorageValue(cid, automatic_task_config.defeat_storage) <= 0 and getPlayerStorageValue(cid, info.storage) < info.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. getPlayerStorageValue(cid, info.storage) .. "/" .. info.count .. "] da Task do " .. info.name .. ".") end if getPlayerStorageValue(cid, info.storage) >= info.count then if info.exp > 0 then doPlayerAddExp(cid, info.exp) str = str.."".. (str == "" and "" or ", ") .." "..info.exp.." de exp" end if info.money > 0 then doPlayerAddMoney(cid, info.money) str = str.."".. (str == "" and "" or ", ") ..""..info.money.." gps" end if table.maxn(info.reward) > 0 then GiveRewardsTask(cid, info.reward) str = str.."".. (str == "" and "" or ", ") ..""..getItemsFromList(info.reward) end doPlayerSendTextMessage(cid, automatic_task_config.reward_type, "[Task System] Voce completou a "..info.name.." Task. Obrigado pela sua ajuda!! Suas Recompensas: "..(str == "" and "nenhuma" or str)) if info.can_repeat == true then setPlayerStorageValue(cid, info.storage, 0) end end end end end end return true end]]></event> </mod>
  15. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    coloca o erro todo do console pra mim ver... qual versão do seu ot?
  16. Está aqui: https://pastebin.com/raw/Z7KtXhXT Obrigado pela sua ajuda! OBS: Não esqueça de excluir a outra task, para não dar conflito com a talkactions !task e task Features da Automatic Task: [+] Comando que mostra as tasks disponiveis pelo level. ( se já feita, ela não mostra mais) [+] Contador de monstros mortos [+] Talkactions para ativar e desativar o contador [+] Script de onAdvance que mostra qual task foi aberta quando pegar um level necessario da task. [+] Configuração para colocar se poderá ou não repetir a task.
  17. dofile("./_woe.lua") local config = woe_config function onTime() if Woe.isTime() == true then doBroadcastMessage("War Castle was canceled...", config.bcType) setGlobalStorageValue(stor.WoeTime, 0) setGlobalStorageValue(stor.Started, 0) if isCreature(getThingFromPos(Castle.empePos).uid) == TRUE then doRemoveCreature(getThingFromPos(Castle.empePos).uid) end if getThingFromPos(Castle.desde).itemid > 0 then doRemoveItem(getThingFromPos(Castle.desde).uid) end Woe.removePre() Woe.removePortals() end return true end se não for onTime() é onTimer() depende do servidor kkk a tag vc ja sabe né? coloca pra 8 da manhã ai... parabens pelo ot!! sucesso
  18. @Pifafa deixa eu ver o comando do /castle off
  19. @Sadzinh coloca o seu comando aqui
  20. @DouGlaS Mapper só 7 no máximo? eu acabei de testar aqui e spammo antes de terminar (testei com 2 players), ficaram 25 zombies no mapa. e na outra tentativa, ficaram 13. que server tais usando?
  21. Essa task automatica é até mais fácil e simples de fazer. Se eu tiver eu tempo de sobra eu faço, é digamos 70% mais simple fazer essa task normal do que uma com npc e por ordem ou "escolha"
  22. E ai man, até dá para fazer isso, mas teria que "refazer" o npc, e digamos que o player vai fazer 5 task de uma vez só por exemplo, quando ele chegar no npc, ele vai receber as 5 premiações tudo de uma vez tbm?
  23. @DouGlaS Mapper Estranho, não está entregando o troféu... configurou o ID do trofeu ali? o resto da premiação ainda está dando? tenta remover essas 2 linhas: local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.")
  24. Não tens essa funções na lib... basta adicionar: function getItemAttackSpeed(uid) return getItemAttribute(uid,'attackspeed') end function setItemAttackSpeed(uid) return setItemAttribute(uid,'attackspeed',name) end
  25. @isac001 de boa, vamos por por actionID então!! function doTpTime(cid, delay, pos, msg) if not isCreature(cid) then return LUA_ERROR end if delay > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "{Teleport} "..delay.." segundos para se teletransportar para "..msg..".") addEvent(doTpTime, 1000, cid, delay-1, pos, msg) else doTeleportThing(cid, pos) doSendMagicEffect(getPlayerPosition(cid), 10) doPlayerSendTextMessage(cid, 22, "Voce foi teleportado para "..msg.."! DBO EVOLUTION") end end local store,exhausted = 756841,10 function onUse(cid, item, fromPosition, item2, toPosition) local items = { -- [actionID] [15872] = {pos = {x = 433, y = 992, z = 15}, msg = "Earth"}, [15873] = {pos = {x = 478, y = 992, z = 15}, msg = "Namek Planet"}, [15874] = {pos = {x = 500, y = 992, z = 15}, msg = "Vegeta Planet"} } local var = items[item.actionid] if not var then return true end if getPlayerStorageValue(cid, store) >= os.time() then doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, store) - os.time() .. " seconds to use this item.") return true end setPlayerStorageValue(cid, store, os.time()+exhausted) doTpTime(cid, 5, var.pos, var.msg) return true end FAVOR TROCAR O ACTIONID QUE ESTÃO DENTRO DAS CHAVES [] local items = { -- [ACTIONID] [15872] = {pos = {x = 433, y = 992, z = 15}, msg = "Earth"}, [15873] = {pos = {x = 478, y = 992, z = 15}, msg = "Namek Planet"}, [15874] = {pos = {x = 500, y = 992, z = 15}, msg = "Vegeta Planet"} } ai no actions.xml coloca assim por exemplo: <action actionid="15872;15873;15874" script="nome do seu script.lua"/> ou se forem tudo em ordem os actionID, tbm pode ser assim: <action actionid="15872-15874" script="nome do seu script.lua"/>

Informação Importante

Confirmação de Termo