|
asm |
Posted: Tue Jul 20, 2004 6:37 pm
A simple combat bot. |
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Jun 30, 2007 12:48 pm |
By default, hjkl in paths represent nw, ne, sw and se respectively. So 2h in the path will send nw twice the same way 2n will send north twice. Your path in the other thread becomes 2s2l.
The only way that trigger will be set off twice is if the mud sends two lines starting "You killed". You could try putting that trigger in its own class and then using #t- and #t+ to disable it when it's not needed. Have the akill trigger enable it, and then it disable itself when it fires. |
|
|
|
Eul Wanderer
Joined: 30 Jun 2007 Posts: 53
|
Posted: Sat Jun 30, 2007 12:59 pm |
Yes, you are totally correct. I had the triggers in there twice.
Well it is working now, and I have had fun tweeking it to work for my MUD and making it all work. NowI guess I need to read a load of the tutorials and learn how to make it better!
Thanks for all your help!
Eul. |
|
|
|
Abijah Newbie
Joined: 27 Jul 2007 Posts: 2
|
Posted: Fri Jul 27, 2007 10:51 pm |
I need help with creating a hunting bot. If somebody is very experienced with this type of stuff, please send me a PM, thank you greatly.
|
|
|
|
asm Wanderer
Joined: 19 Jul 2004 Posts: 68
|
Posted: Sat Aug 11, 2007 4:43 am |
One of these days I need to post an updated version...Really much more code in this than there needs to be. Heh.
|
|
|
|
SRPrice Beginner
Joined: 19 Jul 2007 Posts: 18
|
Posted: Sat Dec 01, 2007 12:38 pm |
is there a way on the paths, to have it execute commands other than the path itself? such as opening a door?
#SL .newns;open e;ene
#pause
is there a way to accomplish this, or would one have to set up a seperate trigger to fire on roomname? |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sat Dec 01, 2007 4:34 pm |
Yes. exactly what you have there should work. If you want it to open a specific door or direction that is not known when the path walk begins then you'd need a separate trigger.
|
|
_________________ Asati di tempari! |
|
|
|
SRPrice Beginner
Joined: 19 Jul 2007 Posts: 18
|
Posted: Sat Dec 01, 2007 10:23 pm |
I tried using the following slow path.
#SL .n;open w;wdsen
#pause
This is what happened when I executed.
n
open w
wdsen
Zmud tossed it out like it was just a normal speedwalk alias, and not a slow walk.
That same path worked perfectly w/o the "open w" in it. Just had to open the door ahead of time. |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Sat Dec 01, 2007 10:36 pm |
Shouldn't that be a #SL .n{open west}wdsen?
I don't use #SLOW so maybe I'm wrong :)
Or would it be #SL .n;open west;#SL .wdsen? |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Sun Dec 02, 2007 12:49 am |
SRPrice wrote: |
#SL .n;open w;wdsen
#pause
|
Shouldn't there be "." before "wdsen"?
Prog |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Dec 02, 2007 7:05 am |
Prognoi is absolutely right. Keep in mind that you can't test this in a blank session because English Directions package isn't load in the untitled session.
|
|
_________________ Asati di tempari! |
|
|
|
Seeker Newbie
Joined: 19 Feb 2008 Posts: 3
|
Posted: Wed Feb 20, 2008 9:30 pm |
delete
|
|
|
|
The1nk Newbie
Joined: 09 Jun 2008 Posts: 5 Location: Blenheim, NJ
|
Posted: Wed Jun 11, 2008 10:56 am |
Amazing. I love this script. It's beautiful! I've been using a slightly modified version for a few days now, but I can't figure out how to make it loop. :(
If anyone could help me out with some idea on how to make it loop... that'd be great. :-P |
|
|
|
asm Wanderer
Joined: 19 Jul 2004 Posts: 68
|
Posted: Sun Jul 27, 2008 1:26 am |
Wow, I'm surprised this is still going. The1nk, you can make it loop...Just set a trigger to fire the starting alias when it sees a line from the starting room. Ideally, it should be unique, although if you play a mud that clones a lot of its rooms...
Alternatively, figure out a way to track when it reaches the end of its path, but I'm not sure how you'd do that I'm afraid. Maybe someone else can offer some advice? |
|
|
|
Balder Newbie
Joined: 29 Nov 2008 Posts: 3
|
Posted: Tue Dec 02, 2008 7:40 am |
Bumping this thread just to say thanks, it's a really nice script!
Works fine for me, right away, not much editing.
However, I must ask...does the "a1" refer to the akill class or? I don't see something actually called "a1"? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Dec 02, 2008 9:47 am |
Code: |
#ALARM "a1" +2 {
#STEP
#PAUSE
} |
This is an alarm named "a1". |
|
|
|
twoudwijk Newbie
Joined: 30 Nov 2008 Posts: 3
|
Posted: Tue Dec 02, 2008 12:44 pm |
hey guys!!
Congrats on the bot! It's exactly what I have been looking for...
What amendments would be needed if lets say the attack was a spell followed by a backstab?
The problem here is that there could be any number of mobs in the room...
I would need to sleep each one first... If the spells fail, it would need to recast.. (e.g 'sleep' 2.guard or 3.guard)
And then follow that up once they're asleep with a backstab...
Anyone know? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Dec 02, 2008 3:18 pm |
This is a very simple bot and can't really do what you're after. Bear in mind that writing a bot is one of the most difficult things you can do because it involves so many interlocking parts, but also because every MUD is different and even subtle differences matter when writing this kind of script, so we can't do it for you or even offer all that much help.
In short, though, you want to build a list of mobs in the room (by adding items to a stringlist) and then running through each of them by casting, and triggering off the fail message to recast or the success message to move onto the next item. When the list is exhausted, you start the killing. |
|
|
|
demingm13 Newbie
Joined: 02 Jul 2009 Posts: 2
|
Posted: Fri Jul 03, 2009 2:55 pm |
Sorry to bring this thread way back from the dead... I've been using the script with minor mods to fit my mud output and it works great. However, I recently tried to use it with an area that requires opening doors and such, and it doesn't seem to work properly. I formatted my path just like was mentioned above (i.e. .s;unlock west;open west;.w etc) but it seems to get hung after it performs the first non-movement command in the path. It will unlock the door, then attempt to do the look, kill, etc, and then it just stops because the mob isn't there. For some reason its not doing the next step in the path at this point and I'm not sure why. Any thoughts?
|
|
|
|
gokihar Newbie
Joined: 09 Oct 2009 Posts: 1
|
Posted: Fri Oct 09, 2009 1:59 pm |
Hello , I modify a little that script to use it for searching herbs but I get small problem .
Code: |
#CLASS {herbwalk}
#TRIGGER {You find *!} {search here for herbs}
#CLASS 0
#CLASS {herbwalk|hwalk}
#TRIGGER {^There are * obvious exits:*} {
#ALARM "a1" +2 {
#STEP
#PAUSE
search here for herbs
#class hwalk 0
}
} "" {notrig}
#CLASS 0
#CLASS {herbwalk|autogetherb}
#TRIGGER {^Your search reveals nothing special.} {
#class hwalk 1
#ALARM +2 {#RESUME a1}
look
#class autogetherb 0
}
#TRIGGER {^You search everywhere, but find no herbs.} {
#class hwalk 1
#ALARM +2 {#RESUME a1}
look
#class autogetherb 0
}
#CLASS 0
#CLASS {herbpath}
#ALIAS examplepath {
#class herbwalk 1
#class hwalk 1
#sl .6e
#pause
}
#CLASS 0 |
Basicly it work fine but becouse the command for searching herbs is not a mob but a 'LOOK' it works untill end of path and then do infinite loop.
Searches for herbs , get info that there are none, trig does look buy path is ended so the search starts again and so on ...
I tryed to add at the end of path #class herbwalk 0 but it's executed at the begining ??
I check it with adding :
#sl .6e;endofpath where endofpath is an alias : #alias {endofpath} {smile stupid} {harbpath}
Any ideas how to get it workin' ? |
|
|
|
rea Newbie
Joined: 20 Aug 2010 Posts: 4
|
Posted: Fri Aug 20, 2010 11:52 am |
Im novice in this trigger business and these triggers looks very intresting but can't really find out how to write it, am i ment to do like this
on lets say the walking trigger
Pattern: #TRIGGER {^There are * obvious exits:*}
command:
#TRIGGER {^There are * obvious exits:*} {
#ALARM "a1" +2 {
#STEP
#PAUSE
}
} "" {notrig}
and at last fill in class as walk ?
Rea. |
|
|
|
Einder Novice
Joined: 03 Jan 2008 Posts: 48
|
Posted: Mon Oct 10, 2011 7:42 pm |
I know this thread is old, but I personally have been unsuccessful in getting it to work. I'm sure it's something I'm not doing right, so far though, when walking, the script just builds a list of rooms and walks them all without pause, or walks them and deletes a room in the path because of the pause, or when I try to ok the walk to the next room using #STEP, it's not recognised and tries to walk two rooms instead of just the next one. I've tried lots of different things, but I don't know that it's workable for all MUD's and in most, such a thing is against the rules anyway :P. I was attempting to mod the script for a different purpose, however I've been unable to do so.
|
|
|
|
Alsith Newbie
Joined: 12 Jul 2002 Posts: 7 Location: Australia
|
Posted: Mon Aug 15, 2016 4:46 am |
Edited to remove text because I'm an idiot. Also I can't figure out how to delete the entire post :)
|
|
|
|
nope492 Newbie
Joined: 08 Aug 2017 Posts: 4
|
Posted: Wed Aug 09, 2017 12:02 am Still active |
Hi, i was wondering if this thread is still active?
If so, im a complete beginer and could use some help getting this set up. !! a PM would be great |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Wed Aug 09, 2017 1:43 am |
This thread is likely not active, however, if you are running into are specific issues with implementation, I may be able to help.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
nope492 Newbie
Joined: 08 Aug 2017 Posts: 4
|
Posted: Wed Aug 09, 2017 10:47 pm everything |
shalimar wrote: |
This thread is likely not active, however, if you are running into are specific issues with implementation, I may be able to help. |
i literally dont know how to even set it up and use it? |
|
|
|
|
|