Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Haldrik
Wanderer


Joined: 03 Sep 2007
Posts: 88

PostPosted: Fri Sep 07, 2007 11:35 am   

#Wait vs Wait|Param-- How to use variable as the wait Param?
 
I've been using a LOT of #wait during my scripting. I also read about the side effects of using #wait and have noticed some choppyness / lag that I believe is due to the #wait.

So... I am trying to convert my old #Waits into the new Wait|Param trigger state. I am having issues as i use a variable in my #wait

Roundtime:

#wait ((@rt+1)*1000)

#sw (@expvalue = 1 && @action = 1) {@botkill}
(@expvalue = 1 && @action = 2) {lootmob}
(@expvalue = 2 && @action = 1) {#T- tm;#T- AttackSeq;#T+ roomobvious;look}
(@expvalue = 2 && @action = 2) {lootmob;#T- tm;#T- AttackSeq;#T+ roomobvious;look}

Using the Param example....

#ONINPUT {Go} {First Command}
#COND {} {Fourth Command} {Wait|Param=((@rt+1)*1000)}

Would be something to this effect. Yet it drops it to 0 Ms when I try using this example.

Does anyone have any ideas how to make this work? Is the performance extra even worth it?
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Fri Sep 07, 2007 11:59 am   
 
You could wait until the newer version of CMUD goes public where the side effect of #wait is removed as threads are used.
_________________
Taz :)
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Fri Sep 07, 2007 12:02 pm   
 
I'm pretty sure you can't use Wait|Param with a variable value, unless maybe you're always destroying and re-creating the trigger, which I wouldn't recommend. I'd recommend an alarm to separate the commands. If you prefer to use #WAIT, though, use CMUD 2.x, as Taz suggested.
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Fri Sep 07, 2007 12:06 pm   
 
Bear in mind that I did say wait until it goes public since it is currently in beta testing and should not be used as your day to day client.
_________________
Taz :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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