|
shakey Novice
Joined: 07 Jul 2007 Posts: 40
|
Posted: Sat Jul 07, 2007 6:55 am
Alter Aeon bots |
I'm attempting to make a fully operational bot for Alter Aeon. So I'm starting off with something simple. Like a Disarm bot. But it doesn't seem to work correctly. It never resets itself. Below is the coding.
#CLASS {DisarmBot} {enable|setdef}
#TRIGGER {DEAD!} {
get coin corpse
#class DisarmBot 1
}
#TRIGGER {You disarm * weapon flying!} {#class DisarmBot 0}
#TRIGGER {Your stab *!} {disarm}
#TRIGGER {Your slices *!} {disarm}
#TRIGGER {^But your opponent isn't wielding a weapon!} {#class DisarmBot 0}
#TRIGGER {You try to disarm *, but fail.} {disarm}
#BUTTON 1 {Disarm Bot On} {#class DisarmBot 1} {Disarm Bot Off} {#class DisarmBot 0} {} {1} {} {Size} {81} {23} {} {} {} {} {} {} {} "" {} {} {}
#CLASS 0
Any help would be appreciated. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Jul 07, 2007 2:09 pm |
What do you mean, "it never resets itself"?
|
|
|
|
shakey Novice
Joined: 07 Jul 2007 Posts: 40
|
Posted: Sat Jul 07, 2007 3:16 pm |
When the loop is done. It turns the itself off and not on. Like it's suppposed to And now I've encountered an entirely new problem with a different part of the bot.
When I make my variable for my friends list. Only the first friend works.
Anyone who falls after that, can't use it. |
|
|
|
Dharkael Enchanter
Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: Sat Jul 07, 2007 3:20 pm |
Isn't this more of a General Discussion than a Finished MUD Scripts topic?
|
|
_________________ -Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sat Jul 07, 2007 3:23 pm |
It looks like you want the button to toggle itself automatically depending on the state of the bot...
To have a button the changes state without you clicking on it you need to use a variable.
Edit: Ah. then look at the part that I have made red below. I made the change that should fix the turning itself off.
Edit Again: Ok so right you don't want the thing to turn itself off at the end so I undid the change and removed the red.
Also you have your button states backwards...
#CLASS {DisarmBot} {enable|setdef}
#TRIGGER {DEAD!} {
get coin corpse
#class DisarmBot 1
disarm = 1
}
#TRIGGER {You disarm * weapon flying!} {#class DisarmBot 0;disarm = 0}
#TRIGGER {Your stab *!} {disarm}
#TRIGGER {Your slices *!} {disarm}
#TRIGGER {^But your opponent isn't wielding a weapon!} {#class DisarmBot 0;disarm = 0}
#TRIGGER {You try to disarm *, but fail.} {disarm}
#BUTTON 1 {Disarm Bot Off} {#class DisarmBot 1} {Disarm Bot On} {#class DisarmBot 0} {} {disarm} {} {Size} {91} {23} {} {} {} {} {} {} {} "" {} {} {}
#CLASS 0 |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Last edited by Arminas on Sat Jul 07, 2007 3:29 pm; edited 1 time in total |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Jul 07, 2007 3:24 pm |
Without seeing that part of the script, shakey, it's hard to help. You're probably doing something wrong when you try to iterate over the list.
For your not-re-enabling problem, your trouble is that you're deactivating the class that contains the DEAD! trigger. So that trigger is disabled with all the others, and never fires. Move it somewhere else.
EDIT: Ninjad :( But while you're right about the button thing, Arminas, I think you're wrong about the #class 0 change. That won't matter since that trigger is supposed to reactivate the bot (so that it'll disarm the next mob) but can't because it's in the class that gets disabled.
So much ninja :( |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sat Jul 07, 2007 3:25 pm |
Ninja'd TWICE heh, Guess I'm just too slow.
Yeah, could someone please move this to general discussion?
Edit: Make that three times. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
shakey Novice
Joined: 07 Jul 2007 Posts: 40
|
Posted: Sat Jul 07, 2007 6:19 pm |
Thanks, that's cleared up. I'm working on other parts of the bot now. I gave up on the friends list thing, but it went something like this
@var friends guy1|guy2|guy3|guy4
#trigger @friends tells the group, 'bot %1' {%1} |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Jul 07, 2007 9:28 pm |
You'd need to use something like this:
#var friends guy1|guy2|guy3|guy4
#trigger {{@friends} tells the group, 'bot %1'} {#exec %1}
to get that to work, but work it should. The braces round @friends are important. |
|
|
|
|
|