Líderes
-
Mathias Kenfi
MembroPontos233Total de itens -
-
-
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 05/05/20 em %
-
[Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana Absorb
[Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana Absorb
thekilleron e 3 outros reagiu a Mathias Kenfi por uma resposta no tópico
4 pontosEsse sistema foi feito utilizando a source disponibilizada neste link Pode funcionar em TFS 0.4, OTX 2.X e, talvez, em TFS 0.4 só que a probabilidade erros é maior por ter diferentes nomes de funções e variáveis. Fiz um vídeo seguindo o passo a passo abaixo para facilitar o processo de instalação do sistema. Hoje estarei ensinando a instalar os seguintes novos atributos/sistemas em sua source CriticalHitChance e DodgeChance -- (Funciona da mesma maneira que o critical básico de script, porém sem bugs de callstack) Life e Mana Absorb -- (Regenera, de acordo com a % atribuida, a partir de dano recebido) Life e Mana Leech -- (Regenera, de acordo com a % atribuida, a partir do dano causado) Exemplo de como vai ficar Primeiro e antes de tudo, você terá de desativar o critical padrão do Tibia (Você pode pular essa parte se quiser) Vamos lá! Vá em items.cpp e procure por: attackSpeed = 0; Abaixo coloque: criticalHitChance = dodgeChance = lifeAbsorb = manaAbsorb = lifeLeech = manaLeech = 0; Depois, ainda em items.cpp, procure por: else if(tmpStrValue == "extradefense" || tmpStrValue == "extradef") { if(readXMLInteger(itemAttributesNode, "chance", intValue)) it.extraDefenseChance = intValue; if(readXMLInteger(itemAttributesNode, "value", intValue)) it.extraDefense = intValue; if(readXMLInteger(itemAttributesNode, "random_min", intValue)) it.extraDefenseRndMin = intValue; if(readXMLInteger(itemAttributesNode, "random_max", intValue)) it.extraDefenseRndMax = intValue; } Abaixo coloque: else if(tmpStrValue == "criticalhitchance") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.criticalHitChance = intValue; } else if(tmpStrValue == "dodgechance") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.dodgeChance = intValue; } else if(tmpStrValue == "lifeabsorb") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.lifeAbsorb = intValue; } else if(tmpStrValue == "manaabsorb") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.manaAbsorb = intValue; } else if(tmpStrValue == "lifeleech") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.lifeLeech = intValue; } else if(tmpStrValue == "manaleech") { if(readXMLInteger(itemAttributesNode, "value", intValue)) it.manaLeech = intValue; } Agora vá em items.h e procure por: int32_t attack, extraAttack, defense, extraDefense, armor, breakChance, hitChance, maxHitChance, runeLevel, runeMagLevel, lightLevel, lightColor, decayTo, rotateTo, alwaysOnTopOrder; Abaixo coloque: int32_t criticalHitChance, dodgeChance, lifeAbsorb, manaAbsorb, lifeLeech, manaLeech; Agora vá em item.cpp e procure por: case ATTR_ATTACK: { int32_t attack; if(!propStream.getLong((uint32_t&)attack)) return ATTR_READ_ERROR; setAttribute("attack", attack); break; } Acima coloque: case ATTR_CRITICALHITCHANCE: { int32_t criticalHitChance; if(!propStream.getLong((uint32_t&)criticalHitChance)) return ATTR_READ_ERROR; setAttribute("criticalhitchance", criticalHitChance); break; } case ATTR_DODGECHANCE: { int32_t dodgeChance; if(!propStream.getLong((uint32_t&)dodgeChance)) return ATTR_READ_ERROR; setAttribute("dodgechance", dodgeChance); break; } case ATTR_LIFEABSORB: { int32_t lifeAbsorb; if(!propStream.getLong((uint32_t&)lifeAbsorb)) return ATTR_READ_ERROR; setAttribute("lifeabsorb", lifeAbsorb); break; } case ATTR_MANAABSORB: { int32_t manaAbsorb; if(!propStream.getLong((uint32_t&)manaAbsorb)) return ATTR_READ_ERROR; setAttribute("manaabsorb", manaAbsorb); break; } case ATTR_LIFELEECH: { int32_t lifeLeech; if(!propStream.getLong((uint32_t&)lifeLeech)) return ATTR_READ_ERROR; setAttribute("lifeleech", lifeLeech); break; } case ATTR_MANALEECH: { int32_t manaLeech; if(!propStream.getLong((uint32_t&)manaLeech)) return ATTR_READ_ERROR; setAttribute("manaleech", manaLeech); break; } Procure por: if(it.weaponType == WEAPON_DIST && it.ammoType != AMMO_NONE) { begin = false; s << " (Range:" << int32_t(item ? item->getShootRange() : it.shootRange); if(it.attack || it.extraAttack || (item && (item->getAttack() || item->getExtraAttack()))) { s << ", Atk " << std::showpos << int32_t(item ? item->getAttack() : it.attack); if(it.extraAttack || (item && item->getExtraAttack())) s << " " << std::showpos << int32_t(item ? item->getExtraAttack() : it.extraAttack) << std::noshowpos; } if(it.hitChance != -1 || (item && item->getHitChance() != -1)) s << ", Hit% " << std::showpos << (item ? item->getHitChance() : it.hitChance) << std::noshowpos; } else if(it.weaponType != WEAPON_AMMO && it.weaponType != WEAPON_WAND) { if(it.attack || it.extraAttack || (item && (item->getAttack() || item->getExtraAttack()))) { begin = false; s << " (Atk:"; if(it.abilities.elementType != COMBAT_NONE && it.decayTo < 1) { s << std::max((int32_t)0, int32_t((item ? item->getAttack() : it.attack) - it.abilities.elementDamage)); if(it.extraAttack || (item && item->getExtraAttack())) s << " " << std::showpos << int32_t(item ? item->getExtraAttack() : it.extraAttack) << std::noshowpos; s << " physical + " << it.abilities.elementDamage << " " << getCombatName(it.abilities.elementType); } else { s << int32_t(item ? item->getAttack() : it.attack); if(it.extraAttack || (item && item->getExtraAttack())) s << " " << std::showpos << int32_t(item ? item->getExtraAttack() : it.extraAttack) << std::noshowpos; } } if(it.defense || it.extraDefense || (item && (item->getDefense() || item->getExtraDefense()))) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Def:" << int32_t(item ? item->getDefense() : it.defense); if(it.extraDefense || (item && item->getExtraDefense())) s << " " << std::showpos << int32_t(item ? item->getExtraDefense() : it.extraDefense) << std::noshowpos; } } Abaixo coloque: if(it.criticalHitChance || (item && item->getCriticalHitChance())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Crit Chance:" << std::showpos << int32_t(item ? item->getCriticalHitChance() : it.criticalHitChance) << "%"<< std::noshowpos; } if(it.dodgeChance || (item && item->getDodgeChance())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Dodge Chance:" << std::showpos << int32_t(item ? item->getDodgeChance() : it.dodgeChance) << "%"<< std::noshowpos; } if(it.lifeAbsorb || (item && item->getLifeAbsorb())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Life Absorb:" << std::showpos << int32_t(item ? item->getLifeAbsorb() : it.lifeAbsorb) << "%"<< std::noshowpos; } if(it.manaAbsorb || (item && item->getManaAbsorb())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Mana Absorb:" << std::showpos << int32_t(item ? item->getManaAbsorb() : it.manaAbsorb) << "%"<< std::noshowpos; } if(it.lifeLeech || (item && item->getLifeLeech())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Life Leech:" << std::showpos << int32_t(item ? item->getLifeLeech() : it.lifeLeech) << "%"<< std::noshowpos; } if(it.manaLeech || (item && item->getManaLeech())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Mana Leech:" << std::showpos << int32_t(item ? item->getManaLeech() : it.manaLeech) << "%"<< std::noshowpos; } Procure por: int32_t tmp = it.armor; if(item) tmp = item->getArmor(); bool begin = true; if(tmp) { s << " (Arm:" << tmp; begin = false; } Abaixo coloque: if(it.criticalHitChance || (item && item->getCriticalHitChance())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Crit Chance:" << std::showpos << int32_t(item ? item->getCriticalHitChance() : it.criticalHitChance) << "%"<< std::noshowpos; } if(it.dodgeChance || (item && item->getDodgeChance())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Dodge Chance:" << std::showpos << int32_t(item ? item->getDodgeChance() : it.dodgeChance) << "%"<< std::noshowpos; } if(it.lifeAbsorb || (item && item->getLifeAbsorb())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Life Absorb:" << std::showpos << int32_t(item ? item->getLifeAbsorb() : it.lifeAbsorb) << "%"<< std::noshowpos; } if(it.manaAbsorb || (item && item->getManaAbsorb())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Mana Absorb:" << std::showpos << int32_t(item ? item->getManaAbsorb() : it.manaAbsorb) << "%"<< std::noshowpos; } if(it.lifeLeech || (item && item->getLifeLeech())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Life Leech:" << std::showpos << int32_t(item ? item->getLifeLeech() : it.lifeLeech) << "%"<< std::noshowpos; } if(it.manaLeech || (item && item->getManaLeech())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Mana Leech:" << std::showpos << int32_t(item ? item->getManaLeech() : it.manaLeech) << "%"<< std::noshowpos; } Agora vá em item.h e procure por: ATTR_DUALWIELD = 43, Abaixo coloque: ATTR_CRITICALHITCHANCE = 44, ATTR_DODGECHANCE = 45, ATTR_LIFEABSORB = 46, ATTR_MANAABSORB = 47, ATTR_LIFELEECH = 48, ATTR_MANALEECH = 49, Procure por: int32_t getExtraDefense() const; Abaixo coloque: int32_t getCriticalHitChance() const; int32_t getDodgeChance() const; int32_t getLifeAbsorb() const; int32_t getManaAbsorb() const; int32_t getLifeLeech() const; int32_t getManaLeech() const; Procure por: inline int32_t Item::getExtraDefense() const { bool ok; int32_t v = getIntegerAttribute("extradefense", ok); if(ok) return v; return items[id].extraDefense; } Abaixo coloque: inline int32_t Item::getCriticalHitChance() const { bool ok; int32_t v = getIntegerAttribute("criticalhitchance", ok); if(ok) return v; return items[id].criticalHitChance; } inline int32_t Item::getDodgeChance() const { bool ok; int32_t v = getIntegerAttribute("dodgechance", ok); if(ok) return v; return items[id].dodgeChance; } inline int32_t Item::getLifeAbsorb() const { bool ok; int32_t v = getIntegerAttribute("lifeabsorb", ok); if(ok) return v; return items[id].lifeAbsorb; } inline int32_t Item::getManaAbsorb() const { bool ok; int32_t v = getIntegerAttribute("manaabsorb", ok); if(ok) return v; return items[id].manaAbsorb; } inline int32_t Item::getLifeLeech() const { bool ok; int32_t v = getIntegerAttribute("lifeleech", ok); if(ok) return v; return items[id].lifeLeech; } inline int32_t Item::getManaLeech() const { bool ok; int32_t v = getIntegerAttribute("manaleech", ok); if(ok) return v; return items[id].manaLeech; } Agora vá em player.cpp e procure por: int32_t Player::getArmor() const { int32_t i = SLOT_FIRST, armor = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) armor += item->getArmor(); } if(vocation->getMultiplier(MULTIPLIER_ARMOR) != 1.0) return int32_t(armor * vocation->getMultiplier(MULTIPLIER_ARMOR)); return armor; } Abaixo coloque: int32_t Player::getCriticalHitChance() const { int32_t i = SLOT_FIRST, crit = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) crit += item->getCriticalHitChance(); } return crit; } int32_t Player::getDodgeChance() const { int32_t i = SLOT_FIRST, dodge = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) dodge += item->getDodgeChance(); } return dodge; } int32_t Player::getLifeAbsorb() const { int32_t i = SLOT_FIRST, life = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) life += item->getLifeAbsorb(); } return life; } int32_t Player::getManaAbsorb() const { int32_t i = SLOT_FIRST, mana = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) mana += item->getManaAbsorb(); } return mana; } int32_t Player::getLifeLeech() const { int32_t i = SLOT_FIRST, life = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) life += item->getLifeLeech(); } return life; } int32_t Player::getManaLeech() const { int32_t i = SLOT_FIRST, mana = 0; for(; i < SLOT_LAST; ++i) { if(Item* item = getInventoryItem((slots_t)i)) mana += item->getManaLeech(); } return mana; } Agora vá em player.h e procure por: virtual int32_t getDefense() const; Abaixo coloque: virtual int32_t getCriticalHitChance() const; virtual int32_t getDodgeChance() const; virtual int32_t getLifeAbsorb() const; virtual int32_t getManaAbsorb() const; virtual int32_t getLifeLeech() const; virtual int32_t getManaLeech() const; Agora vá em luascript.cpp e procure por: //getCreatureHealth(cid) lua_register(m_luaState, "getCreatureHealth", LuaInterface::luaGetCreatureHealth); Abaixo coloque: //getPlayerCriticalHitChance(cid) lua_register(m_luaState, "getPlayerCriticalHitChance", LuaInterface::luaGetPlayerCriticalHitChance); //getPlayerDodgeChance(cid) lua_register(m_luaState, "getPlayerDodgeChance", LuaInterface::luaGetPlayerDodgeChance); //getPlayerLifeAbsorb(cid) lua_register(m_luaState, "getPlayerLifeAbsorb", LuaInterface::luaGetPlayerLifeAbsorb); //getPlayerManaAbsorb(cid) lua_register(m_luaState, "getPlayerManaAbsorb", LuaInterface::luaGetPlayerManaAbsorb); //getPlayerLifeLeech(cid) lua_register(m_luaState, "getPlayerLifeLeech", LuaInterface::luaGetPlayerLifeLeech); //getPlayerManaLeech(cid) lua_register(m_luaState, "getPlayerManaLeech", LuaInterface::luaGetPlayerManaLeech); Procure por: int32_t LuaInterface::luaGetCreatureMaxHealth(lua_State* L) { //getCreatureMaxHealth(cid[, ignoreModifiers = false]) bool ignoreModifiers = false; if(lua_gettop(L) > 1) ignoreModifiers = popBoolean(L); ScriptEnviroment* env = getEnv(); if(Creature* creature = env->getCreatureByUID(popNumber(L))) lua_pushnumber(L, creature->getPlayer() && ignoreModifiers ? creature->healthMax : creature->getMaxHealth()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } Abaixo coloque: int32_t LuaInterface::luaGetPlayerCriticalHitChance(lua_State* L) { //getPlayerCriticalHitChance(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getCriticalHitChance()); else { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaInterface::luaGetPlayerDodgeChance(lua_State* L) { //getPlayerDodgeChance(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getDodgeChance()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaInterface::luaGetPlayerLifeAbsorb(lua_State* L) { //getPlayerLifeAbsorb(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getLifeAbsorb()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaInterface::luaGetPlayerManaAbsorb(lua_State* L) { //getPlayerManaAbsorb(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getManaAbsorb()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaInterface::luaGetPlayerLifeLeech(lua_State* L) { //getPlayerLifeLeech(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getLifeLeech()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } int32_t LuaInterface::luaGetPlayerManaLeech(lua_State* L) { //getPlayerManaLeech(cid) ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) lua_pushnumber(L, player->getManaLeech()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } Agora vá em luascript.h e procure por: static int32_t luaGetPlayerSpentMana(lua_State* L); Abaixo coloque: static int32_t luaGetPlayerCriticalHitChance(lua_State* L); static int32_t luaGetPlayerDodgeChance(lua_State* L); static int32_t luaGetPlayerLifeAbsorb(lua_State* L); static int32_t luaGetPlayerManaAbsorb(lua_State* L); static int32_t luaGetPlayerLifeLeech(lua_State* L); static int32_t luaGetPlayerManaLeech(lua_State* L); As funções Lua adicionadas foram getPlayerCriticalHitChance(cid) getPlayerDodgeChance(cid) getPlayerLifeAbsorb(cid) getPlayerManaAbsorb(cid) getPlayerLifeLeech(cid) getPlayerManaLeech(cid) Agora a parte do game.cpp. (Esta é uma parte opcional, você pode optar por não adicioná-la) Créditos: ~Mathias Kenfi4 pontos -
[Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana Absorb
[Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana Absorb
diarmaint e um outro reagiu a LeoTK por uma resposta no tópico
2 pontos@Ackerzin melhor forma de você aplicar em qualquer source é pegar uma função existe na sua source e usar o DiffCheker para comparar os códigos e deixar o do tópico com as mesmas funções e chamadas da sua source assim é 100% de certeza que não vai dar erro porque muda alguns pequenos detalhes de source para source ai é nisso que gera o erro2 pontos -
[8.60] Wodbo Wars v5.9 + Site + Client Download
[8.60] Wodbo Wars v5.9 + Site + Client Download
Toca do Aranha e um outro reagiu a Cat por uma resposta no tópico
2 pontos@Yan Liima A acusação procede? Preciso fazer o scan completo de todos os arquivos ou posso confiar que o scan apresentado na denúncia foi resolvido? Resolvido por pm, o arquivo em questão foi removido pelo autor do tópico.2 pontos -
Ensinando como compilar TFS 0.4 [COM IMAGENS]
Como compilar no Windows (TFS 0.4) E aí pessoal, beleza? Apanhei muito para aprender a compilar no Windows, nunca dava conta, e um dia alguém (não me lembro quem) me ajudou e estou aqui para repassar esse conhecimento... Enfim, hoje vou ensinar como compilar a TFS 0.4 no Windows, e em breve, no Linux. Primeiramente, irei deixar a lista de programas que iremos precisar. ==================================================================================== Dev C++ (Links para download no spoiler) ==================================================================================== Uma TFS 0.4 ==================================================================================== Feito o download de tudo isso, vamos ao passo a passo. ==================================================================================== 1º Após baixar a TFS, abra a pasta e encontre a pasta src ==================================================================================== 2º Abra a pasta, encontre a pasta dev-cpp encontrada dentro da pasta src ==================================================================================== 3º Crie uma pasta chamada "Obj" dentro dessa pasta ==================================================================================== 4º Beleza, agora vamos abrir o Dev C++ ==================================================================================== 5º Com o Dev C++ aberto, vamos abrir o projeto da TFS 0.4 ==================================================================================== 6º Irá aparecer uma caixa para você escolher qual arquivo você irá procurar. Então vamos naquela pasta dev-cpp e encontraremos o "TheForgottenServer.dev" e selecionaremos ele. ==================================================================================== 7º Irá carregar muitos arquivos que apareceram em uma lista, não recomendo vocês mexerem neles se não tiver um conhecimento necessário para tal. ==================================================================================== 8º Agora vamos no Menu Project -> Project Options, ou apertar Alt + P ==================================================================================== 9º Feito isso, vamos em Parameters e iremos adicionar algumas coisas em C++ compiler e em Linker ==================================================================================== 10º Em C++ compiler coloque esses parâmetros ==================================================================================== 11º Agora em Linker, coloque esses parâmetros ==================================================================================== 12º Ainda em Project Options, vamos na aba Build Options e iremos escolher o Object file output directory e colocar aquela pasta "Obj" que criamos lá em cima ==================================================================================== 13º Feito isso, irá ficar assim ==================================================================================== 14º Agora pode dar Ok no Project Options ==================================================================================== 15º Agora, vamos COMPILAR!! Use o primeiro item (o que tem 4 janelinhas de cores diferentes) ou use Ctrl + F9 ==================================================================================== 16º Irá aparecer uma janela como essa aqui, fique tranquilo, está tudo normal! ==================================================================================== 17º Ao terminar, aparecerá essa janela e a sua TFS 0.4 está compilada. ==================================================================================== 18º Voltamos naquela pasta dev-cpp e encontraremos esse arquivo, ele é a sua Distro. ==================================================================================== 19º Agora só jogar ela na sua datapack e utilizá-la. (Não esqueça de adicionar as libs) ==================================================================================== É isso pessoal, espero que tenham conseguido, se houver alguma dúvida, vai deixar aqui nos comentários que vou tentar ir respondendo...1 ponto
-
[Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana Absorb
[Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana Absorb
Mathias Kenfi reagiu a Ackerzin por uma resposta no tópico
1 pontoEu troquei, lhe informei para arrumar no topico G_G1 ponto -
[Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana Absorb
[Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana Absorb
Ackerzin reagiu a Mathias Kenfi por uma resposta no tópico
1 pontoApenas troque player->getManaAsborb() por player->getManaAbsorb()1 ponto -
[Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana Absorb
[Novos Atributos] Critical/Dodge/Life e Mana Leech/Life e Mana Absorb
Lurk reagiu a Mathias Kenfi por uma resposta no tópico
1 ponto@Gabrieldsadaxas @leozincorsair O tutorial foi feito a partir da OTX 2.xx séries na qual já existe, por padrão, atributos como dualwield e attackspeed Vocês devem, no entanto, adaptar para a source de vocês. Não tem que colocar especificamente depois de ATTR_DUALWIELD = 43; Vocês devem colocar ele depois do PENÚLTIMO ATTR e antes do ÚLTIMO A mesma coisa no item.cpp em relação ao attackspeed if(it.attackSpeed || (item && item->getAttackSpeed())) Se não tem na source vocês podem olhar em uma source que tenha (OTX 2.XX séries de preferência) e ver em qual posição deve ser colocada else if(it.weaponType != WEAPON_AMMO && it.weaponType != WEAPON_WAND) { if(it.attack || it.extraAttack || (item && (item->getAttack() || item->getExtraAttack()))) { begin = false; s << " (Atk:"; if(it.hasAbilities() && it.abilities->elementType != COMBAT_NONE) { s << std::max((int32_t)0, int32_t((item ? item->getAttack() : it.attack) - it.abilities->elementDamage)); if(it.extraAttack || (item && item->getExtraAttack())) s << " " << std::showpos << int32_t(item ? item->getExtraAttack() : it.extraAttack) << std::noshowpos; s << " physical + " << it.abilities->elementDamage << " " << getCombatName(it.abilities->elementType); } else { s << int32_t(item ? item->getAttack() : it.attack); if(it.extraAttack || (item && item->getExtraAttack())) s << " " << std::showpos << int32_t(item ? item->getExtraAttack() : it.extraAttack) << std::noshowpos; } } if(it.defense || it.extraDefense || (item && (item->getDefense() || item->getExtraDefense()))) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Def:" << int32_t(item ? item->getDefense() : it.defense); if(it.extraDefense || (item && item->getExtraDefense())) s << " " << std::showpos << int32_t(item ? item->getExtraDefense() : it.extraDefense) << std::noshowpos; } } if(it.attackSpeed || (item && item->getAttackSpeed())) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "AS: " << (item ? item->getAttackSpeed() : it.attackSpeed); } Claramente você perecebe que o attackspeed está depois de else if(it.weaponType != WEAPON_AMMO && it.weaponType != WEAPON_WAND) { if(it.attack || it.extraAttack || (item && (item->getAttack() || item->getExtraAttack()))) { begin = false; s << " (Atk:"; if(it.hasAbilities() && it.abilities->elementType != COMBAT_NONE) { s << std::max((int32_t)0, int32_t((item ? item->getAttack() : it.attack) - it.abilities->elementDamage)); if(it.extraAttack || (item && item->getExtraAttack())) s << " " << std::showpos << int32_t(item ? item->getExtraAttack() : it.extraAttack) << std::noshowpos; s << " physical + " << it.abilities->elementDamage << " " << getCombatName(it.abilities->elementType); } else { s << int32_t(item ? item->getAttack() : it.attack); if(it.extraAttack || (item && item->getExtraAttack())) s << " " << std::showpos << int32_t(item ? item->getExtraAttack() : it.extraAttack) << std::noshowpos; } } if(it.defense || it.extraDefense || (item && (item->getDefense() || item->getExtraDefense()))) { if(begin) { begin = false; s << " ("; } else s << ", "; s << "Def:" << int32_t(item ? item->getDefense() : it.defense); if(it.extraDefense || (item && item->getExtraDefense())) s << " " << std::showpos << int32_t(item ? item->getExtraDefense() : it.extraDefense) << std::noshowpos; } } Então se não tiver esse atributo na sua source é só adicionar depois do código citado acima1 ponto -
[AJUDA] Mudar Sprite HP e MANA do Old Cliente
[AJUDA] Mudar Sprite HP e MANA do Old Cliente
dbofurie reagiu a Spooky Ghost por uma resposta no tópico
1 pontoVocê vai precisar de um programa chamado Pic Editor, e abrir o tibia.pic lá você pode alterar o background do seu client e entre várias outras coisas, com essas informações você vai encontrar os tutoriais aqui do fórum que explicam melhor cada detalhe. Um exemplo: quando você abrir na parte das imagens vai estar lá a barrinha de vida e mana que você quer alterar é só clicar em exportar e fazer as alterações dps importar se não me engano xD1 ponto -
[8.60] Wodbo Wars v5.9 + Site + Client Download
[8.60] Wodbo Wars v5.9 + Site + Client Download
ITALOx reagiu a Toca do Aranha por uma resposta no tópico
1 ponto@Nolis sim, já foi resolvido e corrigido.1 ponto -
[8.60][OLD Client] Narutibia (NTO HARD) - Servidor Completo
@CM Ryuuji @One Punch Man Para colocar para atacar um jogador, só é alterar elfProtectionTarget = true para elfProtectionTarget = false1 ponto
-
Remover Item Melhorado
Remover Item Melhorado
Mathias Kenfi reagiu a Naze por uma resposta no tópico
1 pontoBom, estava criando um script e me deparei com um problema a função doRemoveItem(uid) não funciona em addEvent, pelo fato de uid sempre ta variando a cada segundo. Então fiz essa versão que funciona com addEvent e sem necessidade de stackpos. Aos que não sabem como usar, adicione esse código no 050-function.lua da pasta lib de seu ot. removeItem(pos, item) -- pos = posição do item, item = id do item. exemplo: local pos, itemid = {x = 160, y = 54, z = 7}, 8753 removeItem(pos, itemid)1 ponto -
Mapa castelo para Tíbia 8.54
Mapa castelo para Tíbia 8.54
S H I O N reagiu a Renan Gerson por uma resposta no tópico
1 pontoBom, sempre que eu tiver um tempo disponível eu irei trazer algumas criações de mapas para servidores 8.54. Ao longo do tópico irão ver imagens do mapa criado por mim chamado " Castelo/Castle ". Caso queira pegar o projeto e fazer melhorias para postar no fórum certifique-se de dar os devidos créditos: -------------------------------------------------- Inicialmente criado por: Renan Gerson Modificado e melhorado por: ( SEU NOME ) -------------------------------------------------- Dês de já se consegui te ajudar da REP+ -O mapa mostrando nas imagens é um castelo com apenas um acesso ( frontal/ponte ). -Possuindo algumas casas dentro dele e uma "área real" logo a cima da entrada, uma subida em cada parte da frente do castelo para visualizar novos inimigos se aproximando e caminhos diretos da frente até a "área real". -Também possuindo duas decidas para a área de maquinas ( onde faz a energia chegar nas cassas dos moradores ). -OBS: portas não testadas. Download: https://www.mediafire.com/file/hbf6ci2fugfphow/Mapa_Castelo-Renan_Gerson.rar/file1 ponto -
TFS 0.4 3777
1 pontoOlá @Magalhaes92, tudo bem? Primeiramente, verifique no seu config.lua o seu packetsPerSecond. O mesmo não pode ultrapassar 450. (recomendo 350 ou 400) Agora tente modificar a porta do SSH e instalar uma proteção para DDoS. Não vai ser as melhores opções, mas vai te ajudar muito. Não copie o $: $ nano /etc/ssh/sshd_config Procure por algo parecido como Port 22, modifique para um à sua escolha. Sempre que você for acessar sua máquina, você não irá usar a porta 22 e sim, a porta que você escolheu. Reinicie o SSH: $ service ssh restart Beleza, agora só você saberá o valor da porta SSH, ficará mais difícil atacarem esta porta. Instale agora um CSF dentro de uma Screen e configure: (caso não tenha screen, utilize o comando: apt get install screen -y) $ screen -S CSF $ cd /home $ rm -fv csf.tgz $ wget https://download.configserver.com/csf.tgz $ tar -xzf csf.tgz $ cd csf $ sh install.sh $ nano /etc/csf/csf.conf Use CTRL + W e procure por: TESTING = "1", mude para 0 Configure tudo: Lembre-se: Onde estiver XXXX, troque pela porta SSH. (Coloquei em XXXX pensando que você modificará a sua porta SSH) TCP_IN = "80,7171,7172,XXXX" TCP_OUT = "80,7171,7172" UDP_IN = "" UDP_OUT = "" TCP6_IN = "80,7171,7172,XXXX" TCP6_OUT = "80,7171,7172" UDP6_IN = "" UDP6_OUT = "" CT_LIMIT = "100" SYNFLOOD = "1" SYNFLOOD_RATE = "150/s" SYNFLOOD_BURST = "200" UDPFLOOD = "1" PORTFLOOD = "80;tcp;20;5,7171;tcp;20;5,7172;tcp;20;5,XXXX;tcp;5;60" PS_INTERVAL = "1500" PS_LIMIT = "20" Agora reinicie o CSF para aplicar as modificações: $ csf -r Caso seu CSF esteja desativado, utilize: $ csf -e AVISO: Caso cometa algum erro nas configurações acima, você perderá acesso à maquina. Não preciso comentar o que vai ocorrer né1 ponto
-
(Resolvido)Cast System
1 ponto1 ponto
-
Anti Divulgação em LUA
Anti Divulgação em LUA
Lincoln123123 reagiu a Lyu por uma resposta no tópico
1 pontoTestado apenas em TFS 0.4 Em "Data/talkactions", no arquivo talkactions.xml, adicione a tag: <talkaction default="yes" filter="quotation" logged="no" hidden="yes" event="script" value="antidiv.lua"/> Em "Data/talkactions/scripts", crie um arquivo.LUA e renomeie para antidiv.lua, apague tudo e cole: local words_, prev = {"org","no-ip","net","com","pl","biz","servegame","br","sytes","info"}, {".",",",";"} function onSay(cid, words) for _, w in ipairs(words_) do for _, p in ipairs(prev) do if(words:lower():find(p..''..w, 1, true)) then return doPlayerSendCancel(cid, 'You can\'t send this message.') end end end end Na tabela prev.. Você pode adicionar na tabela, o que vem antes de "net", "org" e etc.. ex : se eu adicionar um til "~", não vai dá pra divulgar assim : "www.etcetc~org" {".",",",";"} Já existem 'ponto', 'vírgula' e 'ponto e vírgula' dentro da tabela. Então é impossível divulgar dos seguintes modos : entrem aqui otfodao.com entrem nesse ot baiakzikaofodapakas,com novo ot lançado hoje, entrem www.otnoob;net Créditos : EU1 ponto