Ir para conteúdo

Wakon

Héroi
  • Registro em

  • Última visita

Tudo que Wakon postou

  1. Tenta usar o Object Builder: http://www.tibiaking.com/forum/topic/30624-object-builder/ Abre a .spr e .dat nele e compila na versão desejada.
  2. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Adiciona a tag em "Data/actions" no arquivo actions.xml: <action itemid="102" event="script" value="arquivo.lua"/> Em value="arquivo.lua" troque para o nome do script que você colocou na pasta "Data/actions/scripts".
  3. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Usei a Kame e Tapion, mais o nome é só para identificar, ele está configurado com outfits e vocations do tibia, para testar. Configure a vocation e a outfit certinha da vocação desejada .
  4. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Criei uma forma para você adicionar as vocações que você quer que mantenha ao deslogar: Adicione em "Data/creaturescripts/scripts" esses dois scripts: voclogin.lua: function onLogin(cid) local vocations = { ["Tapion"] = {voc = 5, storage = 210000, outfit = 139}, -- ["Nome da vocação"], ID da vocação, storage da vocação( nunca repita a storage em outro outfit!! ) e outfit que vai ganhar ao logar com a vocação! ["Kame"] = {voc = 8, storage = 210001, outfit = 303} } for k, v in pairs(vocations) do local outfit = {lookType = v.outfit , lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0} if getPlayerStorageValue(cid, v.storage) == 1 then doPlayerSetVocation(cid, v.voc) doSetCreatureOutfit(cid, outfit, -1) end end return true end voclogout.lua: function onLogout(cid) local vocations = { ["Tapion"] = {voc = 5, storage = 210000}, -- ["Nome da vocação"], ID da vocação e storage da vocação( nunca repita a storage em outro outfit!! ) ["Kame"] = {voc = 8, storage = 210001} } for k, v in pairs(vocations) do if getPlayerStorageValue(cid, v.storage) == 1 and getPlayerVocation(cid, v.vocation) == false then setPlayerStorageValue(cid, v.storage, -1) return true end if getPlayerVocation(cid) == v.voc then setPlayerStorageValue(cid, v.storage, 1) end end return true end Depois adicione as tags em "Data/creaturescripts" no arquivo creaturescripts.xml: <event type="logout" name="VocLogout" event="script" value="voclogout.lua"/> <event type="login" name="VocLogin" event="script" value="voclogin.lua"/> Para configurar você deve colocar a mesma vocação nos dois scripts na tabela, a mesma storage pra cada uma( nunca repita a storage para outra vocation ) e na de login você configura também o outfit que vai ficar quando o player logar com tal vocação. Na hora de adicionar uma nova, você deve copiar a primeira e colar antes da ultima, para separar a linha de cada outfit por uma vírgula. Se tiver algum problema/dúvida é só dizer. Créditos ao fireelement por me ajudar com a parte dos outfits .
  5. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Tenta assim:
  6. Wakon postou uma resposta no tópico em Suporte OTServer Derivados
    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 OTServ Geral" Para: "OTServ → Suporte OTServ → Suporte de Clients"
  7. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Tenta assim:
  8. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Factur, creio que assim vá bugar, pois cada level muda o Topic[cid] e ficaria tentando mudar para 1, 2 e 3 ou apenas mudaria para 1.
  9. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Não sei se vai funcionar, pois não consigo testar na minha base, mais tenta:
  10. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Ao invés de retirar, tente colocar um numero tipo 5000, ou altere para > 1. if lvl < 5000 then
  11. Em "Data/creaturescripts/scripts" copie e cole um arquivo .lua, renomeie para battle.lua, apague tudo e cole isso: function onThink(cid, interval) if(getTilePzInfo(getCreaturePosition(cid))) then doRemoveCondition(cid, CONDITION_INFIGHT) end end Agora em "Data/creaturescripts" abra o creaturescripts.xml e adicione a tag: <event type="think" name="TiraBattle" event="script" value="battle.lua"/> Agora novamente em "Data/creaturescripts/scripts" abra seu login.lua e adicione: registerCreatureEvent(cid, "TiraBattle")
  12. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Cara adicionar todas vai ser tenso, vou tentar montar uma gambiarra para não precisar adicionar em todos a storage, se eu conseguir até amanhã eu te passo. Pois adicionar em todas vai ser complicado e também iria bugar, vou ver o que faço.
  13. Usa assim: local reward = {7844, 10} -- ID do item e quantidade só para pegar o valor da capacidade(importante). local backpack = 1988 function onUse(cid, item, fromPos, itemEx, toPos) if getPlayerFreeCap(cid) >= getItemWeightById(reward[1], reward[2]) then local backpack = doPlayerAddItem(cid, backpack, 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid, 'Você não tem '..getItemWeightById(reward[1], reward[2])..' de capacidade livre.') end return true end Vai adicionando quantas linhas você quiser e sempre muda o valor na variável "reward" para ele pegar o peso dos itens.
  14. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    O script de transformação provavelmente é feito por uma talkaction, abra a pasta "Data/talkactions" e abra o arquivo talkactions.xml e procure pelo seu comando de transform. Veja o nome do script em value e me passe ele que eu tento adaptar para você.
  15. Em "Data/actions/scripts" adicione arquivo.lua: function onUse(cid, item, fromPos, itemEx, toPos) local reward = {2160, 10} -- ID do item e quantidade. doPlayerAddItem(cid, reward[1], reward[2]) doRemoveItem(item.uid, 1) return true end Em "Data/actions" abra actions.xml e adicione: <action itemid="2456" event="script" value="testt.lua"/>
  16. Ainda não deu pra entender seu pedido, vamos a um exemplo: Cliquei em um Bow, ao clicar ele é removido do player e o player ganha 10 crystal coins. Seria isso?
  17. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Você pode fazer o seguinte, adicionar a tag: setPlayerStorageValue(cid, 43553, 1) No script da transform que deve ser uma talkaction, e depois adicionar no login.lua: if getPlayerStorageValue(cid, 43553) == 1 then doCreatureChangeOutfit(cid, IDDOOUTFIT) end Creio que isso funcione, nunca mexi com wodbo então não conheço as funções, ai fica tenso ajudar.
  18. Faltou o s no player, pois está definido como players: _Lib_Battle_Info = { Reward = {9971,10}, TeamOne = {name = "Black Assassins", storage = 140120, pos = {x=1262,y=1150,z=6}}, TeamTwo = {name = "Red Barbarians",storage = 140121,pos = {x=1275,y=1150,z=6}}, storage_count = 180400, tpPos = {x=161, y=44, z=7}, limit_Time = 10 -- em minutos } function resetBattle() return setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, 0) and setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, 0) end function OpenWallBattle() local B = { {3517,{x=1270, y=1161, z=6, stackpos = 1}}, {3517,{x=1270, y=1162, z=6, stackpos = 1}}, {3517,{x=1270, y=1163, z=6, stackpos = 1}}, {3517,{x=1270, y=1164, z=6, stackpos = 1}} } for i = 1, #B do if getTileItemById(B[i][2], B[i][1]).uid == 0 then doCreateItem(B[i][1], 1, B[i][2]) else doRemoveItem(getThingfromPos(B[i][2]).uid,1) end end end function doBroadCastBattle(type,msg) local players = {} for _, cid in pairs(getPlayersOnline()) do if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) == 1 or getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) == 1 then table.insert(players, cid) end end for i = 1, #players do doPlayerSendTextMessage(players[i],type,msg) end end function removeBattleTp() local t = getTileItemById(_Lib_Battle_Info.tpPos, 1387).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(_Lib_Battle_Info.tpPos, CONST_ME_POFF) end function getWinnersBattle(storage) local players,str = {},"" for _, cid in pairs(getPlayersOnline()) do if getPlayerStorageValue(cid, storage) == 1 then table.insert(players, cid) end end str = str .. ""..#players.." Player"..(#players > 1 and "s" or "").." do time "..(getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == 0 and _Lib_Battle_Info.TeamTwo.name or _Lib_Battle_Info.TeamOne.name).." venceu o evento Battlefield, todos do time vencedor ganharam ".._Lib_Battle_Info.Reward[2].." "..getItemNameById(_Lib_Battle_Info.Reward[1]).."!" for i = 1, #players do doRemoveCondition(players[i], CONDITION_OUTFIT) doTeleportThing(players[i], getTownTemplePosition(getPlayerTown(players[i]))) setPlayerStorageValue(players[i], storage, -1) setPlayerStorageValue(players[i], 52310, getPlayerStorageValue(cid, 52310) + 3) end resetBattle() OpenWallBattle() return doBroadcastMessage(str) end function CheckEvent(delay) if delay > 0 and getGlobalStorageValue(_Lib_Battle_Info.storage_count) > 0 then doBroadcastMessage("[BattleField Evento] Esta esperando "..getGlobalStorageValue(_Lib_Battle_Info.storage_count).." players para o evento Battlefield começar.") elseif delay == 0 and getGlobalStorageValue(_Lib_Battle_Info.storage_count) > 0 then local players = {} for _, cid in pairs(getPlayersOnline()) do if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) == 1 or getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) == 1 then table.insert(players, cid) end end for i = 1, #players do doRemoveCondition(players[i], CONDITION_OUTFIT) setPlayerStorageValue(players[i], 52310, getPlayerStorageValue(cid, 52310) + 1) doTeleportThing(players[i], getTownTemplePosition(getPlayerTown(players[i]))) setPlayerStorageValue(players[i], getPlayerStorageValue(players[i], _Lib_Battle_Info.TeamOne.storage) == 1 and _Lib_Battle_Info.TeamOne.storage or _Lib_Battle_Info.TeamTwo.storage, -1) end doBroadcastMessage("Evento não pode ser iniciado por falta de jogadores.") setGlobalStorageValue(_Lib_Battle_Info.storage_count, 0) resetBattle() removeBattleTp() end addEvent(CheckEvent, 60000, delay-1) end
  19. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local player = Player(cid) if(msgcontains(msg, "silk yarn")) then if player:getStorageValue(Storage.FriendsandTraders.TheMermaidMarina) < 1 then npcHandler:say("Um. You mean, you really want me to touch that gooey spider silk just because you need yarn? Well... do you think that I'm pretty?", cid) npcHandler.topic[cid] = 1 elseif player:getStorageValue(Storage.FriendsandTraders.TheMermaidMarina) == 2 then npcHandler:say("Okay... a deal is a deal, would you like me to create a {spool of yarn} from {10 pieces of spider silk}?", cid) npcHandler.topic[cid] = 5 end elseif msgcontains(msg, "honey") then if player:getStorageValue(Storage.FriendsandTraders.TheMermaidMarina) == 1 then npcHandler:say("Did you bring me the 50 honeycombs I requested and do you absolutely admire my beauty?", cid) npcHandler.topic[cid] = 4 end elseif(msgcontains(msg, "yes")) then if(npcHandler.topic[cid] == 1) then npcHandler:say("Well, everyone would say that in your position. Do you think that I'm really, absolutely the most stunning being that you have ever seen?", cid) npcHandler.topic[cid] = 2 elseif(npcHandler.topic[cid] == 2) then selfSay("<giggles> It's funny how easy it is to get humans to say what you want. Now, proving it will be even more fun! ...", cid) selfSay("You want me to touch something gooey, so you have to touch something gooey for me too. <giggles> ...", cid) npcHandler:say("I love honey and I haven't eaten it in a while, so bring me 50 honeycombs and worship my beauty a little more, then we will see.", cid) player:setStorageValue(Storage.FriendsandTraders.TheMermaidMarina, 1) player:setStorageValue(Storage.FriendsandTraders.DefaultStart, 1) elseif(npcHandler.topic[cid] == 4) then if player:getItemCount(5902) >= 50 then player:removeItem(5902, 50) npcHandler:say("Oh goodie! Thank you! Okay... I guess since my fingers are sticky now anyway, I will help you. From now on, if you bring me {10 pieces of spider silk}, I will create one {spool of yarn}.", cid) npcHandler.topic[cid] = 0 player:setStorageValue(Storage.FriendsandTraders.TheMermaidMarina, 2) player:addAchievement(16) -- Achievement Beach Tamer else npcHandler:say("You don't have enough honey.", cid) npcHandler.topic[cid] = 0 end elseif(npcHandler.topic[cid] == 5) then if player:getItemCount(5879) >= 10 then player:removeItem(5879, 10) player:addItem(5886, 1) npcHandler:say("Ew... gooey... there you go.", cid) npcHandler.topic[cid] = 0 else npcHandler:say("You don't have the required items.", cid) npcHandler.topic[cid] = 0 end end end return true end keywordHandler:addKeyword({'comb'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Sorry, I don\'t have a spare comb. I lost my favourite one when diving around in Calassa.'}) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) O diálogo após entregar os honeycomb e tentar trocar os silk é: Player: Hi Marina: You wouldn't keep a pretty lady like me waiting, would you? Player: Silk yarn Marina: Okay... a deal is a deal, would you like me to create a spool of yarn from 10 pieces of spider silk? Player: Yes Marina: Marina: Ew... gooey... there you go.
  20. Tenta alterar o ID do item a ser removido a ser contado, qual quer um. Bem estranho isso, aqui ele funcionou normalmente em TFS 0.4 !
  21. Adiciona isso em login.lua, antes do ultimo return true: if getPlayerStorageValue(cid, 52310) < 0 then setPlayerStorageValue(cid, 52310, 0) end Deve resolver o problema da storage.
  22. Bem estranho cara, dá algum erro na distro?
  23. Tente alterar a storage 18256 para -1, geralmente o comando é /storage Wakon, 18256, -1 se não tiver o comando altere na database.
  24. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Sim, porém esse script está adaptado para tfs 1.0 e provavelmente seu servidor não está lendo suas funções.
  25. Testa assim: 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 local config = { storage = 18256, } function creatureSayCallback(cid, type, msg) msg = msg:lower(); if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'old backpack') then if getPlayerStorageValue(cid, config.storage) <= 0 then if getPlayerItemCount(cid, 3960) >= 1 then selfSay('Thank you very much! This brings back good old memories! Please, as a reward, travel to Kazordoon and ask my old friend Kroox to provide you a special dwarven armor.', cid) doPlayerRemoveItem(cid, 3960, 1) setPlayerStorageValue(cid, config.storage, 1) else selfSay("You don't have my backpack.", cid) end else selfSay('Você já entregou a old backpack.', cid) talkState[talkUser] = 0 end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser])) then talkState[talkUser] = 0 selfSay("Bye.", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())

Informação Importante

Confirmação de Termo