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
Rolly
Wanderer


Joined: 16 Oct 2006
Posts: 62

PostPosted: Wed Jan 31, 2007 2:51 am   

Achaea prompt trigger
 
Hi! I've been gagging many of my messages and replacing them with simple one word phrases like PARALYSED! and my ability to control a fight has improved exponentially. I have also successfully gagged my prompt because I just don't need that extra line during a fight and often things scroll by so fast I can't pay any attention to it anyway. It usually looks like this:

2516h, 2808m cekxdb-

I don't care whether my cloak is up when in the middle of a fight and equilibrium and balance tell me when they come back up, I do not need to see them all of the time. I have buttons that turn colors as blindness, deafness and kola defenses go up and down but they don't always trigger since there are more ways to strip these defs than I have scripted so far. It would be great if I could gag the prompt but use the prompt letters to trigger the colored buttons. my trigger looks like this right now:

#Trigger {(%n)h, (%n)m (%w)-} {#gag}


I think the (%w) should be able to be replaced with something like (?)(?)(?)(?)(?). then if any of the letters are k or d or b, I want to add the trigger that goes something like:

#If one of the (?) is k then #noop %btncol(Kola, red, white) otherwise #noop $btncol(Kola, white, black)

etc for all three letters. In my opinion this would work very well as I get the updated information constantly. Can someone please help me with this one?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Jan 31, 2007 3:09 am   
 
As long as none of the letters are repeated this will work:

#if (%pos(k,%3)) {#call %btncol(Kola,red,white)} {#call %btncol(Kola,white,black)}

The %pos function returns the position of the first string (k) in the second (your string of letters), it returns 0 if it's not present. You should be using #call rather than #noop for calling functions.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Wed Jan 31, 2007 11:57 am   
 
I use #NOOP for calling functions. #CALL is for COM calls, if I'm not mistaken. Either should work in this case, however.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Wed Jan 31, 2007 2:22 pm   
 
Both work, but Zugg is trying to stop people from using #NOOP.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Rolly
Wanderer


Joined: 16 Oct 2006
Posts: 62

PostPosted: Thu Feb 01, 2007 12:14 am   
 
I use the #NOOP to avoid yet another meaningless line scrolling down my screen. Without it I get something like btncol Kola ### where the # is the color number (I think). It has been a while since I tried it. Anyway thanks for the help. I'll give it a try.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Feb 01, 2007 12:18 am   
 
I'm not sure what you mean by "avoiding another meaningless line" - #call doesn't print anything when I use it in conjunction with %btncol like I described above, and it's the prescribed way of calling functions like this (check out the #noop help file, it points you to use #call instead).
Reply with quote
Rolly
Wanderer


Joined: 16 Oct 2006
Posts: 62

PostPosted: Thu Feb 01, 2007 11:19 pm   
 
It works great. Thanks guys.
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