Follow

Fonte: Wot Wiki
Revisão em 12h50min de 16 de setembro de 2023 por Igorlabanca (discussão | contribs) (Criou a página com "<span style="font-size: 18px;">Voltar</span> <div class="mw-custom-box"> '''Script Lua:''' <pre> UI.Label("Auto Follow Name") addTextEdit("followleader", storage.followLeader or "player name", function(widget, text) storage.followLeader = text end) --Code local toFollowPos = {} local followMacro = macro(20, "Follow", function() local target = getCreatureByName(storage.followLeader) if target then local tpos = target:getPosition() toFollowPos[tpos....")
(dif) ← Revisão anterior | Revisão atual (dif) | Revisão seguinte → (dif)
Saltar para a navegação Saltar para a pesquisa

Voltar


Script Lua:

UI.Label("Auto Follow Name")
addTextEdit("followleader", storage.followLeader or "player name", function(widget, text)
 storage.followLeader = text
end)
--Code
local toFollowPos = {}
local followMacro = macro(20, "Follow", function()
 local target = getCreatureByName(storage.followLeader)
 if target then
 local tpos = target:getPosition()
 toFollowPos[tpos.z] = tpos
 end
 if player:isWalking() then return end
 local p = toFollowPos[posz()]
 if not p then return end
 if autoWalk(p, 20, {ignoreNonPathable=true, precision=1}) then
 delay(100)
 end
end)
onCreaturePositionChange(function(creature, oldPos, newPos)
  if creature:getName() == storage.followLeader then
    if newPos then
        toFollowPos[newPos.z] = newPos
    else
        print('Invalid position for player ' .. creature:getName() .. '. Please investigate what happened')
    end
  end
end)

Para que a macro funcione corretamente, será necessário:

Inserir a macro em Tolls > Ingame script editor (Caso possua outros scripts, você deverá rolar a barra até o final, saltar alguns espaços e colar o nome em seguida).

Inserir o nome do player que você quer seguir.