|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Mon Oct 15, 2007 8:10 pm
alias and %3 issue.... |
Is there a reason why an alias wouldn't be able to recognize a %3 input? IE.... For some reason the command set stance mant doesn't do the command per the alias.... But set att keii DOES work... For the life of me, I can't seem to get it to work. Amongst a couple other aliases that a third command is needed to function... =[
Code: |
#alias {set} {#IF (%1 = "att") {
#IF (%2 = "stun") {
#VARIABLE attack {stun}
#VARIABLE attack_stance 0
emote sets attack to STUN!
}
#IF (%2 = "keii") {
#VARIABLE attack keii
#VARIABLE attack_stance 0
emote sets attack to KEIIKEN!
}
#IF (%2 = "vic") {
#VARIABLE attack {vici fis}
#VARIABLE attack_stance 0
emote sets attack to VICIOUS FIST!
}
#IF (%2 = "kill") {
#VARIABLE attack k
#VARIABLE attack_stance 0
emote sets attack to normal attack...
}
#IF (%2 = "temp") {
#VARIABLE attack {temp tou}
#VARIABLE attack_stance 0
emote sets attack to TEMPLE TOUCH!
}
#IF (%2 = "stance") {
#IF (%3 = "ann") {
#VARIABLE usestance {Annulment Stance}
#VARIABLE stance_combat 0
show stance
}
#IF (%3 = "hao") {
#VARIABLE usestance {Hao'tien Stance}
#VARIABLE stance_combat 1
#VARIABLE attack_stance 1
show stance
}
#IF (%3 = "mant") {
#VARIABLE usestance {Mantis Stance}
#VARIABLE stance_combat 1
#VARIABLE attack_stance 1
show stance
}
#IF (%3 = "drag") {
#VARIABLE usestance {Dragon Stance}
#VARIABLE stance_combat 1
#VARIABLE attack_stance 1
show stance
}
#VARIABLE attack k
emote sets attack to @usestance!
#WINDOW misc ~>~<~>~> stance set to @usestance ~<~<~>~<
}
}
#IF (%1 = "line") {#LOOP 1,%filesize( 1) {#IF (%left( %read( 1, %i), 2) = "//") {#IF (%right( %read( 1, %i), 2) = %2) {#VARIABLE line %i}}}}
#IF (%1 = "pool") {
#IF (%2 = "man") {
#VARIABLE man_pool %3
#WINDOW misc ~>~<~>~> mana set to %3 ~<~<~>~<
}
#IF (%2 = "spi") {
#VARIABLE spi_pool %3
#WINDOW misc ~>~<~>~> spi set to %3 ~<~<~>~<
}
#IF (%2 = "end") {
#VARIABLE end_pool %3
#WINDOW misc ~>~<~>~> end set to %3 ~<~<~>~<
}
#IF (%2 = "hps") {
#VARIABLE hps_pool %3
#WINDOW misc ~>~<~>~> hps set to %3 ~<~<~>~<
}
}
} |
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Oct 15, 2007 9:52 pm |
According to the way you have your alias written the correct syntax would be "set att stance mant". It looks like you need to adjust the script if you want to do it differently.
Also using an #IF..else chain can gain some speed as long as you put the more frequently used command at the top of the chain. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Oct 15, 2007 9:58 pm |
You haven't included any code to handle "stance" when used in the %1 slot. That's why set stance mant doesn't work. It's checking %1 to see if it's "att" and concluding it's not, then it checks to see if %1 = "line" and finds it's not that either, and finally it checks to see if %1 = "pool" but finds that's not true either. Because there's no code after this #IF check, the alias doesn't do anything.
Another issue I notice is that despite what %2 is, the alias is always setting @attack to "k". This means you're losing the "keii" assignment you make when evaluating %2 in the set att keii example. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Mon Oct 15, 2007 10:03 pm |
hodildidy-dog! I swear... I love play'n with zmud, and mudding, but... Thank heaven that MY programming skills (or lack there of) don't dictate someone's actual LIFE! Oye! I swear, one lil period... Hahahahah
Thanks sOOOOO much again Vijilante! Works like a champ now... Hahahahah
Code: |
#alias {set} {#IF (%1 = "att") {
#IF (%2 = "stun") {
#VARIABLE attack {stun}
#VARIABLE attack_stance 0
emote sets attack to STUN!
}
#IF (%2 = "keii") {
#VARIABLE attack keii
#VARIABLE attack_stance 0
emote sets attack to KEIIKEN!
}
#IF (%2 = "vic") {
#VARIABLE attack {vici fis}
#VARIABLE attack_stance 0
emote sets attack to VICIOUS FIST!
}
#IF (%2 = "kill") {
#VARIABLE attack k
#VARIABLE attack_stance 0
emote sets attack to normal attack...
}
#IF (%2 = "temp") {
#VARIABLE attack {temp tou}
#VARIABLE attack_stance 0
emote sets attack to TEMPLE TOUCH!
}
}
#IF (%1 = "stance") {
#IF (%2 = "ann") {
#VARIABLE usestance {Annulment Stance}
#VARIABLE stance_combat 0
}
#IF (%2 = "hao") {
#VARIABLE usestance {Hao'tien Stance}
#VARIABLE stance_combat 1
#VARIABLE attack_stance 1
}
#IF (%2 = "mant") {
#VARIABLE usestance {Mantis Stance}
#VARIABLE stance_combat 1
#VARIABLE attack_stance 1
}
#IF (%2 = "drag") {
#VARIABLE usestance {Dragon Stance}
#VARIABLE stance_combat 1
#VARIABLE attack_stance 1
}
#VARIABLE attack k
emote sets stance to @usestance!
#WINDOW misc ~>~<~>~> stance set to @usestance ~<~<~>~<
}
#IF (%1 = "line") {#LOOP 1,%filesize( 1) {#IF (%left( %read( 1, %i), 2) = "//") {#IF (%right( %read( 1, %i), 2) = %2) {#VARIABLE line %i}}}}
#IF (%1 = "pool") {
#IF (%2 = "man") {
#VARIABLE man_pool %3
#WINDOW misc ~>~<~>~> mana set to %3 ~<~<~>~<
}
#IF (%2 = "spi") {
#VARIABLE spi_pool %3
#WINDOW misc ~>~<~>~> spi set to %3 ~<~<~>~<
}
#IF (%2 = "end") {
#VARIABLE end_pool %3
#WINDOW misc ~>~<~>~> end set to %3 ~<~<~>~<
}
#IF (%2 = "hps") {
#VARIABLE hps_pool %3
#WINDOW misc ~>~<~>~> hps set to %3 ~<~<~>~<
}
}
} |
|
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Mon Oct 15, 2007 10:11 pm |
Hrmmm... now how about this one?? =[ (On a side note... It isn't a COMPLETE botter script, it just automatically loads the next script in the series.) For some reason, I can't get any of it to work. And its all enabled, so is the class that it resides in....
Code: |
#alias {botter} {#IF (%1 = "on") {
#VARIABLE bottrloop 10
#WINDOW misc %ansi( grey)~#~#~#~#~# BOTTER ENABLED ~#~#~#~#~#
}
#IF (%1 = "off") {
#VARIABLE bottrloop -100
#WINDOW misc %ansi( grey)~#~#~#~#~# BOTTER DISABLED ~#~#~#~#~#
}
#IF (%1 = "group") {
#IF (%2 = "on") {
#VARIABLE bottrgroup 1
gt ---[ BOTTER: Welcome to BOTTER ]---
#WINDOW misc %ansi( grey)~#~#~#~#~# BOTTER GROUP ENABLED ~#~#~#~#~#
}
#IF (%2 = "off") {
#VARIABLE bottrgroup 0
#WINDOW misc %ansi( grey)~#~#~#~#~# BOTTER GROUP DISABLED ~#~#~#~#~#
}
}
} |
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Oct 15, 2007 10:56 pm |
You shouldn't have braces around the name of the alias. It'll never be more than one word, so you don't need them.
What about this alias isn't working?
And it doesn't really matter to most of us if you use bots or not - some MUDs even allow them. If yours doesn't, that's your problem. |
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Mon Oct 15, 2007 11:08 pm |
Well... the {}'s around the alias, I just put in there to read easier. The actual alias is copied straight from the alias. I figured it would be best to see how it looks to me. *shrug* And the whole alias isn't working. It doesn't recognize any part of it. =[ Almost like there is none... But there is. I'm going nutty I think. LoL!
As far as the botting... *shrug* I've seen a couple ppl goin off on 'botters'. You can script all day long @ nodeka but you can't script the botcheck, and you MUST answer the botcheck. Short of that, your imagination is the limit. =] |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Oct 15, 2007 11:33 pm |
Now here's something interesting. It fails if you use botter on but works fine if you do botter "on". I reduced the alias down to this:
#alias botter {#if (%1 = "on") {#say lol}}
and it still doesn't work! It should be, so I have no idea what's happening. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Oct 16, 2007 1:04 am |
On, off, true, and false are keywords in expressions. Picking another word would be best, alternately you could use #if ("%1" = "on")
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Wed Oct 17, 2007 2:43 pm |
Vijilante wrote: |
On, off, true, and false are keywords in expressions. Picking another word would be best, alternately you could use #if ("%1" = "on") |
You so rock man... Works like a charm now! =] |
|
|
|
|
|