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
edyarchi
Newbie


Joined: 25 Feb 2003
Posts: 7
Location: Italy

PostPosted: Tue Feb 25, 2003 9:43 pm   

Prompt Color when Fighting
 
This is my prompt:
H:336/336 M:375/375 V:130 S:---T-- *:* *:* >

This is my prompt when fighting:
H:336/336 M:375/375 V:121 S:---T-- TankName:excellent MobName:injured >

My PG name is Edyarchi, so when grouped if I'm the tank the prompt appears like this:
H:336/336 M:375/375 V:121 S:---T-- Edyarchi:excellent a large wolf:injured >

Now, I want my name (only Edyarchi, not the name of other tanks) changing color (or better flashing!) if I'm fighting and grouping with other players. I need this trigger because I've a few hit point and - in the confusion of the fight - if I don't notice immediatly that I'm attacked I cannot flee in time.

I'm using Zmud 6.16 with this code:
#TRIGGER {H:&Hp/&MaxHp M:&Mana/&MaxMana V:&Move S:&Spell &Tank:* &Mob:* >} {#IF (@Tank="Edyarchi" and @grouped=1) {#color yellow}}

This trigger not oly sets the variables contained in the prompt, but changes in yellow the color of all the prompt if the tank is Edyarchi and he is grouped. The variable @groouped is setted up by other triggers.

How can I do to substitute only the color of the name Edyarchi?? Is it possible flashing it?
I tried using the %replace and #SUB commands without results.

Thanks!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Feb 26, 2003 5:05 am   
 
The simplest method is to change the color of your character's name everywhere, instead of only in the prompt. I do this with most of my characters.
#CW {%char} {yellow}

LightBulb
Advanced Member
Reply with quote
edyarchi
Newbie


Joined: 25 Feb 2003
Posts: 7
Location: Italy

PostPosted: Wed Feb 26, 2003 8:40 pm   
 
quote:

#CW {%char} {yellow}



Ok, but this solution doesn't catch my attention in the particular occasion that I want.
Surely, for that use is better to change the color of the entire prompt as I am doing now.

However - independently by the real usefulness of trigger - finding a solution of that question represents a challenge for me.

It is also a good way to learn programming zmud.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Feb 26, 2003 8:49 pm   
 
Question I'd ask is how does T-- Edyarchi change?

How does that piece in your combat prompt when you have 1, 2, 3 tanks
if I understand correctly? Could make 1-3 triggers to match
the combinations and highlight your name.

Ton Diening
Reply with quote
edyarchi
Newbie


Joined: 25 Feb 2003
Posts: 7
Location: Italy

PostPosted: Wed Feb 26, 2003 10:01 pm   
 
quote:

Question I'd ask is how does T-- Edyarchi change?

How does that piece in your combat prompt when you have 1, 2, 3 tanks
if I understand correctly? Could make 1-3 triggers to match
the combinations and highlight your name.




It is possible only having 1 tank for each round of fight, this means that for each round the mob can attack only a player of the group. (unless he uses area spells)

For example, supposing my group is composed by me (Edyarchi) and BigWarrior that is the tank, a tipical fight appears like this:

BigWarrior hits a warg.

H:336/336 M:375/375 V:73 S:---T-- BigWarrior:excellent a ferocious warg:excellent >
BigWarrior his extremely well a ferocious warg.
BigWarrior his extremely well a ferocious warg.
BigWarrior his extremely well a ferocious warg.
You hit hard a ferocious warg.
You miss a ferocious warg.
A ferocious warg misses BigWarrior.
A ferocious warg misses BigWarrior.


(note: at this point the warg switches to me, so I become the tank and the prompt changes like this)

H:336/336 M:375/375 V:71 S:---T-- Edyarchi:excellent a ferocious warg:scratched >
BigWarrior his very hard a ferocious warg.
BigWarrior his extremely well a ferocious warg.
BigWarrior misses a ferocious warg.
You hit hard a ferocious warg.
You miss a ferocious warg.
A ferocious massacrates you.
A ferocious devastes you.

H:148/336 M:375/375 V:69 S:---T-- Edyarchi:injured a ferocious warg:injured >
BigWarrior misses a ferocious warg.
BigWarrior his extremely well a ferocious warg.
BigWarrior misses a ferocious warg.
You hit a ferocious warg.
You hit a ferocious warg.
A ferocious devastes you.
A ferocious devastes you.

YOU ARE DEAD! R.I.P.


I would like something this when the warg switches on me:

H:336/336 M:375/375 V:71 S:---T-- Edyarchi:excellent a ferocious warg:scratched >
BigWarrior his very hard a ferocious warg.


...so I can quickly decide if fleeing or other.

Note that the "S:---T--" in the prompt is not influenced by the changing of the tank..it indicates some important spells upon me. In the example True Sights.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Feb 26, 2003 11:41 pm   
 
If I understand correctly, then how about?

#TRIGGER {T~-~- (Edyarchi)} {#PCOL red %x1}

Ton Diening
Reply with quote
edyarchi
Newbie


Joined: 25 Feb 2003
Posts: 7
Location: Italy

PostPosted: Thu Feb 27, 2003 12:19 am   
 
1. I think #PCOL is not implemented in Zmud 6.16 ... it is not recognized as a valid command.

2. #TRIGGER {T~-~- (Edyarchi)} {#PCOL red %x1} will not trig because the prompt could change for example in:

H:336/336 M:375/375 V:71 S:-IST-D Edyarchi:excellent a ferocious warg:scratched >

if I've this spell upon me: Invisibility, Sanctuary, True Sight and protection Drain
however it could be modified in
#TRIGGER {Edyarchi:} .......

3. The name of the tank (Edyarchi) must change *only* if variable @grouped=1...that is if I'm grouped. Infact I don't wanto to re-color the name in the prompt in the case I fight alone

Is it too difficult?
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Feb 27, 2003 12:37 am   
 
So would this work then?

#TRIGGER {Edyarchi~:} {#IF (@grouped=1) {#CW red}}

Ton Diening
Reply with quote
edyarchi
Newbie


Joined: 25 Feb 2003
Posts: 7
Location: Italy

PostPosted: Thu Feb 27, 2003 1:33 am   
 
quote:

So would this work then?

#TRIGGER {Edyarchi~:} {#IF (@grouped=1) {#CW red}}



Ok, thanks to your suggestion I solved the problem in this way:

#TRIGGER {H:&Hp/&MaxHp M:&Mana/&MaxMana V:&Move S:&Spell &tank:* &Mob:* >} {}
#TRIGGER {%char} {#IF (@grouped=1 and @tank=%char) {#CW red}}

so, the first trigger - among the other things - updates the variable @tank containing the name of the current tank (if no one is fighting the variable @tank is equal to *)

the second trigger changes the color of the name Edyarchi (replaced by %char due to portability) only if he is the tank and if he is grouped.

The trigger is not perfect (in fact it could change the colour of *each* occurence of the character name when the IF condition is True, not only the occurrence on the prompt).

However it works :)
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