UOSteam macro syntax help

Alucard

Grandmaster
Hi, please help with writing scripts in UOSteam

For example, macro dressing weapons, if it finds 1 in the list puts it, if not find 1 put 2

if not @findlayer 'self' 1;
if @findtype 0x143b 'any' 'backpack' or @findtype 0x1407 'any' 'backpack' or @findtype 0x1439 'any' 'backpack';
@equipitem 'found' 1;
endif;
/ 0x143b-maul, 0x1407-war mace, 0x1439-war hammer;

if i use 2 conditions, work normal
if i use 3 conditions\weapon work only 2
i can't use {or or or or } ?
 

amonseti

Grandmaster
Not sure what your talking about but I think this is what your looking for ..

Code:
@clearhands 'both'
pause 500
warmode 'on'
//*** Find and equip any fencing wep in backpack ***
if not listexists 'WepList'
  createlist 'WepList'
endif
@clearlist 'WepList'
@pushlist 'WepList' 0x1405 //Warfork
@pushlist 'WepList' 0x1401 //Kryss
@pushlist 'WepList' 0xf52  //Dagger
//
for 0 to 'WepList'
  if @findtype 'WepList[]' 'any' 'backpack'
    unsetalias 'WEP'
    setalias 'WEP' 'found'
  endif
endfor
//
if not @findlayer 'self' 2
  equipitem 'WEP' 2
endif

if you only want 2 weapons in the list do something like this

Code:
@clearhands 'both'
pause 500
warmode 'on'
//*** Find and equip Wep A first Priority , then Wep B 2ndary Priority
if not listexists 'WepList'
  createlist 'WepList'
endif
@clearlist 'WepList'
@pushlist 'WepList' 0x1405 //Weapon B
@pushlist 'WepList' 0x1401 //Weapon A
//
for 0 to 'WepList'
  if @findtype 'WepList[]' 'any' 'backpack'
    unsetalias 'WEP'
    setalias 'WEP' 'found'
  endif
endfor
//
if not @findlayer 'self' 2
  equipitem 'WEP' 2
endif
This is essentialy the same as my first code example , except now i only have a list of 2 weapons ,, and this is a last in first up scenario , so if Wep A is in your pack it will always equip that one over wep B but if wep A is absent then Wep B will be equiped instead .
 

Alucard

Grandmaster
Not sure what your talking about but I think this is what your looking for ..

Code:
@clearhands 'both'
pause 500
warmode 'on'
//*** Find and equip any fencing wep in backpack ***
if not listexists 'WepList'
  createlist 'WepList'
endif
@clearlist 'WepList'
@pushlist 'WepList' 0x1405 //Warfork
@pushlist 'WepList' 0x1401 //Kryss
@pushlist 'WepList' 0xf52  //Dagger
//
for 0 to 'WepList'
  if @findtype 'WepList[]' 'any' 'backpack'
    unsetalias 'WEP'
    setalias 'WEP' 'found'
  endif
endfor
//
if not @findlayer 'self' 2
  equipitem 'WEP' 2
endif

if you only want 2 weapons in the list do something like this

Code:
@clearhands 'both'
pause 500
warmode 'on'
//*** Find and equip Wep A first Priority , then Wep B 2ndary Priority
if not listexists 'WepList'
  createlist 'WepList'
endif
@clearlist 'WepList'
@pushlist 'WepList' 0x1405 //Weapon B
@pushlist 'WepList' 0x1401 //Weapon A
//
for 0 to 'WepList'
  if @findtype 'WepList[]' 'any' 'backpack'
    unsetalias 'WEP'
    setalias 'WEP' 'found'
  endif
endfor
//
if not @findlayer 'self' 2
  equipitem 'WEP' 2
endif
This is essentialy the same as my first code example , except now i only have a list of 2 weapons ,, and this is a last in first up scenario , so if Wep A is in your pack it will always equip that one over wep B but if wep A is absent then Wep B will be equiped instead .
thanks very helpful
 

Alucard

Grandmaster
another question :rolleyes:
is there a parameter - check for the use of bandages?
if timer applying bandages exist - do not use bandages
 

tragic

Neophyte
you could use a journal scan...


if @injournal 'finish applying' 'system' or timer 'bandie' >= 10000
bandageself
clearjournal
settimer bandie 0
endif



idk if thats right wording or w/e i just wrote that up on here so yea..... you get the point.
 

amonseti

Grandmaster
you could use a journal scan...


if @injournal 'finish applying' 'system' or timer 'bandie' >= 10000
bandageself
clearjournal
settimer bandie 0
endif



idk if thats right wording or w/e i just wrote that up on here so yea..... you get the point.

Not so sure journal will catch "finish applying" . Also this would be considered an auto heal which I do beleave is a no no,
But to some up this would work if the journal did catch that string .
 

halygon

Grandmaster
another question :rolleyes:
is there a parameter - check for the use of bandages?
if timer applying bandages exist - do not use bandages
There is no parameter that tells you the status of a bandaid in-progress. There IS a built in counter that you can add to the top of your window (Title Bar). You can add this to y our Title Bar code via $bandagetimer (also available on the Shortcuts list). You cannot use this in any macros though - it is a standalone feature.

No. You have to make your own timer in the macro.
You can do this, however it won't work very good. The problem is that the timer counts in milliseconds and not seconds.

Maybe if you let us know what you are trying to accomplish with the bandaids, we can help you further. It sounds though that you are heading towards either an auto-heal macro (no no) or a single button that prevents you from applying a new bandaid if one is already in progress.
 

Alucard

Grandmaster
Thank you all, and interesting option with a journal scan.
I will try to adapt the version from Guide

Sample
if not timerexists 'bandageSelf'
// You can use createtimer function, settimer create and set a value
settimer 'bandageSelf' 2000
endif
if hits != maxhits
// Check if timer elpased 2 seconds
if timer 'bandageSelf' >= 2000
bandageself
else
// Reset timer
settimer 'bandageSelf' 0
endif
// Check if poisoned
if poisoned 'self'
usetype! 0xf07
endif
endif
...

please - advise fastest variant of UOS script. (in razor was easy)
need drop item on ground from backpack 1 tile (not coordinates) for example - to the east
need use - moveitem 'ground' x y z ?
 

Alucard

Grandmaster
...

please - advise fastest variant of UOS script. (in razor was easy)
need drop item on ground from backpack 1 tile (not coordinates) for example - to the east
need use - moveitem 'ground' x y z ?
answer is -
movetypeoffset Graphic 'backpack' 'ground' 0 1 0 0
 

bane

Master
Not sure what your talking about but I think this is what your looking for ..
....

You should add a break inside of the if statement within the for loop. No need to search through the backpack again after it found the first match.
 

bane

Master
Code:
if not timerexists 'bandageSelf'
// You can use createtimer function, settimer create and set a value
settimer 'bandageSelf' 2000
endif
if hits != maxhits
// Check if timer elpased 2 seconds
if timer 'bandageSelf' >= 2000
bandageself
// Moved this inside this if so you don't continually reset the timer when it is counting down.  You want to reset it on apply.
// Reset timer
settimer 'bandageSelf' 0
endif
// Check if poisoned
if poisoned 'self'
usetype! 0xf07
endif
endif

Pretty sure you need to move that timer reset to just after you bandage self otherwise you will continually reset the timer even if you didn't bandage. See above.
 
Top