Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion Goto page 1, 2  Next
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Wed Jun 01, 2005 6:56 pm   

Walking a Path without a Map for a combat bot
 
k, just curious, and this prolly goes into the "Stupid Question of the Day" Category.
I have a path called test, but not a map.
Running the path itself by typing .test works, but can i set up a combat bot to stop the path, kill the mob, and resume the path?
The reason i don't have a map is cause i can't figure out how to get it to work.
It SHOULD be easy cause when i move there's no desc in the room:

You walk down the tunnel.
You can see exits to the: north south
You walk down the tunnel.
You can see exits to the: south west
You walk down the tunnel.
You can see exits to the: east west

For some reason it don't pick up the moves.
But either way, that's not the real issue :-)

Was just wondering if it was possible to have me walk a path and pause and kill and resume without a map, and HOW i could do it.

Thanks

edit:
actually there IS some text if a mob walks in or if there are items on the floor:
You walk down the tunnel.
You can see exits to the: north east
1. Triple plate armor
2. Vial marked D-03
3. Triple plate armor
An I.R.S. Supervisor emerges from the shadows!
You walk down the tunnel.
You can see exits to the: east south west
1. Springgun (Shock Tox) Dart weapon
2. Hunting Blaster rifle
3. Triple plate armor
_________________
Reply with quote
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Wed Jun 01, 2005 11:00 pm   
 
It certainly is possible. I accomplished this by setting an alarm to take a step in the path, and suspended the alarm if there were monsters to kill in the room....When all everything is nice and dead, just resum the alarm.
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Thu Jun 02, 2005 12:23 pm   
 
Could you tell me how to set the alarm to take a step in the path?

Assume the path is called test and it's simply nesw

I tried
#step nesw

All i get is a north and then slow walking aborted.
follow that with just #step, and i get north again.

Path is something i am just NOW interested in.
I have speedwalks to areas thru alias' and am just curious about how paths work. so thought i'd try a combat bot for a muck that really don't have a real fighting system.
Just press h to attack the mob in the room. there is only one mob at any point, and one wont wander in unless you drop and pick up something. it's really stupid, so figured it would be a good training guide for me.
_________________
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Thu Jun 02, 2005 12:47 pm   
 
bleh, thougth #step was my answer

#step wewe
#TRIGGER {^You can see exits to the:} {#IF (%walkconfirm) {#STEP}}

w
You walk down the tunnel.
You can see exits to the: east west
A Defel Pirate emerges from the shadows!
Slow walking aborted

*mutter*
_________________
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Sun Jun 05, 2005 3:37 am   
 
innocent bump:)
_________________
Reply with quote
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Sun Jun 05, 2005 6:51 am   
 
Sorry for the delay...Not mudding too much anymore, so...

Code:
#TRIGGER {^You killed *.} {take coins from corpse;bury corpse;#T+ akill;#T+ walk;look;#ALARM +2 {#RESUME a1}}

#CLASS {akill}
#TRIGGER {^An I.R.S. supervisor emerges from the shadows.} {
  #T- walk
  #SUSPEND a1
  kill supervisor
  #T- akill
  }
#CLASS 0
;Just copy the trigger and past it for as many different mobs you want to detect, and change
;the expression it matches. Some day I'm going to look up loops on zmud and make this more efficient....

#CLASS {walk}
#TRIGGER {^You can see exits to the:*} {
  #ALARM "a1" +2 {
    #STEP
    #PAUSE
    }
  } "" {notrig}
#CLASS 0



Oh yeah, just out of curiousity, what mud are you playing? I mean, an IRS supervisor emerges from the shadows...?
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Sun Jun 05, 2005 2:28 pm   
 
like i said, it's a muck, and the only combat area is a Labyrinth.
It's nailschat.org
_________________
Reply with quote
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Mon Jun 06, 2005 5:05 am   
 
Mud, muck, mush, same bloody thing as far as I'm concerned. You get the same types of people in each, even if in slightly different proportions....
_________________
My collections of scripts.
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Tue Jun 07, 2005 7:35 pm   
 
hrmm.
Do i need a certain alias for the path?
right now, if i have the path a1 as wewewe and i type .a1 it spams in the commands, and continues the path with out stopping
Code:
You walk down the tunnel.
You can see exits to the: east west
1. Taryntri teleporter
2. Transparent stone
3. Single plate armor
A Playboy photographer emerges from the shadows!
h
h
You walk down the tunnel. You see a staircase here, leading up.
You can see exits to the: east south west
You walk down the tunnel.
You can see exits to the: east west
1. Taryntri teleporter
2. Transparent stone
3. Single plate armor
You walk down the tunnel. You see a staircase here, leading up.
You can see exits to the: east south west
You walk down the tunnel.
You can see exits to the: east west
1. Taryntri teleporter
2. Transparent stone
3. Single plate armor
4. Transparent stone
You walk down the tunnel. You see a staircase here, leading up.
You can see exits to the: east south west
You walk down the tunnel.
You can see exits to the: east west
1. Taryntri teleporter
2. Transparent stone
3. Single plate armor
4. Transparent stone
You walk down the tunnel. You see a staircase here, leading up.
You can see exits to the: east south west
h
h
h
You are not currently fighting anything.
You are not currently fighting anything.
You are not currently fighting anything.
You are not currently fighting anything.
You are not currently fighting anything.
_________________
Reply with quote
Kiasyn
Apprentice


Joined: 05 Dec 2004
Posts: 196
Location: New Zealand

PostPosted: Tue Jun 07, 2005 10:29 pm   
 
DeathDealer wrote:

Code:

A Playboy photographer emerges from the shadows!


what the heck :P you play some weirrrrrrrd games
_________________
Kiasyn
Owner of Legends of Drazon
Coder on Dark Legacy
Check out Talon, an easy IMC connection.
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Wed Jun 08, 2005 12:01 am   
 
Yer just jealous cause the voices in my head hate you :-P
_________________
Reply with quote
Kiasyn
Apprentice


Joined: 05 Dec 2004
Posts: 196
Location: New Zealand

PostPosted: Wed Jun 08, 2005 3:52 am   
 
i dont wanna be hated...
_________________
Kiasyn
Owner of Legends of Drazon
Coder on Dark Legacy
Check out Talon, an easy IMC connection.
Reply with quote
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Wed Jun 08, 2005 5:50 am   
 
Create an alias that does the following:

Code:

#SLOW yourpathhere
#PAUSE


And yeah, you play some weird mud.....
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Wed Jun 08, 2005 12:52 pm   
 
yeah, remembered the alias from someone elses post.

but now i got another problem. There are 3 certain mobs that I don't want to attack. one causes blindness, the other hits you for a HIGH exp loss, and the other just kicks ass.

#TRIGGER {(%*) emerges from the shadows!} {
#if ((%1="A Playboy Photographer") OR (%1="A D.E.A. Man") OR (%1="A Deadhead")) {t} {
#T- "Combat_Bot|walk"
#SUSPEND a1
h
#T- "Combat_Bot|akill"
}
}

I woulda thought this would work. the {t} is there for a test:

A Playboy photographer emerges from the shadows!
t
A Bret Saberhagen emerges from the shadows!
t

*mutter* that's not whats supposed to happen...supposed to be an h for the saberhagen
Would be nice to put them together as well
#if (%1="{A Playboy Photographer|A D.E.A. Man|A Deadhead")
but don't know if that would work since it's fouled up anyways.

Here's the whole script
Code:
#CLASS {Combat_Bot}
#PATH test {wewewe}
#ALIAS a1 {
  #SLOW test
  #pause
  }
#VAR downvar {4}
#TRIGGER {^You destroy *!} {
  #T+ "Combat_Bot|akill"
  #T+ "Combat_Bot|walk"
  #ALARM +.5 {#RESUME a1}
  }
#TRIGGER {^You blast *} {h}
#TRIGGER {^You miss *} {h}
#TRIGGER {^You walk down the tunnel. You see a staircase here, leading down.$} {
  #add downvar 1
  #if (@downvar = 5) {
    #alarm +5 {a1}
    #var downvar {}
    }
  }
#TRIGGER {^You descend the stairs into the labyrinth. Type ? for a list of combat commands.$} {#var downvar {}}
#CLASS 0
#CLASS {Combat_Bot|akill}
#TRIGGER {(%*) emerges from the shadows!} {
  #if ((%1="A Playboy Photographer") OR (%1="A D.E.A. Man") OR (%1="A Deadhead")) {t} {
    #T- "Combat_Bot|walk"
    #SUSPEND a1
    h
    #T- "Combat_Bot|akill"
    }
  }
#CLASS 0
#CLASS {Combat_Bot|walk}
#TRIGGER {^You walk down the {tunnel|stairs}.} {
  #ALARM "a1" +.5 {
    #STEP
    #PAUSE
    }
  } "" {notrig}
#CLASS 0
Also tried this part but it would attack everything:
Code:
#if ((%1!="A Playboy Photographer") OR (%1!="A D.E.A. Man") OR (%1!="A Deadhead")) {
  #T- "Combat_Bot|walk"
  #SUSPEND a1
  h
  #T- "Combat_Bot|akill"
  }
Sample mud output
Quote:
n
You walk down the tunnel.
You can see exits to the: east south west
1. Leather fedora
2. Leather flight jacket
3. Vial marked X-000
4. Low sneakers
s
You walk down the tunnel.
You can see exits to the: north south
1. Medium Duinuogwuin skin
2. Droid parts
3. E-11 Trooper Rifle
A Stormtrooper quintet emerges from the shadows!
_________________
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Wed Jun 08, 2005 1:55 pm   
 
*grumble*
I went another route with it:
#CLASS {Combat_Bot|akill}
#TRIGGER {{A Bret Saberhagen|A Bothan spy|etc etc etc etc|A Hutt} emerges from the shadows!} {#T- "Combat_Bot|walk";#SUSPEND a1;h;#T- "Combat_Bot|akill"}
#CLASS 0

don't have the 3 mobs i DON'T want in there.
Don't like how it looks, but it works.
If someone can show how my PREVIOUS one can work with out the bloat that would be great.
Thanks

EDIT: Went yet another route:
#VAR mobs {Barabel hunter|Barney|etc etc etc|Ossan Chief} {_nodef} "Combat_Bot|akill"
#TRIGGER {{A|An} (%*) emerges from the shadows!} {#IF (%ismember( %1, @mobs)) {#T- "Combat_Bot|walk";#SUSPEND a1;h;#T- "Combat_Bot|akill"}} "Combat_Bot|akill"

Still wondering about the one way before :-)
_________________
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Wed Jun 08, 2005 5:55 pm   
 
#TR {{@mobs} emerges from the shadows} {kill em!}
_________________
Discord: Shalimarwildcat
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Wed Jun 08, 2005 11:10 pm   
 
thought i needed that in a if %ismember thing.
either way, really looking for the shorter list.
if it's one of about 3 or 4 mobs, it wont attack, and continue the path as if nothing happened.
_________________
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Sun Jun 12, 2005 2:25 am   
 
ran into a snag.
Quote:
s
Slow walking paused
You walk down the tunnel. You see a staircase here, leading down.
You can see exits to the: north
A Barney emerges from the shadows!
h
You blast the Barney!
h
You blast the Barney.
h
You blast the Barney!
h
You blast the Barney.
h
You blast the Barney.
h
You miss the Barney.
h
You blast the Barney!
h
You blast the Barney!
h
You blast the Barney.
h
You blast the Barney!
h
The Barney loves you!
You miss the Barney.w
h
Slow walking paused
You blast the Barney!
h
You can't walk through the stone wall.
You blast the Barney!

Looks like for LONG fights, the #pause/#suspend thing stopped, and it looks like it skipped the down, and went to the next direction.
Code:
#CLASS {Combat_Bot}
#ALIAS a1 {#SLOW test;#pause}
#VAR downvar {1}
#VAR nailsexp {35639607}
#PATH test {wewewe;down}
#TRIGGER {^You descend the stairs into the labyrinth. Type ? for a list of combat commands.} {#var downvar {}}
#TRIGGER "recallgetter" {(%d). Recaller} {#T- "Combat_Bot|walk";#SUSPEND a1;get %1;#ALARM +2 {#T+ "Combat_Bot|walk";#RESUME a1}}
#TRIGGER {^Inventory of DeathDealer:} {#t- recallgetter;#alarm +2 {#t+ recallgetter}}
#TRIGGER {Exp: (%d)} {#show %ansi( high, yellow)EXP Change: %eval( %1-@nailsexp);#var nailsexp %1}
#TRIGGER {^You walk down the tunnel. You see a staircase here, leading down.} {#ALARM "a1" +1 {#STEP;#PAUSE};#add downvar 1;#if (@downvar = 5) {#var downvar {};#alarm +5 {a1}}}
#CLASS 0

#CLASS {Combat_Bot|akill}
#VAR mobs {Barabel hunter|Barney|ETC ETC ETC|IRS auditor|Ossan Chief}
#TRIGGER {^You destroy *!} {#T+ "Combat_Bot|walk";#ALARM +1 {#RESUME a1}}
#TRIGGER {^You blast *} {h}
#TRIGGER {^You miss *} {h}
#TRIGGER {{A|An} (%*) emerges from the shadows!} {#IF (%ismember( %1, @mobs)) {#T- "Combat_Bot|walk";#SUSPEND a1;h}}
#CLASS 0

#CLASS {Combat_Bot|walk}
#TRIGGER {^You walk down the {tunnel|stairs}.} {#ALARM "a1" +.75 {#STEP;#PAUSE}} "" {notrig}
#CLASS 0
_________________


Last edited by DeathDealer on Mon Jun 13, 2005 1:41 pm; edited 1 time in total
Reply with quote
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Mon Jun 13, 2005 6:04 am   
 
Well done so far....If I start mudding alot again, I'll have to make some major revisions to my own bot...Anyways, back to your problem....

At this point my copy of zMud seems to be reluctant to start, so I can't thoroughly test anything, but...
Quote:
You walk down the tunnel. You see a staircase here, leading down.

Quote:
#TRIGGER {^You walk down the tunnel. You see a staircase here, leading down.} {#ALARM "a1" +1 {#STEP;#PAUSE};#add downvar 1;#if (@downvar = 5) {#var downvar {};#alarm +5 {a1}}}


So, if you've gone down 5 times.....That does what? Also, how long were you fighting before the "w" appeared, and what was @downvar at? :)
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Mon Jun 13, 2005 1:40 pm   
 
if i've gone down 5 times then #alarm +5 {a1} = wait 5 seconds before doing the a1 alias again which starts the whole bot. the @downvar was at 5 at the time. the W was the 1st step of the bot
if ya want a TIME frame of how long i was fighting, i can't tell, but it was 11 rounds from what I count in my post.
a round is subjective tho, if u DONT attack the mob just sits there doing nothing. But since i got that trigger to auto-h it's pretty much like..every half a sec?
It don't seem to happen everytime either. I ran into some long fights after and everything was fine. Tho, I can't confirm if the SAME specs were met here. Meaning, long fight on the last step of the bot.
_________________
Reply with quote
Private
Adept


Joined: 10 Jan 2002
Posts: 264
Location: USA

PostPosted: Mon Jun 13, 2005 7:34 pm   
 
are all the last words of the mob names unique, multiple words, and keywrods (supervisor|man|spy|saberhagen|hutt|photographer|etc etc)?

if so:

#VAR dont_kill {A Bret Saberhagen|A Bothan spy|etc etc etc etc|A Hutt}

#TRIGGER {(%*) (%w) emerges from the shadows!$} {#IF %ismember(%concat(%1," ",%2),@dont_kill) {#SHOW %concat(%1," ",%2) is a mean mob, skipping} {#SHOW kill %2}}


#SHOW A Bret Saberhagen emerges from the shadows!
A Bret Saberhagen is a mean mob, skipping

#SHOW A Stormtrooper quintet emerges from the shadows!
kill quintet

just an easier way to auto_target if so.
Reply with quote
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Mon Jun 13, 2005 10:57 pm   
 
Well, apparently you're restarting the bot in the middle of a fight....Quick and dirty solution is to give that alarm I put in bold a name and suspend it (put the suspend in the hit trigger?) and then resume it on death....Though you'll probably think of some better way to do it.
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Tue Jun 14, 2005 11:39 am   
 
Well, it happened again, and this time it was at the same situation. The room with a down and mob comes in.
I'm thinking that I'll just #T- akill when the down room comes up, and #T+ akill when i finish going down.
(Anyone but me thinks this is starting to sound like a bad Porn Movie?)

Private:
This is what I have now with mobs i attack
#TRIGGER {{A|An} (%*) emerges from the shadows!} {#IF (%ismember( %1, @mobs)) {#T- "Combat_Bot|walk";#SUSPEND a1;h}} "Combat_Bot|akill"


This is what I had before with the MUCH shorter list (5 mobs) of stuff NOT to kill
#TRIGGER {{A|An} (%*) emerges from the shadows!} {#IF (%ismember( %1, @ickymobs)) {#echo No kill} {#T- "Combat_Bot|walk";#SUSPEND a1;h}} "Combat_Bot|akill"

For some reason it never worked.It would still attack mobs in the ickmobs variable. Am i missing something? cause it LOOKS like it should work, but ya know me, things never come out right the 5th time around ;-)
_________________
Reply with quote
asm
Wanderer


Joined: 19 Jul 2004
Posts: 68

PostPosted: Thu Jun 16, 2005 6:56 am   
 
Put the second trigger first, and.....does #GAG prevent the other triggers from detecting it?
Reply with quote
DeathDealer
Adept


Joined: 20 Jul 2004
Posts: 268

PostPosted: Thu Jun 16, 2005 12:19 pm   
 
?...2nd trigger 1st?
I only have ONE trigger.
the 1st is my current one, the 2nd was what i HAD before.
_________________
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net