Ir para conteúdo

Roy

Membro
  • Registro em

  • Última visita

Tudo que Roy postou

  1. \/ Foi isso que eu quis dizer amigo, apagar todas towns e então elas iriam zerar e ao criar iria começar do 1. Agora só precisa editar seu post e por como Resolvido.
  2. Em condition.cpp procure por: case CONDITION_GAMEMASTER: E logo abaixo adicione case CONDITION_REGEN: Ainda em condition.cpp procure por: Icons_t ConditionGeneric::getIcons() const Olhando um pouco abaixo você irá encontrar case CONDITION_DRUNK: return ICON_DRUNK; e logo abaixo dele adicione: case CONDITION_REGEN: return ICON_ENERGY; Agora vamos em condition.h e procuramos por: enum ConditionType_t No final você verá a última condition adicionada. A minha era -> CONDITION_HOUSESAY = 1 << 24 Então você irá adicionar a nova condition: CONDITION_REGEN = 1 << 25 OBSERVAÇÃO: Não esqueça de colocar a virgula no número 24 e deixar sem a virgula o número 25 ou seja vai ficar assim: CONDITION_HOUSESAY = 1 << 24, CONDITION_REGEN = 1 << 25 }; Agora compile sua source. Agora procure a pasta lib no seu otserv e então procure por 000-constant.lua dentro da pasta lib, abra a mesma e procure por: CONDITION_NONE = 0 Procure por CONDITION_HUNTING = 8388608 e logo abaixo adicione: CONDITION_REGEN = 33554432 Por que tá "33554432" ao inves de "16777216" talvez você lembre que a última linha no condition.h era "HOUSESAY" enfim é uma condition no meu constant.lua ela não está adicionada então muti pliquei por 4x, chega de blablabla vamos pra parte final. Ao criar uma magia de suporte ou qualquer que seja a magia você irá adicionar: local REGEN = createConditionObject(CONDITION_REGEN) setConditionParam(REGEN, CONDITION_PARAM_TICKS, tempo*1000) doAddCondition(cid, REGEN) após function onCastSpell(cid, var). E pronto a minha spell de suporte ficou assim. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_ENERGY) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 100, 0, 100) local tempo = 60 -- 60 segundos local condition = createConditionObject(CONDITION_REGENERATION) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 250) setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1) setConditionParam(condition, CONDITION_PARAM_MANAGAIN, 125) setConditionParam(condition, CONDITION_PARAM_MANATICKS, 1) setCombatCondition(combat, condition) function onCastSpell(cid, var) local REGEN = createConditionObject(CONDITION_REGEN) setConditionParam(REGEN, CONDITION_PARAM_TICKS, tempo*1000) doAddCondition(cid, REGEN) return doCombat(cid, combat, var) end Prontinho agora só ir testar.
  3. Está tudo nas mãos dele basta ele olhar pro lugar certo, 7.92 é muito antigo ainda mais as source do Xidazou Em Item.cpp procure por "case ITEM_COINS_CRYSTAL:" Vai tá assim: int Item::getWorth() const { switch(getID()){ case ITEM_COINS_GOLD: return getItemCount(); case ITEM_COINS_PLATINUM: return getItemCount() * 100; case ITEM_COINS_CRYSTAL: return getItemCount() * 10000; default: return 0; } } Substitua por: int Item::getWorth() const { switch(getID()){ case ITEM_COINS_GOLD: return getItemCount(); case ITEM_COINS_PLATINUM: return getItemCount() * 100; case ITEM_COINS_CRYSTAL: return getItemCount() * 10000; case ITEM_COINS_RUBY: return getItemCount() * 1000000; default: return 0; } } Em const79.h procure por "enum item_t {" Vai tá assim: enum item_t { ITEM_FISHING_ROD = 2580, ITEM_SHOVEL = 2554, ITEM_ROPE = 2120, ITEM_MACHETE = 2420, ITEM_SCYTHE = 2550, ITEM_COINS_GOLD = 2148, ITEM_COINS_PLATINUM = 2152, ITEM_COINS_CRYSTAL = 2160, Abaixo de "ITEM_COINS_CRYSTAL = 2160," Adicione: ITEM_COINS_RUBY = 13685, E por fim vamos em game.cpp e procure por "/* Remove a monetary value from an item*/" Vai está assim: /* Remove a monetary value from an item*/ int remaind = item->getWorth() - money; int crys = remaind / 10000; remaind = remaind - crys * 10000; int plat = remaind / 100; remaind = remaind - plat * 100; int gold = remaind; Substitua por: /* Remove a monetary value from an item*/ int remaind = item->getWorth() - money; int rubys = remaind / 1000000; remaind = remaind - rubys * 1000000; int crys = remaind / 10000; remaind = remaind - crys * 10000; int plat = remaind / 100; remaind = remaind - plat * 100; int gold = remaind; Olhando um pouco mais abaixo você verá isso: if(crys != 0){ Item* remaindItem = Item::CreateItem(ITEM_COINS_CRYSTAL, crys); ReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags); if(ret != RET_NOERROR){ internalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT); } } Depois é só adicionar isso acima de "if(crys != 0){" if(rubys != 0){ Item* remaindItem = Item::CreateItem(ITEM_COINS_RUBY, rubys); ReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags); if(ret != RET_NOERROR){ internalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT); } } e irá ficar assim: if(rubys != 0){ Item* remaindItem = Item::CreateItem(ITEM_COINS_RUBY, rubys); ReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags); if(ret != RET_NOERROR){ internalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT); } } if(crys != 0){ Item* remaindItem = Item::CreateItem(ITEM_COINS_CRYSTAL, crys); ReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags); if(ret != RET_NOERROR){ internalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT); } } if(plat != 0){ Item* remaindItem = Item::CreateItem(ITEM_COINS_PLATINUM, plat); ReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags); if(ret != RET_NOERROR){ internalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT); } } if(gold != 0){ Item* remaindItem = Item::CreateItem(ITEM_COINS_GOLD, gold); ReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags); if(ret != RET_NOERROR){ internalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT); } } Pronto. Compile sua source e vá comprar seus itens.
  4. @Vodkart BlockMonsters = {dragon lord}, Monstros com espaços nos nomes não funciona, não da pra executar o comando!
  5. Mais simples séria você remover todas as towns ids e e então elas iriam zerar e você só precisava criar todas novamente. Também poderia criar um npc para mudar a town id do player assim quando ele morresse ele iria pra town id desejada
  6. Amigo eu não entendi nada do que você tentou passar, explique melhor!
  7. E ai TK, eu uso TFS 0.4 e estive tentando por ícone no buff REGENERATION ou seja ao usar uma magia com Condition_Regeneration aparece o ícone de Energy e ao acabar o ticks o ícone vai desaparecer. +Rep a quem ajudar! Podem fechar o tópico eu já resolvir!
  8. Tente Esse: doCreatureSay(cid, "ML +".. ml, TEXTCOLOR_YELLOW) Caso não funcione basta você mudar os números até achar a cor desejada.
  9. doCreatureSay(cid, "ML +".. ml, 19) Porque por \/ doCreatureSay(cid, "ML +".. ml, TALKTYPE_WHITE_1)
  10. Roy postou uma resposta no tópico em Suporte OTServer Derivados
    Faz o seguinte, entra no skype que tento te ajudar!
  11. Roy postou uma resposta no tópico em Suporte OTServer Derivados
    Eu estou usando a mesma distro que você postou e está normal aqui. \/ \/
  12. Roy postou uma resposta no tópico em Suporte OTServer Derivados
    Meu Deus do céu, tão simples. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1.3, -30, 1.7, 0) function onGetFormulaValues(cid, level, maglevel) min = (level * 4 + maglevel * 5) * 2.3 - 25 max = (level * 5 + maglevel * 6) * 2.9 if min < 550 then min = 750 end return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) doSendAnimatedText(getPlayerPosition(cid), "+Health", 63) ---> 63 é a cor que vai aparecer acima da cabeça return doCombat(cid, combat, var) end
  13. Rapais fiz uma cambiarra louca aqui vê se funfa ai. NPC 1: 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 storage = 135001 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 msg == "catacounbs" then if getPlayerStorageValue(cid, storage) == -1 then selfSay("Hello! I think you are here to get acess to the entrance of The Catacounbs, right?", cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, storage) == 5 then selfSay("Did you bring me the itens?", cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, storage) == 6 then selfSay("Thanks for the help.", cid) else selfSay("Something is missing.", cid) end npcHandler:addFocus(cid) elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage) == -1 then selfSay("For I give you the acess you need to make me a favor. Go to Nico and tell him that I want the {stuffs}. He'll know what is.", cid) setPlayerStorageValue(cid, storage, 1) elseif getPlayerStorageValue(cid, storage) == 5 then if doPlayerRemoveItem(cid, 2796, 1) then selfSay("Well, now you can pass the door.", cid) doPlayerAddItem(cid, 2160, 3) doPlayerAddExp(cid, 5000) setPlayerStorageValue(cid, storage, 6) else selfSay("You don't have it.", cid) end else selfSay("I think you've not talk with Nico yet", cid) end talkState[talkUser] = 0 elseif msg == "no" or msg == "nao" or msg == "n" and talkState[talkUser] >= 0 then npcHandler:say("Ok then.", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) elseif msgcontains(msg, "bye") then npcHandler:say("bye.", cid) npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) NPC 2: 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 storage = 135001 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 msg == "stuffs" then if getPlayerStorageValue(cid, storage) == -1 then selfSay("What you mean?", cid) elseif getPlayerStorageValue(cid, storage) == 1 then selfSay("I think you come here for Tery. Well, to do what him want I need that you go to Lian and bring me some {mix herbs}, can you do it?", cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, storage) == 4 then selfSay("Did you bring the mix herbs?", cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, storage) == 5 then selfSay("Already done.", cid) else selfSay("Something is missing.", cid) end npcHandler:addFocus(cid) elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage) == 1 then selfSay("So be it. Come back when you have it.", cid) setPlayerStorageValue(cid, storage, 2) elseif getPlayerStorageValue(cid, storage) == 4 then if doPlayerRemoveItem(cid, 2801, 1) then selfSay("Here are. Tell Tery to come visit me at any time.", cid) doPlayerAddItem(cid, 2796, 1) setPlayerStorageValue(cid, storage, 5) else selfSay("You don't have it.", cid) end else selfSay("I think you've not talk with Lian yet", cid) end talkState[talkUser] = 0 elseif msg == "no" or msg == "nao" or msg == "n" and talkState[talkUser] >= 0 then npcHandler:say("Ok then.", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) elseif msgcontains(msg, "bye") then npcHandler:say("bye.", cid) npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) NPC 3: 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 storage = 135001 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 msg == "mix herbs" then if getPlayerStorageValue(cid, storage) <= 1 then selfSay("What do you mean by that?", cid) elseif getPlayerStorageValue(cid, storage) == 2 then selfSay("Hm...Ok then. Back with one of each item below: blood herb, stone herb, star herb, sling herb, powder herb and shadow herb. Ok?", cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, storage) == 3 then selfSay("You bring the herbs?", cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, storage) == 6 then selfSay("I already gave it to you. Have you memory loss?", cid) else selfSay("Something is missing.", cid) end npcHandler:addFocus(cid) elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage) == 2 then selfSay("Ok, come back when you have it.", cid) setPlayerStorageValue(cid, storage, 3) elseif getPlayerStorageValue(cid, storage) == 3 then if doPlayerRemoveItem(cid, 2798, 1) and doPlayerRemoveItem(cid, 2799, 1) and doPlayerRemoveItem(cid, 2800, 1) and doPlayerRemoveItem(cid, 2802, 1) and doPlayerRemoveItem(cid, 2803, 1) and doPlayerRemoveItem(cid, 2804, 1) then selfSay("So done. Here are the mix herb", cid) doPlayerAddItem(cid, 2801, 1) setPlayerStorageValue(cid, storage, 4) else selfSay("You don't have it.", cid) end else selfSay("I think you've not talk with Lian yet", cid) end talkState[talkUser] = 0 elseif msg == "no" or msg == "nao" or msg == "n" and talkState[talkUser] >= 0 then npcHandler:say("Ok then.", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) elseif msgcontains(msg, "bye") then npcHandler:say("bye.", cid) npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Perdão mas não sei deixar as paradas ocultas.
  14. Roy postou uma resposta no tópico em Suporte Tibia OTServer
    @Bruno Carvalho não existe nenhum nenhum id="2100" no actions.xml pois eu já tinha verificado. Eu acho que 2100 é para level 100 e é necessário promotion para poder passar na porta más o problema é que eu já coloquei promotion no player e o level porém não vai de jeito nenhum continua aparecendo a mensagem "Only the worthy may pass."
  15. Roy postou uma resposta no tópico em Suporte Tibia OTServer
    Pessoal eu gostaria de saber qual a função da action 2100 em door eu sei que 1100 é level 100 agora 2100 não sei. Eu estou com um problema em uma porta do meu server tá com actionid 2100 e diz "Somente os dignos podem passar." eu tentei ver o que podia fazer no door.lua porém não deu certo, se alguém poder ajudar ficarei grato
  16. Roy postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    @xWhiteWolf Poderia classificar o script de !rank;/rank por não somente rank e também level e magic level? local storage = 378378 -- storage que fica salvo os resets local itens = {2182, 2190, 2456, 2395} -- itens cujas imagens aparecerao (se nao souber oque eh, nao mexa) function onSay(cid, words, param, channel) local function getRankStorage(cid, value, max, RankName) -- by vodkart local str = "" str = "--[".. (RankName == nil and "RANK STORAGE" or ""..RankName.."") .."]--\n" local query = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = "..value.." ORDER BY `value` DESC;") if (query:getID() ~= -1) then k = 1 repeat if k > max then break end str = str .. "\n " .. k .. ". ["..getPlayerNameByGUID(query:getDataString("player_id")).."] - [Rest. " .. query:getDataInt("value") .. "]" k = k + 1 until not query:next() end return doShowTextDialog(cid, itens[math.random(1, #itens)], str) end getRankStorage(cid, storage, 10, "Rank Resets") return true end
  17. Olá nação TK, eu segui o tópico do Gpedro - Reset Ststem with sources e fiz tudo passo a passo, e mesmo assim recebo o seguinte error ao tentar compilar. D:\MyServer\sources\luascript.cpp In member function `virtual void LuaInterface::registerFunctions()': 2174 D:\MyServer\sources\luascript.cpp `luaGetResets' is not a member of `LuaInterface' 2177 D:\MyServer\sources\luascript.cpp `luaSetResets' is not a member of `LuaInterface' 2177 D:\MyServer\sources\luascript.cpp At global scope: 9035 D:\MyServer\sources\luascript.cpp no `int32_t LuaInterface::luaGetResets(lua_State*)' member function declared in class `LuaInterface' 9062 D:\MyServer\sources\luascript.cpp no `int32_t LuaInterface::luaSetResets(lua_State*)' member function declared in class `LuaInterface' D:\MyServer\sources\dev-cpp\Makefile.win [Build Error] [obj//luascript.o] Error 1 Se alguém poder me ajudar fico grato. +Rep
  18. @xWhiteWolf, pode me dizer o porque eu mesmo sem eu está usando dodge nos itens sobe mensagem no player, "DODGE!"
  19. @zLockey9 juro que pra mim que já tinha colocado isso mas faltou o speed="0", cara valeu +Rep
  20. Eu tenho a source do 7.92 porém não é com esses sistemas é a source de quando foi lançado o Evolutions 7.92, ou seja você teria que começar do zero e deixar o ot da maneira que você quisesse se for bom em programação e script.
  21. Amigo você teria que ter a source do seu executável para fazer essa alteração se possível né.
  22. Roy postou uma resposta no tópico em Suporte Tibia OTServer
    aceite-me no skype
  23. Roy postou uma resposta no tópico em Suporte Tibia OTServer
    Manda o lua do seu npc de reset
  24. Olá nação TK estou aqui para fazer um pedido a vocês, até procurei no comunidade TK pra ver se achava alguma solução mas não encontrei, então eu estive tentado deixar um npc parado editando eles no .XML como outras versões anteriores que eu costumava mexer mas agora estou com (TF 0.4). Não encontrei solução, eles ainda continuavam andando e andando de novo. Eu gostaria de um NPC que fique parado e/ou que possa determinar quantos metros ele pode andar, fico grato se alguém poder me ajudar com esse problema.

Informação Importante

Confirmação de Termo