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
kurosh
Beginner


Joined: 01 May 2002
Posts: 18

PostPosted: Thu May 23, 2002 1:14 am   

Walking through an area killing mobs
 
I'm trying to make a bot to walk through an area and count the number of mobs in each room, if it's greater or equal to 5 it berserks. I'm having some trouble doing it any one have a suggestion on an easy way of doing it? Right now I have it set up on a slowwalk and the exits word makes the enemy var become 0 then it counts the mobs in the room and if it's more than 5 it pauses, berserks, then steps and it's not working very well.
Reply with quote
Gandorf
Novice


Joined: 28 Oct 2000
Posts: 38
Location: Sweden

PostPosted: Thu May 23, 2002 10:45 pm   
 
You can do this three different ways.
1. using #SLOW
2. Read a single line from a .txt file
3. using an alias for every move

Don't know wich method is the best but they all should work.
Maybe something like this would work for the 2nd way

#tr {mobname} {#add enemy 1}
#tr {DEAD} {#add enemy -1}
#tr {exits:} {#var enemy 0}

#alias autokill {#if (@enemy>= 5) {berserk} {#add @count 1;#READ 1 @count}}

This is nowhere complete yet but I hope you get the idea. You also need to setup something that wait a amount of time after entering the room so that the trigger gets time to add to the enemy variable. Then you need something that moves you after you have killed all mobs using berserk



Gandorf
-------------------------
Out in the night they laugh about me and my knowledge
Reply with quote
Gandorf
Novice


Joined: 28 Oct 2000
Posts: 38
Location: Sweden

PostPosted: Thu May 23, 2002 10:46 pm   
 
Also I forgot you need to setup the file using the #FILE command

Gandorf
-------------------------
Out in the night they laugh about me and my knowledge
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