|
Jalonis Beginner
Joined: 19 Oct 2000 Posts: 12 Location: USA
|
Posted: Sun Dec 09, 2001 12:24 am
Help with an alias? |
I am trying to set up a spell check inside
an alias that will allow me to decide what
totem I am using, and if I don't have the
correct one equipped, it will remove the
current totem, and equip the correct one.
What I have tried:
#IF %ismember( ivory, @cur_totem) {
cast 'spirit armor' %1
}{
remove totem
hold ivory
cast 'spirit armor' %1
#var cur_totem = ivory
}
As well as:
#IF (@cur_totem = ivory) {
cast 'spirit armor' %1
}{
remove totem
hold ivory
cast 'spirit armor' %1
#var cur_totem = ivory
}
I even tried it with "'s around the ivory
in case it needed that, and so far, it does
not do the check right, I finally got it to
at least show up on the screen, but, the
check itself isn't sorting the check, it's
dropping the whole alias with {}'s up onto
the screen, in a type of #SAY message instead
of sending it as a command.
Can anyone give me an idea on how I can do
this? I have a variable called cur_totem
and I set the variable to ivory to start it,
which is how it did the show, but I don't
see enough information in the help for if,
expression or any of the other links that
help me figure this out.
Thanks! |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Sun Dec 09, 2001 2:14 am |
the problem is probably this line:
#var cur_totem = ivory
it should either be:
cur_totem = ivory
or
#var cur_totem ivory
otherwise the value of @cur_totem will be "="!
|
|
|
|
Jalonis Beginner
Joined: 19 Oct 2000 Posts: 12 Location: USA
|
Posted: Sun Dec 09, 2001 2:29 am |
No, I tried that as well, but thanks for the
suggestion =)
This is what I get when I type sa %1:
{cast 'spirit armor' me}{remove totem;hold ivory;cast 'spirit armor' me;#var cur_totem = ivory}
That is the exact syntax I get on the screen
in yellow, but, nothing actually happens, and
no what message or anything.
Once again, thanks! |
|
|
|
Acaila Apprentice
Joined: 30 Aug 2001 Posts: 187 Location: Netherlands
|
Posted: Sun Dec 09, 2001 10:04 am |
Your code messes up because you need a space between "}{" like "} {".
This should show up on the syntax checker as an error too bwt.
And Emit is correct about the variable thing. It's either Cur_Totem=Ivory or #VAR Cur_Totem Ivory.
And #IF %ismember(ivory, @cur_totem) {
Should be #IF (%ismember(ivory, @cur_totem)) {
Yours COULD be correct, I'm not sure, but I know mine is correct for certain.
Acaila |
|
|
|
Jalonis Beginner
Joined: 19 Oct 2000 Posts: 12 Location: USA
|
Posted: Sun Dec 09, 2001 12:00 pm |
Thanks, that appears to have resolved the
problem for sure, appreciate it! |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|