Ir para conteúdo

Vodkart

Héroi
  • Registro em

Tudo que Vodkart postou

  1. @hiquezerah sim, todos os players recebem um time de 24 horas para voltar a fazer a quest, essa storage é ó para controlar esse time.
  2. local lvl = 400 local stor_time = 787687 local hours = 24 local pos_die = {x=1429, y=1549, z=9} local t = { {vocations = {1, 13},Pos = {{x=1397, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1398, y=1502, z=9}}}, -- TANK OR DRUNK {vocations = {14, 15},Pos = {{x=1396, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1398, y=1508, z=9}}}, -- ATTACK OR DRUNK {vocations = {16, 17},Pos = {{x=1395, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1508, z=9}}}, -- SUPPORT OR DRUNK {vocations = {18, 19},Pos = {{x=1394, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1502, z=9}}}, -- PARALYZE OR DRUNK {vocations = {18, 19},Pos = {{x=1394, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1502, z=9}}}, -- PARALYZE {vocations = {18, 19},Pos = {{x=1394, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1502, z=9}}} -- SUPPORT } function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} local items = {} for _, k in ipairs(t) do local x = getTopCreature(k.Pos[1]).uid local v = getTileItemById(k.item[2], k.item[1]) if x == 0 or not isPlayer(x) or getPlayerLevel(x) < lvl or isInArray(k.vocations, getPlayerVocation(x)) == FALSE or getPlayerStorageValue(x, stor_time) - os.time() > 0 then doPlayerSendCancel(cid, 'Está faltando player ou alguém não possui level '..lvl..' ou mais ou não tem a vocação ou so pode participar 1x no dia.') return true elseif v.uid == 0 then doPlayerSendCancel(cid, "Todos os itens precisão estar na posição.") return true end table.insert(check, x) table.insert(items, v) end local sort = check[math.random(1, #check)] for k, tid in ipairs(check) do doSendMagicEffect(getCreaturePosition(tid), CONST_ME_POFF) if tid ~= sort then doTeleportThing(tid, t[k].Pos[2]) else doTeleportThing(tid, pos_die) end doSendMagicEffect(getCreaturePosition(tid), CONST_ME_TELEPORT) setPlayerStorageValue(tid, stor_time, os.time()+hours*3600) end for _, remove in ipairs(items) do doRemoveItem(remove.uid) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end
  3. @ITALOx @ITALOx é qndo vc usa a talk? poderia mostrar o erro todo no console?
  4. result = db.getResult("SELECT `id`,`name`,`account_id` FROM `players` WHERE `level` < ".. cleanup[i].level .." AND `name` NOT IN('Account Manager', 'Sorcerer Sample', 'Druid Sample', 'Paladin Sample', 'Knight Sample', 'Rook Sample') AND `group_id` < 2 AND `lastlogin` < UNIX_TIMESTAMP() - ".. cleanup[i].time .." AND `lastlogin` > 0;") onde está o group_id onde esta 2 , coloca para 3 `group_id` < 3
  5. pra quem tem o bug no distro que troca os números da storage por string. no mods: troca <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) and not isSummon(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[3])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[3]) .. "/" .. t.count .. "] da Task do " .. t.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[3]) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.") end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[5])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[5]) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[5]) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.") end end end return true end]]></event> por <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) and not isSummon(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < 0 and 1 or (tonumber(getPlayerStorageValue(cid, task_sys_storages[3]))+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) .. "/" .. t.count .. "] da Task do " .. t.name .. ".") end if tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.") end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (tonumber(getPlayerStorageValue(cid, task_sys_storages[5]))+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".") end if tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.") end end end return true end]]></event>
  6. é porque a criatura nao está viva no caso kkk é um onDeath e vc usa addEvent, ou seja, não vai aparecer mesmo. você pode colocar uma função diferente para ao invés de aparecer na criatura, faz o cid ser no jogador e a pos da onde vai sair a fala, ser onde o monstro morreu.
  7. addEvent(function() doCreatureSay(cid, "Corra enquanto á tempo o teleport irá desaparecer em breve.", TALKTYPE_ORANGE_1, false, cid, tp.info.pos) end, 100) por addEvent(function(cid) if not isCreature(cid) then return LUA_ERROR end doCreatureSay(cid, "Corra enquanto á tempo o teleport irá desaparecer em breve.", TALKTYPE_ORANGE_1, false, cid, tp.info.pos) end, 100, cid)
  8. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    é que estranho, parece que não tem essa função na sua source mesmo. o jeito é fazer o script de outro jeito, ao clicar fazer sumir aquela papel lá e depois de 2 segundos aparecer os monstros.
  9. @Icaro Simoes não ta funcionando é a spell em si, nenhuma parte dela. quando tu tenta usar sem o summon, aparece aquela mensagem? "Você não invocou nenhum summon." ou nao aparece nada?
  10. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    seu ot é 8.6?
  11. @Icaro Simoes testa assim e ve se retorna algo no seu console(distro) local combat = createCombatObject() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onCastSpell(cid, var) local summons = getCreatureSummons(cid) local health_summon = 2000 -- quantidade a ser curada no summon local health_player = 1600 -- quantidade a ser curada no player if #summons > 0 then doCreatureAddHealth(getCreatureSummons(cid)[1], health_summon) print(#summons, getCreatureName(getCreatureSummons(cid)[1])) doCreatureAddHealth(cid, health_player) print(getCreatureName(cid),health_player) return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Você não invocou nenhum summon.") return true end return true end
  12. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    na pasta creaturescript em script la parchquest.lua local config = { str = 123123123, -- Global storage tempo = 10, -- Tempo para criar os monstros novamente itemID = 2159, -- ID do item a ser movido tileAID = 1231, -- Actionid do tile em que o item está monster = {"Demon", "Dragon"} -- Monstros } function onMoveItem(moveItem, fromPosition, position, cid) if (moveItem.itemid == config.itemID and getTileInfo(fromPosition).actionid == config.tileAID and getGlobalStorageValue(config.str) < os.time()) then for _, i in ipairs(config.monster) do doCreateMonster(i, fromPosition) end setGlobalStorageValue(config.str, os.time() + 30) end return true end creaturescript.xml <event type="moveitem" name="MovePaQuest" event="script" value="parchquest.lua"/> registra no onLogin.lua registerCreatureEvent(cid, "MovePaQuest")
  13. @Icaro Simoes testa o que eu acabei de passar ali em cima!!
  14. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    @bpm91 acho que tu colocou errada a tag no creaturescript posta o creaturescript.xml deve ter sim a função moveitem no seu servidor.
  15. @Icaro Simoes tenta assim local combat = createCombatObject() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onCastSpell(cid, var) local summons = getCreatureSummons(cid) local health_summon = 2000 -- quantidade a ser curada no summon local health_player = 1600 -- quantidade a ser curada no player if #summons > 0 then doCreatureAddHealth(getCreatureSummons(cid)[1], health_summon) doCreatureAddHealth(cid, health_player) return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Você não invocou nenhum summon.") return true end return true end
  16. local combat = createCombatObject() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onCastSpell(cid, var) local summons = getCreatureSummons(cid) local health_summon = 2000 -- quantidade a ser curada if #summons > 0 then doCreatureAddHealth(getCreatureMaster(cid), health_summon) return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Você não invocou nenhum summon.") return true end return true end
  17. Vodkart postou uma resposta no tópico em Suporte OTServer Derivados
    Qual group id do player? não é 1? porque já está só para players WHERE `group_id` < 2 "<" menor que 2... ou seja, menor que 2 é 1, 0 , etc...
  18. @Brunds function HaveCreatureArena(area, remove, clean) for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do for z = area[1].z, area[2].z do local pos = {x=x, y=y, z=z} local m = getTopCreature(pos).uid if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end if clean ~= false then doCleanTile(pos,false) end end end end end local areas = { -- colocas começo e final pos de todas as salas {{x=909,y=1019,z=7}, {x=1000,y=1019,z=7}}, {{x=156,y=1019,z=7}, {x=200,y=1019,z=7}}, {{x=200,y=1019,z=7}, {x=300,y=1019,z=9}} } local t = { lvl = 100, Time = 15, -- em minutos entrada = { {x = 1045, y = 1014, z = 6}, -- pos players {x = 1045, y = 1015, z = 6} }, saida = { {x = 1110, y = 1122, z = 7}, -- pos para onde eles irão {x = 1110, y = 1123, z = 7} }, monstros = { {{x = 1108, y = 1116, z = 7}, "Orc"}, -- defina pos dos montros e nomes {{x = 1108, y = 1117, z = 7}, "Orc"}, {{x = 1108, y = 1118, z = 7}, "Orc"}, {{x = 1108, y = 1119, z = 7}, "Orc"} } } function VarAnihiPlayer(cid, tab) if not isCreature(cid) then return LUA_ERROR end for _, var in ipairs(tab) do if isInRange(getPlayerPosition(cid), var[1], var[2]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end end end function getPlayersInArea(fromPos, toPos) local players = {} for _, pid in ipairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), fromPos, toPos) then table.insert(players, pid) end end return players end function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, var in ipairs(areas) do if #getPlayersInArea(var[1], var[2]) > 0 then doPlayerSendCancel(cid, 'Aguarde, tem jogadores fazendo a quest.') return true end end for _, k in ipairs(t.entrada) do local x = getTopCreature(k).uid if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.lvl) then doPlayerSendCancel(cid, 'Está faltando player ou alguém não possui level '..t.lvl..' ou mais.') return true end table.insert(check, x) end for _, clear in ipairs(areas) do HaveCreatureArena({clear[1],clear[2]}, true, true) -- limpar monstro de todas as salas end for _, summon in pairs(t.monstros) do doCreateMonster(summon[2], summon[1]) end for i, tid in ipairs(check) do doSendMagicEffect(t.entrada, CONST_ME_POFF) doTeleportThing(tid, t.saida, false) addEvent(VarAnihiPlayer, t.Time*1000, tid, areas) doSendMagicEffect(t.saida, CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end
  19. kkkkkkkkk qual id do brass set? ainda ta ganhando esse lixo?
  20. setPlayerStorageValue(cid, 30001, 1) o certo é setPlayerStorageValue(cid, 30002, 1) outra coisa que não entendo, no eu servidor começa em voc? ai quando ganha voc tem que vir mais itens?
  21. @bpm91 faltou as virgula nessa parte firstItems[4] = { 2412 2449 2405 } o correto é: firstItems[4] = { 2412, 2449, 2405 }
  22. não tem a tag no creaturecript.xml adiciona: <event type="login" name="FirstItemLogin" event="script" value="firstitems.lua"/>
  23. mas tu fecho e abriu o ot? outra coisa, você registrou esse onLogin em creaturescript.xml?
  24. claro que influencia, por isso etá entregando o itens errados... exclua o MODS
  25. só agora que vi, erro meu function HaveCreatureArena(area, remove, clean) for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do local pos = {x=x, y=y, z=area[1].z} local m = getTopCreature(pos).uid if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end if clean ~= false then doCleanTile(pos,false) end end end end local from, to = {x = 1105, y = 1113, z = 7}, {x = 1115, y = 1123, z = 7} local t = { lvl = 100, Time = 15, -- em minutos entrada = { {x = 1045, y = 1014, z = 6}, -- pos players {x = 1045, y = 1015, z = 6} }, saida = { {x = 1110, y = 1122, z = 7}, -- pos para onde eles irão {x = 1110, y = 1123, z = 7} }, monstros = { {{x = 1108, y = 1116, z = 7}, "Orc"}, -- defina pos dos montros e nomes {{x = 1108, y = 1117, z = 7}, "Orc"}, {{x = 1108, y = 1118, z = 7}, "Orc"}, {{x = 1108, y = 1119, z = 7}, "Orc"} } } function VarAnihiPlayer(cid) if not isCreature(cid) then return LUA_ERROR end if isInRange(getPlayerPosition(cid), from, to) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end end function getPlayersInArea(fromPos, toPos) local players = {} for _, pid in ipairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), fromPos, toPos) then table.insert(players, pid) end end return players end function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} if #getPlayersInArea(from, to) > 0 then doPlayerSendCancel(cid, 'Aguarde, tem jogadores fazendo a quest.') return true end for _, k in ipairs(t.entrada) do local x = getTopCreature(k).uid if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.lvl) then doPlayerSendCancel(cid, 'Está faltando player ou alguém não possui level '..t.lvl..' ou mais.') return true end table.insert(check, x) end HaveCreatureArena({from,to}, true, true) for _, summon in pairs(t.monstros) do doCreateMonster(summon[2], summon[1]) end for i, tid in ipairs(check) do doSendMagicEffect(t.entrada, CONST_ME_POFF) doTeleportThing(tid, t.saida, false) addEvent(VarAnihiPlayer, t.Time*1000, tid) doSendMagicEffect(t.saida, CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end

Informação Importante

Confirmação de Termo