Quote:
Originally Posted by
yompa93
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
Check if flask and sell all types of flasks
lua code:
if (Self.Flasks() > 0) then
Sell.ShopSellFlasks()
end
Instead of use Self.ItemCount(3031) for the money use Self.Money() (It Counts gp, platinums and CC).