Ir para conteúdo

Vodkart

Héroi
  • Registro em

Solutions

  1. Vodkart's post in (Resolvido)Ajuda NPC was marked as the answer   
    claro, tem que aumentar a tabela de rewards tbm.
     
    troque:
     
    local prizes = { [1] = {{itemid = 2160, count = 50}, {itemid = 13536, count = 20}}} -- Mega bit e Oran Berry por
    local prizes = { [1] = {{itemid = 2160, count = 50}, {itemid = 13536, count = 20}}, [2] = {{itemid = 2160, count = 50}, {itemid = 13536, count = 20}}, [3] = {{itemid = 2160, count = 50}, {itemid = 13536, count = 20}}, [4] = {{itemid = 2160, count = 50}, {itemid = 13536, count = 20}}, [5] = {{itemid = 2160, count = 50}, {itemid = 13536, count = 20}}, [6] = {{itemid = 2160, count = 50}, {itemid = 13536, count = 20}} } -- Mega bit e Oran Berry  
  2. Vodkart's post in (Resolvido)FimPremium.lua faltando algo was marked as the answer   
    function onLogin(cid)     local house = getHouseByPlayerGUID(getPlayerGUID(cid))     local pos = {x=32369, y=32241, z=7} -- pos onde será teleportado     if isPremium(cid) and getPlayerStorageValue(cid, 548474) <= 0 then         setPlayerStorageValue(cid, 548474, 1)     elseif not isPremium(cid) and getPlayerStorageValue(cid, 548474) > 0 then         doPlayerSendTextMessage(cid, 22, "seu premium acabou")         doCreatureChangeOutfit(cid,{lookType = getPlayerSex(cid) == 0 and 136 or 128})         if house then         setHouseOwner(house,NO_OWNER_PHRASE,true)         end         doTeleportThing(cid, pos)         setPlayerStorageValue(cid, 548474, 0)     end     return true end  
  3. Vodkart's post in (Resolvido)NPC DE STAMINA ERRO was marked as the answer   
    a função 'doPlayerAddStamina' n existe no seu servidor, troque por 'doPlayerSetStamina'
  4. Vodkart's post in (Resolvido)[Ajuda] Aprendendo was marked as the answer   
    slot 3 é backpack?
     
    está retornando o id da backpack só kk
     
    teria que fazer um loop na backpack
     
     
    function Container.getItems(self, ret) ret = ret or {} for index = self:getSize()-1, 0, -1 do local item = self:getItem(index) if item:isContainer() == true then ret[#ret+1] = item else ret[#ret+1] = item end end return ret end  
  5. Vodkart's post in (Resolvido)erro de script no catch was marked as the answer   
    local dir = "data/Pokemon Statistics/"..poke.." Attempts.txt"
     
     
     
    checou pra ver se tem esse arquivo no seu servidor?
  6. Vodkart's post in (Resolvido)[Query sqlite] limpar todos os items dos players (menos os donaters) was marked as the answer   
    DELETE FROM player_items WHERE itemtype NOT IN ('2494', '2495', '2646'); ali vc coloca o id dos itens
  7. Vodkart's post in (Resolvido)[Action] Tile que é criado por tempo ao dar "use" na lever was marked as the answer   
    https://tibiaking.com/forums/topic/2231-action-alavanca-de-pontes-que-desaparecem/
  8. Vodkart's post in (Resolvido)[AJUDA] Arena PvP was marked as the answer   
    troca
    local from, to = {x = 1068, y = 916, z = 7}, {x = 1062, y = 924, z = 7} por
    local from, to = {x = 1062, y = 916, z = 7}, {x = 1068, y = 924, z = 7}
    começa do MENOR pro MAIOR
  9. Vodkart's post in (Resolvido)Look mostra saga was marked as the answer   
    blz, mas quando faz a quest certo, ele ganha a storage e muda outfit... troca a voc tbm?
     
    se nao vms usar uma terceira storage p/ todas as sagas ficar na descrição ?
  10. Vodkart's post in (Resolvido)Me ajuda Vodkart was marked as the answer   
    function onUse(cid, item, frompos, item2, topos) local sagastor = 578744 -- usa essa stor pq ja ta no saga system msm local voc = 60 -- id da vocation que ele vai ser promovido local outfit = 364 doPlayerSetVocation(cid, voc) doCreatureChangeOutfit(cid, {lookType = outfit}) setPlayerStorageValue(cid, sagastor, ":"..outfit..",:"..getPlayerVocation(cid)) doRemoveItem(item.uid) doPlayerSendTextMessage(cid, 22, "Parabens voce virou um Chojuro.") return true end  
  11. Vodkart's post in (Resolvido)TPSYSTEM ERRO was marked as the answer   
    esqueci pra setar storage pra 0
     
     
    local storage, storage1 = 8910,158787 -- storage local position = {x=1541, y=1157, z=7} local voc, effect = 8, 2 function onSay(cid, param, word) if getPlayerVocation(cid) ~= voc then return true end if getPlayerStorageValue(cid, storage) <= 0 then setPlayerStorageValue(cid, storage, 1) local pos = getCreaturePosition(cid) setPlayerStorageValue(cid, storage1, ":"..pos.x..",:"..pos.y..",:"..pos.z) doTeleportThing(cid, position) doSendMagicEffect(getCreaturePosition(cid), effect) else local w = tostring(getPlayerStorageValue(cid, storage1)):gsub(':', ''):explode(',') doTeleportThing(cid, {x = w[1], y = w[2], z = w[3]}) doSendMagicEffect(getCreaturePosition(cid), effect) setPlayerStorageValue(cid, storage, 0) end return true end  
  12. Vodkart's post in (Resolvido)[Ajuda] Spell Paralyze/Stun que precisa de X storage was marked as the answer   
    é aquele efeito branco ali? kk
     
    local combat = createCombatObject() setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -40.2, 1, -40.2, 1) function onCastSpell(cid, var) function effectNoMove(target, storage, effect) if not isCreature(target) then return LUA_ERROR end if getPlayerStorageValue(target, storage) - os.time() > 0 then local pos = getPlayerPosition(target) doSendMagicEffect(pos, effect) addEvent(effectNoMove, 300, target, storage, effect) -- 300 é o delay end end local time,efeito = 10, 49 -- tempo e efeito local target = getCreatureTarget(cid) local storage,storage1 = 89785,845784 if getPlayerStorageValue(cid, storage) <= 0 then doPlayerSendTextMessage(cid, 20, "n pode usar esta spells.") return false end if isPlayer(target) and getPlayerStorageValue(target, storage1) - os.time() <= 0 then doCreatureSetNoMove(target, true) setPlayerStorageValue(target, storage1, os.time()+time) addEvent(function(target) if not isCreature(target) then return LUA_ERROR end doCreatureSetNoMove(target, false) end, time*1000, target) doSendMagicEffect(getPlayerPosition(target), efeito) effectNoMove(target, storage1, efeito) return doCombat(cid, combat, var) end return true end  
  13. Vodkart's post in (Resolvido)Suporte em script was marked as the answer   
    if isInArray(chek.outfits, getCreatureOutfit(cid).lookType) then doCreatureChangeOutfit(cid,{lookType = 81})  
  14. Vodkart's post in (Resolvido)[Entendendo] Verificação de party was marked as the answer   
    você precisa usar um looping nesse código, já que a função 'party:getMembers()' retorna uma tabela
     
    ai você usaria por exemplo
    local bers = party:getMembers() if #bers >= 2 then bloco end  
    e para checar cada um você faria um looping, como falei...
     
    local bers = party:getMembers() if #bers >= config.members then for _, var in pairs(bers) do if var:getLevel() < config.level or not var:removeItem(config.item[1], config.item[2]) then var:sendCancelMessage("You don't have a level or don't have item!") return true end t[#t+1] = var end end  
     
    acho que ficaria mais ou menos assim:
     
    local config = {members = 2, level = 300, item = {2160,10}} function onStepIn(player, item, position, fromPosition) local t = {} local party = player:getParty() if party then local bers = party:getMembers() if #bers >= config.members then for _, var in pairs(bers) do if var:getLevel() < config.level or not var:removeItem(config.item[1], config.item[2]) then var:sendCancelMessage("You don't have a level or don't have item!") return true end t[#t+1] = var end for _, membros in pairs(t) do membros:teleportTo(Position(7659, 7834, 6)) membros:sendTextMessage(22,"Good Luck "..membros:getName()) membros:getPosition():sendMagicEffect(49) end else player:teleportTo(Position(7639, 7834, 6)) player:sendCancelMessage("You can only spend "..config.members.."+ players in the party.") player:getPosition():sendMagicEffect(CONST_ME_POFF) end else player:teleportTo(Position(7639, 7834, 6)) player:sendCancelMessage("Only players with party can pass through here.") player:getPosition():sendMagicEffect(CONST_ME_POFF) end return true end  
  15. Vodkart's post in (Resolvido)Creaturescript de luz quando o player logar, leiam a descrição. was marked as the answer   
    @Fabio Leandro
     
    pq o code do fórum da bugando os scripts, já avisei o bruno...
     
    testa assim e me avisa:
     
    https://pastebin.com/raw/PnmihQ25
  16. Vodkart's post in (Resolvido)ABRIR TP AO MONSTRO MORRER was marked as the answer   
    local tpId = 1387 local tps = { ["Kurama"] = {pos = {x=1243, y=1090, z=9}, toPos = {x=1276, y=1055, z=9}, time = 30}, } function removeTp(pos) local t = getTileItemById(pos, 1387).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(pos, CONST_ME_POFF) end function onDeath(cid) local tp = tps[getCreatureName(cid)] if tp then doCreateTeleport(tpId, tp.toPos, tp.pos) doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1) addEvent(removeTp, tp.time*1000, tp.pos) end return true end  
  17. Vodkart's post in (Resolvido)Como fazer o player nascer em determinado lugar was marked as the answer   
    function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) local from, to = {x = 996, y = 903, z = 7}, {x = 1003, y = 905, z = 7} -- pos começo e final da arena local tp = {x = 979, y = 907, z = 7} -- para onde vai if isPlayer(cid) and isInRange(getPlayerPosition(cid), from, to) then doTeleportThing(cid, tp) doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doRemoveConditions(cid, false) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce saiu da arena.") return false end return true end  
  18. Vodkart's post in (Resolvido)Recompensa ao ficar online was marked as the answer   
    usa o creaturescript normal daquele topic e usa esse globalevents:
     
    local config = { p_time = 3600, -- Tempo em segundos para receber os pontos( 3600 = 1hora ) p_points = 1 -- 1 hora de vip account } function addVipHoursByAccount(acc, hours) local hValue = hours*3600 local vipTime = getVipTimeByAccount(acc) local timeNow = os.time() local time = getVipDaysByAccount(acc) == 0 and (timeNow + hValue) or (vipTime + hValue) return setVipTimeByAccount(acc, time) end local function givePoints(cid, quant) if os.time() - getCreatureStorage(cid, 1219) >= config.p_time then doPlayerSendTextMessage(cid, 19, "Congratulations, you recieved ".. config.p_points .." Hour from Vip Account.") addVipHoursByAccount(getPlayerAccountId(cid), quant) doCreatureSetStorage(cid, 1219, 0) doCreatureSetStorage(cid, 1219, os.time()) end return true end function onThink(interval) for i, v in pairs(getPlayersOnline()) do givePoints(v, config.p_points) end return true end  
  19. Vodkart's post in (Resolvido)Como fazer um npc so te responder quando vc estiver bebado? was marked as the answer   
    getCreatureCondition(cid, condition[, subId = 0])  
    conditions:
     
    CONDITION_NONE = 0 CONDITION_POISON = 1 CONDITION_FIRE = 2 CONDITION_ENERGY = 4 CONDITION_PHYSICAL = 8 CONDITION_HASTE = 16 CONDITION_PARALYZE = 32 CONDITION_OUTFIT = 64 CONDITION_INVISIBLE = 128 CONDITION_LIGHT = 256 CONDITION_MANASHIELD = 512 CONDITION_INFIGHT = 1024 CONDITION_DRUNK = 2048 CONDITION_EXHAUST = 4096 CONDITION_FOOD = 8192 CONDITION_REGENERATION = 8192 CONDITION_SOUL = 16384 CONDITION_DROWN = 32768 CONDITION_MUTED = 65536 CONDITION_ATTRIBUTES = 131072 CONDITION_FREEZING = 262144 CONDITION_DAZZLED = 524288 CONDITION_CURSED = 1048576 CONDITION_PACIFIED = 2097152 CONDITION_GAMEMASTER = 4194304 CONDITION_HUNTING = 8388608  
     
    no caso do bebado é a CONDITION_DRUNK
     
    usaria assim
     
    :
    if getCreatureCondition(cid, CONDITION_DRUNK) then --bloco vazio end  
     
  20. Vodkart's post in (Resolvido)Npc adicionando Storage was marked as the answer   
    setPlayerStorageValue(cid,key,value)

    key = numero da storage
    value = valor dela
     
    exemplo:
     
    setPlayerStorageValue(cid,1500,1)
  21. Vodkart's post in (Resolvido)Bug na morte do player. TFS 0.4.0 8.6 was marked as the answer   
    Adicione isto  an pasta lib em 050-function.lua:
    function doPlayerRemoveLethalConditions(cid) local tmp = {1, 2, 4, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 32768, 65536} for i = 1, #tmp do if(hasCondition(cid, tmp)) then doRemoveCondition(cid, tmp) end end return true end  
  22. Vodkart's post in (Resolvido)Erro Mod Jounin was marked as the answer   
    <?xml version="1.0" encoding="UTF-8"?> <mod name="Exame Jounin" enabled="yes" author="Demonbholder" forum="XTibia.com"> <config name="ArenaLib2"><![CDATA[ dinheiro = 10000 storage = 47002 storage2 = 47003 playerpos = {x = 964, y = 899, z = 7} -- posicao da arena trofypos = {x=986, y=902, z=8} -- posicao da area apos a arena monpos = {x = 964, y = 894, z = 7} -- posicao onde o monstro sera criado fromPos,toPos = {x = 960, y = 893, z = 7},{x = 969, y = 900, z = 7} -- posio do canto superior direito, posio do canto inferior esquerdo da arena monsters = { [0] = 'uchiha fugaku', [1] = 'chouza akimichi', [2] = 'anko', [3] = 'zabuza', [4] = 'kakashi' } function doRemoveCorpse(pos) for i = 0, 255 do pos.stackpos = i tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then doRemoveItem(tile.uid) end end end ]]></config> <creaturescript type="death" name="Arena2" event="script"><![CDATA[ domodlib('ArenaLib2') if isPlayer(deathList[1]) and isMonster(cid) then if getPlayerStorageValue(deathList[1], storage) > -1 and getPlayerStorageValue(deathList[1], storage) < 5 then setPlayerStorageValue(deathList[1], storage, getPlayerStorageValue(deathList[1], storage) + 1) addEvent(doRemoveCorpse, 500, getCreaturePosition(cid)) setPlayerStorageValue(deathList[1], storage2, -1) end if getPlayerStorageValue(deathList[1], storage) == 5 then doTeleportThing(deathList[1], trofypos) setPlayerStorageValue(deathList[1],49502,1) end end return TRUE ]]></creaturescript> <creaturescript type="kill" name="ArenaK2" event="script"><![CDATA[ domodlib('ArenaLib2') if isMonster(cid) and isPlayer(target) then if getPlayerStorageValue(target, storage) > -1 and getPlayerStorageValue(target, storage) < 5 then setPlayerStorageValue(target, storage, -1) setPlayerStorageValue(target, storage2, -1) doRemoveCreature(cid) addEvent(doRemoveCorpse, 500, getCreaturePosition(target)) end end return TRUE ]]></creaturescript> <creaturescript type="logout" name="ArenaL2" event="script"><![CDATA[ domodlib('ArenaLib2') if isInRange(getPlayerPosition(cid), fromPos, toPos) then return FALSE, doPlayerSendCancel(cid, "You can't logout during arena!") end return TRUE ]]></creaturescript> <movevent type="StepIn" actionid="40003" event="script"><![CDATA[ domodlib('ArenaLib2') if monsters[getPlayerStorageValue(cid, storage)] then if getPlayerStorageValue(cid, storage2) == -1 then local mon = doCreateMonster(monsters[getPlayerStorageValue(cid, storage)], monpos) setPlayerStorageValue(cid, storage2, 1) registerCreatureEvent(mon, "Arena2") registerCreatureEvent(mon, "ArenaK2") end end return TRUE ]]></movevent> <movevent type="StepIn" actionid="40002" event="script"><![CDATA[ domodlib('ArenaLib2') for x = fromPos.x, toPos.x do for y = fromPos.y,toPos.y do local m = getTopCreature({x=x, y=y, z=fromPos.z}).uid if m~= 0 and isPlayer(m) then doTeleportThing(cid, fromPosition, true) return doPlayerSendCancel(cid, "Alguem esta fazendo o exame Jounin.") end end end if getPlayerMoney(cid) < dinheiro then return TRUE, doTeleportThing(cid, fromPosition), doPlayerSendCancel(cid, "Tens que ter 1g para fazer o exame jounin, sera para seus proprios medicamentos.") end doPlayerRemoveMoney(cid, dinheiro) setPlayerStorageValue(cid, storage, 0) doPlayerSendTextMessage(cid, 4, "Exame Jounin!") return TRUE, doTeleportThing(cid, playerpos) ]]></movevent> </mod>  
  23. Vodkart's post in (Resolvido)[AJUDA] Npc checando storage was marked as the answer   
    n testei
     
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser,msg = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid, msg:lower() local storage1,storage2 = 15754,89745 local tabble = { ["primeira"] = {10551,10,0, "Va até o local 06 do MAPA, mate uns nekenins e me traga 10 Nukenin talisma!"}, ["segunda"] = {6500,25,1,"Va ate a Florest Renegade, quero que me tragas 25 renegade essence!"}, ["terceira"] = {2690,1,2,"Va ate o Local 05 do mapa que fica na Floresta Renegade, Tens um Shinobi de graduação Jounin la que roubou 1 saco de dinheiro de um aldeão, pegue e traga para mim"} } if isInArray({'missao','mission', 'missoes', 'tarefa', 'missions'}, msg) then if getPlayerStorageValue(cid,storage2) <= 0 then npcHandler:say("voce nao eh um gennin entao nao pode fazer missao aqui!", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) return true end npcHandler:say("qual missão deseja fazer agora, lembre-se de terminar uma para começar a outra, eu tenho disponivel {primeira}, {segunda} ou {terceira} missao!", cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then if tabble[msg] then local t = tabble[msg] local var = getPlayerStorageValue(cid,storage1) <= 0 and 0 or getPlayerStorageValue(cid,storage1) if var ~= t[3] then npcHandler:say('Voce ainda nao pode fazer ou ja terminou essa missao.', cid) return true elseif not doPlayerRemoveItem(cid, t[1], t[2]) then npcHandler:say(t[4], cid) return true end doPlayerAddExperience(cid,1000) doPlayerAddItem(cid,10136,1) setPlayerStorageValue(cid,storage1,var+1) npcHandler:say(getPlayerStorageValue(cid,storage1) > 2 and "Obrigado! Voce ja terminou 3 missões minhas, ja é digno de fazer o exame Jounin." or "Obrigado! ganhou um livro do kakashi de presete e ganhou 1000 de exp por ler!! agora ja podes fazer outra missao!", cid) return true end elseif msg == "no" then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())  
    -----------------------
    editado arrumei uma coisa agora
  24. Vodkart's post in (Resolvido)[PEDIDO] BLESSING AMULET was marked as the answer   
    remove essa parte do login.lua
     
    if getPlayerSlotItem(cid, 2).itemid == 7889 then doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) doSendMagicEffect(getPlayerPosition(cid), 49) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end  
    e no outro script deixa assim:
     
    function onDeath(cid, corpse, deathList) if getPlayerSlotItem(cid, 2).itemid == 7889 and getPlayerSkullType(cid) >= 4 then         doCreatureSetDropLoot(cid, false)     end     return true end  
  25. Vodkart's post in (Resolvido)Talkactions !saga was marked as the answer   
    abre todos esses arquivos e depois dessa linha:
     
    doCreatureChangeOutfit(cid, outfit)  
    adiciona essa linha embaixo
     
    setPlayerStorageValue(cid, 578744, ":"..t[getPlayerVocation(cid)]..",:"..getPlayerVocation(cid))  
     
    por exemplo do akatsuki
     
    local t = { [1] = 1096, -- [VocID] = lookTypeID [2] = 1372, [3] = 944, [4] = 1424, [5] = 1149, [6] = 1563, [7] = 565, [8] = 735, [9] = 334, [10] = 1297, [11] = 446, [12] = 828, [13] = 608, [14] = 1683, [15] = 1091, [16] = 1702, [17] = 856, [18] = 1545, [19] = 808, [20] = 1198, [21] = 650, [22] = 1616, [23] = 1168, [24] = 547, [25] = 389, [26] = 590, [27] = 1446, [50] = 1318, [52] = 349, [54] = 1049, [56] = 1439, [58] = 1772, [60] = 368, [62] = 313, [64] = 401, [66] = 497, [68] = 1804, [70] = 435, [72] = 1755, [74] = 679, [76] = 1745, [100] = 1774, [103] = 1031, [105] = 633, [107] = 359 } local key = 89785 -- Akatsuki storage local effect = 3 -- Efeito ao transformar function onSay(cid, words, param, channel) local pos = getCreaturePosition(cid) if t[getPlayerVocation(cid)] then if getCreatureStorage(cid, key) >= 1 then local outfit = {lookType = t[getPlayerVocation(cid)]} doCreatureChangeOutfit(cid, outfit) setPlayerStorageValue(cid, 578744, ":"..t[getPlayerVocation(cid)]..",:"..getPlayerVocation(cid)) doCreatureSay(cid, "!akatsuki", TALKTYPE_MONSTER) doSendMagicEffect(pos, effect) return true else doPlayerSendTextMessage(cid, 27, "Voce não fez a quest Akatsuki") doSendMagicEffect(pos, 2) return true end else doPlayerSendTextMessage(cid, 27, "Sua vocation ainda não tem akatsuki transform.") doSendMagicEffect(pos, 2) return true end return true end  

Informação Importante

Confirmação de Termo