PDA

View Full Version : Script Help



wetsand
05-04-2017, 06:45 PM
I'm trying to rewrite ;surge into a script that will run burst of swiftness in the same capacity but I'm running into some issues.

This is essentially a copy and paste from ;surge but with the cool down spell id change to bursts cool down:

loop{
wait_until{ !Spell[9051].active and checkstamina > 40 }
if Spell[9699].active
poptime = Spell[9699].remaining
echo "your muscles are popped, you must wait #{poptime}"
wait_while{ Spell[9699].active }
fput “cman burst”
elsif
fput “cman burst”
end
sleep 1
}

But when I try to run ;cmanburst (what the file name is) I get this:

>;cman
--- Lich: cmanburst active.
--- Lich: error: undefined local variable or method `burst”' for main:Object
cmanburst:16:in `block in _script'
cmanburst:8:in `loop'
--- Lich: cmanburst has exited.

Although it will run if my muscles are popped and I'm in the cool down period but will exit once the cool down resets.

FYI I have no idea what I'm doing but maybe something went wonky when I converted the .txt file to a .lic file and its not showing up when I view the text. I'm using a Mac running El Capitan.

Maerit
05-04-2017, 06:57 PM
I'm trying to rewrite ;surge into a script that will run burst of swiftness in the same capacity but I'm running into some issues.

This is essentially a copy and paste from ;surge but with the cool down spell id change to bursts cool down:

loop{
wait_until{ !Spell[9051].active and checkstamina > 40 }
if Spell[9699].active
poptime = Spell[9699].remaining
echo "your muscles are popped, you must wait #{poptime}"
wait_while{ Spell[9699].active }
fput “cman burst”
elsif
fput “cman burst”
end
sleep 1
}

But when I try to run ;cmanburst (what the file name is) I get this:

>;cman
--- Lich: cmanburst active.
--- Lich: error: undefined local variable or method `burst”' for main:Object
cmanburst:16:in `block in _script'
cmanburst:8:in `loop'
--- Lich: cmanburst has exited.

Although it will run if my muscles are popped and I'm in the cool down period but will exit once the cool down resets.

FYI I have no idea what I'm doing but maybe something went wonky when I converted the .txt file to a .lic file and its not showing up when I view the text. I'm using a Mac running El Capitan.

Try deleting and retyping the quotation marks.

wetsand
05-04-2017, 08:30 PM
Tried that and rewriting everything line by line.

This is the message I get once the cool down resets:


Your muscles feel much less strained than they did a moment ago.
--- Lich: error: undefined local variable or method `burst”' for main:Object
cmanburst:14:in `block in _script'
cmanburst:8:in `loop'
--- Lich: cmanburst has exited.

wetsand
05-04-2017, 10:02 PM
After some headaches I used terminal to copy ;surge and edit the copy and bam it works now.

phalen33
05-04-2017, 10:04 PM
My guess is you typed and retyped the code in Word... Smart quotes screws everything up. IMO Notepad++ is your friend. Try copying and pasting the below code with regular quotes.



loop{
wait_until{ !Spell[9051].active and checkstamina > 40 }
if Spell[9699].active
poptime = Spell[9699].remaining
echo "your muscles are popped, you must wait #{poptime}"
wait_while{ Spell[9699].active }
fput "cman burst"
elsif
fput "cman burst"
end
sleep 1
}

phalen33
05-04-2017, 10:05 PM
Missed the Mac El Captain part..