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


Joined: 05 May 2017
Posts: 7

PostPosted: Fri May 05, 2017 3:25 pm   

Old Script Need Help
 
Hey I have this old chase script from Dark and Shattered Lands (DSL) But can't seem to get it to work. When I enable the trigger by typing pk I get an {IF prompt and nothing happens. Any help would be appreciated I'm not too great at these things and tried to fix it with no luck.

#CLASS {chasetrig}
#VAR celdarianissexy {1} {1}
#TRIGGER {^@target*, right here.$} {@action @target}
#TRIGGER {^@target*, nearby to the (%1).$} {
%1
@action @target
scan
}
#TRIGGER {^@target*, not far %1.$} {
%1
%1
@action @target
scan
}
#TRIGGER {^@target*, off in the distance %1.$} {
%1
%1
%1
@action @target
scan
}
#TRIGGER {^@target* {walks|runs|floats|swims|leaves|flies} (%w)} {
~~
#if %1=in {@action @target} {
%1
@action @target
}
}
#TRIGGER {^@target* appears in the room.$} {@action @target}
#TRIGGER {~|{Defensive|Offensive|Normal}>$} {#SAY {CURRENTLY CHASING @target}}
#CLASS 0
#ALIAS pk {
#IF {@celdarianissexy} {
#T- chasetrig
#SAY Chase trigger deactivated.
} {
#T+ chasetrig
#SAY Chase trigger activated.
}


Thanks!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri May 05, 2017 6:06 pm   
 
Parenthesis should be used for the condition part of an #IF. There are 2 lines to correct; one is in the pk alias the other is in a trigger:
#if (%1=in) {@action @target} {
#IF (@celdarianissexy) {
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
sique
Newbie


Joined: 05 May 2017
Posts: 7

PostPosted: Sat May 06, 2017 12:43 am   
 
Awesome thanks for the help! Another question, what if I wanted to follow them into the next room to lets say cast a spell or kill them? How would I go about doing that?


Thanks again!!!


Last edited by sique on Sat May 06, 2017 2:33 am; edited 2 times in total
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sat May 06, 2017 2:16 am   
 
Looks like it should already be chasing.... you would just need to change you @action variable accordingly.
_________________
Discord: Shalimarwildcat
Reply with quote
sique
Newbie


Joined: 05 May 2017
Posts: 7

PostPosted: Sat May 06, 2017 2:19 am   
 
I got it to work with the help with Vijilante, but now just trying to figure out how to follow into next room to cast or attack. And how to set the target of whom I'm chasing.

Thanks!


Last edited by sique on Sat May 06, 2017 4:46 am; edited 1 time in total
Reply with quote
Medakan
Novice


Joined: 15 Dec 2015
Posts: 41
Location: Seattle

PostPosted: Sat May 06, 2017 4:29 am   
 
First thing I notice is the variable celdarianissexy is set to 1, this is going to have the PK alias always turn off the script by disabling the class chasetrig unless you have some way to set it to 0 that isn't in the code you provided.

Edit- now I look at it again the variable is going to be disabled, so I bet it returns null so the alias would turn it on and off. Hrmm.. I have never tried it that way so just another guess.


Last edited by Medakan on Sat May 06, 2017 10:19 am; edited 2 times in total
Reply with quote
sique
Newbie


Joined: 05 May 2017
Posts: 7

PostPosted: Sat May 06, 2017 4:48 am   
 
I just copy pasted this from an old forum thread, I remember it working. But now it seems to just chase anyone who enters the room and not sure how to set the target.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Sat May 06, 2017 5:27 am   
 
target=that guy
_________________
Discord: Shalimarwildcat
Reply with quote
sique
Newbie


Joined: 05 May 2017
Posts: 7

PostPosted: Sat May 06, 2017 5:35 am   
 
Yeah something is iffy with the script, not working as really intended to. Follows literally anyone that walks in when I scan, have few prompt errors with Huh? etc


Last edited by sique on Sat May 06, 2017 5:52 am; edited 1 time in total
Reply with quote
sique
Newbie


Joined: 05 May 2017
Posts: 7

PostPosted: Sat May 06, 2017 5:51 am   
 
It doesn't really work that well, I'll just forget about it. Thanks for help though guys.
Reply with quote
Medakan
Novice


Joined: 15 Dec 2015
Posts: 41
Location: Seattle

PostPosted: Sat May 06, 2017 10:16 am   
 
The reason it triggers on anyone is because of the * after the @target. (* matches anything, even spaces)

Since I bet you have no name in the target variable the * is matching any name.

Can't help with any prompt errors, never played that mud.

Don't give up! You make this work for you and the next thing you try something else... then something else... year from now you will be answering people's questions here ;) this stuff just takes a little research and some patience to start writing your own stuff.
Reply with quote
sique
Newbie


Joined: 05 May 2017
Posts: 7

PostPosted: Mon May 08, 2017 6:03 am   
 
Hah :) Thanks I'll keep messing around with it!
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