Ir para conteúdo

Vodkart

Héroi
  • Registro em

Tudo que Vodkart postou

  1. creaturescript nome do seu arquivo,lua local time = 10 -- o tp sera removido em 10 segundos local monster = "Doombringer" -- nome do monstro que vai ter que matar local toPos = {x=147, y=55, z=7} -- para onde o tp leva function removeMosterTp(pos) local t = getTileItemById(pos, 1387).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(pos, CONST_ME_POFF) end function onDeath(cid, corpse, deathList) if getCreatureName(cid) ~= monster then return true end local var = getCreaturePosition(cid) doCreateTeleport(1387, toPos, var) doCreatureSay(cid, "O teleport irá sumir em "..time.." segundos.", TALKTYPE_ORANGE_1) addEvent(removeMosterTp, time*1000, var) return true end TAG <event type="death" name="TpMonster" event="script" value="nome do seu script.lua"/> no arquivo.xml do seu monstro adicione: <script> <event name="TpMonster"/> </script>
  2. local doorPos = {x=1218, y=1644, z=11} local time = 120 -- in seconds function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 548749) - os.time() > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "please wait.") return true end if item.itemid == 1946 then local v = getTileItemById(doorPos, 1219) if v.itemid == 1219 then doRelocate(doorPos, {x=doorPos.x+1, y=doorPos.y, z=doorPos.z}) doTransformItem(v.uid, 1220) end else local v = getTileItemByType(doorPos, ITEM_TYPE_DOOR) if v.itemid == 1219 or v.itemid == 1220 then doTransformItem(v.uid, 1219) end end setPlayerStorageValue(cid, 548749, os.time()+time) return doTransformItem(item.uid, item.itemid == 1946 and 1945 or 1946) end
  3. function getPlayerSameAcc(cid) local t = {} for _, pid in pairs(getPlayersOnline()) do if getPlayerAccountId(cid) == getPlayerAccountId(pid) then t[#t+1] = pid end end return t end ai poderia usar assim: if #getPlayerSameAcc(cid) > 1 then -- bloco end
  4. o script que coloquei nesse tópico funciona, acredito que vc deva reinstalar o sistema.
  5. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    neste caso vai dar error no console caso o monstro tenha sido morto!
  6. @KR3 usa assim: function onStepIn(cid, item, position, lastPosition, fromPosition) local config = { [1] = 71, -- [Vocation] = 71 = Roupa [2] = 84 -- Naruto } if (config[getPlayerVocation(cid)]) then doSetCreatureOutfit(cid, {lookType = config[getPlayerVocation(cid)]}, -1) doSendMagicEffect(getThingPos(cid), 2) doSendAnimatedText(getPlayerPosition(cid),"Que Frio!", math.random(01,255)) end return true end function onStepOut(cid, item, position, lastPosition, fromPosition) doRemoveCondition(cid, CONDITION_OUTFIT) return true end
  7. @KR3 local config = { [1] = 71, -- [Vocation] = 71 = Roupa [2] = 84, -- Naruto } local storage = 548754 function onStepIn(cid, item, frompos, topos) if (config[getPlayerVocation(cid)]) and getPlayerStorageValue(cid, storage) <= 0 then doCreatureChangeOutfit (cid, {lookType = config[getPlayerVocation(cid)]}) doSendMagicEffect(getThingPos(cid), 2) doSendAnimatedText(getPlayerPosition(cid),"Que Frio!", math.random(01,255)) setPlayerStorageValue(cid, storage, getCreatureOutfit(cid).lookType) end return true end function onStepOut(cid, item, frompos, topos) if isPlayer(cid) and getPlayerStorageValue(cid, storage) > 1 then doCreatureChangeOutfit(cid, {lookType = getPlayerStorageValue(cid, storage)}) setPlayerStorageValue(cid, storage, -1) end return true end TAG <movevent type="StepIn" actionid="16530" event="script" value="nome do seu script .lua"/> <movevent type="StepOut" actionid="16530" event="script" value="nome do seu script.lua"/> ai coloca no aid do tlle = 16530
  8. function onDeath(cid, corpse, deathList) local monsters, t = {"Demon","Hydra"}, {} local items = {{2160,1},{2148,2}} -- ITEM ID, QUANTIDADE if isMonster(cid) and isInArray(monsters, getCreatureName(cid)) then for _, players in pairs(deathList) do if isPlayer(players) then local give = true if #t > 0 and isInArray(t, getPlayerIp(players)) then give = false end t[#t+1] = getPlayerIp(players) if give then for i = 1, #items do doPlayerAddItem(players, items[i][1], items[i][2]) end end end end return true end return true end tag <event type="death" name="AddItens" event="script" value="nome do seu script.lua"/> adc no monstro <script> <event name="AddItens"/> </script>
  9. Quando seu suporte for resolvido, por favor marque a melhor resposta para que a tag "Resolvido" seja adicionada. Esta é uma mensagem automática! Pedimos que leia as regras do fórum!
  10. @diarmaint local newpos9 = {x = 229,y = 13,z = 7} function efekts3(cid) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome on Ot!\n\n Go talk to NPC Yama and start your adventure!\n Firstly visit train room, hunt some wolfes and remember about !mission.") end function onStepIn(cid, fromPosition, toPosition) if getPlayerStorageValue(cid, 50002) > 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid,22,"You have it done.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end doSendMagicEffect(getPlayerPosition(cid), 3) setPlayerStorageValue(cid, 50002,1) doTeleportThing(cid, newpos9) doSendMagicEffect(newpos9, 33) if getPlayerStorageValue(cid, 50031) <= 0 then addEvent(efekts3, 500, cid) setPlayerStorageValue(cid, 50031, 1) end return true end
  11. Este tópico foi movido para a área correta. Esta é uma mensagem automática! Pedimos que leia as regras do fórum!
  12. @Sdrula Seu erro é bem comum... Nas positions que você configurar sempre deve ser do MENOR para o MAIOR. exemplo de uso correto: pos = {fromPosition = {x=1019, y=916, z=7},toPosition = {x=1033, y=922, z=7}} perceba que na variável toPosition, sempre o X, Y ou Z devem ser maiores que na variável fromPosition no seu código tinha essa linha invertida: ["11:56"] = {nome = "Demon", pos = {fromPosition = {x=149, y=61, z=7},toPosition = {x=156, y=57, z=7}}, m = {"1 Demon"}, Time = 15}, está percebendo que o Y = 61 na variável fromPosition é maior que o Y na variável toPosition? então, está errado, o certo seria: ["11:56"] = {nome = "Demon", pos = {fromPosition = {x=149, y=57, z=7},toPosition = {x=156, y=61, z=7}}, m = {"1 Demon"}, Time = 15},
  13. deixa eu ver como ficou a configuração do MOD que vc alterou aí.
  14. @Sdrula troca ESSA parte: <globalevent name="AutomaticRaids" interval="60" event="script"><![CDATA[ por <globalevent name="AutomaticRaids" interval="60000" event="script"><![CDATA[ ou seja, o 60 para 60000
  15. @jakons aqui mais completo https://tibiaking.com/forums/topic/93438-informações-do-jogador/?tab=comments#comment-508423
  16. @Tomarasdaf só pra avisar que fiz o script
  17. No primeiro código não seria difícil, até fiz um sistema que "salva" o tempo online: https://tibiaking.com/forums/topic/71413-86-staff-time/ fiz usando storages como vc pode ver
  18. https://otland.net/threads/item-not-able-to-trade.147127/
  19. só não registrar no login.lua, registra só no monstro.
  20. @joaovitorbk9 creaturescript removepzplayer.lua function onLogin(cid) registerCreatureEvent(cid, "removePZ") return true end function onThink(cid, interval) if getTilePzInfo(getCreaturePosition(cid)) == true then doRemoveCondition(cid, CONDITION_INFIGHT) end return true end -- tag <event type="think" name="removePZ" script="removepzplayer.lua"/> <event type="login" name="loginPZ" script="removepzplayer.lua"/>
  21. function onSay(cid, words, param) local days = 2 local price = 20000000 if not doPlayerRemoveMoney(cid, price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "voce nao tem "..price.." gps.") return true end vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(tonumber(days))) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você recebeu "..days.." dias de VIP, bom jogo!") return true end @Naze vai retornar erro no seu c´pdigo por causa dessa função que adiciona o vip days: getPlayerAccount(getPlayerByName(name)) -- a variavel name não existe, então n vai adicionar pra nenhum jogador
  22. local config = { level_remain= 130, exp_remain= 34963300, levels_reset= {1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000} } function getPlayerResets(cid) local consulta = db.getResult("SELECT `reset` FROM `players` WHERE `id` = "..getPlayerGUID(cid)) return consulta:getDataInt('reset') <= 0 and 0 or consulta:getDataInt('reset') end function setPlayerReset(cid) local ret = (getPlayerResets(cid) + 1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.level_remain..", `experience` = "..config.exp_remain..", `reset` = "..ret.." WHERE `id` = "..getPlayerGUID(cid)) return true end function onSay(cid, words, param, channel) if (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"Voce Precisa estar sem Battle para Resetar.") return TRUE end local resets = getPlayerResets(cid) if (getPlayerLevel(cid) >= config.levels_reset[resets+1]) then setPlayerReset(cid) else doPlayerSendTextMessage(cid,22,"Voce nao tem level minimo para o reset.") end return true end
  23. @BangxD no meu último post eu coloquei para não summonar monstro na agua e nem em houses! coloquei efeito quando for removido e quando eles nascer tbm... @Brunds removi esses erros no ultimo post ali que dei um upgrade no código
  24. <?xml version="1.0" encoding="UTF-8"?> <mod name="Automatic Raids" version="1.0" author="Vodkart And xotservx" contact="tibiaking.com" enabled="yes"> <config name="raids_func"> -- Mini-tutorial de configuração -- Não esqueça de configurar os horários que o evento vai iniciar (OBS: O script sempre pega o horário da maquina caso a sua maquina ou vps -- usar horário de outros lugares vai ter atraso dependendo do fuso-horário -- nome = Nome do evento que vai mostrar em mensagem vermelha para o servidor todo -- pos = fromPosition = Canto Superior Direito -- pos = toPosition = Canto Inferior Esquerdo -- Configurando a pos corretamente pode formar um quadrado ou retangulo para os monstro não nascerem um em cima do outro -- m = Quantidade e tipos de monstro a serem criados, pode seguir a lógica do nome do evento podendo colocar Orc porém na invasão vai ter orc, orc shaman, orc spear etc... -- Time = Tempo que a invasão vai durar caso colocar time = 10 a invasão vai durar 10 minutos depois de 10 minutos os monstros restantes serão removidos <![CDATA[ days = { -- Segunda ["Monday"] = { ["17:00"] = {nome = "Renegados", pos = {fromPosition = {x=1019, y=916, z=7},toPosition = {x=1033, y=922, z=7}},m = {"6 Renegade", "5 Bandit", "2 Shinobi Archer"}, Time = 1}, ["22:00"] = {nome = "Dragon", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}},m = {"100 Dragon"}, Time = 20} }, -- Terça ["Tuesday"] = { ["17:00"] = {nome = "Demon", pos = {fromPosition = {x=202, y=11, z=7},toPosition = {x=204, y=12, z=7}}, m = {"1 Demon"}, Time = 15}, ["22:00"] = {nome = "Hydra", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}}, m = {"7 Hydra", "4 Cyclops"}, Time = 20} }, -- Quarta ["Wednesday"] = { ["17:00"] = {nome = "Demon", pos = {fromPosition = {x=202, y=11, z=7},toPosition = {x=204, y=12, z=7}}, m = {"1 Demon"}, Time = 15}, ["22:00"] = {nome = "Hydra", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}}, m = {"7 Hydra", "4 Cyclops"}, Time = 20} }, -- Quinta ["Tursday"] = { ["17:00"] = {nome = "Demon", pos = {fromPosition = {x=202, y=11, z=7},toPosition = {x=204, y=12, z=7}}, m = {"1 Demon"}, Time = 15}, ["22:00"] = {nome = "Hydra", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}}, m = {"7 Hydra", "4 Cyclops"}, Time = 20} }, -- Sexta ["Friday"] = { ["17:00"] = {nome = "Demon", pos = {fromPosition = {x=202, y=11, z=7},toPosition = {x=204, y=12, z=7}}, m = {"1 Demon"}, Time = 15}, ["22:00"] = {nome = "Hydra", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}}, m = {"7 Hydra", "4 Cyclops"}, Time = 20} }, -- Sábado ["Saturday"] = { ["17:00"] = {nome = "Demon", pos = {fromPosition = {x=202, y=11, z=7},toPosition = {x=204, y=12, z=7}}, m = {"1 Demon"}, Time = 15}, ["22:00"] = {nome = "Hydra", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}}, m = {"7 Hydra", "4 Cyclops"}, Time = 20} }, -- Domingo ["Sunday"] = { ["20:33"] = {nome = "renegados", pos = {fromPosition = {x=1019, y=916, z=7},toPosition = {x=1033, y=922, z=7}}, m = {"1 Renegade", "1 Bandit", "1 Shinobi Archer"}, Time = 1}, ["22:00"] = {nome = "Hydra", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}}, m = {"7 Hydra", "4 Cyclops"}, Time = 20} } } ]]></config> <globalevent name="AutomaticRaids" interval="60" event="script"><![CDATA[ domodlib('raids_func') function onThink(interval, lastExecution) 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 if days[os.date("%A")] then hours = tostring(os.date("%X")):sub(1, 5) tb = days[os.date("%A")][hours] if tb then function removeCreature(tb) for x = ((tb.pos.fromPosition.x)-20), ((tb.pos.toPosition.x)+20) do for y = ((tb.pos.fromPosition.y)-20), ((tb.pos.toPosition.y)+20) do local m = getTopCreature({x=x, y=y, z= tb.pos.fromPosition.z}).uid if m ~= 0 and isMonster(m) then doSendMagicEffect(getCreaturePosition(m), CONST_ME_MORTAREA) doRemoveCreature(m) end end end end doBroadcastMessage("Uma orda de " .. tb.nome .. " esta invadindo a cidade ajude a defende-la") -- Mensagem que vai aparecer para todos do servidor quando a invasão iniciar for _ , x in pairs(tb.m) do local c = tonumber(x:match("%d+")) if c > 0 then repeat local pos = {x = math.random(tb.pos.fromPosition.x, tb.pos.toPosition.x), y = math.random(tb.pos.fromPosition.y, tb.pos.toPosition.y), z = tb.pos.fromPosition.z} if isWalkable(pos) then doCreateMonster(x:match("%s(.+)"), 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) c = c-1 end until c == 0 end end addEvent(removeCreature, tb.Time*60*1000, tb) addEvent(doBroadcastMessage, tb.Time*60*1000, "A invasão de " .. tb.nome .. " acabou, os sobreviventes fugiram") -- Mensagem que vai aparecer para todos do servidor quando a invasão iniciar end end return true end ]]></globalevent> </mod>
  25. @Brunds Da para fazer todos os monstro que estejam na tela sair um efeito, mas não teria como colocar uma storage neles por exemplo, para saber se ja saiu efeito nele ou não...

Informação Importante

Confirmação de Termo