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


Joined: 27 Apr 2004
Posts: 5
Location: USA

PostPosted: Thu Oct 27, 2005 5:51 pm   

Zmud Script in a Variable
 
I am doing some stuff where i want a variable to be some scripting. Multiple lines and everytime i select the zmud script box and save it...it reverts back to the text option and my scripting in the variable doesn't work.... Any ideas on how to get that to stick.or is there a trick to it. that i am missing..
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Thu Oct 27, 2005 7:43 pm   
 
Without seeing the script, I'll just point out the generic information.
1.) If you manually put spaces in front of your lines of script, it does not save often. (found through experience)
2.) Scripting variables require you to place a @ in front of them.
Defined: #var text "hello world!"
Referencing: #show @text
Reply with quote
yejun
Wanderer


Joined: 13 Jun 2005
Posts: 51

PostPosted: Thu Oct 27, 2005 7:45 pm   
 
variable will revert back if there is a default value.
Reply with quote
theputter
Newbie


Joined: 27 Apr 2004
Posts: 5
Location: USA

PostPosted: Thu Oct 27, 2005 8:23 pm   here is the script
 
#VAR ran9 {'hey you.....
#wait 3000
'with the bike...
#wait 2000
'quit looking at me before i open a a can} {} "randomaction"

the says work fine...but the waits don't work ...it is sending the literal to the mud rather than executing a pause...
If i click the zmud script it identifys the waits just fine but when i click save it reverts the setting back to TEXT and the waits are no longer in the pretty print identified as script.

I have tried starting one from scratch and click the zmud script first before i do anything...and i have tried the save button under file rather than on the variable window...with no luck...

It jsut appears that it is not saving the setting change....or does not alow that setting to be changed and saved..or set as smud script and saved
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Thu Oct 27, 2005 8:43 pm   
 
You are probably looking for:

#ALIAS ran9 {
'hey you.....
#wait 3000
'with the bike...
#wait 2000
'quit looking at me before i open a a can
"randomaction"
}

To run it from an alias or a trigger, use:
#EXEC ran9
Reply with quote
theputter
Newbie


Joined: 27 Apr 2004
Posts: 5
Location: USA

PostPosted: Thu Oct 27, 2005 8:53 pm   
 
Yea i guess that would work....but i don't see why what i am doing..shouldn't work...

Here is the full scenario.
On a specfic action
%1 looks at you
excute
@(ran%random{1,8})
so it excutes a random action from a list of 8 items....
I'll switch it over to an alias ...but to me it looks like there is a bug in the variable screen when trying to excute a script within a variable.
Thanks
theputter
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Oct 27, 2005 9:47 pm   
 
Variables were not meant for executing scripts. but there is a workaround %exec
_________________
Zmud Support Library
Zmud Knowledge Base
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