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


Joined: 31 Mar 2008
Posts: 10

PostPosted: Mon Mar 31, 2008 8:14 pm   

simple command
 
What can you use to make a simple trigger to toggle in between what person you want to target?

forgot whether its an alias, variable or just a trigger. Like for instance


NIGHT SCOURGE <target>

need something along the lines of

t=target and be able to switch between whom I want to target. Then is there a way to make it show on your bar at the bottom of whom you targeted? like:

Target -->John
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Mar 31, 2008 8:44 pm   
 
Use a variable and an alias.

#alias x {target=%1}

Now to use it for an attack:

#alias scrg {night scourge @target}
or more complex:
#alias scrg {#if (%1) {night scourge %1} {night scourge @target}}

To display it in the status bar:

#status {Target: @target}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Shujinko07
Beginner


Joined: 31 Mar 2008
Posts: 10

PostPosted: Mon Mar 31, 2008 9:45 pm   One last thing...
 
My final question for a healing trigger to automatically sip healing or mana after a certain percentage drop, like

804h, 1014m, 930e, as an example stat to drink healing or mana after like 20% less than stated amount.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Mar 31, 2008 9:52 pm   
 
That's much more difficult because your script needs to understand when it can sip and when it can't. Most simply that means when you have sip balance, but it also means when you're not anorexic, asleep, stunned, aeoned, etc.

Most simply:

#trig {(%d)h, (%d)m, (%d)e} {#if (%1<600) {drink health}}

But if you're detecting sip balance as well you can use something like:

#trig {You can sip health again} {CapSip=1}
#trig {(%d)h, (%d)m, (%d)e} {#if (%1<600 AND @CanSip) {drink health;CanSip=0}}

But obviously this is overly simple and not robust enough to work in many situations, especially ones where you try but fail to sip successfully.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Martyl
Newbie


Joined: 30 May 2007
Posts: 7

PostPosted: Wed Apr 02, 2008 5:29 pm   
 
How would it look if your prompt was like this instead :
{208/275hp 133/234m 64/477v 4351tnl 1000a 3673g}

Where the second number is the MAX? and you've got other stuff in there too? Does that matter at all?

thanks,
Martyl
Reply with quote
Martyl
Newbie


Joined: 30 May 2007
Posts: 7

PostPosted: Wed Apr 02, 2008 5:33 pm   
 
I think I just answered my own question :
#TRIG {(%d)/(%d)hp (%d)/(%d)m (%d)/(%d)v} {#IF (%1<300) {cast 'heal'}}

Does that look right?

The %1 is the first number (current HP), and %2 is the second (in this case, my max HP), %3 is current mana, etc etc..?

Wow, I'm learning! :)
Thanks,
Martyl
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Thu Apr 03, 2008 12:44 am   
 
Yep. The contents of each set of brackets is numbered based on where the brackets open, from left to right.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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