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


Joined: 02 Apr 2006
Posts: 20

PostPosted: Sun Apr 02, 2006 12:43 pm   

Making Scripts automatically
 
Hi there I am trying to make some scipts automatically. I ahve an output going to a window
The merchant examines your large hammered copper shield and makes an initial offer of 31sp.
the underlined parts are always the same. the item name and price are different.

I want it to take this and turn it into a sub trigger like this
#TRIGGER {large hammered copper shield} {#sub {large hammered copper shield 31sp}} can zmud do this? Thanks a bunch


Dravon
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Apr 02, 2006 6:11 pm   
 
I thought you knew how to do this already, Dravon (you're the same one who used to play dragon's gate a few years back, right?)

Anyways, if you just want to chop down that long line to just it's variable portions you can do something like this:

#trigger {The merchant examines your ([%x%s]) and makes an initial offer of (%a).} {#sub {%1 %2}}

If you want to make it so that all instances of that item appear with the price, use a trigger like you posted but instead of using #SUB use #PSUB.
_________________
EDIT: I didn't like my old signature
Reply with quote
dravond
Beginner


Joined: 02 Apr 2006
Posts: 20

PostPosted: Sun Apr 02, 2006 6:36 pm   
 
hey mat thanks a bunch ill give that a try. Yes it is the same dravon. I havent used zmud for a few years so I am learning it again. what I want this trigger to do when i am done is after I have the merchant give me the price i want to be able to look at that item and see its price along with the name so If I see short thick bladed steel dirk on the ground it will sub and show me short thick bladed steel dirk 63sp
so i dont have to remember the prices it will show me them.

I already have some made by hand
#CLASS {items prices 4-1-06}
#TRIGGER {short iron dirk} {#sub {short iron dirk 12sp}}
#TRIGGER {large hammered copper shield} {#sub {large hammered copper shield 31sp}}
#TRIGGER {feathered birch spear} {#sub {feathered birch 22sp}}
#TRIGGER {brass hilted silver khopesh} {#sub {brass hilted silver khopesh 36sp}}
#TRIGGER {leather lockpick} {#sub {leather lockpick case 46sp}}
#TRIGGER {crystalla reinforced mahogany targe} {#sub {crystalla targe 66sp}}
#TRIGGER {leather barbuta} {#sub {leather barbuta 18sp}}
#TRIGGER {stag bone helm} {#sub {stag bone helm 35sp}}
#CLASS 0
I want to continue this but I want zmud to do it
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