PDA

View Full Version : problem with mana burn script.



Wendall
07-24-2017, 07:05 AM
So, i have this script here. i would like to add more spells into the "manaburn" function. it works well with most spells, but i have noticed an issue when i try to add in summon creature spell. and i think it is due to a misplaced quotation mark.

\/ functioning code.

local ManaPotion = "strong mana potion"
Module.New("manabuy", function(module)
if(Self.ItemCount(ManaPotion)<50) then
Self.SayToNpc("Hi")
wait(200)
Self.SayToNpc("Trade")
wait(200)
Self.ShopBuyItemsUpTo(ManaPotion, 100)
wait(100)
end
module:Delay(1000)
end)
Module.New("manaburn", function(module)
if(Self.Mana()>1000) then
Self.Cast("utana vid")
Self.Cast("exura vita")
else
Self.UseItemWithMe(ManaPotion)
end
module:Delay(20)
end)

\/ Non functioning code

local ManaPotion = "strong mana potion"
Module.New("manabuy", function(module)
if(Self.ItemCount(ManaPotion)<50) then
Self.SayToNpc("Hi")
wait(200)
Self.SayToNpc("Trade")
wait(200)
Self.ShopBuyItemsUpTo(ManaPotion, 100)
wait(100)
end
module:Delay(1000)
end)
Module.New("manaburn", function(module)
if(Self.Mana()>1000) then
Self.Cast("utevo res "gozzler")
Self.Cast("exevo gran mas flam")
Self.Cast("exevo gran mas vis")
Self.Cast("utana vid")
Self.Cast("exevo vis hur")
Self.Cast("exura vita")
else
Self.UseItemWithMe(ManaPotion)
end
module:Delay(20)
end)

i believe the problem lies in.

Self.Cast("utevo res "gozzler")
due to the extra quotation mark.
any suggestions?
the script launches just fine as long as the summon gozzler line is gone. but wont launch with it.


edit: Fixed my own problem.

Self.Cast("utevo res \"gozzler")