Unknown2005-05-14 01:20:27
To clarify, this is a script that allows you to simply "target virgin", and now matter how many virgins(or whatever) come and go or are in the room, it'll stay on one target and automatically move to the next.
#CLASS {Targetting}
#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~ }} "" {disable}
#TRIGGER "targetEnd" {^Number of objects~: %d} {#gag;#t- targetGag;#t- targetMatch;#t- targetEnd} "" {disable}
#TRIGGER {^You have slain*@target*$} {get_target_number}
#TRIGGER "targetGag" {*} {#gag} "" {disable}
#CLASS 0
To adapt this to your system, simply change it so that any command to attack by target actually does..
attack @target_func()
CODE
#CLASS {Targetting}
#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 ~
#TRIGGER "targetEnd" {^Number of objects~: %d} {#gag;#t- targetGag;#t- targetMatch;#t- targetEnd} "" {disable}
#TRIGGER {^You have slain*@target*$} {get_target_number}
#TRIGGER "targetGag" {*} {#gag} "" {disable}
#CLASS 0
To adapt this to your system, simply change it so that any command to attack by target actually does..
CODE
attack @target_func()
Terenas2005-05-14 05:31:33
Wouldn't it be more convenient to use ih @target instead of just ih? Saves from extra spams, especially for Moon/Shadow Dancers.
Unknown2005-05-14 05:51:40
QUOTE(terenas @ May 13 2005, 10:31 PM)
Wouldn't it be more convenient to use ih @target instead of just ih? Saves from extra spams, especially for Moon/Shadow Dancers.
117720
I didn't even know about that. Wow. Adding that to the revisions I'll be posting shortly
Gwylifar2005-05-14 14:34:05
I didn't know that either. I've added it to my shorter version of target-by-number which got posted here. (Mine only does the targetting, not the other stuff Visaeris's does, but it fits in with whatever you already have that does that stuff.)