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. #4

    Join Date
    Nov 2014
    Location
    Sundsvall, Sweden
    Posts
    174
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Stand next to the npc with trade open and run this script, but change the spells first

    I do not take credit for this script since i didnt make it, but i dont know who made it either so credits goes to @somerandomdude
    Code:
    local ratio = 2.7 	-- 100 mana potions = 270.00oz
    local PotionID = Item.GetID("mana potion")
    local PotionPrice = 50
    local PotionName = "mana potion"
    
    
    while(true) do
    
    	if (Self.ItemCount(PotionName) > 0) then --using all of the mana potions
    		while (Self.ItemCount(PotionName) > 0) do
    			if Self.CanCastSpell("exevo gran mas flam") then
    			Self.Cast("exevo gran mas flam")
    			elseif (not Self.CanCastSpell("exevo gran mas flam")) then
    			if Self.CanCastSpell("utana vid") then
    			Self.Cast("utana vid")
    			elseif (not Self.CanCastSpell("utana vid")) then
    			if Self.CanCastSpell("exura vita") then
    			Self.Cast("exura vita")
    			if (Self.Mana() < 2000) then
    				Self.UseItemWithMe(PotionID)
    				sleep(math.random(200,500))
    				end
    			end
    		end
    	end
    end
    	else -- we must buy more potions
    		--firstly, sell flasks..
    		if (Self.Flasks() > 0) then
    			while (Self.Flasks() > 0) do
    				if (Self.ItemCount(283) > 0) then
    					Self.ShopSellAllItems(283)
    				end
    				if (Self.ItemCount(284) > 0) then
    					Self.ShopSellAllItems(284)
    				end
    				if (Self.ItemCount(285) > 0) then
    					Self.ShopSellAllItems(285)
    				end
    			end		
    		end
    		
    		-- lets buy potions
    		if (Self.Money() > 0) then -- just to reduce amount of gold coins (wasting cap)
    			while (Self.ItemCount(3031) > PotionPrice) do
    				Self.ShopBuyItem(PotionID, 1)
    				sleep(math.random(300,900))
    			end
    			
    			while ((Self.Cap() > (ratio * 100 + 10)) and (Self.Money() > PotionPrice * 100)) do
    				Self.ShopBuyItem(PotionID, 100)
    				sleep(math.random(300,900))
    			end
    			
    			while ((Self.Cap() > (ratio * 10 + 10)) and (Self.Money() > PotionPrice * 10)) do
    				Self.ShopBuyItem(PotionID, 10)
    				sleep(math.random(300,900))
    			end
    		end
    	end
    
        sleep(math.random(600,1400))
    end
    Last edited by yompa93; 05-02-2016 at 09:10 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
  •