Signup Now
Results 1 to 2 of 2
  1. #1
    Free User
    Join Date
    Mar 2014
    Posts
    43
    Reputation
    10
    Rep Power
    0

    Anti Lure + Waipoint saiTop, saiMid e Sai

    Olá, tenho uma duvidas sobre o Anti Lure.

    não to conseguindo configurar direito para sai o que estive mais proxima de waypoint.

    Exemplo:

    adicionei 3 label que ta escrito "SaiTop", "SaiHunt" e o segundo no centro "SaiMid", "SaiHunt" e o terceiro perto da saida da hunt "Sai", "SaiHunt" assim por diante.

    por isso testei varia vez, quanto tem maior que anti lure, e o char tava mais próxima no label "Sai", "SaiHunt", só que o bot foi pra "SaiTop", "SaiHunt" e nao "Sai", "SaiHunt"

    veja como esta no meu scripts.

    PHP Code:
    --Anti Lure
    auto
    (100)
    if 
    $posz == and $wptsection ~= "SaiTop" and maround(10"Ghastly Dragon","Lizard Chosen") >= tonumber(getuseroption("AntiLureAmount")) then
         playsound
    ("alert.wav")
         
    wait(500)
              
    setsetting('Looting/Enabled''no')
              
    setsetting("Persistent/Scripts/Haste/Enabled","yes")
              
    setsetting("Targeting/Creatures/Lizard Chosen/Setting1/OnlyIfTrapped","yes")
              
    setsetting("Targeting/Creatures/Ghastly Dragon/Setting1/OnlyIfTrapped","yes")
              
    setsetting("Targeting/Creatures/Lizard Chosen/Setting2/OnlyIfTrapped","yes")
              
    setsetting("Targeting/Creatures/Ghastly Dragon/Setting2/OnlyIfTrapped","yes")
              
    stopattack()
              
    gotolabel("SaiTop","SaiHunt"
              
    wait(5000)
         elseif 
    $posz == and $wptsection ~= "SaiMid" and maround(10"Ghastly Dragon","Lizard Chosen") >= tonumber(getuseroption("AntiLureAmount")) then
              setlooting
    ("no")
              
    setsetting("Persistent/Scripts/Haste/Enabled","yes")
              
    setsetting("Targeting/Creatures/Lizard Chosen/Setting1/OnlyIfTrapped","yes")
              
    setsetting("Targeting/Creatures/Ghastly Dragon/Setting1/OnlyIfTrapped","yes")
              
    setsetting("Targeting/Creatures/Lizard Chosen/Setting2/OnlyIfTrapped","yes")
              
    setsetting("Targeting/Creatures/Ghastly Dragon/Setting2/OnlyIfTrapped","yes")
              
    stopattack()
              
    gotolabel("SaiMid","SaiHunt"
              
    wait(5000)
         elseif 
    $posz == and $wptsection ~= "Sai" and maround(10"Ghastly Dragon","Lizard Chosen") >= tonumber(getuseroption("AntiLureAmount")) then
              setlooting
    ("no")
              
    setsetting("Persistent/Scripts/Haste/Enabled","yes")
              
    setsetting("Targeting/Creatures/Lizard Chosen/Setting1/OnlyIfTrapped","yes")
              
    setsetting("Targeting/Creatures/Ghastly Dragon/Setting1/OnlyIfTrapped","yes")
              
    setsetting("Targeting/Creatures/Lizard Chosen/Setting2/OnlyIfTrapped","yes")
              
    setsetting("Targeting/Creatures/Ghastly Dragon/Setting2/OnlyIfTrapped","yes")
              
    stopattack()
              
    gotolabel("Sai","SaiHunt"
              
    wait(5000)
    end 
    tem alguns error?

  2. #2
    Administrator Lucas Terra's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    2,202
    Reputation
    180
    Rep Power
    10
    $wptsection returns the waypoints tab you are currently in, that's why your script was failing.

    The code below calculates the distance between each exit, and pick the closest one. Make sure to edit the values of the exits.
    --Anti Lure
    init start
    local exits = {
    SaiTop = {12345, 54321, 7}, -- coordinates to the top exit
    SaiMid = {12345, 54321, 7}, -- coordinates to the mid exit
    Sai = {12345, 54321, 7}, -- coordinates to the other exit
    }

    function manhattanDist(x, y, z)
    if z ~= $posz then
    return 999999
    end

    return math.abs(x - $posx) + math.abs(y - $posy)
    end
    init end

    auto(100)
    if $posz == 9 and maround(10, 'Ghastly Dragon', 'Lizard Chosen') >= tonumber(getuseroption('AntiLureAmount')) then
    local bestExit, bestExitScore = '', 999999

    for label,coordinates in pairs(exits) do
    local temp = manhattanDist(unpack(coordinates))
    if temp < bestExitScore then
    bestExitScore = temp
    bestExit = label
    end
    end

    if bestExit ~= '' then
    setsetting('Looting/Enabled', 'no')
    setsetting('Persistent/Scripts/Haste/Enabled', 'yes')
    setsetting('Targeting/Creatures/Lizard Chosen/Setting*/OnlyIfTrapped', 'yes')
    setsetting('Targeting/Creatures/Ghastly Dragon/Setting*/OnlyIfTrapped', 'yes')
    stopattack()
    gotolabel(bestExit, 'SaiHunt')
    end
    end

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •