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


Joined: 03 Jun 2003
Posts: 25

PostPosted: Sat Jun 07, 2003 9:42 pm   

help with speed
 
#Trig{^The Supreme Kai gives you one zeni for your sacrifice.$}
#cond{#wait @Time
#add Suppress 1
@Rand = %case( %random( 1, 6), 10, 13, 11, 12, 14, 15)
#if (@Suppress > @Rand) {%case( %random( 1, 3), "suppress", "suppr", "suppres")}
%case( %random( 1, 7), "kil fi", "kill fi", "kill fighter", "kil fighter", "kill fight", "ki fi", "kil fight")
#state cast 0
@Fight = 1
@Over = 0
save}

I know there is alot in there for one trigger, but is there a way to make it faster. Using the #wait comand becuase I have not seen how to get an #alarm or something else to fire in less than seconds. Thinking about moving some of the stuff that just sets stuff up before the wait comand. Thinking that might help the speed, but maybe is there a way to do it will in a @wait or whatever.

Sometimes it is fast (just takes the time of the #wait) and sometimes it is slow (can wait a minute and nothing). Kind of would like it to work for about 3seconds and under. Max I have on the #wait is 2500. Using a random to get it to work randomally.
Reply with quote
DeathofOne
Beginner


Joined: 03 Jun 2003
Posts: 25

PostPosted: Sat Jun 07, 2003 9:43 pm   
 
the line @Rand so on and so worth is not there any more. and in a differ place.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Jun 07, 2003 10:14 pm   
 
I see nothing there that would be terribly slow. You can output the value of %secs before and after some action to find out how much time is spent on that action. This way, you can find which part of the script is slowest.

As for the #WAIT, I don't understand why you said that you can't use an alarm, or even state of type wait for that matter, since you later on talk about having the wait set to 2500.

Kjata
Reply with quote
DeathofOne
Beginner


Joined: 03 Jun 2003
Posts: 25

PostPosted: Sat Jun 07, 2003 10:39 pm   
 
I change it with a random prosses. So it seems more human but you are right. My major promlem with #alarm's is that I can not get them to set on 1minute intervals for some reason.

*edit*
I changed some of the things around moved the save to happen before that trigger and move some of the stupid change @varibables up. Also moved the #case up. Still looks a little some times but it has speed it up on the average alot. Think it might have been the save or one of the things I moved up.

Side note:
%secs Would sometimes read all the same and others would read a good way off from each other this was before the change.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Jun 08, 2003 1:12 pm   
 
By the way, %secs is in milliseconds.

I don't have any problem with alarms that go off in one minute intervals. *60, as a pattern should make the alarm fire every minute. +60 for a one-time one minute alarm. If you want two minutes then use 120, and so on.

Kjata
Reply with quote
DeathofOne
Beginner


Joined: 03 Jun 2003
Posts: 25

PostPosted: Mon Jun 09, 2003 7:04 am   
 
#Alarm -1 is running one minute not 1 sec. That is where I am coming into my problem. If it was not doing that I would use it but
#wait 500 will run 1/2 sec and so on. I am not sure.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Jun 09, 2003 11:30 am   
 
Why use the connection time? As mentioned in my previous reply, an alarm of +1 is a temporary alarm that will fire in one second and an alarm of *1 is an alarm that fires every second. Both of these work fine.

The problem with #WAIT is that it may cause some weird side effects. Read this article for more information.

Kjata
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