Ir para conteúdo

gabrielsaintz

Membro
  • Registro em

  • Última visita

Solutions

  1. gabrielsaintz's post in (Resolvido)Como adicionar sistema de quiver ao tfs 1.4.2 sem trocar o protocolo para 12.x was marked as the answer   
    Consegui adicionar galera. De qualquer forma obrigado!

    Para adicionar quiver ao tfs 1.4.2 sem mudar para versão 12.x, você tem que fazer essas alterações na source:
    https://github.com/otland/forgottenserver/pull/4105/files
    Exceto as alterações dos arquivos networkmessage.cpp/player.h
     
    E Também essas linhas não devem ser adicionadas:
     
    weapon.cpp
    player->sendQuiverUpdate(); player.cpp
    // update quiver if (actorPlayer) { actorPlayer->sendQuiverUpdate(g_config.getBoolean(ConfigManager::CLASSIC_EQUIPMENT_SLOTS)); }  
     
     
    Compilar:
    caso dê erro no <boost/filesystem.hpp>. Tente fazer isso:
    https://github.com/otland/forgottenserver/pull/3990/files

     
    créditos:
    Ranieri Althoff:https://github.com/otland/forgottenserver/pull/3990
    Evil Punker: https://github.com/otland/forgottenserver/pull/4105
  2. gabrielsaintz's post in (Resolvido)Corrigir Spell tfs 1.4.2 was marked as the answer   
    Consegui arrumar uma solução!!

    Depois de muito tempo fazendo testes cheguei a esse resultado:
     
    local combat = Combat() combat:setArea(createCombatArea(AREA_CIRCLE5X5)) function getRandomPositions(cid) local player = Player(cid) local playerPos = player:getPosition() local areaCircle5x5 = {} -- cria uma nova AREA_CIRCLE5X5 com base na posição do meu personagem for i = -5, 5 do for j = -5, 5 do local dist = math.sqrt(i^2 + j^2) if dist <= 5 then table.insert(areaCircle5x5, {x=playerPos.x+i, y=playerPos.y+j, z=playerPos.z}) end end end local randomPosition = {} for i = 1, 1 do local index = math.random(1, #areaCircle5x5) table.insert(randomPosition, areaCircle5x5[index]) end return randomPosition end function spellCallback(cid, position, count, maxCount) if Creature(cid) and count < maxCount then if count == 0 and math.random(0, 1) == 1 or math.random(0, 15) == 1 then position:sendMagicEffect(CONST_ME_MORTAREA) doAreaCombat(cid, COMBAT_DEATHDAMAGE, position, 0, -100, -100, CONST_ME_EXPLOSIONHIT) end count = count + 1 local area = getRandomPositions(cid) -- pega uma nova posição aleatoria com base na posição do meu personagem local positionAreaCircle = {x= area[1].x, y= area[1].y, z= area[1].z} local position1 = Position(positionAreaCircle) if count > 1 and count < 81 or count > 81 and count < 145 then addEvent(spellCallback,50, cid, position1, count, maxCount) else addEvent(spellCallback,math.random(1000, 2000) , cid, position1, count, maxCount) end if count > 141 then addEvent(spellCallback,math.random(600, 3000) , cid, position1, count, maxCount) end end end function onTargetTile(creature, position) local maxCount = 145 -- quantidade de execuções spellCallback(creature:getId(), position, 0, maxCount) end combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(creature, variant, isHotkey) return combat:execute(creature, variant) end  
    Dentro do game:
     

     
    @FeeTads de qualquer forma obrigado pela ajuda!

Informação Importante

Confirmação de Termo