Evil Script

by Unknown

Back to Mechanic's Corner.

Unknown2005-09-29 06:19:20
Yeah, this targeting by numbers script has worked for me since I've got it, but now for some reason is making everything on the screen blank apart from the first line. Yeah, wierd.
CODE
#CLASS {Targeting}
#ALIAS t {target=%1;get_target_number}
#ALIAS get_target_number {target_once=0;targetnumber="";#t+ targetMatch;#t+ targetEnd;#t+ targetGag;ih}
#VAR target_func {%if( @targetnumber = "%d" & @targetnumber, @targetnumber, @target)}
#TRIGGER "targetMatch" {^~"%w(%d)~"*@target*$} {#if (!@target_once) {target_once=1;targetnumber=%1;#gag;#mxp ~Target: @targetnumber~}}
#TRIGGER "targetEnd" {^Number of objects~: %d} {#gag;#t- targetGag;#t- targetMatch;#t- targetEnd}
#TRIGGER {^You have slain*@target*$} {get_target_number}
#TRIGGER "targetGag" {*} {#gag}
#STAT {Targeting: @target}
#CLASS 0


could someone take a look at it please, because I cannot see what is going on. I even tried getting rid of the gags to see if the class was only gagging everything, but I dunno.
Unknown2005-09-29 13:54:43
You're gagging too often, and zMUD's probably gagging lines that shouldn't be because the line you thought was going to be gagged was already MIA.
Unknown2005-09-30 03:03:01
So take out the gags altogether?
CODE
#CLASS {Targeting}
#ALIAS t {target=%1;get_target_number}
#ALIAS get_target_number {target_once=0;targetnumber="";#t+ targetMatch;#t+ targetEnd;ih}
#VAR target_func {%if( @targetnumber = "%d" & @targetnumber, @targetnumber, @target)}
#TRIGGER "targetMatch" {^~"%w(%d)~"*@target*$} {#if (!@target_once) {target_once=1;targetnumber=%1;#mxp ~Target: @targetnumber~}}
#TRIGGER "targetEnd" {^Number of objects~: %d} {#t- targetMatch;#t- targetEnd}
#TRIGGER {^You have slain*@target*$} {get_target_number}
#STAT {Targeting: @target}
#CLASS 0


It's still wierd cause I have been using the same script for weeks and I didn't have any probs till now *shrugs*.
Unknown2005-10-03 19:18:29
Your "targetGag" trigger gags everything, but your other triggers also gag lines, so you were getting a double gagging effect on many lines. You can gag things all you want, but you need to be careful about gagging too much or the wrong lines.