Author Topic: Scripts/Triggers/Thingies  (Read 923 times)

Daklore

  • Builders
  • Sr. Contributor
  • *
  • Posts: 480
  • Crazy Perverted Gnome Demon
Scripts/Triggers/Thingies
« on: 06/27/11, 19:28 »
Some of you use Zmud, some of you don't. I use Zmud, and I use triggers. Cue imms/imps glaring at me with with quotes of HELP RULES... and stuff.

But we, the players know better! Triggers are helpful, triggers are grand, and pie tastes great. Aside from the obvious fact that some can be used to keep you on-line, which are bad, some can be used to do things quicker than normal, which is good. So... post your triggers and scripts and what not that might be helpful to others! ... Also tell them what it does, how to put it in, and what client it works for. >P (and then sit back and wait to get jailed for being awesome. AWESOME!)

So I'll start us off:

Daklore's totally awesome group tell quest information relater thingy.

It's really pretty straight forward, you request a quest, and then you automatically relegate the what, where and why for a quest target. Be it to keel, or to grab an item. This is made for Zmud, by the way.

To install, you'll need to copy and paste the code below into a notepad file, save it as anything you want (.txt file). Then in Zmud goto "Settings > Import > Script(ASCII)", select the .txt file you saved, and open. Voila, it's ready to go.
Code: [Select]
#CLASS {quest info}
#VAR quest_area {Null}
#VAR quest_room {Null}
#VAR quest_target {Null}
#REGEX {^.+ tells you 'Look for (.+) somewhere in the vicinity of (.+)!'$} {
  #VAR quest_room "%2"
  #var quest_target "%1"
  }
#REGEX {^.+ tells you 'Seek (.+) out somewhere in the vicinity of (.+)!'$} {
  #VAR quest_room "%2"
  #var quest_target "%1"
  }
#REGEX {^.+ tells you 'That location is in the general area of (.+)\.'$} {
  #VAR quest_area "%1"
  gt ~{CQuest info:~{R @quest_target ~{Clocated at the room~{W @quest_room ~{Cof the area~{Y %1~{x
  }
#REGEX {You inform .+ quest\.} {
  #var quest_area "Null"
  #var quest_target "Null"
  #var quest_room "Null"
  }
#CLASS 0
#ECHO Hax 1337 Questing Triggers thingy installed.

Enjoy!
"Okay, who let Odin out of his cage?"
*A blue bouncy ball bounces by*
"That's it, I'm outta here."

Daklore

  • Builders
  • Sr. Contributor
  • *
  • Posts: 480
  • Crazy Perverted Gnome Demon
Re: Scripts/Triggers/Thingies
« Reply #1 on: 06/30/11, 16:00 »
Now let's teach you how to make an otell alias, in Zmud! This one is easy, note the colour code tags (the ~ (tilde)) is only placed to make Zmud not whine about errors in the scripting window. The easiest method is to copy/paste below and modify colour tags before you hit enter.

Code: [Select]
#ALIAS {otell} {tell %1 ~{B(~{WO~{CO~{WC~{B)~{W: ~{C}
To use it, just use it like a normal tell(except immies).
otell sye stop posting ideas!  
You telepathy Sye '(OOC):  stop posting ideas!'    


So you want one that will automatically reply oocly for you? I don't really suggest it, but if you're going to use the reply command for nothing but ooc reply, then:

Quote
#ALIAS {reply} {~reply ~{B(~{WO~{CO~{WC~{B)~{W: ~{C}

Bolded is necessary. Do not take that tilde away from reply. It -must- read ~reply, otherwise you'll generate a loop. And that's bad. This also implies you haven't altered Zmud's special characters and removed ~ as your escape character. If you have no idea how to even do this, you probably never changed it.

And voila, you have otell (and ooc reply. I don't suggest oreply, for the simple fact that it will interfere with the in game oreply command for responding to immy based otells)

Edit: Forgot a set of braces that would've been bad... *shifty*
« Last Edit: 07/01/11, 12:26 by Daklore »
"Okay, who let Odin out of his cage?"
*A blue bouncy ball bounces by*
"That's it, I'm outta here."

Daklore

  • Builders
  • Sr. Contributor
  • *
  • Posts: 480
  • Crazy Perverted Gnome Demon
Re: Scripts/Triggers/Thingies
« Reply #2 on: 07/05/11, 13:17 »
Since Sye brought this up a few days ago, and I know Sye, you don't use Zmud, but in the event that for some reason you wanted to make your says a different colour? That's easy!

However, instead of my previous two posts, I won't give you the simple command to write into your text bar. This time I'm going to give you the steps to make it, that way you can modify it to whatever you want it to be. As an example, I'm going to use one of these I used ages ago, and they're fairly easy.

First(Again, this is in Zmud. Zmud!) you need to make a new alias. Along the top of your screen, below "File Edit View..." you should see a line of clickable buttons with text under them (unless you know how to alter that and already have, I'll assume you haven't). Click on the button that looks like an abc with Alias listed under it.

This will bring up a new window. In that window you should see a button that has a white + on a blue background with "New" written beneath it. You should also notice a little down arrow at the very right edge. Don't click that. Click the New button(but not the drop down arrow!). This will generate a new alias. If you look at the very bottom of this previously opened window you'll see the bottom half of the window is, kind of another window. It really is, if you want to annoy yourself, you can click and drag the little blue line that says "Edit Alias" and growl as you try to reconnect it to the window you tore it from.

Anyway, you should have two typable fields, Name and Value. Between the two are three clickable things (zMUD script, Text, MSScript--default is zMUD script, do not click anything here, prz).

The name field is what the alias is going to be; or rather what you'll type in your mudding window to trigger the alias.

The value field is what you want it to do. WARNING: If you put the name as the same as the first word in the value field, YOU WILL CAUSE A LOOP, but there are ways to get around it, with a tilde.

Now the first thing you should know about Zmud aliases, everything you type following the alias "name" is input at the end of whatever you put in the value field(barring certain exceptions which are more complicated). This is where the simple part of this goes in.

Example:
Name: dsay
Value: say {R(in a demonic and raspy tone)

dsay You will all die!
Will show:
You exclaim '(in a demonic and raspy tone) You will all die!'

Now you might ask, why no colour terminate? ({x). It's because KotL will already do that for you at the end of the text with the quote mark, which is coloured white.

What are the limitations then? Well, you can only use a solid colour, there's no way to code this with a rainbow of colours for every letter... well, it might be possible, but I'm not going to try and figure it out. The simplest alias will just have a value of "say {B" or whatever colour you want. It is possible to make it have a little flavour text(for tone, for instance) like my example above, and have it still change the colour once more.

Example:
Name: dsay
Value: say {R(in a demonic and raspy tone){C

dsay You will all die!
Will show:
You exclaim '(in a demonic and raspy tone) You will all die!'

Now to show you what won't work:

Example:
Name: say
Value: say {R(in a demonic and raspy tone)

say You will all die!
Will show:
THIS WILL CAUSE A LOOP!!!!

Why will this cause a loop? Notice the first word in the alias is say? This will cause it to continually reference the say alias over and over and over. Without actually returning anything to the MUD, thankfully, but it'll probably freeze or crash your client at worst.

Here's the proper way of doing it, although I still don't recommend it:

Example:
Name: say
Value: ~say {R(in a demonic and raspy tone)

say You will all die!
Will show:
You exclaim '(in a demonic and raspy tone) You will all die!'

Note the tilde--the squiggly thingy--in front of the say in the value? This will force zMud to push it to the MUD instead of re-referencing an alias, over and over and over. I still don't recommend this, but if you want to overwrite all of your says to have this, then this is how you would do it.


AND FOR THE LOVE OF GOD, NO USING THE BEEP CODE! I'm looking at you, Nevaeh >.>

So what else do you slackers want me to cover? Anything at all?

Also, for those of you who notice Zmud putting up a parsing error thingy when they're typing in the value field? It's usually because of the { used for colour codes. (and sometimes brackets). It won't actually cause an error or anything, but if you don't want to see the error message, change your { to ~{ and your ( ) to ~( ~). The tilde solves a lot of things >P

Edit: My lazy copy/pasting resulted in a bad example, fixed!
« Last Edit: 07/05/11, 13:21 by Daklore »
"Okay, who let Odin out of his cage?"
*A blue bouncy ball bounces by*
"That's it, I'm outta here."

Chalgyr

  • Grand Poobah of Kingdoms of the Lost
  • Implementors
  • Heroic Contributor
  • ***
  • Posts: 809
  • Grand Poobah
    • Chalgyr's Game Room
  • Other character names: Glith, Devinoste, Deakkyn, Wolfryc, Rylee, Deus... it goes on for a while
Re: Scripts/Triggers/Thingies
« Reply #3 on: 07/12/11, 14:03 »
*beep*



:D
I must be here, 'cause I'm not all there.

Jadyss

  • New Contributor
  • **
  • Posts: 50
  • Hey everyone. It's Mike.
  • Other character names: Jadyss, Kagaho
Re: Scripts/Triggers/Thingies
« Reply #4 on: 01/26/15, 04:31 »
As I necro the hell out of this I remember a lot of muds where I used to do this. I have CMUD though and can't for the love of me remember how to get it working on that properly.
Smart. Intelligent. Articulate. All words that you can find in a dictionary.