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


Joined: 29 Nov 2005
Posts: 3

PostPosted: Tue Nov 29, 2005 3:50 am   

Help with Zmud Scripty Alias Thingy
 
Hello. I do not know much about programming and zMud and all that stuff. I can do basic macros, aliases, and triggers, and there I stop.

I need an alias I used to have for zMud but have since lost somehow.

I can explain exactly what I need in hopes that someone knows how to do this and explain how I put it in zMud in a simple, clear manner.

The game I play has a herbs/poisons system in which you must pick and prepare the herbs and poisons.

I need an alias that would do the following:

pick herbname

Then wait until this line: Right hand ready.

Then:

prepare herbname

Then:

inpouch herbname

Then wait until this line again: Right hand ready.

Then restart the alias.

Problem: The 'right hand ready' line is used often in the game so it would have to turn itself on and off as a trigger line in the alias itself.

Also, I'd like to specify the number of times I can do this in the alias itself.

I would like the alias to look something like this:

pic herbname #

Thank you very much for any help you can give me.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Nov 29, 2005 1:39 pm   
 
This should create an alias that:
1) allows for pick herbname or pick herbname #
2) Waits for Right Hand Ready. just during the process of the herb picking, preparing and inpouch'ing.
3) Puts it into folder HerbPickPrepare

#ALIAS pick {#IF ((%numparam( )==1) OR (%int( %2)>0)) {~pick %1;#ALARM RightHAndReadyPrepare +1 {#temp RightHandReady {Right hand ready.} {prepare %1;#ALARM RightHAndReadyInPouch +1 {#TEMP RightHandReady {Right hand ready.} {inpouch %1;pick %1 [%2-1]} "" {}}} "" {}}} {#NOOP End of herb preparing script.}} "HerbPickPrepare"
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Nov 29, 2005 1:59 pm   
 
#CLASS {Herbing}
#ALIAS pic {#VARIABLE howmany {0};#VARIABLE howmanycount {0};#VARIABLE herbname {%1};#VARIABLE howmany {%2};#SEND {pick @herbname};#T+ righthandready1}
#VAR howmany {0} {0}
#VAR herbname {} {}
#VAR howmanycount {0} {0}
#TRIGGER "Righthandready1" {Right hand ready} {#SEND {prepare @herbname};#SEND {inpouch herbname};#T+ righthandready2;#T- righthandready1} "" {disable}
#TRIGGER "Righthandready2" {Right hand ready} {#ADD howmanycount 1;#IF (@howmanycount = @howmany) {#ECHO Last Herbing Being Performed Now.} {#T+ righthandready1;#SEND {pick @herbname}};#T- righthandready2} "" {disable}
#CLASS 0

Tried it and it worked.
_________________
http://www.Aardwolf.com
Reply with quote
adverge
Newbie


Joined: 29 Nov 2005
Posts: 3

PostPosted: Wed Nov 30, 2005 3:46 am   
 
Oh thank you that works!

The only problem with it is that the "inpouch herbname" line says that I'm not holding a herbname to inpouch.

Thank you very much for this. Maybe I can figure out what's missing and get it sorted.
Reply with quote
adverge
Newbie


Joined: 29 Nov 2005
Posts: 3

PostPosted: Wed Nov 30, 2005 3:51 am   
 
Actually, I need a 'right hand ready' before the inpouch as well.

Also, when I try to change the type of herb/poison it still picks the first one I chose. How do I change that?
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Fri Dec 02, 2005 3:08 pm   
 
The inpouch herbname it shoulda been inpouch @herbname

This is for the right hand ready inpouch

#CLASS {Herbing}
#ALIAS pic {#VARIABLE howmany {0};#VARIABLE howmanycount {0};#VARIABLE herbname {%1};#VARIABLE howmany {%2};#SEND {pick @herbname};#T+ righthandready1}
#VAR howmany {0} {0}
#VAR herbname {} {}
#VAR howmanycount {0} {0}
#TRIGGER "Righthandready1" {Right hand ready} {#SEND {prepare @herbname};#T+ righthandready2;#T- righthandready1} "" {disable}
#TRIGGER "Righthandready2" {Right hand ready} {#SEND {inpouch @herbname};#T+ righthandready3;#T- righthandready2} "" {disable}
#TRIGGER "Righthandready3" {Right hand ready} {#ADD howmanycount 1;#IF (@howmanycount = @howmany) {#ECHO Last Herbing Being Performed Now.} {#T+ righthandready1;#SEND {pick @herbname}};#T- righthandready3} "" {disable}
#CLASS 0

What exactly do u mean by change type doing the same?
pic herb 3
Runs thru the cycle 3 times
pic poison 3
Runs thru the cycle with herb not poison?
Shouldn't be doing that at all. Are you sure you copied and pasted correctly?

#ALIAS pic {#VARIABLE howmany {0};#VARIABLE howmanycount {0};#VARIABLE herbname {%1};#VARIABLE howmany {%2};#SEND {pick @herbname};#T+ righthandready1}

pic herb 3
the herb is the %1 the 3 is the %2
whenever you type the command it resets the herbname

Question is the herb/poison picked always one work? Meant to ask that before.
_________________
http://www.Aardwolf.com
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