PDA

View Full Version : Mana train



krille09
09-01-2012, 09:29 PM
I got this script, but i dont know where to paste it, can you guys help me? im new to xenobot

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 = "SPELL TO MANA TRAIN WITH"
local castAt = Self.MaxMana() - 5


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

Forgee
09-02-2012, 03:57 PM
Read this:
http://forums.xenobot.net/showthread.php?970-Tutorial-How-to-use-the-Scripter

krille09
09-16-2012, 07:14 PM
Read this:
http://forums.xenobot.net/showthread.php?970-Tutorial-How-to-use-the-Scripter

Okay thanks, but can someone look through the script? I tested it and it doesn't work...

Can somebody remake the script or so?

Forgee
09-16-2012, 10:27 PM
Well, you would have to change "SPELL TO MANA TRAIN WITH" to the spell you want to train mana with.

local spell = "SPELL TO MANA TRAIN WITH" -> local spell = "exura"

I noticed that the script passes a nil value (castTo is not declared anywhere) as an argument. I'm not going to remake the script, but you can have mine.
Set up the first two lines to your preference.

local spell = "exura ico" -- Spell words
local mppc = 95 -- Mana %

function trainMana(spell, percent)
local mp = ((Self.MaxMana() * 0.01) * percent)
if Self.Mana() >= mp then
if math.random(1,5) == 3 then
Self.Say(spell)
wait(500, 700)
end
end
end

while true do
trainMana(spell, mppc)
wait(400, 600)
end

kubax36
09-16-2012, 11:13 PM
support > conditions > haste

and put there spell and mana to cast spell
i think its easier way :D

for example if ur full mana is 1235 so write there 1230 mana and spell which u want