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
talonfreak2003
Beginner


Joined: 02 Dec 2004
Posts: 27
Location: Kansas... whippie!

PostPosted: Mon Nov 14, 2005 4:58 pm   

Odd trigger problem
 
Alright, I made a rather extensive set of alias's with only 8 triggers working them (about 90 alias's) for questing. but I ran into this small problem...

Code:
^The High Priest of Arkane says 'Look in the general area of Forbidden Forest for (*)'$

Is the pattern

Code:
#IF ("%1"="Few stunted pines!") {pq143}
#IF ("%1"="Clearing In The Woods!") {pq144}
#IF ("%1"="Thick Knot of Pine!") {pq145}
#IF ("%1"="Wall of Fog!") {pq146}
#IF ("%1"="Gravesight!") {pq147}
#IF ("%1"="Scarred Field") {pq148}
#IF ("%1"="Overgrown deer path!") {pq149}
#IF ("%1"="Rolling hills of fog!") {pq150}
#IF ("%1"="Solid Wall of Timber!") {pq151}
#IF ("%1"="Large Cave!") {bad_quest}
#IF ("%1"="A Bloody Battlefield!") {pq100}
#IF ("%1"="A Boulder Strewn Field!") {pq101}
#IF ("%1"="A Broken Ice Field!") {pq102}
#IF ("%1"="A Broken Wall Of Ice!") {pq103}
#IF ("%1"="A Crumbling Ice Wall!") {pq104}
#IF ("%1"="A Dark Forest!") {pq105}
#IF ("%1"="A Deserters Camp!") {pq106}
#IF ("%1"="A Glacier Wall!") {pq107}
#IF ("%1"="A Hollow Tree!") {pq108}
#IF ("%1"="A Jumbled Pile Of Ice!") {pq109}
#IF ("%1"="A Sheer Ice Wall!") {pq110}
#IF ("%1"="A Slush Filled Marsh!") {pq111}
#IF ("%1"="for A Snow Covered Field!") {pq112}
#IF ("%1"="A Wide Path For Deer!") {pq113}
#IF ("%1"="An Old Pine Forest!") {pq114}
#IF ("%1"="Ice Covered Fields!") {pq115}
#IF ("%1"="Small Pine Filled Valley!") {pq116}
#IF ("%1"="Some Drifts Of Snow!") {pq117}
#IF ("%1"="The Forest Entrance!") {pq118}
#IF ("%1"="A Forested Grove!") {pq119}


Now, as you can see it has a rather large amount of If/thens in there. Only one problem. 20 of the quests have scrolled off that one single area. Any ideas? I Don't want to make my questing script into 90 triggers.
_________________
Yes, I'm a programing newb, but I can fix a car faster than you can spin your head.
Reply with quote
talonfreak2003
Beginner


Joined: 02 Dec 2004
Posts: 27
Location: Kansas... whippie!

PostPosted: Mon Nov 14, 2005 5:00 pm   
 
As you can see, I've already got all of the needed areas on alias ... just need a way for them to fit ... or not disappear ... I would just make a second trigger ... but can't do that ? Dunno, I'm not the trigger expert Mr. Green
_________________
Yes, I'm a programing newb, but I can fix a car faster than you can spin your head.
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Mon Nov 14, 2005 5:23 pm   
 
What do you mean by "single area"?
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Mon Nov 14, 2005 5:27 pm   
 
I don't understand whats happening or doing, or not doing and I swear I've read it 5 times?!?

6 times now
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
talonfreak2003
Beginner


Joined: 02 Dec 2004
Posts: 27
Location: Kansas... whippie!

PostPosted: Mon Nov 14, 2005 6:05 pm   
 
It's a MUD. Each area has alot of rooms in it , room names. So the triggers are by the area with if/then statements for the room name in that area. The problem I'm having is that if you put too much text in the zmud command box, the stuff on the top scrolls off

IF ("%1"="Roomname") {relatedalias} is the general setup
_________________
Yes, I'm a programing newb, but I can fix a car faster than you can spin your head.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Mon Nov 14, 2005 6:11 pm   
 
But it still goes in right? I am still not seeing a problem anywhere and I recreated your trigger without a problem.
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Mon Nov 14, 2005 6:12 pm   
 
For large scripts, it may be more helpful to edit the aliases and triggers from inside zmud's editor. Open it by clicking on the "Aliases" or "Triggers" buttons at the top of the zmud screen and edit them directly.
Reply with quote
saplingg
Novice


Joined: 06 Oct 2005
Posts: 31

PostPosted: Mon Nov 14, 2005 6:14 pm   
 
Um... I'm not sure I understand the question.

Er, is what you're saying that you're trying to put in your settings but they don't fit?

This might or might not help, but at the top, click on the "windows" tab, then click on "editor". Type in your settings there and just hit send. Or look up the "#READ" command.


I'm probably wrong, but that's what it sounds like what you're talking about :)
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Mon Nov 14, 2005 6:28 pm   
 
So are you saying you can't see all of your #IF Statements in the editor? Then it could be a limitation. I guess you should let Zugg know if that is the case.

Another idea to fix this is to group certain types of quests into specific aliases which will call another alias.
If we can get a few examples of your aliases maybe we can come up with a way to group them.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
talonfreak2003
Beginner


Joined: 02 Dec 2004
Posts: 27
Location: Kansas... whippie!

PostPosted: Mon Nov 14, 2005 8:44 pm   
 
All the alias's are are just the directions (pq101-pq193). I"ll say it again.

The Zmud Script (The command box) DELETES SOME OF THE TRIGGER (they scroll off and stop working). If you still don't understand then you can't help me. Basically, that trigger I posted up there actually has about 20 more rooms ... which were deleted off by zmud.
_________________
Yes, I'm a programing newb, but I can fix a car faster than you can spin your head.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Nov 14, 2005 9:08 pm   
 
Generally if you're asking for help then it's better not to be rude to the people attempting to help you, especially when your original description of the problem is somewhat lacking.

Okay, so you have a trigger whose output is being cut short... there are those 20 or so lines that you've listed but another 20 or so have been deleted by zMud?

Post the entire trigger, the bit you tried to put in before it got cut short by zMud, because there's nothing we can do if we only see what you're being left with - we need to see what you started with to see if we can replicate the problem or fix it.

On a separate note, surely some sort of forall or loop would be better suited to the trigger, rather than 40 If statements... but that's for another topic.
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Mon Nov 14, 2005 9:12 pm   
 
We'll start with the nomenclature issue:
The command box (as defined only in Introduction to Multiplaying- Reference: http://forums.zuggsoft.com/modules/mx_kb/kb.php?page=3&mode=doc&k=112 is also known as The command input line (as defined in Introduction to Aliases - Reference: http://forums.zuggsoft.com/modules/mx_kb/kb.php?page=3&mode=doc&k=105
We will start assuming you are referring to the Alias Settings Editor (as defined in Introduction to Aliases - Reference: http://forums.zuggsoft.com/modules/mx_kb/kb.php?page=3&mode=doc&k=105 since you appear to be getting frustrated by the answer when the question is what is lacking information.

On to attempting to get more information.
How many lines is this trigger in total inside the Trigger Settings Editor?
Is it possible it is just the Pretty Printing that is deleting your script? (Preferences->Script Parser->Pretty Printing)
Sometimes it interferes with saving a script over a previous one.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Nov 14, 2005 9:25 pm   
 
I believe he's trying to enter the trigger into the command-line, which DOES have a character/line limit somewhere in the vicinity of 8 lines of text in a game window that stretches from one side of the (15") screen to the other. The text editor (CTRL-SHIFT-ENTER) and the Settings Editor do not have any such limits.
_________________
EDIT: I didn't like my old signature
Reply with quote
talonfreak2003
Beginner


Joined: 02 Dec 2004
Posts: 27
Location: Kansas... whippie!

PostPosted: Mon Nov 14, 2005 10:47 pm   
 
MattLofton wrote:
I believe he's trying to enter the trigger into the command-line, which DOES have a character/line limit somewhere in the vicinity of 8 lines of text in a game window that stretches from one side of the (15") screen to the other. The text editor (CTRL-SHIFT-ENTER) and the Settings Editor do not have any such limits.


So by using the text editor I can enter in the other 20 rooms and it will work properly ? Because if I add another into what I posted, the one on the top will be erased so on and so forth. And I wasn't trying to be rude, it's just some of the people weren't answering and they were asking questions that I already explained
_________________
Yes, I'm a programing newb, but I can fix a car faster than you can spin your head.
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Mon Nov 14, 2005 11:07 pm   
 
Right Matt, that was my initial conclusion as well.
Yes Talon, by using the text editor or the Settings Editor as described above, you can create much larger scripts. The settings editor allows editing of classes, aliases, triggers, etc.
Reply with quote
talonfreak2003
Beginner


Joined: 02 Dec 2004
Posts: 27
Location: Kansas... whippie!

PostPosted: Mon Nov 14, 2005 11:51 pm   
 
Alright, so i've never used that text editor before, how do I get it to work in combination with my triggers?
_________________
Yes, I'm a programing newb, but I can fix a car faster than you can spin your head.
Reply with quote
saplingg
Novice


Joined: 06 Oct 2005
Posts: 31

PostPosted: Tue Nov 15, 2005 4:15 am   
 
Type your triggers in and press "send".


And hey hey hey look who guessed the answer first? Laughing
Reply with quote
Slaem
Apprentice


Joined: 20 Sep 2005
Posts: 135

PostPosted: Tue Nov 15, 2005 5:54 am   
 
The settings editor will show all your settings for you, or you can specify just certain types to view.

At the top of your main zMud window you should have buttons or words reading something like "Setting Aliases Variables Triggers, etc". Clicking on any of those will open up the settings editor. Or, you can access the editor via the menu Settings > Edit Settings.

You can create new settings and modify exiting ones as well.

So, if you want to modify that trigger, access the editor, find the trigger and then you can modify it's content.

Here's a link on the Settings Editor.
http://www.zuggsoft.com/page.php?file=zmud/help6/Settings.htm
_________________
Show your love.
Support Zugg Software!
Donate to zugg@zuggsoft.com with PayPal Send Money.
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Tue Nov 15, 2005 12:37 pm   
 
For information on the Settings Editor, I have already provided a few links describing how to use them as well on the previous page.
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Tue Nov 15, 2005 5:15 pm   
 
talonfreak2003 said
Quote:
All the alias's are are just the directions (pq101-pq193). I"ll say it again.

The Zmud Script (The command box) DELETES SOME OF THE TRIGGER (they scroll off and stop working). If you still don't understand then you can't help me. Basically, that trigger I posted up there actually has about 20 more rooms ... which were deleted off by zmud.


This way I don't try and help out anymore Sad
Where in this person's previous post on this thread did they explain that pq101-p1193 were directions? NOWHERE!!!
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
talonfreak2003
Beginner


Joined: 02 Dec 2004
Posts: 27
Location: Kansas... whippie!

PostPosted: Tue Nov 15, 2005 7:15 pm   
 
Oh, that editor is what I've always used... but it will still scroll commands off the top. they just disappear after a certain amt of text.
_________________
Yes, I'm a programing newb, but I can fix a car faster than you can spin your head.
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Tue Nov 15, 2005 7:22 pm   
 
At this point I am going to have to agree with everyone else. We are going to need to see the entire script so we can reproduce the problem.
Also, which version of zMud are you using?
Reply with quote
OmegaDeus
Apprentice


Joined: 14 Sep 2005
Posts: 121

PostPosted: Wed Nov 16, 2005 3:22 am   
 
Might I suggest using a db var in this case? Seems like it would be a little more efficient.

Pattern:
Code:
^The High Priest of Arkane says 'Look in the general area of Forbidden Forest for {@room_name}'$


then instead of doing if (%1="blah") {alias} you know your %1 already equals something in your list and you can then set it up to #exec %db(@room_name, %1) which would execute your stored alias. Or at least I think it would.
_________________


Look at me I've got zSKILLS
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Wed Nov 16, 2005 7:51 pm   
 
I took OmegasDeus suggestion and created this script for you.. This will do what you want.
Code:

#CLASS {Quests}
#ALIAS addquest {#ADDKEY RoomDirection {%1=%2}}
#VAR RoomDirection {Few stunted pines!pg143Clearing In The Woodspg144Thick Knot of Pine!pg145Wall of Fog!pg146Gravesight!pg147Scarred Fieldpg148Overgrown deer path!pg149Rolling hills of fog!pg150Solid Wall of Timber!pg151Large Cave!bad_questA Bloody Battlefield!pg100A Boulder Strewn Field!pq101A Broken Ice Field!pg102A Broken Wall Of Ice!pg103A Crumbling Ice Wall!pg104A Dark Forest!pg105A Deserters Camp!pg106A Glacier Wall!pg107A Hollow Tree!pg108A Jumbled Pile Of Ice!pg109A Sheer Ice Wall!pg110A Slush Filled Marsh!pg111for A Snow Covered Field!pg112A Wide Path For Deer!pg113An Old Pine Forest!pg114Ice Covered Fields!pg115Small Pine Filled Valley!pg116Some Drifts Of Snow!pg117The Forest Entrance!pg118A Forested Grove!pg119}
#TRIGGER {The High Priest of Arkane says 'Look in the general area of Forbidden Forest for (*)'} {#loopdb @RoomDirection {#if (%key =~ {%1}) {#show %val}}}
#CLASS 0


To use the addquest alias the syntax is: addquest "Blah blah blah" pgxxx
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
nkei0
Beginner


Joined: 08 Oct 2005
Posts: 19

PostPosted: Sun Nov 27, 2005 7:52 pm   
 
I don't know if this would help any but if it is a large number of commands that you need to run instead of using aliases you could use the #READ command, I find it quite helpful.
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