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 01-05-2005, 06:54 PM   #1 (permalink)
 
Join Date: Nov 2002
Posts: 1
Default If, Else and EndIf statements???

Ok heres my macro:
Code:
!Loop
Assistant.Macros.UseSkillAction|33
Assistant.Macros.WaitForTargetAction
Assistant.Macros.AbsoluteTargetAction|0|0|1074405343|141|66|0|3705
Assistant.Macros.PauseAction|00:00:02
Assistant.Macros.IfAction|4|0|successfully
Assistant.Macros.LiftAction|1074405343|1|3705
Assistant.Macros.DropAction|0x400A1FE0|(142, 65, 0)|0
Assistant.Macros.EndIfAction
Assistant.Macros.ElseAction
Assistant.Macros.PauseAction|00:00:10
Assistant.Macros.UseSkillAction|33
Assistant.Macros.WaitForTargetAction
Assistant.Macros.AbsoluteTargetAction|0|0|1074228550|116|66|0|3705
Assistant.Macros.PauseAction|00:00:02
Assistant.Macros.IfAction|4|0|successfully
Assistant.Macros.LiftAction|1074228550|1|3705
Assistant.Macros.DropAction|0x400A1FE0|(116, 65, 0)|0
Assistant.Macros.EndIfAction
Assistant.Macros.ElseAction
Assistant.Macros.PauseAction|00:00:10
Assistant.Macros.UseSkillAction|33
Assistant.Macros.WaitForTargetAction
Assistant.Macros.AbsoluteTargetAction|0|0|1074228547|90|66|0|3705
Assistant.Macros.PauseAction|00:00:02
Assistant.Macros.IfAction|4|0|successfully
Assistant.Macros.LiftAction|1074228547|1|3705
Assistant.Macros.DropAction|0x400A1FE0|(90, 65, 0)|0
Assistant.Macros.EndIfAction
Assistant.Macros.ElseAction
Assistant.Macros.PauseAction|00:00:10
Assistant.Macros.UseSkillAction|33
Assistant.Macros.WaitForTargetAction
Assistant.Macros.AbsoluteTargetAction|0|0|1074228549|66|66|0|3705
Assistant.Macros.PauseAction|00:00:02
Assistant.Macros.IfAction|4|0|successfully
Assistant.Macros.LiftAction|1074228549|1|3705
Assistant.Macros.DropAction|0x400A1FE0|(66, 65, 0)|0
Assistant.Macros.EndIfAction
Assistant.Macros.ElseAction
Assistant.Macros.PauseAction|00:00:10
Assistant.Macros.UseSkillAction|33
Assistant.Macros.WaitForTargetAction
Assistant.Macros.AbsoluteTargetAction|0|0|1074228551|45|66|0|3705
Assistant.Macros.PauseAction|00:00:02
Assistant.Macros.IfAction|4|0|successfully
Assistant.Macros.LiftAction|1074228551|1|3705
Assistant.Macros.DropAction|0x400A1FE0|(45, 65, 0)|0
Assistant.Macros.EndIfAction
Assistant.Macros.PauseAction|00:00:10
Now from my understanding else should not be happening if there is no if before it. Basically like this

!Loop
a = b
if (a = b)
endif
else
say bob
endif

so this should continually loop and not ever say bob because a will always = b. With the macro for razor though it treats each else statemant as a new if and never goes back to the begining on an endif statement.

Ok the setup:
One pouch open on the gound with 5 pouches inside each weighing a stone more. I want it to steal the heaviest one and check to see if successful. [IF] If its successful move the pouch outta backpack and back into pouch on ground and restart the macro from the begining. [ENDIF] If it failes move to next pouch 1 stone lighter and continue. [ELSE]

Am I asking for something that Razor cant do or does razor treat if, else and endif statements differently from regular programs?
Skitch is offline   Reply With Quote
Old 01-06-2005, 04:13 AM   #2 (permalink)
Administrator
 
Zippy's Avatar
 
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,868
Default

The syntax is

If ( Condition )
Statement(s)
Else
Statement(s)
End If

You do NOT want to have an End If before the else.
__________________
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