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
blackwolffe
Newbie


Joined: 14 Oct 2002
Posts: 9
Location: Memphis Tennessee

PostPosted: Mon Oct 14, 2002 2:47 pm   

Help with Hunt trigger please?
 
I found Isyldyrs autohunt, and it is fantastic, however, my SCAN provides this information:

[North]
A small rock
An alchemist
A mud monster
[East]
A tiny elemental
A small blob of acid
A rainbow warrior
[South]
The elemental guardian
A flame
A small rock
A rainbow warrior
A rainbow warrior
[West]
Nobody here.
[Up]
No exit.
[Down]
No exit.

Is there any way to adapt to that? (I cant figure out how to adapt is, since it doesnt list direction with the mob name)

However, if I type 'look north', I CAN get a list of the mobs in that room, if that helps at all.

Thanks in advance. :-)


On a hot summer night, would you offer your throat to the wolffe with the red, red, roses?
Reply with quote
blackwolffe
Newbie


Joined: 14 Oct 2002
Posts: 9
Location: Memphis Tennessee

PostPosted: Wed Oct 30, 2002 11:21 pm   
 
Wow.. *listens to the crickets* Not even the senior members want to touch this one huh? Hurm.


On a hot summer night, would you offer your throat to the wolffe with the red, red, roses?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Oct 31, 2002 12:30 am   
 
I think I have something to help you capture the info, but I need know exactly what your scan output looks from issuance of the scan command to whatever regular line appears/doesn't appear after the last scan output line (a prompt, some sort of tag for the SCAN output, a blank line, etc).

Also, if there are ansi colors involved (maybe you don't have colorized text from the MUD, but I recognize the area you're in and most muds with that seem to be colorized), it might be easier if the colors of the directional tags were known.

li'l shmoe of Dragon's Gate MUD
Reply with quote
blackwolffe
Newbie


Joined: 14 Oct 2002
Posts: 9
Location: Memphis Tennessee

PostPosted: Thu Oct 31, 2002 12:33 am   
 
Ok, here is the text from my other post, showing the scan output:

[North]
No exit.
[East]
No exit.
[South]
BoobooKitty's servant
BoobooKitty's servant
BoobooKitty's servant
[West]
No exit.
[Up]
No exit.
[Down]
No exit.

Thanks in advance for your help.

On a hot summer night, would you offer your throat to the wolffe with the red, red, roses?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Oct 31, 2002 5:25 am   
 
Since I don't know what Isyldur's autohunt looks like, I don't have anything to adapt.
However, based on the SCAN you provided it should be quite easy to get the direction.
#TR {~[(%w)~]} {#VAR scandir %1} {autohunt}
There you go. @scandir will now contain the direction to the mob. I even put the trigger into a class, for ease of control.

LightBulb
Senior Member
Reply with quote
blackwolffe
Newbie


Joined: 14 Oct 2002
Posts: 9
Location: Memphis Tennessee

PostPosted: Thu Oct 31, 2002 6:32 am   
 
Isyldurs AutoHunt is as follows:

#CLASS {Autohunt}
#ALIAS Hunt {
#var mobEnemy {} {_nodef} {Autohunt}
#var mobDirection {} {_nodef} {Autohunt}
#var numRooms {} {_nodef} {Autohunt}
look
#wait 6000
#t+ MatchEnemy
#loop %numitems( @exits) {scan <%item(@exits,<%i>)>}
#wait 6000
#t- MatchEnemy
#if (@mobEnemy) {
#loop 1,@numRooms {@mobDirection}
kill @mobEnemy
} {
RandomMove
hunt
}
}
#ALIAS RandomMove {
#exec %item( @exits, %random( 0, %numitems( @exits)))
#var exits {} {_nodef} {Autohunt}
}
#VAR mobEnemyList {monster|kobold|human|cat|wolf|snake}
#VAR mobEnemy {wolf}
#VAR mobDirection {northwest}
#VAR numRooms {1}
#VAR exits {north|east|south|west|up|down|northwest|northeast|southwest|southeast}
#TRIGGER {*{@mobEnemyList}* is DEAD!!} {hunt}
#TRIGGER {^ ~[Exits:%s(*)%s~]} {#var exits {%replace( %1, ' ', |)} {_nodef} {Autohunt}}
#TRIGGER {They aren't here.} {hunt}
#CLASS 0
#CLASS {Autohunt|MatchEnemy}
#TRIGGER {*({@mobEnemyList})*, nearby to the (%w).} {
#var mobEnemy {%1} {_nodef} {Autohunt}
#var mobDirection {%2} {_nodef} {Autohunt}
#var numRooms {1} {_nodef} {Autohunt}
#t- MatchEnemy
}
#TRIGGER {*({@mobEnemyList})*, not far (%w).} {
#var mobEnemy {%1} {_nodef} {Autohunt}
#var mobDirection {%2} {_nodef} {Autohunt}
#var numRooms {2} {_nodef} {Autohunt}
#t- MatchEnemy
}
#CLASS 0

Please, I appreciate your answer, but dont know how to add #TR {~[(%w)~]} {#VAR scandir %1} {autohunt} to it....

Sorry about the double post, just someone responded to the two-week old one today.


On a hot summer night, would you offer your throat to the wolffe with the red, red, roses?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Oct 31, 2002 7:52 am   
 
Put it right before the line that says
#CLASS {Autohunt}

Then change this trigger (changes in red)
#TRIGGER {^({@mobEnemyList})*, nearby to the (%w).} {
#var mobEnemy {%1} {_nodef} {Autohunt}
#var mobDirection {@scandir} {_nodef} {Autohunt}
#var numRooms {1} {_nodef} {Autohunt}
#t- MatchEnemy
}

The script will probably need several other changes as well, since the scan command is quite a bit different.

LightBulb
Senior Member
Reply with quote
blackwolffe
Newbie


Joined: 14 Oct 2002
Posts: 9
Location: Memphis Tennessee

PostPosted: Thu Oct 31, 2002 2:25 pm   
 
Well, *wry grin* Thanks anyway, then. I am completely lost as to how to
adjust it. Maybe someone will see it as a challenge or something. Untill
then, thank you for your help.


On a hot summer night, would you offer your throat to the wolffe with the red, red, roses?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Oct 31, 2002 3:14 pm   
 
Probably easier to throw the whole thing out and do your own. Here's the basic plan:
1. Scan
2. Notice a direction which has a target you'd like to kill
3. Move in that direction
4. Kill that target
5. Repeat
6. If there are no targets, pick a direction at random and move

You only need one direction which contains targets, since you can't be in two places at the same time. Therefore, you can either take the first direction containing targets or the last one.

LightBulb
Senior Member
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
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