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


Joined: 06 Feb 2004
Posts: 17
Location: USA

PostPosted: Sun Jun 20, 2004 2:14 am   

How can I do this
 
I am making a script for myself and I am needing it to do something that I am not sure how to do

The part I am working on needs to do the following:

!) When it enters a room if there are mobs to kill in that room(I have tirgs set up to kill the mobs already) I wiant it to kill the mobs, but if there are no mobs to kill I wanna be able to tell it to move on. How can I do that?
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Sun Jun 20, 2004 3:19 pm   
 
We need more information. What MUD are you playing? Even better, quote what it looks like when you enter a room and there's a mob, and when there's no mob. Also, how are you having it stop when there is a mob?

Without this info, I would guess that you're making it stop regardless of if there's one or not, and automatically killing the mob if there is one. I'd change it up so that it only pauses the slow walk if there is a mob.
Reply with quote
neo2083
Beginner


Joined: 06 Feb 2004
Posts: 17
Location: USA

PostPosted: Sun Jun 20, 2004 9:18 pm   
 
Well I am trying to keep things hush hush since this script will not exactly be legal [}:)]

As for more info lets see:

A mob in a room looks like any basic mob:

A cat is here, getting into trouble.

Basically I have a trigger set up when I see this "cat" or any number of other mobs in the area to "kill cat"

When something dies I have a trigger that sends a "look" command and if there are more things that I wanna kill my kill trigs kill em

what I need is to have it so when I look in the room, if there are no mobs to be killed then issue a command of my choosing

Hope that helped a bit more

Not asking for it to be done for me just wanna know how I can do it
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jun 20, 2004 9:38 pm   
 
I'm sorry, but you'll have to figure out how to tell if the room is empty. You won't provide the information for anyone else to figure it out so you'll have to do it yourself.

Detecting the ABSENCE of something is usually much more difficult than detecting its PRESENCE. The simplest method is probably to use a one-time alarm (#ALARM) with each move/look to allow your triggers a chance to detect any mobs. If none have been detected when the alarm expires, assume there weren't any.
Reply with quote
Zener
Wanderer


Joined: 31 May 2004
Posts: 54
Location: USA

PostPosted: Mon Jun 21, 2004 10:05 pm   
 
If the mobs have a different ANSI color than other things in the room, like players or objects, then you could make an ANSI trigger, but it might also be wise to make a trigger, if you haven't already, that recognizes when a mob is already in combat with someone else.

~Zener
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