|
talonfreak2003 Beginner
Joined: 02 Dec 2004 Posts: 27 Location: Kansas... whippie!
|
Posted: Sat Oct 20, 2007 6:10 pm
Script help? |
Alright, I'm not exactly great with scripts, so I figured I'd come here to ask for abit of advice/help.
What I'm looking for is either help making the script or help on understanding how to make the script.
Whenever someone goes to quest, they get this multiple line feed:
Quote: |
Someone asks The High Priest of Arkane for a quest.
The High Priest of Arkane says 'Thank you, brave Someone!'
The High Priest of Arkane says 'Vile pilferers have stolen the King's sceptre from the royal treasury!'
The High Priest of Arkane says 'My court wizardess, with her magic mirror, has pinpointed its location.'
The High Priest of Arkane says 'Look in the general area of <area>l for <room>!'
The High Priest of Arkane says 'You have 52 1/2 hours to complete this quest.'
The High Priest of Arkane says 'May the gods go with you!'
|
Now, I already have, for the most part, the entire script worked out, to fire off of "Look in the general are of". The problem I run into is there's usually 5-15 people in the same room as me questing, so my script also fires off of theirs. What would be the easiest way to have it only fire off on my quests? I would post my questing script but it's rather long (70kb worth of quests)[/quote] |
|
_________________ Yes, I'm a programing newb, but I can fix a car faster than you can spin your head. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Oct 20, 2007 8:34 pm |
Put the trigger(s) in a class and disable it. Create an alias and use #t+ to enable in when you ask for a quest (create an alias to do both). Have the trigger for the last line use #t- do disable the class again.
|
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sat Oct 20, 2007 10:37 pm |
You could also check for the name. For instance, change the first line to read:
Code: |
#trigger {@myname asks the priest of High Arkane for a quest.} {#t questscript} |
Just put the script, minus the above trigger, into a folder called questscript. Also, make a variable myname with your name in it. You'll want to make a trigger to turn off the script, too. Probably want the last line to turn it off. |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sat Oct 20, 2007 10:39 pm |
Stupid cell limits. I was going to add that you would need to disable the folder when you first make it. And the trigger I made is if your script starts off you asking the high priest. Change it as you see fit. :-)
|
|
|
|
talonfreak2003 Beginner
Joined: 02 Dec 2004 Posts: 27 Location: Kansas... whippie!
|
Posted: Mon Oct 22, 2007 4:50 am |
I got it to work. Everything is divided into folders
Inside the Script_Triggers folder is the one to disable it after it's been selected using
Code: |
#TRIGGER {$The High Priest of Arkane says 'May the gods go with you!'$} {#T- Script_Triggers} |
The one that permanently runs is
Code: |
#TRIGGER {^* asks The High Priest of Arkane for a quest.$} {#IF ("%1"="Aritan") {#T+ Script_Triggers} {#SHOW @questgauge} |
|
|
_________________ Yes, I'm a programing newb, but I can fix a car faster than you can spin your head. |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Mon Oct 22, 2007 7:43 am |
If you have Relogin set up on your ZMud session, you can alternatively also use %char instead of writting your name out.
So the part with #if ("%1"="Aritian") would be #if ("%1"=%char)
Just a thought.
Prog |
|
|
|
talonfreak2003 Beginner
Joined: 02 Dec 2004 Posts: 27 Location: Kansas... whippie!
|
Posted: Fri Oct 26, 2007 3:24 am |
Ok, next question... how do I make it gag all the lines going in.
Code: |
s;s;c fly;c pass;w;s;w;w;w;w;w;w;w;w;w;w;w;s;s;s;e;s;s;w;w;se;s;se;e;n;n;e;e;s;se;e;se;se;n;ne;nw;sw;s;e;n;n;n;n;n;n |
How do I make it gag all that when it's imputed. I put #GAG infront of it, but it doesn't gag it :) |
|
_________________ Yes, I'm a programing newb, but I can fix a car faster than you can spin your head. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Oct 26, 2007 3:41 am |
#forall "s|s|c fly|c pass|w|s|w|w|w|w|w|w|w|w|w|w|w|s|s|s|e|s|s|w|w|se|s|se|e|n|n|e|e|s|se|e|se|se|n|ne|nw|sw|s|e|n|n|n|n|n|n" {#send %i}
Alternatively, you could create a trigger:
#oninput "GagInput" {*} {#gag}
And keep it disabled. Before you send a big load of commands, use #t+ to enable it, and then once they've been sent, use #t- to disable it. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Oct 26, 2007 5:08 am |
If you set it up as a path then you can also use this alias
#ALIAS QuietPath {#SEND {%replace(%pathexand(%alias(%1)),"|",%cr)}
alternately if you use some moce compex commands in the paths like your example shows
#ALIAS QuietPath {#SEND {%replace(%exec(.%1),"|",%cr)} |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
|
|