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


Joined: 07 Apr 2003
Posts: 15
Location: USA

PostPosted: Tue Apr 29, 2003 9:30 pm   

zMUD Trigger (Combining)
 
Ok, I am trying to Combine a bunch of the same line into one line.
The line is as follows:

Your blast of gas strikes SomeMobNameWithSpaces for [1234]

The Ending line is:

<[12345678] [123456H 123456M 123456V]>

This is the trigger I have setup, that does NOT work:

#TRIGGER {Your blast of gas strikes %1 %2 %3 %4 %5 for(%s)~[%6~]} {#T+ Combine2;#math counter1 {@Counter1 + 1};#If (@Victim1=0) { #Var Victim1 {%1 %2 %3 %4 %5}} { #if (@Victim2=0) { #Var Victim2 {%1 %2 %3 %4 %5}}} {#if (@Victim3=0) { #var @Victim3 {%1 %2 %3 %4 %5}} {#if (@Victim4="") { #var Victim4 {%1 %2 %3 %4 %5}} {#if (@MoreVictims=0) { #AddItem @MoreVictims {%1 %2 %3 %4 %5}}}}};#If ((%1 %2 %3 %4 %5)=@Victim1) {#math Counter1 {@Counter1+1}} {#If (%0=@Victim2) {#math Counter2 {@Counter2+1}} {#if (%1 %2 %3 %4 %%5)=@Victim3) {#math Counter3 {@Counter3+1}} {#If ((%1 %2 %3 %4 %5)=@Victim4) {#Math counter4 {@Counter4+1}} {#additem @MoreVictims %0;#math Counter5 {@Counter5+1}}}}};#Var Damage %6} "Combine"
#TRIGGER {~<~[%1~] ~[%2H %3M %4V~]~>} {#if (@Victim1=0) {} {#show ~(@Counter1~) Your blast of gas strikes @Victim1 for ~[@Damage~]};#if (@Victim2=0) {} {#show ~(@Counter2~) Your blast of gas strikes @Victim2 for ~[@Damage~]};#if (@Victim3=0) {} {#show ~(@Counter3~) Your blast of gas strikes @Victim3 for ~[@Damage~]};#if (@Victim4=0) {} {#show ~(@Counter4~) Your blast of gas strikes @Victim4 for ~[@Damage~]};#if (@MoreVictims=0) {} {#show ~(@Counter5~) Your blast of gas strikes @MoreVictims for ~[@Damage~]};#unvar @Counter1;#unvar @Counter2;#unvar @Counter3;#unvar @Counter4;#unvar @Counter5;#var Counter1 0;#var Counter2 0;#var Counter3 0;#var Counter4 0;#var Counter5 0;#unvar Victim1;#unvar Victim2;#unvar Victim3;#unvar Victim4;#unvar MoreVictims;#var Victim1 0;#var Victim2 0;#var Victim3 0;#var Victim4 0;#var MoreVictims 0;#unvar Damage;#var Damage 0;#T- Combine2} "Combine2" {prompt}

And these are the Variables:

#VAR Counter1 {0}
#VAR Counter2 {0}
#VAR Counter3 {0}
#VAR Counter4 {0}
#VAR Counter5 {0}
#VAR Victim1 {0}
#VAR Victim2 {0}
#VAR Victim3 {0}
#VAR Victim4 {0}
#VAR MoreVictims {0}
#VAR Damage {0}

I put (%1-%5) because the names have spaces in them and I can't figure out how to check them any other way. I have a feeling that my problem lies there...

-Seth
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Tue Apr 29, 2003 10:02 pm   
 
just to help you along a bit.

Use (*) to match instead of %1, use %d to match a number.

#TRIGGER {Your blast of gas strikes (*) for%s~[%d~]}

This will match any string, even with spaces.
the value stored in %1 will be the name of the Mob with its spaces.
%2 will be the number.

Hope this helps you a little.

Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.57
Zmapper Version 1.14

http://www.dartmud.com
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