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


Joined: 11 Jun 2003
Posts: 9
Location: USA

PostPosted: Wed Jun 11, 2003 4:07 am   

Quest Triggers
 
ok i have a quest trigger set up where i have a list of triggers in a folder. when i type complete card it gives me 4 items to find and looks like this:

You still need to find the following:
An old, tattered map.
The white pelt of a yeti.
A diamond gem.
A pale blue stone.


now i want it too look at these items and if anyone of them is A Silver Blue Wand or A Metal Wand i want it to do the following commands:
drop card
sac card
if none of those items is that then i want it to execute the triggers
an example of my triggers look like this:
#CLASS {quest}

#TRIGGER {^ A lamia collar.} {travel 'pet lamia';k pet;get collar cor;com collar}
#TRIGGER {^ An imperial chest plate.} {travel 'imperial cityguard';k cityguard;get plate cor;com plate}
#TRIGGER {^ The Titanic Horns of Capricorn.} {travel capricorn;k capricorn;get horn cor;com horn}
#TRIGGER {^ A prism wand.} {gk 'prism dragon';get wand cor;com wand}
#TRIGGER {^ An aegis.} {gk zeus;get aegis cor;com aegis}
#TRIGGER {^ An artist's smock.} {travel etcher;kill etcher;get smock cor;com smock}
#TRIGGER {^ An auburn-colored orb.} {travel horror;kill horror;get orb cor;com orb}

#CLASS 0


if anyone could tell me how to do this it would be greatly appreciated.
thanx
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jun 12, 2003 7:00 pm   
 
You won't be able to do this the way you have it now. Your kill triggers will act immediately but you won't be able to check if those wands are on the card until you've seen all four items. If the first item on the card is A lamia collar and the second item is A Silver Blue Wand, you'll already be killing the lamia before you drop and sacrifice the card.

One way of doing this is to pair the items and their commands in a record-variable. You can then retrieve the needed commands for each item AFTER you've verified the card doesn't require one of those wands.

#ADDK QuestCommands {A lamia collar} {travel 'pet lamia';k pet;get collar cor;com collar}
#ADDK QuestCommands {An imperial chest plate} {travel 'imperial cityguard';k cityguard;get plate cor;com plate}
#TR QuestCard {You still need to find the following:} {#VAR QuestItems {}}
#COND {(*).} {#ADDI QuestItems {%1}} {LoopLines|Param=4}
#COND {} {#IF (%ismember( "A Silver Blue Wand", @QuestItems) OR %ismember( "A Metal Wand", @QuestItems)) {drop card;sac card} {#IF (%iskey( @QuestCommands, %item( @QuestItems, 1))) {#EXEC %db( @QuestCommands, %item( @QuestItems, 1))} {#SAY Unknown Quest Item: %item( @QuestItems, 1)};#IF (%iskey( @QuestCommands, %item( @QuestItems, 2))) {#EXEC %db( @QuestCommands, %item( @QuestItems, 2))} {#SAY Unknown Quest Item: %item( @QuestItems, 2)};#IF (%iskey( @QuestCommands, %item( @QuestItems, 3))) {#EXEC %db( @QuestCommands, %item( @QuestItems, 3))} {#SAY Unknown Quest Item: %item( @QuestItems, 3)};#IF (%iskey( @QuestCommands, %item( @QuestItems, 4))) {#EXEC %db( @QuestCommands, %item( @QuestItems, 4))} {#SAY Unknown Quest Item: %item( @QuestItems, 4)}}} {Wait|Param=100}

LightBulb
Advanced Member
Reply with quote
Monsoon
Newbie


Joined: 11 Jun 2003
Posts: 9
Location: USA

PostPosted: Sat Jul 12, 2003 10:59 pm   
 
sorry i havent replied to ur post in a while..computer has been broke lol
anyway i tried that solution you give me however i dont think it is workin....
i notice that it is not storing the quest items into the @questitems variable
i think it may be this reason..but im not sure
when i type complete card it says
You still need to find the following items:
A lamia collar.
A silvery blue wand.
ect...
last time i forgot the spaces before the items..im not sure if that affects anything...lol im not good with this kinda stuff=)
ok if u could help me out it would appreciate it a bunch
thanx
Reply with quote
Monsoon
Newbie


Joined: 11 Jun 2003
Posts: 9
Location: USA

PostPosted: Sun Jul 13, 2003 12:44 am   
 
ok ive been trying some other triggers that i found in the tutorials
and they are not adding items to variables either....im thinkin theyre may be something wrong with my version of zmud...im using 6.16
or i have a setting messed up...
if someone could give me feedback maybe it would help me figure out why Lightbulb's solution is not working either...
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jul 13, 2003 5:35 am   
 
The first reason it won't work is that multistate triggers, and the #CONDITION command, weren't introduced until after 6.16. If you aren't using the latest public version of zMUD you really should mention it when you first ask a question. I'll take another look at it tomorrow and see if I can revise it to something that will work on your older version.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jul 13, 2003 4:29 pm   
 
#CLASS Quest
#TR {You still need to find the following:;(*);(*);(*);(*)} {#VAR QuestItems {%1};#ADDI QuestItems {%2};#ADDI QuestItems {%3};#ADDI QuestItems {%4};#IF (%ismember( "A Silver Blue Wand", @QuestItems) OR %ismember( "A Metal Wand", @QuestItems)) {drop card;sac card} {#IF (%iskey( @QuestCommands, %item( @QuestItems, 1))) {#EXEC %db( @QuestCommands, %item( @QuestItems, 1))} {#SAY Unknown Quest Item: %item( @QuestItems, 1)};#IF (%iskey( @QuestCommands, %item( @QuestItems, 2))) {#EXEC %db( @QuestCommands, %item( @QuestItems, 2))} {#SAY Unknown Quest Item: %item( @QuestItems, 2)};#IF (%iskey( @QuestCommands, %item( @QuestItems, 3))) {#EXEC %db( @QuestCommands, %item( @QuestItems, 3))} {#SAY Unknown Quest Item: %item( @QuestItems, 3)};#IF (%iskey( @QuestCommands, %item( @QuestItems, 4))) {#EXEC %db( @QuestCommands, %item( @QuestItems, 4))} {#SAY Unknown Quest Item: %item( @QuestItems, 4)}}}
#CLASS 0

Edit: The first #ADDI changed to #VAR to clear @QuestItems.
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