Ir para conteúdo

TheKronOs

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Curtir
    Esse 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 Kenfi
  2. Obrigado
    TheKronOs deu reputação a Agaka em (Resolvido)AJUDA NESSA SPELL KAMUI IN   
    @leozincorsair Foi mal, realmente foi erro meu. Bom, pra fazer com que quem entre possa sair, vai ser preciso criar um novo movement. Por que? Simples, quando o player casta a spell a posição dele fica salva. Já o player que entrar no portal do mundo normal não vai ter suas posições salvas, logo não poderá retornar. Mas vamos lá.
     
    Spell
     
    Portal do mundo normal (Esse script vai salvar a posição dos outros players.)
     
    Portal para sair do kamui
     
    Tags dos movements
    Portal do mundo normal <movevent type="StepIn" actionid="5560" event="script" value="step.lua"/> Portal no kamui <movevent type="StepIn" actionid="5506" event="script" value="step2.lua"/>  
  3. Curtir
    TheKronOs recebeu reputação de tetheuscunha em (Resolvido)Autoloot Bugado   
    da uma olhada nesse link aqui @tetheuscunha
     
  4. Curtir
    TheKronOs deu reputação a Yan Liima em [System] Trade Points   
    #Introdução
    Reparei que muitas pessoas estão atrás desse sistema que o DBOBR e NTOBR usa, e atualmente o VitorSubhi postou um, porém é necessário modificar as sources. Apesar de achar o dele bem melhor, estarei deixando este meu sistema(não é necessário mexer nas sources).
     
    #Funcionamente
    O jogador vai até um NPC e compra um papel, após ter comprado ele pode estar dando trade nesse papel e negociando com algum jogador em troca de qualquer item. Ao finalizar a negociação, os points são transferidos/removidos(caso houver points na conta). Também é possivel comprar o papel por comando, estarei disponibilizando ambos para vocês.
     
    #Alguns prints:
     
    Estarei deixando o script para vocês em inglês, modifique como quiser
    Então vamos lá...
    #Instalação
    Em data/lib crie um arquivo chamado tradepoints.lua cole isto dentro:
     
    Em data/creaturescripts/tradepoints.lua:
     
    TAG:
    <event type="tradeaccept" name="Trade_Points" event="script" value="tradepoints.lua"/> <event type="traderequest" name="Trade_Points_Request" event="script" value="tradepoints.lua"/> login.lua
    registerCreatureEvent(cid, "Trade_Points") registerCreatureEvent(cid, "Trade_Points_Request") NPC XML:
    <?xml version="1.0" encoding="UTF-8"?> <npc name="Frodo" script="data/npc/scripts/trade_points.lua" walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="275" head="114" body="113" legs="113" feet="113" corpse="2212"/> <parameters> <parameter key="module_shop" value="1" /> <parameter key="message_greet" value="Hello |PLAYERNAME|. I sell some utensils and Premium Points Transfer for you to transfer points to other players, remember to buy use '10' to 10 points." /> </parameters> </npc> Data/npc/scripts/trade_points.lua:
     
    Caso queira que a compra do papel seja feita por talkactions, aqui está:
     
    Prontinho xD
    Agradecimentos ao @lordzetros por ajudar na função scanContainer.
    obs: testado em TFS 0.4
  5. Curtir
    TheKronOs deu reputação a Lyu em (Resolvido)bug no look e showvoc   
    É conflito mesmo. O chato é que esses scripts setam uma nova descrição toda vez que um jogador dar look em outro, independente de qual jogador seja, isso é errado. O certo mesmo seria concatenar uma nova descrição com a atual uma única vez, exemplo :
    local newDesc = '\nnova descrição' local desc = getPlayerSpecialDescription(thing.uid) desc = desc .. newDesc doPlayerSetSpecialDescription(thing.uid, desc)  
    Tô terminando umas coisas, e se der tempo, vejo se ainda hoje faço alguma coisa por você.
  6. Gostei
    TheKronOs deu reputação a Jeanfersonsp em (Resolvido)bug no look e showvoc   
    Desativa o do Frag e o Jin look e dps apaga tudo do Showvoc e poe isso
  7. Gostei
    TheKronOs deu reputação a Reds em (Resolvido)Effect em Dodge e Critical System   
    --[[Critical System -------------------------  By Night Wolf]] local lvlcrit = 48913 local multiplier = 1.5 function onStatsChange(cid, attacker, type, combat, value) if isPlayer(attacker) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS)  then if (getPlayerStorageValue(attacker, lvlcrit)*3) >= math.random (0,1000) then dano = math.ceil(value*(multiplier)) doTargetCombatHealth(attacker, cid, combat, -dano, -dano, 255) doSendAnimatedText(getCreaturePos(attacker), "CRITICAL!!", 144) doSendMagicEffect(getCreaturePos(attacker), 43) return false end end return true end  
    é isso q vc quer?
  8. Haha
    TheKronOs recebeu reputação de ShoTTdowN em Attack speed - 2018   
    desculpa reviver o topico, a script funcionou certinho, mais quando eu vou bater sem arma alguma o first sobe muito rapido. chegou ate uns 2k aqui, poderia me da uma força ?
  9. Obrigado
    TheKronOs deu reputação a Luan Zero em Attack speed - 2018   
    Bom cara, esse erro é mais pelo seu vocation.xml, ver se não tem uma linha com nome - fist="1.0" ou fist="2.0", se tiver deixa assim fist="1.1" e no config.lua procura por rates e em skills deixa igual 4
  10. Gostei
    TheKronOs deu reputação a Luan Zero em Attack speed - 2018   
    Olá pessoal, desejo um ótimo dia para todos, é notório que 90% da galera que tem um servidor com derivado de nto/dbo procuram pelo sistema de Speed Attack igual do NtoBrasil, então hoje venho disponibilizar para vocês, o sistema, eu fiz com a ajuda ADM do ultiimate "LKS", lembrando que o sistema eu testei em uma sources 0.4, alguns amigos meu disseram que funcionou em 0.3.6.
     
    Vamos lá, na sua sources procure pelo arquivo : Player.cpp.
     
    e procure por : 
     
    uint32_t Player::getAttackSpeed() { Item* weapon = getWeapon(); if(weapon && weapon->getAttackSpeed() != 0) return weapon->getAttackSpeed(); return vocation->getAttackSpeed(); } e substitua pelo código. 
     
    uint32_t Player::getAttackSpeed() const { int32_t SpeedAttack; SpeedAttack = getSkill(SKILL_FIST, SKILL_LEVEL); if(SpeedAttack < 100) SpeedAttack = 1000; else if(SpeedAttack >= 100 && SpeedAttack < 110) SpeedAttack = 800; else if(SpeedAttack >= 110 && SpeedAttack < 120) SpeedAttack = 600; else SpeedAttack = 500; return SpeedAttack; } Explicando, onde tem 100, 110, 120, é o que precisa de fist para bater rápido, 
     
    Onde tem SpeedAtacck = 500, é 2 hits por segundos, quanto menor mais rápido o personagem vai hitar.
     
    Créditos ao LKS Pela ajuda.
     
  11. Gostei
    TheKronOs deu reputação a KotZletY em Bug placas nao digita texto   
    @weslwy
     
     
  12. Curtir
    TheKronOs deu reputação a Hektor em System !saga   
    Deixa queto!
  13. Gostei
    TheKronOs deu reputação a Lyu em (Resolvido)Ganhar mais exp com cast aberto.   
    Vamos lá irmão, preciso que você faça os testes e me informe se ocorrerá tudo bem.
     
    primeiramente vamos criar uma lib em data/libs com o nome lib-castexp.lua.
    data/lib/lib-castexp.lua :
    CASTEXP = {} CASTEXP_PERCENT = 0.5 CASTEXP_NEEDTIME = 20 -- seconds  
    agora precisamos carregar essa biblioteca a partir do arquivo lib.lua que é carregado por global.lua.
    data/lib/lib.lua :
    dofile('data/lib/lib-castexp.lua')  
    sabe as talkactions !cast e !stopcast? Então, iremos dar uma mexidinha nas mesmas. Irei disponibilizar ambos já mexidos porque acho que é o mesmo que o seu.
    data/talkactions/scripts/start_cast.lua :
    function onSay(player, words, param) if (param == "on") then param = nil end if player:startLiveCast(param) then player:sendTextMessage(MESSAGE_INFO_DESCR, "You have started casting your gameplay.") CASTEXP[player:getName()] = os.time() + CASTEXP_NEEDTIME else player:sendCancelMessage("You're already casting your gameplay.") end return false end  
    data/talkactions/scripts/stop_cast.lua :
    function onSay(player, words, param) if player:stopLiveCast(param) then player:sendTextMessage(MESSAGE_INFO_DESCR, "You have stopped casting your gameplay.") CASTEXP[player:getName()] = nil else player:sendCancelMessage("You're not casting your gameplay.") end return false end  
    Vamos então mexer no evento onGainExperience que é encontrado em data/events/scripts/player.lua.
    CTRL + F, procure por onGainExperience e no final antes do return exp, adicione isso :
    if CASTEXP[self:getName()] then if CASTEXP[self:getName()] <= os.time() then exp = (exp * CASTEXP_PERCENT) + exp self:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Voce recebeu mais experiencia por manter o cast aberto.') end end  
    E pra finalizar, vamos anular o valor da chave caso o player deslogue.
    data/creaturescripts/scripts/logout.lua (Adicionar no final antes do return true) :
    CASTEXP[player:getName()] = nil  
    Lembrando que o CASTEXP_NEEDTIME é em segundos, então caso queira 30 minutos, põe 1800.
    Lembre-se também de me manter informado caso haja bugs.
    Um forte abraço!

Informação Importante

Confirmação de Termo