Signup Now
Results 1 to 3 of 3
  1. #1
    Free User
    Join Date
    Sep 2014
    Posts
    5
    Reputation
    10
    Rep Power
    0

    [Script] Loop BP's

    if getuseroption("PlayerAlert") then
    setsetting("Alerts/PlayerOnScreen/PlaySound", "yes")
    end

    fixhuntbps()

    setlooting("yes")
    settargeting("yes")

    This is 1 of my persistent scripts named global.
    function fixrefillbps()
    local MainBP = getuseroption("MainBP")

    setsetting("Looting/OpenNextBP", "no")
    while windowcount(MainBP) ~= 1 or windowcount() ~= 1 do
    closewindows() waitping()

    openitem(MainBP, "back") waitping()
    resizewindows(0, MainBP) waitping()

    resizewindows()
    end
    end

    function fixhuntbps()
    local MainBP = getuseroption("MainBP")
    local LootBP = getuseroption("LootBP")
    local GoldBP = getuseroption("GoldBP")

    setsetting("Looting/OpenNextBP", "no")
    while windowcount(MainBP) ~= 1 or windowcount(LootBP) ~= 1 or windowcount(GoldBP) ~= 1
    or windowcount() ~= 3 do
    closewindows() waitping()

    openitem(MainBP, "back") waitping()
    resizewindows(0, MainBP) waitping()

    openitem(LootBP, MainBP, true) waitping()
    resizewindows(0, LootBP) waitping()

    openitem(GoldBP, MainBP, true) waitping()
    resizewindows(0, GoldBP) waitping()

    resizewindows()
    end
    setsetting("Looting/OpenNextBP", "yes")
    end

    function logouterror(msg)
    messagebox("Character: " .. $name .. "\nScript: EK Minotaurs Yalahar\n" .. msg)
    beep()
    flashclient()
    logout()
    setcavebot("no")
    end

    function sayhi()
    if ischannel("NPCs") then
    npcsay("hi") waitping()
    else
    say("hi") wait(2200, 2500)
    end
    end

    function freeslots(c)
    tmp = getcontainer(c)
    return tmp.maxcount - tmp.itemcount
    end

    function _opentrade(n, sayhi)
    if $tradeopen then
    return true
    end

    if type(n) == 'boolean' then
    sayhi = n
    n = nil
    end

    n = n or math.random(3,5)
    if sayhi then
    if not ischannel('NPCs') then
    local nhi = math.random(3,5)
    local trieshi = 0
    while (not ischannel('NPCs') or sayhi) and trieshi < nhi do
    say('hi')
    local waittime = $timems+2500
    while $timems < waittime and not ischannel('NPCs') do wait(100) end
    trieshi = trieshi+1
    end
    if not ischannel('NPCs') then
    return false
    end
    else
    npcsay('hi') waitping(2, 4)
    end
    end

    local tries, tradesentence, npcinfo = 0, 'trade', getcreaturebyname('Rock In A Hard Place')

    if ('Rock In A Hard Place' == $lastnpcmsg.sender or (npcinfo.id > 0 and npcinfo.isnpc and tilehasinfo(npcinfo.posx, npcinfo.posy, npcinfo.posz))) then
    tradesentence = 'magic'
    end

    while not $tradeopen and tries < n do
    npcsay(tradesentence)
    local waittime = $timems+1400
    while $timems < waittime do
    wait(100)
    if $tradeopen then
    return true
    end
    end
    tries = tries + 1
    end
    return false
    end

    function nosupplies()
    return itemcount(getuseroption("ManaName")) <= getuseroption("ManaCheck")
    or itemcount(getuseroption("HealthName")) <= getuseroption("HealthCheck")
    or $cap <= getuseroption("CapCheck")
    or $stamina <= getuseroption("StaminaCheck")
    end
    this is the 2nd one named: setup fixer.
    auto(2000)

    setlootingdestination("mainbp", getuseroption("MainBP"))
    setlootingdestination("lootbp", getuseroption("LootBP"))
    setlootingdestination("goldbp", getuseroption("GoldBP"))

    local supplybp = "mainbp"

    setsetting("Looting/LootList/health potion/LootingDestination", "lootbp")
    setsetting("Looting/LootList/strong health potion/LootingDestination", "lootbp")
    setsetting("Looting/LootList/great health potion/LootingDestination", "lootbp")
    setsetting("Looting/LootList/ultimate health potion/LootingDestination", "lootbp")

    if getuseroption("HealthName") == "Health Potion" then
    setsetting("Looting/LootList/health potion/LootingDestination", supplybp)
    setsetting("PotionHealer/Rules/health/Spell", "Health Potion")
    elseif getuseroption("HealthName") == "Strong Health Potion" then
    setsetting("Looting/LootList/strong health potion/LootingDestination", supplybp)
    setsetting("PotionHealer/Rules/health/Spell", "Strong Health Potion")
    elseif getuseroption("HealthName") == "Great Health Potion" then
    setsetting("Looting/LootList/great health potion/LootingDestination", supplybp)
    setsetting("PotionHealer/Rules/health/Spell", "Great Health Potion")
    else
    setsetting("Looting/LootList/ultimate health potion/LootingDestination", supplybp)
    setsetting("PotionHealer/Rules/health/Spell", "Ultimate Health Potion")
    end
    before start hunting my bot just close and open all BP's (loot, main, gold) the problem is, he keeps closing and opening all BPs and never start hunt,

    dab04b81a2.png
    808b6795fc.jpg
    Last edited by streffer; 09-20-2014 at 07:09 PM.

  2. #2
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,914
    Reputation
    109
    Rep Power
    31
    @streffer 'brown backpack' =)



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

  3. #3
    Free User
    Join Date
    Sep 2014
    Posts
    2
    Reputation
    10
    Rep Power
    0
    meu bot fica abrindo e fechando as bps... me ajuda urgente

 

 

Posting Permissions

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