Ir para conteúdo
  • Cadastre-se

Vodkart

Héroi
  • Total de itens

    3259
  • Registro em

  • Dias Ganhos

    229

Tudo que Vodkart postou

  1. tenho que refazer o sistema de task para o 5.0 eu já dei inicio só falta terminar, vou criar uma coluna própria dentro do banco de dados para o armazenamento das tasks, que só aceitem números, pq storage aceita números e caracteres, ai em alguns server buga tudo... obrigado, aguardem!
  2. 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 doRemoveItemsFromList(cid, items) local count = 0 if table.maxn(items) > 0 then for i = 1, table.maxn(items) do if getPlayerItemCount(cid, items[i][1]) >= items[i][2] then count = count + 1 en
  3. Trate todo mundo com respeito, você reviveu um tópico de 2016 e ainda ofendeu um colega, será advertido como consequência.
  4. local item = Está variável não esta recebendo valor, este é motivo do erro.
  5. Este tópico foi movido para a seção de Suporte Otserv.
  6. refiz o sistema: -- LIB hunt_config = { storage = 789456, from = {x = 1739, y = 358, z = 7}, -- coordenada do canto superior esquerdo da área. to = {x = 1844, y = 453, z = 7}, -- coordenada do canto inferior direito da área. maxPlayers = 2, -- quantos jogadores poderão entrar na área ao mesmo tempo. pos = {x = 1739, y = 397, z = 7}, -- para onde o jogador será teleportado. exit = {x = 1005, y = 905, z = 5} } -- MOVEMENTS function onStepIn(cid, item, position, fromPosition) local t = {} if not isPlayer(cid) then return true end for _, pid in pairs(getPlayersOnline()) do
  7. tem que funcionar viado, ta td certo... me chama discord to on @So volto tarde nesse caso não... pois só está pegando a pos númerica dos jogadores... agr se for td hr checar varios tiles(num mapa grande), ai sim da um lag absurdo
  8. local storage = 789456 local from, to = {x = 1739, y = 358, z = 7}, {x = 1844, y = 453, z = 7} local pos = {x = 1005, y = 905, z = 5} function onThink(interval, lastExecution) local on = getPlayersOnline() if #on > 0 then for _, pid in pairs(on) do if isInRange(getPlayerPosition(pid), from, to) and getPlayerStorageValue(pid, storage) - os.time() <= 0 then doTeleportThing(pid, config.pos) doPlayerSendTextMessage(pid, 19, "tempo esgotado.") setPlayerStorageValue(pid, 123456, 0) -- know storage end end end return true end TAG <globalevent name="Exi
  9. recomendo a usar uma storage de controle para saber se o jogador está dentro da hunt e só assim tirar ele de lá quando o tempo acabar.
  10. entendi, o reborn ele desloga o char... usa assim o npc: local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('???') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatur
  11. tem que rebornar e ai pegar um segundo player e dar look no player que deu reborn... fez isso?
  12. local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('???') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) local rstorage = 1495
  13. Tópico bem formatado e organizado... Que delicia cara!! Ótima contribuição, super recomendo gente! Parabéns pelo conteúdo, obrigado por compartilhar @luanluciano93
  14. Tente trocar essa função: local function getper() local n = 1 for i=1,10 do n = n+math.random(0,10) if n < 8*i then break end end return n end por local function getper() local min, max = 1, 10 return math.random(min, max) end máximo está 10%
  15. local magias = { [1] = "zesshou hachimon", [2] = "jukai kousan", [3] = "mugen shiki", [4] = "yahumuki", [5] = "zesshou hachimon", [6] = "jukai kousan", [7] = "mugen shiki", [8] = "yahumuki", [9] = "zesshou hachimon", [10] = "jukai kousan", [11] = "mugen shiki", [12] = "yahumuki" } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerGroupId(cid) > 2 and getPlayerGroupId(cid) < 5 then return true end local voc = getPlayerVocation(cid) local gem = gems.id[voc] if item.itemid == gem then if getPlayerLevel(cid) < 350 then doCreatureSay(cid,"É neces
  16. Exato, como eu alterei a lib eu teria que alterar os demais códigos... enfim... LIB gems = { id = {8635, 8636, 8633, 8634, 8635, 8636, 8633, 8634, 8635, 8636, 8633, 8634}, storage = {5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012}, interval = {800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800} } gemMsg = { rnd = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."}, class_color = { [1] = {180,180}, [2] = {30,215}, [3] = {251,10}, [4] = {204,212}, [5] = {180,180}, [6] = {30,215}, [7] = {251,10}, [8] = {204,212}, [9] =
  17. gems = { id = {8635, 8636, 8633, 8634, 8635, 8636, 8633, 8634, 8635, 8636, 8633, 8634}, storage = {5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012}, interval = {800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800} } gemMsg = { rnd = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."}, class_color = { [1] = {180,180}, [2] = {30,215}, [3] = {251,10}, [4] = {204,212}, [5] = {180,180}, [6] = {30,215}, [7] = {251,10}, [8] = {204,212}, [9] = {180,180}, [10] = {30,215}, [11] = {251,10}, [12] = {204,212} } } function doRemoveGemEffect(cid) l
  18. function onUse(player, item, fromPosition, target, toPosition, isHotkey) local playerPos = player:getPosition() local position = Position(playerPos.x, playerPos.y + 1, playerPos.z) local npcName = "Mad" local function removeNpc(name) local var = Npc(name) if var and var:isNpc() then var:remove() end end local creature = Creature(npcName) if not creature then local create = Game.createNpc(npcName, position) if create then create:setMasterPos(position) position:sendMagicEffect(CONST_ME_POFF) player:say("can you help me?", TALKTYPE_MONSTER_SAY) addEvent(removeN
  19. coloca uma storage de controle que vai checar se o player esta na area... dessa forma vc pode kikar ele qndo ele deslogar na area ou qndo se esgotar o tempo (ai faz atraves do global events) qualquer coisa eu faço quando tiver tempo!
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo