Log in

View Full Version : this is driving me insane



desche188
08-18-2012, 03:41 PM
i am trying to put this in my script but no matter what i change it wont let
if (Do Spell ==true) then in my script

if you are able to help your a god


23:35 XenoScript Error:
Script: ?necro.lua
Line #: 301
Chunk: C:?Users?jonnda?Documents?XenoBot?Scripts??necro.l ua
Error: ')' expected near 'Spell'
This is an error with user-input and should not be reported as a bug with XenoBot.


function TrainMana(range, spell, drainTo)
if (Do Spell = true) then ------------ problem here ------------------
if (Self.Mana() >= range)) then
if (math.random(1, 5) == 5) then
Self.Say(spell)
sleep(math.random(200,600))
else
return math.random(800, 1700)
end
end
return 300end while (true) do
local spell = "Spell"
local castAt = Self.MaxMana() - 5

sleep(TrainMana(castAt, spell, castTo))
end

Xeno Scripts
08-18-2012, 03:57 PM
doSpell = true


function TrainMana(range, spell, drainTo)
if (doSpell == true) then ------------ problem here ------------------
if (Self.Mana() >= range)) then
if (math.random(1, 5) == 5) then
Self.Say(spell)
wait(200,600)
else
return math.random(800, 1700)
end
end
return 300 end while (true) do
local spell = "Spell"
local castAt = Self.MaxMana() - 5

sleep(TrainMana(castAt, spell, castTo))
end

However the script cotains loads of bugs.

desche188
08-18-2012, 05:22 PM
yea im trying to change it i have so far


elseif (Do Spell == true) then
TrainMana(range, spell, drainTo)()

in middle of a script
and at bottom


function TrainMana(range, spell, drainTo)
if (Self.Mana() >= range) then
if (math.random(1, 5) == 5) then
Self.Say(spell)
sleep(math.random(200,600))
else
return math.random(800, 1700)
end
end

return 300
end


while (true) do
local spell = "exura"
local castAt = Self.MaxMana() - 5


sleep(TrainMana(castAt, spell, castTo))
end