PDA

View Full Version : Alias problem.



Nattor
06-12-2012, 11:39 PM
This alias used to cast 704 at every item in a container. I hadn't used it in a while and I just discovered it no longer works.. Now when I run it it tells me there is no script named spell. (There never was.) I'm not sure what caused this to stop working. Any help would be appreciated.

; spell = Spell[704]; GameObj['pouch'].contents.each { |obj| wait_until { spell.affordable? }; spell.cast(obj) }

Smythe
06-12-2012, 11:59 PM
Now when I run it it tells me there is no script named spell.

Are ya puttin' a semicolon ; in front? Pretty sure ya don' use a semicolon wit' an alias. Should jes' run wit'

>spell

- Smythe

Nattor
06-13-2012, 12:11 AM
that isn't the command that is running it, that is actually part of the alias itself.

;alias list shows it like this

phase => ; spell = Spell[704]; GameObj['pouch'].contents.each { |obj| wait_until { spell.affordable? }; spell.cast(obj) }

Changeling
06-13-2012, 12:23 AM
Do you have a ;e at the beginning of the alias?

e.g.

;alias add phase=;e spell=Spell[704]; GameObj['pouch'].etc.etc.etc.

DaCapn
06-13-2012, 12:38 AM
This is what you want:

phase => ;e spell = Spell[704]; GameObj['pouch'].contents.each { |obj| wait_until { spell.affordable? }; spell.cast(obj) }
I'm guessing you did something like re-type it wrong.

By the way, you can do something like this:

phase => ;e spell = Spell[704]; GameObj["\?"].contents.each { |obj| wait_until { spell.affordable? }; spell.cast(obj) }
And do `phase pouch` or `phase backpack`

With things like this, I just have a library script that defines all of this stuff and my aliases look like this. Much easier to modify and port.

bank => ;e errand("bank")
disk => ;e loot_disk("\?")
enc => ;e echo percentencumbrance
eremove => ;e enhancive("remove")
ewear => ;e enhancive("wear")
grab => ;e loot_stow("\?")
kp => ;chat Check krakiipedia: http://www.krakiipedia.org
libhelp => ;e library_help
sp => ;e cast_bolt("\?")
table => ;e errand("table")
wrack => ;e sign_of_wracking

Nattor
06-13-2012, 12:53 AM
This is what you want:

I'm guessing you did something like re-type it wrong.

By the way, you can do something like this:

And do `phase pouch` or `phase backpack`

With things like this, I just have a library script that defines all of this stuff and my aliases look like this. Much easier to modify and port.

That is exactly what it was. I realized after you said that that I hadn't used that particular one since I switched computers. I looked at that for a while before I asked what was wrong.
Thanks guys.

Nattor
06-13-2012, 12:57 AM
I also knew the thing with the \? I use it alot, but for this one specific thing I had pouch in there, for what it does I don't really want it to go anywhere else.