XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 10 of 11

Thread: Potion next to the shop

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8

    Join Date
    Nov 2014
    Location
    Sundsvall, Sweden
    Posts
    174
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    local ratio 2.7     -- 100 mana potions 270.00oz
    local PotionID 
    Item.GetID("mana potion")
    local PotionPrice 50
    local PotionName 
    "mana potion"

    --Spells
    prio1 
    "exevo gran mas vis"
    prio2 "utana vid"
    prio3 "exura vita"

    while(true) do
        if (
    Self.ItemCount(PotionName) > 0then --using all of the mana potions
            
    while (Self.ItemCount(PotionName) > 0) do
                if 
    Self.CanCastSpell(prio1then
                Self
    .Cast(prio1)
                elseif (
    not Self.CanCastSpell(prio1)) then
                
    if Self.CanCastSpell(prio2then
                Self
    .Cast(prio2)
                elseif (
    not Self.CanCastSpell(prio2)) then
                
    if Self.CanCastSpell(prio3then
                Self
    .Cast(prio3)
                
    end
            end
        end
    end
        
    else -- we must buy more potions
            
    --firstlysell flasks..
            
    Self.SayToNpc({"hi""trade"}, 100)
            if (
    Self.Flasks() > 0then
                
    while (Self.Flasks() > 0) do
                
    Self.ShopSellFlasks()
                
    end        
            end
            
            
    -- lets buy potions
            
    if (Self.Money() > 0then -- just to reduce amount of gold coins (wasting cap)
                while (
    Self.ItemCount(3031) > PotionPrice) do
                    
    Self.ShopBuyItem(PotionID1)
                    
    sleep(math.random(300,900))
                
    end
                
                
    while ((Self.Cap() > (ratio 100 10)) and (Self.Money() > PotionPrice 100)) do
                    
    Self.ShopBuyItem(PotionID100)
                    
    sleep(math.random(300,900))
                
    end
                
                
    while ((Self.Cap() > (ratio 10 10)) and (Self.Money() > PotionPrice 10)) do
                    
    Self.ShopBuyItem(PotionID10)
                    
    sleep(math.random(300,900))
                
    end
            end
            
        end

        sleep
    (math.random(600,1400))
    end 
    Made it abit different, more user friendly i guess.
    Use the support tab for potions, or use another script to do it.
    I can also add the Mana on follow if you need it:

    PHP Code:
    local ratio 2.7     -- 100 mana potions 270.00oz
    local PotionID 
    Item.GetID("mana potion")
    local PotionPrice 50


    while(true) do
        if (
    Self.ItemCount(PotionID) > 0then
            Self
    .UseItemWithFollow(PotionID)
        elseif (
    Self.Flasks() >= 0then
                
    while (Self.Flasks() > 0) do
                    
    Self.SayToNpc({"hi""trade"}, 100)
                    
    Self.ShopSellFlasks()
                
    end
            
    -- lets buy potions
            
    if (Self.Money() > 0then -- just to reduce amount of gold coins (wasting cap)
                while (
    Self.ItemCount(3031) > PotionPrice) do
                    
    Self.ShopBuyItem(PotionID1)
                    
    sleep(math.random(300,900))
                
    end
                
                
    while ((Self.Cap() > (ratio 100 10)) and (Self.Money() > PotionPrice 100)) do
                    
    Self.ShopBuyItem(PotionID100)
                    
    sleep(math.random(300,900))
                
    end
                
                
    while ((Self.Cap() > (ratio 10 10)) and (Self.Money() > PotionPrice 10)) do
                    
    Self.ShopBuyItem(PotionID10)
                    
    sleep(math.random(300,900))
                
    end
            end
        end
        sleep
    (math.random(600,1400))
    end 
    Last edited by yompa93; 05-05-2016 at 05:17 PM.

Posting Permissions

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