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
Crymson4
Novice


Joined: 20 Nov 2001
Posts: 35
Location: USA

PostPosted: Wed Jan 30, 2002 12:41 am   

A change in state with no text msg.
 
I want to have zMUD notice, and execute a command when a state of my character stops.

In this case, I have Invisible/Hide/Sneak "icons" in my prompt.

(If I'm invis, it says I, if I'm Invis/Hide it says IH, if I'm all 3, it says IHS, you get the idea).

When I stop sneaking (after 1400 rounds or so) the S just disappears, there's no text associated with it. it doesn't even update my prompt.

So, what I'm asking is, is there a way to make zMUD recognize that the "S" is missing, and then execute the sneak command until it DOES reappear?

-=Crymson

Someone once said "Don't try to be a great man, just be a man; and let history draw it's own conclusions.".
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Jan 30, 2002 1:14 am   
 
quote:

I want to have zMUD notice, and execute a command when a state of my character stops.

In this case, I have Invisible/Hide/Sneak "icons" in my prompt.

(If I'm invis, it says I, if I'm Invis/Hide it says IH, if I'm all 3, it says IHS, you get the idea).

When I stop sneaking (after 1400 rounds or so) the S just disappears, there's no text associated with it. it doesn't even update my prompt.

So, what I'm asking is, is there a way to make zMUD recognize that the "S" is missing, and then execute the sneak command until it DOES reappear?

-=Crymson

Someone once said "Don't try to be a great man, just be a man; and let history draw it's own conclusions.".



Since there isn't any text associated with it (and apparently not even a new prompt line), about the only way you can do this is to use an alarm. Do you happen to know how long a round is on your mud?


li'l shmoe of Dragon's Gate MUD
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Jan 30, 2002 1:16 am   
 
Let's suppose your prompt looks like this:
<50hp 50m 50mv IHS>

You can use this trigger then:
#TRIGGER {~<%dhp %dm %dmv (%w)~>} {#IF (!%pos("S", %1)) {sneak}} "" {prompt|nocr}

The trigger will just catch the part of your prompt where the S appears and look at the text to see if it contains an S. If it doesn't, then it sends sneak to the MUD.

Kjata
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Jan 30, 2002 5:38 pm   
 
Be careful though, sneak will fail on most Muds if you're fighting. So, if "sneak" happens to wear off during battle you could get spammed.

LightBulb
All scripts untested unless otherwise noted
Reply with quote
dacheeba
Adept


Joined: 29 Oct 2001
Posts: 250

PostPosted: Thu Jan 31, 2002 7:27 pm   
 
Is the prompt the only method of telling when your sneak runs out?Most muds have a alternative way of tell you.ie 'You no long move with the shadows' or something simular. It would be a lot more easier and consistant to make a trigger from this line, if such a line exists in your mud.
dacheeba
Reply with quote
Crymson4
Novice


Joined: 20 Nov 2001
Posts: 35
Location: USA

PostPosted: Sat Feb 02, 2002 3:07 am   
 
No, as I said in the original post, there is no text line, or new prompt line. When sneak goes away, until I type a command, I don't notice it.

For example, if I'm <1435hp IHS> and I sit idle for 10-15 minutes, sneak will wear off, but if I haven't typed a command, or had any text come back from the MUD, it still says <1435hp IHS>

Then for example, I save, I see this:

<1435hp IHS>save
Saved...
<1435hp IH>

Get the idea...? RoD just never implemented any code for when sneak wears off. :Þ

Also, Kjata, you're right, I could do that, but Lightbulb is also correct, I cannot sneak while fighting. (Actually, I can't *start* sneaking while fighting). I'm not sure how else I could do this without making a fighting variable, based on whenever I backstab, murder or kill something.

Any other ideas?

-=Crymson

Someone once said "Don't try to be a great man, just be a man; and let history draw it's own conclusions.".
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Feb 02, 2002 2:09 pm   
 
That's right you would need a variable that stores if your are fighting or not. You can set aliases for the commands you use to start battles and have the alias send the command and set the variable to 1. Then have a trigger set it to 0 when you receive the message that the whoever is dead. You can also create trigger to look for messaged like Your pierce hits a mob or Your slash misses a mob to know when you are fighting.

This may not be the best way, but not knowing more about your MUD it is about the most widely applicable solution. For instance, in my MUD I can put the state of the person/mob I'm fighting in the prompt. If I'm not fighting it says nobody is unkown. I then use a trigger to look for this in my prompt and set the fighting variable to 0. If this is not in my prompt but in its place there is some other text. Then I know that I must be fighting and set fighting to 1. This prevents me from incorrectly settings fighting to 0 if one mob dies but I was really fighting two.

Kjata
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Feb 02, 2002 6:49 pm   
 
quote:

That's right you would need a variable that stores if your are fighting or not. You can set aliases for the commands you use to start battles and have the alias send the command and set the variable to 1. Then have a trigger set it to 0 when you receive the message that the whoever is dead. You can also create trigger to look for messaged like Your pierce hits a mob or Your slash misses a mob to know when you are fighting.

This may not be the best way, but not knowing more about your MUD it is about the most widely applicable solution. For instance, in my MUD I can put the state of the person/mob I'm fighting in the prompt. If I'm not fighting it says nobody is unkown. I then use a trigger to look for this in my prompt and set the fighting variable to 0. If this is not in my prompt but in its place there is some other text. Then I know that I must be fighting and set fighting to 1. This prevents me from incorrectly settings fighting to 0 if one mob dies but I was really fighting two.

Kjata



#TRIGGER "tBlank" {^$} {#GAG;#T- tBlank}
#ALIAS Gag {#T+ tBlank;#gag}

#ALARM *30 {#CR;Gag}

(stuff in your prompt trigger to notice the absence of the sneak icon)

The first trigger and alias allow you to control blank lines (figured it'd be less spammy to send a return and then gag the line). The #ALARM is needed to force MUD output. I set it low because I don't know the range (if any) of SNEAK duration nor do I know how long you wish to stay unsneaked without knowing.
li'l shmoe of Dragon's Gate MUD
Reply with quote
Crymson4
Novice


Joined: 20 Nov 2001
Posts: 35
Location: USA

PostPosted: Sun Feb 03, 2002 12:27 am   
 
Well, let's see, not knowing exactly how long a round is on RoD (1-2 seconds maybe?)

Sneak lasts for 1350 rounds... call that 2700 seconds at best.. which is 45 minutes or so... that seems awfully long, so perhaps it isn't quite right. I could probably time it or something, then use Matt's suggestion.

Thanks all!

-=Crymson

Someone once said "Don't try to be a great man, just be a man; and let history draw it's own conclusions.".
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