|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4702 Location: Pensacola, FL, USA
|
Posted: Thu Oct 07, 2004 2:39 pm
Critter finder |
Trying to set up a script to find a critter for me to kill that hasnt been taken. There are four basic lines to worry about.
[Room name]
You notice* ({@critter})
Also here: Other players
Obvious exits:
That is what i see, however the middle two lines only appear when there is something to show.
I want it to stop if there is a critter present, and to continue on (with @direct) if there is no critter, or if there is also another player. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Oct 07, 2004 5:05 pm |
#TR kt {You notice* ({@critter})} {#VAR killtarget {%1}}
#COND {Also here:} {#VAR killtarget {}}
#TR {Obvious exits:} {#IF (@killtarget) {kill @killtarget;#VAR killtarget {}} {#STATE kt 0;@direct}} |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4702 Location: Pensacola, FL, USA
|
Posted: Fri Oct 08, 2004 5:31 am |
Having a bit of trouble with it, i added an extra condition so it only goes off in certain rooms, but i cant seem to get it to work properly:
#TRIGGER {Obvious {exits|paths}} {#IF (%ismember( "%gsl( p)", "Wind Tunnel|Dark Palisade, Tunnel Mouth|Luukos' Gullet, Overhang")) {#VAR huntroom {true}} {#VAR huntroom {}};#IF (%gsl( p) = "Dark Palisade, Tunnel Mouth") {#VAR direct {west}};#IF (%gsl( p) = "Luukos' Gullet, Overhang") {#VAR direct {east}};#IF (@huntroom) {#IF (@killtarget) {kill @killtarget;#VAR killtarget {}} {#STATE kt 0;@direct}}}
the problem seems to be in the %ismember, as @huntroom seems always to be empty |
|
_________________ Discord: Shalimarwildcat |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Oct 08, 2004 9:56 pm |
Try changing "%gsl( p)" to {%gsl( p)} or just %gsl( p).
Other than that, I don't think I can help. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4702 Location: Pensacola, FL, USA
|
Posted: Fri Oct 08, 2004 11:50 pm |
Dont worry about it, i did a workaround to turn the trigger on and off when i enter and leave the area
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|