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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
Isyldur
Newbie


Joined: 17 Sep 2002
Posts: 1
Location: USA

PostPosted: Tue Sep 17, 2002 1:58 am   

Autohunter Script
 
Well, I have returned to geekdom. I decided to mud again, then immediately got bored with making 40k a level. Sooooo.....

This will make your character hang out in an area and kill what it finds in the enemy list. then it will look around, move and continue.

Should would with a little adjustment on any mud that supports the scan <direction> command.

#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


You also will want a button to turn Autohunt on and off

-- Isyldur
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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