Ir para conteúdo
Banner com Efeitos

Vodkart

Héroi
  • Registro em

  1. Peixola reagiu a uma resposta no tópico: [Action/talkaction] Removedor De Frags!
  2. Rodrigo94 começou a seguir Vodkart
  3. bagulhoescroto reagiu a uma resposta no tópico: [8.6] TOP 5 LEVEL no BroadCast
  4. mattei123 reagiu a uma resposta no tópico: [8.6] TOP 5 LEVEL no BroadCast
  5. é pq na storage você só pode armanezar até um valor númerico - decimais, acho que é 99999999, e com essa experiencia do level toda, teria que ser armazenado em um outro arquivo as experiencias. por exemplo level 3 mil: 449,100,849,800
  6. Pauloxd94 começou a seguir Vodkart
  7. Doidodepeda reagiu a uma resposta no tópico: Up vocation
  8. tenta usar addEvent, +ou- assim: local conf = { stunTime = 4500, delayCast = 600, scream = "EXPLOSION FIRE", speakChance = 5, speakList = {"Did you get burned?", "I like well-done meat"} } local s = 0 -- Combat local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN) -- Stun local stun = createConditionObject(CONDITION_PARALYZE) setConditionParam(stun, CONDITION_PARAM_TICKS, conf.stunTime) setConditionFormula(stun, -1, 0, -1, 0) local function setInitCast(cid) if isCreature(cid) then doAddCondition(cid, stun) doCreatureSetLookDir(cid, SOUTH) doCreatureSay(cid, conf.scream, TALKTYPE_MONSTER_YELL) end end function onCastSpell(cid, var) setInitCast(cid) addEvent(function() if not isCreature(cid) then return true elseif s > conf.stunTime then return true end doCreatureSetLookDir(cid, SOUTH) s = s + 250 end, 250) return doCombat(cid, combat, var) end
  9. https://tibiaking.com/forums/topic/12807-recovery-exp/
  10. function onSay(cid, words, param) local level = getPlayerLevel(cid) local vocation = getPlayerVocationName(cid) local health, maxhealth = getCreatureHealth(cid), getCreatureMaxHealth(cid) local mana, maxmana = getCreatureMana(cid), getCreatureMaxMana(cid) local balance, pdays = getPlayerBalance(cid), getPlayerPremiumDays(cid) local fist, club, sword, axe = getPlayerSkillLevel(cid, 0), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3) local distance, shield, fishing, magic = getPlayerSkillLevel(cid, 4), getPlayerSkillLevel(cid, 5), getPlayerSkillLevel(cid, 6), getPlayerMagLevel(cid) local lvldodge = getPlayerStorageValue(cid, 98798644) local lvlcrit = getPlayerStorageValue(cid, 48903) local lvlatk = getPlayerStorageValue(cid, 48904) local a = os.time() local b = math.floor((getPlayerStorageValue(cid, 13545) - a)/(24 * 60 * 60)) local reset = getPlayerStorageValue(cid, 54676) local cap = getPlayerFreeCap(cid) local msg = "Vocation: "..vocation.."\nLevel: ".. level .."\nHP: ".. health .."/".. maxhealth .."\nMP: ".. mana .."/".. maxmana .."\nCapacity: ".. cap .."\nBalance: "..balance.."\nPremium Days: "..pdays.."\nDodge Level: ".. lvldodge .."\nCritical Level: ".. lvlcrit .."\nBOOSTER ATK: ".. lvlatk .."\nMagic Level: ".. magic .."\n[VIP] Days: ".. (b < 0 and 0 or b) .."\nReset Count: ".. reset .." \n\nFist: ".. fist .."\nClub: ".. club .."\nSword: ".. sword .."\nAxe: ".. axe .."\nDistance: ".. distance .."\nShield: ".. shield .."\nFishing: ".. fishing .."" doPlayerPopupFYI(cid, msg) return true end
  11. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    lembrando que ao invés de criar uma tabela e ir adicionando voc por voc, poderia usar somente em uma linha esssa função: doPlayerSetVocation(cid, isSorcerer(cid) and 17 or isDruid(cid) and 18 or isPaladin(cid) and 19 or 20) porém o importante é dar certo, reputado.
  12. Vodkart reagiu a uma resposta no tópico: Up vocation
  13. já existe a função de remover o boss, basta usá-la. function onUse(cid, item, fromPosition, itemEx, toPosition) local players = {} for i = 1, #BossRoom.alavanca do local v = getTopCreature(BossRoom.alavanca[i]).uid players[i] = isPlayer(v) and v or nil end function checkPlayersInRoom() -- Responsável por verificar se há jogadores na sala enfrentando o boss. local player_room = 0 for x = BossRoom.areaSalaBoss[1].x, BossRoom.areaSalaBoss[2].x do for y = BossRoom.areaSalaBoss[1].y, BossRoom.areaSalaBoss[2].y do for z = BossRoom.areaSalaBoss[1].z, BossRoom.areaSalaBoss[2].z do local pos = {x=x, y=y, z=z,stackpos = 253} local thing = getThingfromPos(pos) if thing.itemid > 0 and isPlayer(thing.uid) == true then player_room = player_room+1 end end end end return player_room end if #players < BossRoom.minPlayers then doPlayerSendCancel(cid, "You need at least "..BossRoom.minPlayers.." players to enter.") return true end if checkPlayersInRoom() >= 1 then doPlayerSendTextMessage(cid,19, "There is already a team in the boss room.") return true end function playersTP(position) -- Responsável por teleportar os jogadores for i = 1, 6 do if players[i] then doTeleportThing(players[i], position) doSendMagicEffect(position, CONST_ME_TELEPORT) end end end function removeBoss() -- Responsavel por Remover o BOSS da sala (caso os players nao tenham matado) for x = BossRoom.areaSalaBoss[1].x, BossRoom.areaSalaBoss[2].x do for y = BossRoom.areaSalaBoss[1].y, BossRoom.areaSalaBoss[2].y do for z = BossRoom.areaSalaBoss[1].z, BossRoom.areaSalaBoss[2].z do local area = {x = x, y = y, z = z} local creature = getTopCreature(area).uid if isCreature(creature) then doRemoveCreature(creature) end end end end end function checkBossTime() -- Responsável por verificar se os jogadores matou ou não o boss após 10 minutos. for x = BossRoom.areaSalaBoss[1].x - 1, BossRoom.areaSalaBoss[2].x + 1 do for y = BossRoom.areaSalaBoss[1].y - 1, BossRoom.areaSalaBoss[2].y + 1 do local pos = {x=x, y=y, z=BossRoom.areaSalaBoss[1].z} local m = getTopCreature(pos).uid if m ~= 0 and isMonster(m) and isInArray(BossRoom.name, getCreatureName(m)) then playersTP(BossRoom.positionKickPlayer) removeBoss() end end end return false end removeBoss() playersTP(BossRoom.positionSalaBoss) doCreateMonster(BossRoom.name, BossRoom.positionSpawnBoss) addEvent(checkBossTime, BossRoom.timeToKill*60*1000) return true end
  14. wjuniiorl começou a seguir Vodkart
  15. Jhow ZL começou a seguir Vodkart
  16. https://tibiaking.com/forums/topic/77212-86-talkactions-find-item/
  17. qual base vcs estão usando? pq era para deletar na db sim.
  18. Este tópico foi movido para a seção de Suporte Otserv Alternativo
  19. 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 local shopWindow = {} local t = { [2195] = {price = 15, vocs = {1,5}}, -- [ITEMID] = {valor e vocation ids} [2493] = {price = 25, vocs = {2,6}}, [2361] = {price = 30, vocs = {3,7}}, [8851] = {price = 20, vocs = {4,8}}, [8925] = {price = 30, vocs = {1,5}}, [2640] = {price = 50, vocs = {3,7}}, [2494] = {price = 100, vocs = {2,6}}, [9932] = {price = 50, vocs = {4,8}}, [2472] = {price = 70, vocs = {1,5}}, [8931] = {price = 100, vocs = {1,5}} } local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks) if t[item] and not doPlayerRemoveMoney(cid, t[item].price) then selfSay("you dont have "..t[item].price.." gps.", cid) else doPlayerAddItem(cid, item) selfSay("Here your item!", cid) end return true end if (msgcontains(msg, 'trade') or msgcontains(msg, 'TRADE')) then for var, ret in pairs(t) do if isInArray(ret.vocs, getPlayerVocation(cid)) then table.insert(shopWindow, {id = var, subType = 0, buy = ret.price, sell = 0, name = getItemNameById(var)}) end end openShopWindow(cid, shopWindow, onBuy, onSell) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  20. é todos os npc's ou um npc especifico?
  21. Pelo que eu percebi é que vc vai ter que compilar sua distro ou trocar ela para uma que aceite o npc dentro da house, no meu server test (baiak) funcionou normalmente.
  22. só dá erro neste npc Alice? já testou com outros?
  23. <talkaction words="/task;!task" event="buffer"><![CDATA[ domodlib('task_func') param,task,daily = param:lower(), getTaskMission(cid), getDailyTaskMission(cid) if isInArray({"counter","contador"},param) then setPlayerStorageValue(cid, task_sys_storages[8], getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Task System] O contador foi "..(getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and "ativado" or "desativado")..".") return true elseif isInArray({"daily","diaria"},param) then if not daily_task[daily] or getPlayerStorageValue(cid, task_sys_storages[7]) <= 0 then doPlayerSendCancel(cid, "Desculpe, Mas você não está em nenhuma Daily Task.") return true elseif getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily_task[daily].count then doPlayerSendCancel(cid,"Desculpe, Mas Você não terminou a Daily Task a tempo! Por favor volte ao npc e comece uma nova Daily Task!") return true end return doShowTextDialog(cid, 8983, "[->] CURRENT DAILY TASK INFO [<-]\n\nNome: "..daily_task[daily].name.."\nProgresso: ["..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[5])).."/"..daily_task[daily].count.."]\nPrazo para entrega: "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).."\nMonstros para caçar: "..getMonsterFromList(daily_task[daily].monsters_list).."\n\n[->] CURRENT TASK REWARDS [<-]\n\nMoney: "..(daily_task[daily].money > 0 and daily_task[daily].money or 0).."\nExperiencia: "..(daily_task[daily].exp > 0 and daily_task[daily].exp or 0).."\nTask Points: "..daily_task[daily].points.."\nItems: "..(#daily_task[daily].reward > 0 and getItemsFromList(daily_task[daily].reward) or "Nenhum item de recompensa")..".") end if not task_sys[task] or getPlayerStorageValue(cid, task_sys[task].start) <= 0 then doPlayerSendCancel(cid, "você não está em nenhuma task.") return true end return doShowTextDialog(cid, 8983, "-> CURRENT TASK ["..getTaskMission(cid).."/"..#task_sys.."] <-\n\nTask Name: "..task_sys[task].name.."\nTask Level: "..task_sys[task].level.."\nTask Progress: ["..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[3])).."/"..task_sys[task].count.."]\nMonster To Hunt: "..getMonsterFromList(task_sys[task].monsters_list)..".\nItens Para Entrega: "..(#task_sys[task].items > 0 and getItemsFromList(task_sys[task].items) or "Nenhum")..".\n\n[->] CURRENT TASK REWARDS [<-]\n\nReward Money: "..(task_sys[task].money > 0 and task_sys[task].money or 0).."\nReward Experiencia: "..(task_sys[task].exp > 0 and task_sys[task].exp or 0).."\nReward Points: "..task_sys[task].points.."\nRedward Items: "..(#task_sys[task].reward > 0 and getItemsFromList(task_sys[task].reward) or "Nenhum item de recompensa")..".") ]]></talkaction> por <talkaction words="/task;!task" event="buffer"><![CDATA[ domodlib('task_func') param,task,daily = param:lower(), getTaskMission(cid), getDailyTaskMission(cid) if isInArray({"counter","contador"},param) then setPlayerStorageValue(cid, task_sys_storages[8], getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Task System] O contador foi "..(getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and "ativado" or "desativado")..".") return true elseif isInArray({"pontos","points","ponto","point"},param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Task System] Voce tem ".. getTaskPoints(cid) .." Task Points.") return true elseif isInArray({"daily","diaria"},param) then if not daily_task[daily] or getPlayerStorageValue(cid, task_sys_storages[7]) <= 0 then doPlayerSendCancel(cid, "Desculpe, Mas você não está em nenhuma Daily Task.") return true elseif getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily_task[daily].count then doPlayerSendCancel(cid,"Desculpe, Mas Você não terminou a Daily Task a tempo! Por favor volte ao npc e comece uma nova Daily Task!") return true end return doShowTextDialog(cid, 8983, "[->] CURRENT DAILY TASK INFO [<-]\n\nNome: "..daily_task[daily].name.."\nProgresso: ["..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[5])).."/"..daily_task[daily].count.."]\nPrazo para entrega: "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).."\nMonstros para caçar: "..getMonsterFromList(daily_task[daily].monsters_list).."\n\n[->] CURRENT TASK REWARDS [<-]\n\nMoney: "..(daily_task[daily].money > 0 and daily_task[daily].money or 0).."\nExperiencia: "..(daily_task[daily].exp > 0 and daily_task[daily].exp or 0).."\nTask Points: "..daily_task[daily].points.."\nItems: "..(#daily_task[daily].reward > 0 and getItemsFromList(daily_task[daily].reward) or "Nenhum item de recompensa")..".") end if not task_sys[task] or getPlayerStorageValue(cid, task_sys[task].start) <= 0 then doPlayerSendCancel(cid, "você não está em nenhuma task.") return true end return doShowTextDialog(cid, 8983, "-> CURRENT TASK ["..getTaskMission(cid).."/"..#task_sys.."] <-\n\nTask Name: "..task_sys[task].name.."\nTask Level: "..task_sys[task].level.."\nTask Progress: ["..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[3])).."/"..task_sys[task].count.."]\nMonster To Hunt: "..getMonsterFromList(task_sys[task].monsters_list)..".\nItens Para Entrega: "..(#task_sys[task].items > 0 and getItemsFromList(task_sys[task].items) or "Nenhum")..".\n\n[->] CURRENT TASK REWARDS [<-]\n\nReward Money: "..(task_sys[task].money > 0 and task_sys[task].money or 0).."\nReward Experiencia: "..(task_sys[task].exp > 0 and task_sys[task].exp or 0).."\nReward Points: "..task_sys[task].points.."\nRedward Items: "..(#task_sys[task].reward > 0 and getItemsFromList(task_sys[task].reward) or "Nenhum item de recompensa")..".") ]]></talkaction> só usa agora !task points

Informação Importante

Confirmação de Termo