|
maggwulf Newbie
Joined: 27 Sep 2005 Posts: 1
|
Posted: Tue Sep 27, 2005 1:05 am
Help with a loop script |
ok..I am new to this..and usually try to figure things out on my own, I have searched the forums and have picked up on a lot of stuff. I originally made an alias to loop this process by using #wait commands etc..but after reading through some other scripts, I see that it can be done MUCH more efficiently. Heres a little info on what I need/want...and thanks in advance.
I want my character to...
Lore <object>
if movement is less than 100 I want to sleep until movement is at least 300
Wake
repeat
and obviously a way to stop the loop.
I figured if soeone could show me how to do this first one, then I could disect the code and learn how to move on to bigger things. Thanks. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Sep 27, 2005 1:31 am |
Use an alarm and your prompt trigger:
#alarm tSleepAlarm *30 {#cr} //this will force another prompt, adjust time as needed (I didn't want to make it too spammy)
#trigger {(%d)/(%d)hp (%d)/(%d)mp (%d)/(%d)mv~>} {#if (%3 >= 300) {#T- tSleepAlarm;wake;lore object} {sleep;#T+ tSleepAlarm}} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|