Ir para conteúdo

Wakon

Héroi
  • Registro em

  • Última visita

Tudo que Wakon postou

  1. O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Aprovação de Tópicos de Conteúdos" Para: "OTServ → Suporte OTServ → Suporte de Scripts"
  2. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Scripting → Tutoriais de Scripting" Para: "OTServ → Suporte OTServ → Suporte de Scripts"
  3. Em "Data/movements/scripts", copie e cole um arquivo.lua e renomeie para nome_desejado.lua, apague tudo e cole: local config = { [9056] = 4, -- Aqui você coloca em [ACTIONID] = TOWNID. Exemplo ActionID 9056 vira morador da town 4. [9057] = 2, [9058] = 1 } function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end local townId = config[item.actionid] doPlayerSetTown(cid, townId) doTeleportThing(cid, getTownTemplePosition(townId)) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You are now a citizen of '.. getTownName(townId) ..'.') return true end Em "Data/movements", abra o arquivo movements.xml e adicione a tag: <movevent type="StepIn" actionid="9056-9058" event="script" value="nome_desejado.lua"/> Na tag você coloca o nome do script em value="nome_desejado.lua" e coloca as actionid citadas no script, no exemplo está para funcionar da actionID 9056 até a 9058.
  4. Wakon postou uma resposta no tópico em Suporte OTServer Derivados
    Amigo, não é permitido dar up varias vezes em menos de 24 horas, leia as regras: http://www.tibiaking.com/forum/topic/1281-regras-gerais/
  5. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Suporte OTServ → Suporte de Scripts" Para: "OTServ → Suporte OTServ → Suporte de Programação"
  6. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Tenta assim: local aids = { [4120] = {used_id = 8299, target_id = 8573, effect = 3, transform_id = 8575, create_id = 0, sto = 40064}, -- Sorcerer [4121] = {used_id = 8303, target_id = 8567, effect = 29, transform_id = 0, create_id = 1491, sto = 40065}, -- Knight [4122] = {used_id = 8302, target_id = 8571, effect = 29, transform_id = 8574, create_id = 0, sto = 40066}, -- Paladin [4123] = {used_id = 8298, target_id = 8572, effect = 29, transform_id = 8576, create_id = 0, sto = 40067}, -- Druids } function onUse(cid, item, fromPosition, itemEx, toPosition) local soil = aids[itemEx.actionid] if soil and item.itemid == soil.used_id and itemEx.itemid == soil.target_id then if soil.create_id ~= 0 then Game.createItem(soil.create_id, 1, toPosition) addEvent(function() Tile(toPosition):getItemById(soil.create_id):remove(1) --doRemoveItem(getTileItemById(toPosition, create_id).uid, 1) end, 30000) else addEvent(function(aid) Tile(toPosition):getItemById(soil.transform_id):transform(aid) --doTransformItem(getTileItemById(toPosition, soil.transform_id).uid, aid) end, 30000, itemEx.itemid) Item(itemEx.uid):transform(soil.transform_id) --doTransformItem(itemEx.uid, soil.transform_id) Item(item.uid):remove(1) --doRemoveItem(item.uid, 1) end fromPosition:sendDistanceEffect(toPosition, soil.effect) --doSendDistanceShoot(fromPosition, toPosition, soil.effect) return true end return false end
  7. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Editei o script acima, tente agora.
  8. Em "Data/creaturescripts/scripts", copie e cole um arquivo.LUA e renomeie para aolDeath.lua, apague tudo e cole: local t = { aol = 2173, newAmulet = 2161 } function onDeath(cid, corpse, deathList) if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == t.aol) then doPlayerRemoveItem(cid, t.aol, 1) doPlayerAddItem(cid, t.newAmulet, 1) end return true end Em "Data/creaturescripts", abra o arquivo creaturescripts.xml e adicione a tag: <event type="death" name="aolDeath" event="script" value="aoldeath.lua"/> Novamente em "Data/creaturescripts/scripts", abra o arquivo login.lua e adicione: registerCreatureEvent(cid, "aolDeath") Se der algum problema, me avise!
  9. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Não manjo dessa parte mas acho que sim, se não compilar, não vai ter efeito algum.
  10. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Já tentou como o guioljf falou? Em "Data/creaturescripts/scripts", copie e cole um arquivo.LUA e renomeie para maxLevel.lua, apague tudo e cole: local t = { maxLevel = 150000 -- Level máximo. } function onAdvance(cid, skill, oldLevel, newLevel) if skill == SKILL__LEVEL then if newLevel >= t.maxLevel then doPlayerAddExp(cid, getExperienceForLevel(t.maxLevel)-getPlayerExperience(cid)) end end return true end Agora em "Data/creaturescripts", abra o arquivo creaturescripts.xml e adicione a tag: <event type="advance" name="maxLevel" event="script" value="maxLevel.lua"/> Novamente em "Data/creaturescripts/scripts", abra o arquivo login.lua e adicione: registerCreatureEvent(cid, "maxLevel")
  11. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Tente assim: local config = { manaCost = 300, soulCost = 2, } local spheres = { [7759] = 7, [7760] = 5, [7761] = 6, [7762] = 8 } local enchantableGems = {2147, 2146, 2149, 2150} local enchantableItems = {2383, 7383, 7384, 7406, 7402, 2429, 2430, 7389, 7380, 2454, 2423, 2445, 7415, 7392, 2391, 2544, 8905} local enchantingAltars = { {7504, 7505, 7506, 7507}, {7508, 7509, 7510, 7511}, {7516, 7517, 7518, 7519}, {7512, 7513, 7514, 7515} } local enchantedGems = {7760, 7759, 7761, 7762} local enchantedItems = { [2383] = {7744, 7763, 7854, 7869}, [7383] = {7745, 7764, 7855, 7870}, [7384] = {7746, 7765, 7856, 7871}, [7406] = {7747, 7766, 7857, 7872}, [7402] = {7748, 7767, 7858, 7873}, [2429] = {7749, 7768, 7859, 7874}, [2430] = {7750, 7769, 7860, 7875}, [7389] = {7751, 7770, 7861, 7876}, [7380] = {7752, 7771, 7862, 7877}, [2454] = {7753, 7772, 7863, 7878}, [2423] = {7754, 7773, 7864, 7879}, [2445] = {7755, 7774, 7865, 7880}, [7415] = {7756, 7775, 7866, 7881}, [7392] = {7757, 7776, 7867, 7882}, [2391] = {7758, 7777, 7868, 7883}, [2544] = {7840, 7839, 7850, 7838}, [8905] = {8906, 8907, 8909, 8908} } function onUse(cid, item, fromPosition, itemEx, toPosition) local player = Player(cid) -- The Elemental Spheres by MaXwEllDeN if itemEx.actionid == 4119 and isInArray({7759, 7760, 7761, 7762}, item.itemid) then if spheres[item.itemid] ~= player:getVocation():getId() then return false end if isInArray({8894, 8895}, itemEx.itemid) then -- Mudar ID Ligado doCreatureSay(cid, "Turn off the machine first.", TALKTYPE_MONSTER_SAY) return false end local sto = player:getStorageValue(60026) == -1 and 1 or player:getStorageValue(60026) + 1 if sto == 21 then return false end toPosition:sendMagicEffect(12) player:setStorageValue(60026, sto) Item(item.uid):remove(1) return true end -- ###### if item.itemid == 2147 and itemEx.itemid == 2342 then local targetItem = Item(itemEx.uid) targetItem:transform(2343) targetItem:decay() Item(item.uid):remove(1) toPosition:sendMagicEffect(CONST_ME_MAGIC_RED) return true end if item.itemid == 7760 and isInArray({9934, 10022}, itemEx.itemid) then Item(itemEx.uid):transform(9933) Item(item.uid):remove(1) toPosition:sendMagicEffect(CONST_ME_MAGIC_RED) return true end if isInArray(enchantableGems, item.itemid) then local subtype = item.type if subtype == 0 then subtype = 1 end local mana = config.manaCost * subtype if player:getMana() < mana then player:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) return false end local soul = config.soulCost * subtype if player:getSoul() < soul then player:sendCancelMessage(RETURNVALUE_NOTENOUGHSOUL) return false end local targetId = table.find(enchantableGems, item.itemid) if targetId == nil or not isInArray(enchantingAltars[targetId], itemEx.itemid) then return false end player:addMana(-mana) player:addSoul(-soul) Item(item.uid):transform(enchantedGems[targetId]) player:addManaSpent(mana * configManager.getNumber(configKeys.RATE_MAGIC)) player:getPosition():sendMagicEffect(CONST_ME_HOLYDAMAGE) return true end if item.itemid == 7761 and isInArray({9949, 9954}, itemEx.itemid) then local targetItem = Item(itemEx.uid) targetItem:transform(itemEx.itemid - 1) targetItem:decay() Item(item.uid):remove(1) toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) return true end if isInArray(enchantedGems, item.itemid) then if not isInArray(enchantableItems, itemEx.itemid) then fromPosition:sendMagicEffect(CONST_ME_POFF) return false end local targetId = table.find(enchantedGems, item.itemid) if targetId == nil then return false end local subtype = itemEx.type if not isInArray({2544, 8905}, itemEx.itemid) then subtype = 1000 end local targetItem = Item(itemEx.uid) targetItem:transform(enchantedItems[itemEx.itemid][targetId], subtype) targetItem:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) Item(item.uid):remove(1) return true end return false end
  12. Em "Data/npc/scripts", copie e cole um arquivo.lua e renomeie para newArea.lua, apague tudo e cole: local storage = 55105 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 msg = msg:lower(); local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'new area') or msgcontains(msg, 'acess') then if getPlayerStorageValue(cid, storage) >= 1 then selfSay("Você já tem acesso a New Area.", cid) else doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE) selfSay("Pronto, você obteve minha bencão, mais não vou me responsabilizar por você na New Area. Boa Sorte!", cid) setPlayerStorageValue(cid, storage, 1) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Em "Data/npc", copie e cole um arquivo.xml e renomeie para nome_do_npc.xml, apague tudo e cole: <?xml version="1.0" encoding="UTF-8"?> <npc name="NOMEDONPC" script="data/npc/scripts/newArea.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="149" head="57" body="59" legs="40" feet="76" addons="0"/> <parameters> <parameter key="message_greet" value="Olá |PLAYERNAME|, deseja receber minha permissão para ir a {New Area}?"/> </parameters> </npc> Não esqueça de mudar o nome do NPC no XML, se der algum problema, me avise .
  13. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Poste o script: "Data/actions/scripts/other/enchanting.lua".
  14. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Procure na pasta "Data/movements/scripts", você pode utilizar o notepad para facilitar sua busca. Caso for utilizar, abra o notepad, aperte CTRL + F e seleciona a aba Localizar em arquivos, com a aba selecionada, digite o que quer localizar em "Localizar:" e a pasta onde deseja procurar em "Pasta:", ai é só digitar a mensagem.
  15. O script está funcionando normalmente, tente tirar as positions do teleport, mude apenas no script em: local storage, pos = 15000, {x = 10, y = 10, z = 10}
  16. Em "Data/creaturescripts/scripts", copie e cole um arquivo.LUA e renomeie para maxLevel.lua, apague tudo e cole: local t = { storage = {44440, 4}, -- Storage e valor necessário. maxLevel = 25 -- Level máximo. } function onAdvance(cid, skill, oldLevel, newLevel) if skill == SKILL__LEVEL then if getPlayerStorageValue(cid, t.storage[1]) ~= t.storage[2] then if newLevel >= t.maxLevel then doPlayerAddExp(cid, getExperienceForLevel(t.maxLevel)-getPlayerExperience(cid)) doPlayerSendCancel(cid, "Você atingiu o level máximo, faça a quest para continuar upando.") end end end return true end Agora em "Data/creaturescripts", abra o arquivo creaturescripts.xml e adicione a tag: <event type="advance" name="maxLevel" event="script" value="maxLevel.lua"/> Novamente em "Data/creaturescripts/scripts", abra o arquivo login.lua e adicione: registerCreatureEvent(cid, "maxLevel") Caso dê algum problema ou falte algo, me avise.
  17. O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Aprovação de Tópicos de Conteúdos" Para: "OTServ → Suporte OTServ → Suporte de Scripts"
  18. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Aprovação de Tópicos de Conteúdos" Para: "OTServ → Suporte OTServ → Suporte de Scripts"
  19. Simples, mas bem legal, obrigado por compartilhar. O tópico foi movido a área correta e você recebeu um REP pela contribuição.
  20. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Desculpe a demora para responder. Bom, esse script que lhe passei é uma função "ao usar", como é citado no inicio "function onUse)", quando você adicionar esse script ao seu servidor na pasta "Data/actions/scripts" e colocar a uniqueID em "Data/actions/actions.xml", a uniqueID irá ter uma função e ao colocar ela no baú, quando o player der "Use" no baú irá acontecer o que está citado no script. Caso ele não tenha feito a quest, irá adicionar o reward ( recompensa ) a ele e irá alterar a storage para que ele não consiga fazer a quest diversas vezes, caso ele já tenha feito irá apenas mandar a mensagem dizendo que ele não pode fazer novamente. Espero que tenha entendido, caso não entenda algo, pode perguntar .
  21. Tópico aprovado e movido a área correta, obrigado por compartilhar. Você recebeu um REP pela contribuição.
  22. Desculpe pela demora, tópico aprovado e movido a área correta, obrigado por compartilhar. Você recebeu um REP pela contribuição.
  23. Wakon postou uma resposta no tópico em Recursos e ferramentas de Design
    O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → OTServ Geral" Para: "Diversos → Gráficos → Suporte Gráficos"
  24. Evil, poderia me passar sua base para eu fazer testes? Pode enviar por PM caso queira, mas o suporte continuará no tópico.

Informação Importante

Confirmação de Termo