Ir para conteúdo

Vodkart

Héroi
  • Registro em

Histórico de Curtidas

  1. Gostei
    Vodkart recebeu reputação de Peixola em [Action/talkaction] Removedor De Frags!   
    O script é para remover uma quantia "X" frag do jogador, diferente do outro script de remover frags que removia todos de uma só vez.

    Importante: Você precisa colocar a função 'doPlayerRemoveFrag' na sua lib, segue o link:

    http://tibiaking.com/forum/topic/16697-lua-doplayerremovefragcid-count/

    talkactions:



  2. Curtir
    Vodkart recebeu reputação de Rodrigo94 em Script de recuperar stamina em zona protegida   
    sera que fazendo pelo onThink nao é melhor? exemplo no creaturescript:
     
    staminareco.lua
    local storage = 323274 local store,exausted = 156892,30 function onLogin(cid) registerCreatureEvent(cid, "StaminaThink") setPlayerStorageValue(cid, store,0) setPlayerStorageValue(cid, storage, 0) return true end function onThink(cid, interval) if not isPlayer(cid) or not isCreature(cid) then return true end if getTilePzInfo(getCreaturePosition(cid)) and getPlayerStorageValue(cid, storage) <= 0 then setPlayerStorageValue(cid, storage, 1) if getPlayerStorageValue(cid, store) - os.time() <= 0 then doPlayerSendTextMessage(cid, 20, "{Stamina Recovery} Sua stamina começou a se recuperar, o fator de recuperação é de 30 segundos de stamina a cada 5 segundos dentro da zona de proteção em relação as condições normais.") setPlayerStorageValue(cid, store, os.time()+exausted) end elseif not getTilePzInfo(getCreaturePosition(cid)) and getPlayerStorageValue(cid, storage) > 0 then setPlayerStorageValue(cid, storage, 0) end return true end  
    TAG
    <event type="login" name="StaminareLogin" event="script" value="staminareco.lua"/> <event type="think" name="StaminaThink" event="script" value="staminareco.lua"/>  
    e no globalevents:
     
    staminareco.lua
    function onThink(pid, interval, lastExecution, thinkInterval) local refuel = 42 * 60 * 1000 -- full local add = 30000 -- 30 segundos for _, pid in ipairs(getPlayersOnline()) do if getTilePzInfo(getCreaturePosition(pid)) and getPlayerStamina(pid) < refuel then doPlayerSetStamina(pid, getPlayerStamina(pid) + add) end end return true end  
    TAG
     
    <globalevent name="StaminaRegen" interval="5" script="staminareco.lua"/>  
    obs: se o seu servidor for em milesegundos trocar o "5" por "5000"
  3. Gostei
    Vodkart recebeu reputação de sergiosdrc em [TFS] New Auto Loot Unlimited Edition 2.0   
    [ + ] Descrição: Autoloot refeito para VERSÃO TFS e adicionado algumas outras funções que estarei explicando ao decorrer do tópico.
     
    [ + ] Se você quer o Autoloot para VERSÃO OTX clica neste Link: AUTOLOOT OTX
     
     

     
     
    [ + ] Imagem do comando:
     

     
    [ + ] Features:
     
    [ - ] Você pode ativar ou desativar o autoloot a hora que achar necessário.
    [ - ] Também existe um comando para ativar ou desativar mensagens do loot que o autoloot coleta!
    [ - ] Você pode escolher a cor do texto em que irá aparecer a coleta do loot!
    [ - ] O autoloot informará para você se estiver com pouco slots na sua backpack, e o jogador poderá escolher se quer habilitar ou não está função no autoloot.
    [ - ] Versão ilimitada de itens(não ficam armazenadas em storages).
    [ - ] O jogador poderá optar por depositar direto no banco os golds que forem dropados.
     
    [ + ] Instalação:
     
    Primeiramente CRIE uma PASTA VAZIA chamanda "autoloot" em DATA/LOGS, ficando assim:
     

     
     
    Depois instale o MODS normalmente na pasta MODS do seu servidor.
     

     
     
    new_perfect_autoloot_tfs.xml
     
    Link: https://pastebin.com/raw/0xJR4nwr
     
     
     [ + ] Configuração:
     
    Dentro do mods tem essa tabela
    info = { distro = 1, -- 1 = TFS // 2 = talk modificada directory = "data/logs/autoloot", -- não mexer Warn_Bp_Slots = 5, -- quando tiver 5 ou menos slots na BP vai avisar o jogador Talkaction_delay = 5, -- em segundos // delay para remover e adicionar item BlockMonsters = {}, -- Lista de monstros que o autoloot nao vai funcionar BlockItemsList = {2123,2515}, -- Lista de itens que o autoloot nao coleta Money_ids = {2148, 2152, 2160}, -- id das moedas do ot Max_Slots = {free = 3, premium = 5}, -- quantidade de itens que podem ser adicionados no autoloot por free e premium Storages = {988801, 988802, 988803, 988804, 988805, 988806, 988807} -- não mexer }  
    Sobre o distro = 1
     
    Isso significa que ele usa versão padrão (1), pois existem 2 versões, caso aconteça esse error no seu console ao usar a talkaction do autoloot:
     
    [8/10/2020 19:19:58] [Error - TalkAction Interface]
    [8/10/2020 19:19:58] local words = "!autoloot"
    (...)
    [8/10/2020 19:19:59] return true
    [8/10/2020 19:19:59] Description: 
    [8/10/2020 19:19:59] (LuaInterface::luaGetItemIdByName) Item not found
     
    Você deverá colocar:
     
    distro = 2
     
    Pq? acontece que em alguns servidores não reconhecem o parâmetro "false" da função "getItemIdByName"
     
    OBS: Estarei anexando o autoloot já atualizado na versão 2.0 para quem tiver preguiça de copiar e colar!!
     
     
     
    new_perfect_autoloot_tfs.xml
  4. Gostei
    Vodkart recebeu reputação de bagulhoescroto em [8.6] TOP 5 LEVEL no BroadCast   
    Me pediram para postar uma especie de propaganda, onde aparecia os top level do servidor, no caso está configurado para aparecer os 5 leveis mais alto, como mostra a imagem:
     

     
    como esse script está no meu servidor faz anos, resolvi jogar para a molecada:
     
    Data/globalevents/script
     
    topleveis.lua
    function onThink(interval, lastExecution) local max, query = 5, db.getResult("SELECT `name`, `level` FROM `players` WHERE `id` > 6 AND `group_id` < 2 ORDER BY `level` DESC, `name` ASC;") local str = "TOP "..max.." Rank Level:\n\n" if (query:getID() ~= -1) then k = 1 while true do str = str .. "\n " .. k .. " - "..query:getDataString("name").."["..query:getDataInt("level").."]" k = k + 1 if not(query:next()) or k > max then break end end query:free() end doBroadcastMessage(str, 22) return true end  
    TAG:
    <globalevent name="TopLevels" interval="3600" event="script" value="topleveis.lua"/>  
  5. Obrigado
    Vodkart recebeu reputação de mattei123 em [8.6] TOP 5 LEVEL no BroadCast   
    Me pediram para postar uma especie de propaganda, onde aparecia os top level do servidor, no caso está configurado para aparecer os 5 leveis mais alto, como mostra a imagem:
     

     
    como esse script está no meu servidor faz anos, resolvi jogar para a molecada:
     
    Data/globalevents/script
     
    topleveis.lua
    function onThink(interval, lastExecution) local max, query = 5, db.getResult("SELECT `name`, `level` FROM `players` WHERE `id` > 6 AND `group_id` < 2 ORDER BY `level` DESC, `name` ASC;") local str = "TOP "..max.." Rank Level:\n\n" if (query:getID() ~= -1) then k = 1 while true do str = str .. "\n " .. k .. " - "..query:getDataString("name").."["..query:getDataInt("level").."]" k = k + 1 if not(query:next()) or k > max then break end end query:free() end doBroadcastMessage(str, 22) return true end  
    TAG:
    <globalevent name="TopLevels" interval="3600" event="script" value="topleveis.lua"/>  
  6. Gostei
    Vodkart recebeu reputação de Pauloxd94 em [RESOLVIDO] - [SQLite] -=[TFS]=- 0.4 8.60 Problema com npc Scrutinon   
    é 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
  7. Gostei
    Vodkart recebeu reputação de Doidodepeda em Up vocation   
    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.
  8. Obrigado
    Vodkart deu reputação a Doria Louro em [Spell] Como fazer monstro perde o target durante o cast   
    Bom hoje acordei e efetuei as alterações na spell, o jeito foi efetuar um loop com frequência de 15 milissegundos executando a function de virar o bendito para o sul, dessa forma funcionou perfeitamente, sendo essa spell com castTime de 6 segundos, esse evento ocorrerá 400x kkkk, mas por hora essa solução está muito boa.
    function onCastSpell(cid, var) local confLookDir = { frequency = 15, i = 1, timeTotal = 0 } while confLookDir.timeTotal <= conf.stunTime do addEvent(function() if isCreature(cid) then doCreatureSetLookDir(cid, SOUTH) end end, (confLookDir.frequency * confLookDir.i)) confLookDir.i = confLookDir.i + 1 confLookDir.timeTotal = confLookDir.frequency * confLookDir.i end setInitCast(cid) . . . return doCombat(cid, combat, var) end Agradeço a você Vodkart pela prestatividade e me mostrar o caminho, te desejo sucesso meu amigo.
    Vlw.
  9. Curtir
    Vodkart recebeu reputação de Doria Louro em [Spell] Como fazer monstro perde o target durante o cast   
    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  
  10. Obrigado
    Vodkart recebeu reputação de Admin Ghonim em [MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]   
    Qual dúvida ou erro poste no tópico que estarei respondendo.
     
     
    Obs: Antes que me falem besteiras, coloquei para os GM'S, CM'S E GOD'S não contarem no evento, então testem apenas com jogadores.
     
    Zombie.xml
    <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Perfect Zombie System" version="8.6" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="zombie_config"><![CDATA[ zombie_config = { storages = {172100, 172101, 172102}, -- n edite players = {min = 2, max = 30}, -- min, max players no evento rewards = {items ={{2160,10},{2494,1}}, trophy = 5805}, timeToStartEvent = 30, -- segundos para começar o evento CheckTime = 5, -- tempo que o TP fica aberto para os jogadores adrentarem o evento teleport = {{x=147, y=55, z=7}, {x=125 , y=304, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp arena = {{x=110,y=297,z=7},{x=145,y=321,z=7}}, -- area positions monster_name = "Zombie Event", timeBetweenSpawns = 20, min_Level = 20 } zombie_days = { ["Monday"] = {"13:00","18:00","20:00","22:00"}, ["Tuesday"] = {"13:00","18:00","22:50","22:00"}, ["Wednesday"] = {"21:57","18:00","20:00","23:17"}, ["Thursday"] = {"13:00","18:00","20:00","22:00"}, ["Friday"] = {"13:00","18:00","21:45","22:00"}, ["Saturday"] = {"13:00","18:00","20:00","22:00"}, ["Sunday"] = {"13:00","18:00","20:00","22:00"} } function removeZombieTp() local t = getTileItemById(zombie_config.teleport[1], 1387).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(zombie_config.teleport[1], CONST_ME_POFF) end function ZerarStoragesZombie() for _, stor in pairs(zombie_config.storages) do setGlobalStorageValue(stor, 0) end end function getPlayersInZombieEvent() local t = {} for _, pid in pairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), zombie_config.arena[1], zombie_config.arena[2]) and getPlayerAccess(pid) < 3 then t[#t+1] = pid end end return t end function getZombieRewards(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 function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function HaveCreatureZombie(area, remove) 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 end end end function spawnZombie() if #getPlayersInZombieEvent() > 1 then local pos = {x=math.random(zombie_config.arena[1].x, zombie_config.arena[2].x), y=math.random(zombie_config.arena[1].y,zombie_config.arena[2].y), z=zombie_config.arena[1].z} if not isWalkable(pos, false, false, false) then spawnZombie() else doSummonCreature(zombie_config.monster_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) setGlobalStorageValue(zombie_config.storages[2], getGlobalStorageValue(zombie_config.storages[2]) <= 0 and 1 or getGlobalStorageValue(zombie_config.storages[2])+1) doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(zombie_config.storages[2]) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, zombie_config.timeBetweenSpawns *1000) end end end function CheckZombieEvent(delay) if getGlobalStorageValue(zombie_config.storages[1]) ~= (zombie_config.players.max+1) then if delay > 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.max then doBroadcastMessage("Zombie event starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.min then for _, cid in pairs(getPlayersInZombieEvent()) do doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end removeZombieTp() doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. zombie_config.players.min .. " players is needed!", MESSAGE_STATUS_WARNING) ZerarStoragesZombie() elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) >= zombie_config.players.min then removeZombieTp() doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1]) .. " players]! The event will soon start.") for _, var in pairs(getPlayersInZombieEvent()) do doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!") end addEvent(spawnZombie, zombie_config.timeToStartEvent*1000) end addEvent(CheckZombieEvent, 60000, delay-1) end end]]></config> <event type="statschange" name="ZombieStats" event="script"><![CDATA[ domodlib('zombie_config') if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then if #getPlayersInZombieEvent() > 1 then doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED) local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) if #getPlayersInZombieEvent() == 1 then local winner = getPlayersInZombieEvent()[1] doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!') local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.") getZombieRewards(winner, zombie_config.rewards.items) doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false) doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT) doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!") HaveCreatureZombie(zombie_config.arena, true) ZerarStoragesZombie() end else doBroadcastMessage("No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE) HaveCreatureZombie(zombie_config.arena, true) ZerarStoragesZombie() end return false end end return true]]></event> <globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[ domodlib('zombie_config') function onThink(interval, lastExecution) if zombie_days[os.date("%A")] then local hrs = tostring(os.date("%X")):sub(1, 5) if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then local tp = doCreateItem(1387, 1, zombie_config.teleport[1]) doItemSetAttribute(tp, "aid", 45110) CheckZombieEvent(zombie_config.CheckTime) setGlobalStorageValue(zombie_config.storages[1], 0) setGlobalStorageValue(zombie_config.storages[2], 0) HaveCreatureZombie(zombie_config.arena, true) end end return true end]]></globalevent> <event type="login" name="Zombie_Login" event="script"><![CDATA[ domodlib('zombie_config') function onLogin(cid) registerCreatureEvent(cid, "ZombieBattle") registerCreatureEvent(cid, "ZombieStats") if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true end]]></event> <event type="combat" name="ZombieBattle" event="script"><![CDATA[ domodlib('zombie_config') if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then doPlayerSendCancel(cid, "You may not attack this player.") return false end return true ]]></event> <movevent type="StepIn" actionid ="45110" event="script"><![CDATA[ domodlib('zombie_config') function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, zombie_config.teleport[2]) end if getPlayerLevel(cid) < zombie_config.min_Level then doTeleportThing(cid, fromPosition, true) doPlayerSendCancel(cid, "You need to be at least level " .. zombie_config.min_Level .. ".") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end if getGlobalStorageValue(zombie_config.storages[1]) <= zombie_config.players.max then doTeleportThing(cid, zombie_config.teleport[2]) setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1) doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(zombie_config.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED) if getGlobalStorageValue(zombie_config.storages[1]) == zombie_config.players.max then setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1) removeZombieTp() doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1])-1 .. " players]! The event will soon start.") for _, var in pairs(getPlayersInZombieEvent()) do doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!") end addEvent(spawnZombie, zombie_config.timeToStartEvent*1000) end end return true end]]></movevent> <talkaction words="/zombiestart;!zombiestart" access="5" event="buffer"><![CDATA[ domodlib('zombie_config') if getGlobalStorageValue(zombie_config.storages[3]) > 0 then doPlayerSendCancel(cid, "The event is already starting.") return true elseif not param or not tonumber(param) then doPlayerSendCancel(cid, "Use only numbers.") return true end local param = tonumber(param) <= 0 and 1 or tonumber(param) local tp = doCreateItem(1387, 1, zombie_config.teleport[1]) doItemSetAttribute(tp, "aid", 45110) CheckZombieEvent(tonumber(param)) ZerarStoragesZombie() setGlobalStorageValue(zombie_config.storages[3], 1) HaveCreatureZombie(zombie_config.arena, true) ]]></talkaction> <globalevent name="ZombieDebug-Start" type="start" event="buffer"><![CDATA[ domodlib('zombie_config') ZerarStoragesZombie() return true]]></globalevent> </mod>  
    OBS: Quem serve em milesegundos, mude essa parte:

     
    <globalevent name="Zombie_Start" interval="60" event="script"><![CDATA[  
     
    para
     
    <globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[  
     
     
    ----------------------------------------------------- // --------------------------------------------------
     
    o monstro você instala em data/monsters
     
    zombie event.xml
    <?xml version="1.0" encoding="UTF-8"?> <monster name="Zombie Event" nameDescription="an zombie event" race="undead" experience="280" speed="100" manacost="0"> <health now="500" max="500"/> <look type="311" corpse="9875"/> <targetchange interval="5000" chance="50"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="0"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" min="-35000" max="-35000"/> </attacks> <defenses armor="15" defense="10"/> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="You wont last long!"/> <voice sentence="Mmmmh.. braains!"/> </voices> <loot> <item id="2148" countmax="1" chance="100000"/><!-- gold coin --> </loot> </monster>  
     
    e a tag em monsters.xml
    <monster name="Zombie Event" file="zombie event.xml"/>  
     Configuração 
     
     
     
     
    Sistema
     
    zombie_config = {
        storages = {172100, 172101}, -- não edite
        players = {min = 2, max = 30}, -- número minimo e máximo para jogadores no evento
        rewards = {items ={{2160,10},{2494,1}}, trophy = 5805}, -- premiações do jogador
        timeToStartEvent = 30, -- segundos para começar o evento após dar start
        CheckTime = 5, -- tempo que o TP fica aberto para os jogadores adrentarem o evento
        teleport = {{x=145, y=50, z=7}, {x=176 , y=54, z=5}}, -- posiçãodo tp onde aparece, posição para onde o jogador vai ao entrar no tp
        arena = {{x=173,y=52,z=5},{x=179,y=56,z=6}}, -- posição começo e final da area do evento
        monster_name = "Zombie Event", -- nome do monstro que será sumonado
        timeBetweenSpawns = 20, -- a cada quantos segundos é dado o respaw time do zombie no evento
        min_Level = 20 -- level minimo para participar do evento
    }
     
     
    Dia e Horário
     

    zombie_days = {
        ["Monday"] = {"13:00","18:00","20:00","22:00"},
        ["Tuesday"] = {"13:00","18:00","20:00","22:00"},
        ["Wednesday"] = {"13:00","18:00","20:00","22:00"},
        ["Thursday"] = {"13:00","18:00","20:00","22:00"},
        ["Friday"] = {"13:00","18:00","20:00","22:00"},
        ["Saturday"] = {"13:00","18:00","20:00","22:00"},
        ["Sunday"] = {"13:00","18:00","20:00","22:00"}
    }
     
     
    ["Dia em inglês"] = {"horário do evento"}
     
     
    Configurando a área:
     

     
    zombie lua.rar
  11. Curtir
    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  
  12. Gostei
    Vodkart recebeu reputação de Mateus Robeerto em Up vocation   
    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.
  13. Gostei
    Vodkart deu reputação a Mateus Robeerto em Up vocation   
    function onUse(cid, item, frompos, item2, topos) local config = { timeForUse = 120, -- minutos storage = 88323, toKnow = 98323, effect = CONST_ME_MAGIC_BLUE, vocationIds = { -- Sorc [1] = {5}, [5] = {9}, [9] = {13}, [13] = {17}, -- Druid [2] = {6}, [6] = {10}, [10] = {14}, [14] = {18}, -- Pala [3] = {7}, [7] = {11}, [11] = {15}, [15] = {19}, -- Kina [4] = {8}, [8] = {12}, [12] = {16}, [16] = {20} } } local playerVocation = getPlayerVocation(cid) if config.vocationIds[playerVocation] == nil then return false end local lastVocationId = config.vocationIds[playerVocation][#config.vocationIds[playerVocation]] local time = getPlayerStorageValue(cid, config.storage) if time - os.time() <= 0 then time = os.time() + config.timeForUse * 60 else time = time + config.timeForUse * 60 end setPlayerStorageValue(cid, config.storage, time) doPlayerSetVocation(cid, lastVocationId) doRemoveItem(item.uid, 1) setPlayerStorageValue(cid, config.toKnow, 1) doSendMagicEffect(getCreaturePosition(cid), config.effect) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionadas 2 horas de VIP ao seu personagem.") return true end Se funcionar, não se esqueça de dar REP+ e considere como uma solução, okay?
  14. Obrigado
    Vodkart recebeu reputação de Gatinha Pirada em (Resolvido)Boss Room tfs 0.4   
    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  
  15. Obrigado
    Vodkart recebeu reputação de koyotestark em PISO QUE REMOVE PAREDE   
    function onStepIn(cid, item, position, fromPosition) local time = 30 -- em segundos local item_id, wallpos = 1543, {x=186, y=54, z=7} -- id da parede e pos dela if not isPlayer(cid) then return true end local t = getTileItemById(wallpos, item_id).uid if t > 0 then doRemoveItem(t) doSendMagicEffect(wallpos, CONST_ME_POFF) addEvent(doCreateItem, time * 1000, item_id, 1, wallpos) end return true end  
  16. Gostei
    Em alguns servidores a função 'doPlayerRemoveItem' não tem o parâmetro 'ignoreEquipped', fazendo com que o jogador acabe vendendo os itens que estão nos slots(equipados).
     
    Esta função(gambiarra) serve para que o jogador ao vender itens no npc, o mesmo só compre itens que estiverem dentro da bp.
     
     
    Primeiramente coloque essas duas funções na lib do seu ot caso você não tenha:
     
    https://pastebin.com/raw/BfRLcrLA
     
     
    agora vá em \data\npc\lib\npcsystem e abra o seu modules.lua 
     
    substitua essa função:
     
    -- Callback onSell() function. If you wish, you can change certain Npc to use your onSell(). function ShopModule:callbackOnSell(cid, itemid, subType, amount, ignoreCap, inBackpacks) if(self.npcHandler.shopItems[itemid] == nil) then error("[ShopModule.onSell]", "items[itemid] == nil") return false end if(self.npcHandler.shopItems[itemid].sellPrice == -1) then error("[ShopModule.onSell]", "Attempt to sell a non-sellable item") return false end local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid), [TAG_ITEMCOUNT] = amount, [TAG_TOTALCOST] = amount * self.npcHandler.shopItems[itemid].sellPrice, [TAG_ITEMNAME] = self.npcHandler.shopItems[itemid].realName } if(subType < 1) then subType = -1 end if(doPlayerRemoveItem(cid, itemid, amount, subType)) then local msg = self.npcHandler:getMessage(MESSAGE_SOLD) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg) doPlayerAddMoney(cid, amount * self.npcHandler.shopItems[itemid].sellPrice) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return true else local msg = self.npcHandler:getMessage(MESSAGE_NEEDITEM) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendCancel(cid, msg) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return false end end  
    por esta:
     
    -- Callback onSell() function. If you wish, you can change certain Npc to use your onSell(). function ShopModule:callbackOnSell(cid, itemid, subType, amount, ignoreCap, inBackpacks) if(self.npcHandler.shopItems[itemid] == nil) then error("[ShopModule.onSell]", "items[itemid] == nil") return false end if(self.npcHandler.shopItems[itemid].sellPrice == -1) then error("[ShopModule.onSell]", "Attempt to sell a non-sellable item") return false end local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid), [TAG_ITEMCOUNT] = amount, [TAG_TOTALCOST] = amount * self.npcHandler.shopItems[itemid].sellPrice, [TAG_ITEMNAME] = self.npcHandler.shopItems[itemid].realName } if(subType < 1) then subType = -1 end if getPlayerSlotItem(cid, CONST_SLOT_BACKPACK).itemid ~= 0 then local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) local z = getContainerItemsById(bp, itemid) if #z >= amount then for i = 1, amount do doRemoveItem(z[i].uid) end local msg = self.npcHandler:getMessage(MESSAGE_SOLD) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg) doPlayerAddMoney(cid, amount * self.npcHandler.shopItems[itemid].sellPrice) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return true else local msg = self.npcHandler:getMessage(MESSAGE_NEEDITEM) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendCancel(cid, msg) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return false end else doPlayerSendCancel(cid, "I only buy items that are inside a BackPack") if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return false end end  
  17. Gostei
    Vodkart recebeu reputação de premii em (Resolvido)[SCRIPT] Por tempo na quest   
    @OfWar Verdade, esqueci de adicionar a linha.
     
    local storage, minutos = 48748, 10 -- 10 minutos local lvl = 130 local t = { {vocations = {1, 5}, Pos = {{x=1127, y=1155, z=6},{x=1114, y=1142, z=8}}}, --primeira pos é onde o jogador tem que estar e a segunda para onde ele vai ser teleportado {vocations = {2, 6}, Pos = {{x=1123, y=1157, z=6},{x=1114, y=1142, z=8}}}, {vocations = {3, 7}, Pos = {{x=1117, y=1150, z=6},{x=1114, y=1142, z=8}}}, {vocations = {4, 8}, Pos = {{x=1123, y=1147, z=6},{x=1114, y=1142, z=8}}} } function doTeleportTimer(pos, seconds) doSendAnimatedText(pos, seconds, 145) if seconds ~= 1 then addEvent(doTeleportTimer, 1000, pos, seconds-1) end end function onUse(cid, item, fromPosition, itemEx, toPosition) if getGlobalStorageValue(storage) - os.time() > 0 then doPlayerSendTextMessage(cid, 25, "Você não pode usar a alavanca agora.") return true end local check = {} for _, k in ipairs(t) do local x = getTopCreature(k.Pos[1]).uid if x == 0 or not isPlayer(x) then doPlayerSendCancel(cid, 'Não há jogadores suficientes.') return true elseif not isInArray(k.vocations, getPlayerVocation(x)) then doPlayerSendCancel(cid, 'Todos os jogadores devem estar em seus respectivos pisos!') return true elseif getPlayerLevel(x) < lvl then doPlayerSendCancel(cid, 'Todos os players devem ser level ' .. lvl .. ' ou maior.') return true end table.insert(check, x) end for k, tid in ipairs(check) do doSendMagicEffect(getCreaturePosition(tid), CONST_ME_POFF) doTeleportThing(tid, t[k].Pos[2]) doSendMagicEffect(getCreaturePosition(tid), CONST_ME_TELEPORT) end setGlobalStorageValue(storage, os.time() + minutos*60) doTeleportTimer(toPosition, minutos*60) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end  
  18. Gostei
    Vodkart recebeu reputação de iury alves potter em Event BOSS   
    local config = { name = "Shuryu Boss", pos = {x = 60, y = 63, z = 3}, time = 20 } function onThink(interval, lastExecution) doCreateMonster(config.name, config.pos) broadcastMessage("O "..config.name.." apareceu, voce tem "..config.time.." para mata-lo", MESSAGE_STATUS_CONSOLE_ORANGE) addEvent(function() local creature = getCreatureByName(config.name) if creature ~= nil and not isPlayer(creature) then doRemoveCreature(getTopCreature(getCreaturePosition(creature)).uid) end end, config.time*60*1000) return true end  
  19. Gostei
    Vodkart recebeu reputação de Fir3element em Exclusive Cave System By Account! 8.6   
    Explicação:
     
    Este sistema proporciona ao jogador a compra de determinada cave por "X" tempo, cada conta poderá comprar somente 1 cave por vez... Lá o jogador poderá upar livremente.
     
    Também poderá chamar um amigo para upar na sua cave!!
     
    O sistema é o mais completo do mercado, vou estar falando do mesmo abaixo.
     
    OBS: Não esqueça de executar a query para funcionar!!
     
     
    Exclusive Cave System Features
     
     Dentro do pacote terá duas versões:  
    versão 1 : É para vendar as caves em money(Gold's)

    Versão 2: É para vender as caves por items, por exemplo por moedas especiais como scarab coins(ID 2159)
     
      O sistema é feito por banco de dados  
    O tempo da cave é mostrado em tempo real  
    Você poderá chamar um amigo para sua cave e também remove-lo quando quiser.  
    Existe um globalevents especifico para mostrar no default quando uma cave ficou disponível para venda! (Irá informar o nome da cave o preço dela!)  
    Você poderá configurar a cave para vender por exemplo:  
                     - Level minimo e máximo!
                     - Tempo de duração da cave
                     - Se precisa ser premium account para comprar a cave!
     
     
    Quando o tempo da cave expira tanto o dono da cave como o friend invitado são removidos da cave, mesmo estando offline ou online!  
    Comandos exclusivos:  
    Comando para dono da cave:
     
        /mycave - Mostra informações da sua cave, como:
     
          - Nome da cave
          - Nome do seu amigo de cave(caso tiver invitado)
          - Quando tempo falta para expirar o tempo da sua cave
     
    /addcavefriend - Adiciona um amigo seu para que ele possa entrar e sai da sua cave quando quiser... Obs: Tem um exhausted de 1 hora(configurável) para não ficar toda hora tirando e colocando amigo na cave.
     
    /removecavefriend - Remove o seu amigo da sua cave(caso ele esteja dentro da cave tanto offline quanto online, ele é removido)
     
    /cavetime - Mostra quando tempo falta para expirar a sua cave
     
     
    Comando para amigo invitado da cave:
     
    /cavefriendtime - Mostra quando tempo falta para expirar a cave que ele invitado.
     
    /caveleave - Comando para ele se kikar da cave que está invitado.
     
     
    Comandos adicionais importante para todos:
     

     /cavelist -- Mostra em uma janela todas as caves do servidor
     
     
    /cave ID -- Neste comando você terá que usar o ID da cave que deseja saber as infor,ações, por exemplo:
     
    /cave 1  -- Irá mostrar em uma janela todas as informações desta cave, como:
     
    -Nome da cave
    -Preço da cave
    -Level Minimo e Level Maximo para comprar a cave
    -Se nesta cave precisa ser Premium Account para comprar ou não.
     
    /cavepurchase -- Filtra em uma janela somente as caves que estão disponíveis para compra.
     
     
     
    ----------------------------------------------------------------------------------------------------------------------------------------------------
     
    Configurações:
     
    Vá na lib e irá se deparar com duas tabelas...
     
     
    Esta primeira tabela é onde você irá adicionar novas caves e atribuir as configurações, exemplo:
    exclusives_caves_areas = { -- adicionar as caves [1] = {name = "Demon Hunter", price = 1000, level = {min = 8, max =30}, time = 4, premium = false, enter = {x = 284, y = 223, z = 7}, from = {x = 275, y = 219, z = 5}, to = {x = 302, y = 240, z = 7}}, [2] = {name = "Hydras Thow", price = 2000, level = {min = 10, max = 1000}, time = 3, premium = true, enter = {x = 148, y = 218, z = 7}, from = {x = 137, y = 217, z = 7}, to = {x = 161, y = 234, z = 7}} }  
     
    [1] -- Entre os colchetes é o ID da cave, favor colocar e ordem.
     
    name = "Demon Hunter" -- Entre as aspas "" Você atribui o nome da cave
     
    price = 1000 -- Preço em gps da sua cave(caso use a versão que vende em gps)
     
    level = {min = 8, max =30} -- Aqui voce coloca o level min e max que o jogador tem que ser para comprar a cave
     
    time = 4 -- Tempo em horas que o jogador poderá ficar na cave
     
    premium = false -- Se para comprar a cave terá que ser premium (false ou true)
     
    enter = {x = 284, y = 223, z = 7} -- Pos de entrada da cave
     
    from = {x = 275, y = 219, z = 5}, -- Aqui você deverá pegar a pos do começa da cave
     
    to = {x = 302, y = 240, z = 7} - - -- Aqui você deverá pegar a pos final da cave!(como se fosse um quadrado.
     
    e como adicionar mais caves por exemplo? Assim:
     
    exclusives_caves_areas = { -- adicionar as caves [1] = {name = "Demon Hunter", price = 1000, level = {min = 8, max =30}, time = 4, premium = false, enter = {x = 284, y = 223, z = 7}, from = {x = 275, y = 219, z = 5}, to = {x = 302, y = 240, z = 7}}, [2] = {name = "Hydras Thow", price = 2000, level = {min = 10, max = 1000}, time = 3, premium = true, enter = {x = 148, y = 218, z = 7}, from = {x = 137, y = 217, z = 7}, to = {x = 161, y = 234, z = 7}}, [3] = {name = "Ciclops Cave", price = 5000, level = {min = 20, max = 50}, time = 2, premium = true, enter = {x = 198, y = 320, z = 7}, from = {x = 200, y = 340, z = 7}, to = {x = 250, y = 390, z = 7}} }  
     
    ----------------------------------------------------------------------------------------------------------------------------------------------------
     
    explicando a segunda tabela:
     
     
    exclusives_caves_config = { storage = 547575, check = 547576, comand_add_exaust = {hours = 1, storage = 547577}, -- tempo para nao ficar toda hora tirando e colocando amigo mensagem = "[Exclusive Cave System] Você foi removido ou o tempo da %s cave expirou!", serve_mensagem = "[Exclusive Cave System] A cave %s acabou de ficar liberada para venda por %d Gold's, aproveitem para compra-la no NPC!" }  
     
    storage -- nao mexer!
    check -- não mexer!!
     
    comand_add_exhausted -- é o tempo que jogador poderá voltar a invitar outro jogador, está configurado para 1 hora!!
     
    mensagem -- não mexa
     
    serve_mensagem -- não mexa tbm kkk
     
     
    Só baixar e executar as querys!!
     
     
    Cave System.rar
  20. Obrigado
    Vodkart deu reputação a ArielZeRah em (Resolvido)Mostrar Guild Dominante Castle - SATI   
    Resolvido pode fechar!
    solução acima nos spoiller

    Obrigado  @vitinhoo96
  21. Gostei
    Vodkart recebeu reputação de carloos em criar npc dentro da house   
    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. Gostei
    Vodkart recebeu reputação de vitinhoo96 em Alguem ajudar a adicionar comando nesse MOD   
    <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
  23. Gostei
    Vodkart recebeu reputação de carloos em criar npc dentro da house   
    só dá erro neste npc Alice? já testou com outros?
  24. Gostei
    Vodkart deu reputação a So volto tarde em Piso Vip com erro ao npc/monster passar por cima   
    -- Creditos: Breno Neves (KotZletY) = Criador do Script! function onStepIn(cid, item, position, fromPosition) if (not isPlayer(cid)) then return true end if getPlayerPremiumDays(cid) >= 1 then doSendMagicEffect(getThingPos(cid), 12) doPlayerSendTextMessage(cid, 25, "Seja Bem-vindo ".. getPlayerName(cid) .." !") else doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getThingPos(cid), 2) doPlayerSendTextMessage(cid, 25, "Apenas Players Vip's podem passa.") end return true end  
  25. Gostei
    Vodkart recebeu reputação de L3K0T em [Comando] Comando para add item ao player mesmo off   
    additemdepot.lua
    function doPlayerAddDepotItems(pid, item, count) --By magus and edited by vodkart local item,count = {item},{(count or 1)} for k,v in ipairs(item) do local ls = db.getResult("SELECT `sid` FROM `player_depotitems` WHERE `player_id` = "..pid.." ORDER BY `sid` DESC LIMIT 1") return db.executeQuery("INSERT INTO `player_depotitems` (`player_id`, `sid`, `pid`, `itemtype`, `count`, `attributes`) VALUES ("..pid..", "..(ls:getDataInt("sid")+1)..", 101, "..v..", "..count[k]..", '')") or false end end function onSay(cid, words, param) local t = string.explode(param:lower(),",") if not t[1] then doPlayerSendCancel(cid, "digite Nome, Item ID, quantidade.") return true elseif not getPlayerByNameWildcard(t[1]) and not getPlayerGUIDByName(t[1]) then doPlayerSendCancel(cid, "Você deve digitar um Nome Válido.") return true elseif not tonumber(t[2]) or not tonumber(t[3]) or tonumber(t[3]) < 1 or tonumber(t[3]) > 999 or not isItemStackable(t[2]) and tonumber(t[3]) > 10 then doPlayerSendCancel(cid, "você deve digitar NOME,ID,QUANTIDADE(maior que 0"..(not isItemStackable(t[2]) and " até 10 se não for empilhavel." or " até 1000 se for empilhavel.")..").") return true elseif not isItemMovable(t[2]) or not getItemNameById(tonumber(t[2])) then doPlayerSendCancel(cid, "Este item não existe ou não pode ser adicionado ao jogador.") return true end local player = getPlayerByNameWildcard(t[1]) if player then parcel = doCreateItemEx(ITEM_PARCEL) if isItemStackable(t[2]) or tonumber(t[3]) == 1 then doAddContainerItem(parcel, t[2], t[3]) else for i = 1, t[3] do doAddContainerItem(parcel, t[2], 1) end end doPlayerSendMailByName(getPlayerNameByGUID(getPlayerGUIDByName(t[1])), parcel, 1) else local getPlayer = getPlayerGUIDByName(t[1]) if isItemStackable(t[2]) or tonumber(t[3]) == 1 then doPlayerAddDepotItems(getPlayer, t[2], t[3]) else for i = 1, t[3] do doPlayerAddDepotItems(getPlayer, t[2], 1) end end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"você adicionou "..t[3].." "..getItemNameById(t[2]).." ao depot do jogador "..t[1]) return true end  
     
    TAG
     
    <talkaction log="yes" access="5" words="/adddepot" event="script" value="additemdepot.lua"/>  
     

    Exemplo:
     
    /adddepot vodkart,2160,500
     
    or
     
    /adddepot vodkart,2494,6
     
     
    postei isso em 2013 acho la na otland kk
     
    https://otland.net/threads/add-items-depot-from-player-online-offline.196947/

Informação Importante

Confirmação de Termo