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


Joined: 21 Jul 2007
Posts: 9

PostPosted: Sun Jul 29, 2007 3:14 pm   

help making a script
 
First off i have no clue how to do this but i had a friend send me a copy of his bout 3 years ago but i lost it and i wanted to make one that was similar to his because im familiar how it worked but not sure how he scripted it.

i wanted to make a way where i could i suppose have my targets highlighted a certain color that wont interfere with acropolis and i was wanting to have it so i could have my DSL set up on my delete key next to my numpad so whenever i saw the target all i would have to do is hit that key and it would do the dsl for me while not having to type it or doing it on its own. and i was wanting to have somehow a key for razeslash and my falcon to attack the target on another key possibly the home button or the end button but i can do that later once i know how to do the dsl. if anyone can help me do this i would really appreciate it thank you.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Jul 29, 2007 4:56 pm   
 
I did a quick search of Acropolis here to see if it had any notion of targeting that the scripts would need to "plug into". I couldn't find any, so I'm going to assume that it doesn't. If that's a mistake, feel free to correct me.

First, you're going to want a variable to store your target in. That's easy, just type target="" on the command line. This'll create a variable called target for you to keep, you guessed it, your target in.

Now you need a command to change targets. You can do that by typing #alias x {target=%1} on the command line. This will create an alias which will change the target when you type x targetname.

Now to create your DSL button. On the Actions menu, you'll see an entry "Define Macro Key". Push that, and up pops a dialog asking for you to press a key. Press whatever key you want to make a script for (the delete key by your numpad in this case) and the settings editor will appear. Type in your script in the Value box - in this case you probably want doubleslash @target. You can create your other macros in exactly the same way.

EDIT: I forgot the target highlighting! Here's the command to make a trigger to do that:

#trig {@target} {#color bold,red}

you can change the colour if you want.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
vroomvroom
Newbie


Joined: 21 Jul 2007
Posts: 9

PostPosted: Sun Jul 29, 2007 5:54 pm   
 
what would i put in for the name, default and value when doing this?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Jul 29, 2007 6:07 pm   
 
That's the joy of it, you don't need to do anything inside the settings editor when you're making the variables, aliases and triggers. Just the macros. Just type target="" on the command line and it'll create a variable with the name "target" and the value "". "Use Default" is off, so it doesn't need a default. You could set the default to rat or something if you wanted.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
vroomvroom
Newbie


Joined: 21 Jul 2007
Posts: 9

PostPosted: Sun Jul 29, 2007 6:59 pm   
 
i tryed putting the variable in i suppose i got it in right but when putting in the trigger you sure i dont put anything in for the pattern?
i got the delete key to do dsl's on rats thats a good start i suppose i put rat in between "" but what about other things how would i put them in there to?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Jul 29, 2007 7:20 pm   
 
To change your target, you just do x targetname. The way I've done this, it doesn't let you have more than one target - you seem to be pretty new to zScript and doing that makes things considerably more complicated. I didn't want to overwhelm :)

EDIT: And yes, like charneus says, the trigger should have a pattern - it should be "@target".
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)

Last edited by Fang Xianfu on Sun Jul 29, 2007 7:37 pm; edited 1 time in total
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sun Jul 29, 2007 7:27 pm   
 
You are putting something in the pattern. If you know what your target is going to be, then it's defined by the @target. You can enter the target in manually by typing "target=target name" in the command line. Then when the MUD displays your target name, it'll show up in bold, red font. Here's an example.

Meh. I had something here, then I realized that it was wrong. :P Uh, yeah.

Now if you're not manually putting in your target, then you can set up the trigger. In the MUD I play, we have a questor tell us what our target is, so I'll use that for example.

#TRIGGER {Questor tells you 'your target is *.$'} {#var target %1}

That sets anything after "your target is" to be your target, and will be highlighted from this point forward. There are some complications that can arise from it, however. For instance, if the words were "a slobbering, drunk goblin" for the target, yes, it'll highlight it, but the syntax may not be accepted by your MUD. If you type "kill a slobbering, drunk goblin" and get an error message from your MUD, then yeah, it's not gonna work. There's a workaround for this, somewhat. If you need more assistance, provide direct output from your MUD. That always helps in helping someone create a trigger. :)

Charneus

EDIT: Gah. Fang swooped in for the kill :P Well, hope the above works, too! :P
Reply with quote
vroomvroom
Newbie


Joined: 21 Jul 2007
Posts: 9

PostPosted: Sun Jul 29, 2007 11:22 pm   
 
i think i got everything now i can do dsl with my delete button i haven tryed switching the targets but i will do that later and see how that goes and the only problem is now is how to fix this to where i can see them in bold red

this is what i got under triggers
pattern
@target
value
#trig {@target} {#color bold,red}
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Jul 29, 2007 11:25 pm   
 
No, no... the #trig command creates triggers. All you need for the value is the #color bold,red part.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
vroomvroom
Newbie


Joined: 21 Jul 2007
Posts: 9

PostPosted: Sun Jul 29, 2007 11:35 pm   
 
ok i got my targets to switch with the x <target name>
but now when i hit the delete key this pop up red as well
3052h, 3146m, 14160e, 13200w ex-dsl buckawn

anyway to get rid of that being red, but other than that when they attack me and when i attack them it shows up read and there names
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Jul 29, 2007 11:47 pm   
 
You might want to change the #color command to #cw (which stands for color word). There are ways to get around the "dsl buckawn" problem, but #cw should make it much less noticeable. Other fixes will be much more complex.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
vroomvroom
Newbie


Joined: 21 Jul 2007
Posts: 9

PostPosted: Sun Jul 29, 2007 11:56 pm   
 
thanks for the help i think i got this fixed up good now
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