Go Back   RunUO - Ultima Online Emulation > RunUO > Utility Support > Razor: The Cutting Edge UO Assistant

Razor: The Cutting Edge UO Assistant Razor is an Assistant program (similar to the popular UOAssist) for player run Ultima Online shards.

Reply
 
Thread Tools Display Modes
Old 03-03-2007, 07:36 AM   #1 (permalink)
Newbie
 
Join Date: Mar 2006
Posts: 13
Default Feature request: While statement

It would be very good if in future version was a while and endwhile statements...
for having for example such a macros :


If (Hits<=10)
While(Hits<=90)
Double click (clean bandage%s%(0E21)
Wait for target
Exec: Target self
Pause 4.00 sec
endwhile
Endif
Bluekilla is offline   Reply With Quote
Old 03-03-2007, 12:24 PM   #2 (permalink)
Master of the Internet
 
Join Date: Oct 2005
Age: 45
Posts: 6,283
Default

You don't need while... simply loop the macro and it will do the same thing.

The bottom line is that you have to start and stop the macros manually, so the while statement would do nothing more than the looping if (which is exactly what a while is).
__________________
Why is it that I'm never as smart as I thought I was yesterday?
My vast knowledge is only surpassed by my infinite ignorance.
<TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him
Malaperth is offline   Reply With Quote
Old 03-03-2007, 05:10 PM   #3 (permalink)
Forum Novice
 
Join Date: May 2006
Posts: 260
Default

It would be useful if there was a count variable as well.

while count < 5
count++

So you don't have to add the same exact step five times in the macro and just do that...
Big Cheez-it is offline   Reply With Quote
Old 03-03-2007, 05:26 PM   #4 (permalink)
Master of the Internet
 
Join Date: Oct 2005
Age: 45
Posts: 6,283
Default

There already is a way to loop x times.
__________________
Why is it that I'm never as smart as I thought I was yesterday?
My vast knowledge is only surpassed by my infinite ignorance.
<TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him
Malaperth is offline   Reply With Quote
Old 03-03-2007, 06:04 PM   #5 (permalink)
Newbie
 
Join Date: Mar 2006
Posts: 13
Default

Quote:
Originally Posted by Malaperth View Post
You don't need while... simply loop the macro and it will do the same thing.

The bottom line is that you have to start and stop the macros manually, so the while statement would do nothing more than the looping if (which is exactly what a while is).
You are wrong...look attentively at the example i gave... imagine i'm using the magery skill i.e. magic arrow or poison on myself... i need to heal when my hits are lower than 10, and not one time, but until my hits goes to maximum...so i need a conditioned loop in the main loop...do you understand the thread ??? its just an example... while is very powerful anterior looping statement that can be very useful in macroing


What about an argument like lastsysmsg???

Last edited by Bluekilla; 03-03-2007 at 06:16 PM.
Bluekilla is offline   Reply With Quote
Old 03-03-2007, 06:19 PM   #6 (permalink)
Forum Novice
 
Join Date: May 2006
Posts: 260
Default

Quote:
Originally Posted by Malaperth View Post
There already is a way to loop x times.
How? And inside the looping macro... right?
Big Cheez-it is offline   Reply With Quote
Old 03-03-2007, 06:26 PM   #7 (permalink)
Master of the Internet
 
Join Date: Oct 2005
Age: 45
Posts: 6,283
Default

Yes, inside a looping macro. Right-click and select Special Constructs and select Insert For Loop
__________________
Why is it that I'm never as smart as I thought I was yesterday?
My vast knowledge is only surpassed by my infinite ignorance.
<TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him
Malaperth is offline   Reply With Quote
Old 03-03-2007, 06:27 PM   #8 (permalink)
Master of the Internet
 
Join Date: Oct 2005
Age: 45
Posts: 6,283
Default

Quote:
Originally Posted by Bluekilla View Post
You are wrong...look attentively at the example i gave... imagine i'm using the magery skill i.e. magic arrow or poison on myself... i need to heal when my hits are lower than 10, and not one time, but until my hits goes to maximum...so i need a conditioned loop in the main loop...do you understand the thread ??? its just an example... while is very powerful anterior looping statement that can be very useful in macroing


What about an argument like lastsysmsg???
You can use an If with an Else statement to do what you request.
__________________
Why is it that I'm never as smart as I thought I was yesterday?
My vast knowledge is only surpassed by my infinite ignorance.
<TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him
Malaperth is offline   Reply With Quote
Old 03-04-2007, 05:10 AM   #9 (permalink)
Newbie
 
Join Date: Mar 2006
Posts: 13
Default

Ok, if you think that you are right, show me the same macro i presented without usin while

If (Hits<=10)
While(Hits<=90)
Double click (clean bandage%s%(0E21)
Wait for target
Exec: Target self
Pause 4.00 sec
endwhile
Endif
Bluekilla is offline   Reply With Quote
Old 03-04-2007, 05:22 AM   #10 (permalink)
Newbie
 
Join Date: Mar 2006
Posts: 13
Default

Quote:
Originally Posted by Malaperth View Post
Yes, inside a looping macro. Right-click and select Special Constructs and select Insert For Loop
If you noticed, For loop provides only a loop with exact number of iterations so this will not work,(of course you can insert tons of If messing up the script but it is a barbarian way, a stupid one), an alternative for while is introducing break,for example:

For (1 to <n>) // n should be a big number for us to get sure that the character did everything
<The actions itselves>
if (<our statement to control>)
Break
EndIf
EndFor

Last edited by Bluekilla; 03-04-2007 at 05:24 AM.
Bluekilla is offline   Reply With Quote
Old 03-04-2007, 11:16 AM   #11 (permalink)
Administrator
 
Zippy's Avatar
 
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,868
Default

Razor will never gain a while loop or any other new constructs. Razor is *not* a programming tool and it is *not* designed to play the game for you. There *is* a tool out there that does this, if you want this kind of functionality use EasyUO.
__________________
Zippy, Razor Creator and RunUO Core Developer
The RunUO Software Team

"Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal."
~The Cryptonomicon

Zippy is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5