UOGamers Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • To obtain new Razor updates, please reinstall Razor from our new website.

Finding properties script

Daho

Wanderer
Is there any scrip that could help finding weapons with detailed properties like swing speed or slayer? For example in the container there is a lot of swords and I want to find only slayers - is there a possibility to make it faster?
 

c0d3r

Traveler
sample that will grab from container if item has demon slayer, undead slayer or swing speed >= 25
replace WEAPON_GRAPHIC_HERE with item graphic, you can see the graphic by using object inspector button and selecting the item in game
Code:
// Ask for a container
promptalias 'container'
// Open selected container once in case it is not open and receive its contents
waitforcontents 'container' 2500
clearignorelist
// Replace item graphic below
while @findtype WEAPON_GRAPHIC_HERE 'any' 'container'
  waitforproperties 'found' 2500
  @unsetalias 'move'
  // Check item properties
  if @property 'demon slayer' 'found'
    @setalias 'move' 'found'
  elseif @property 'undead slayer' 'found'
    @setalias 'move' 'found'
  elseif @property 'swing speed increase' 'found' >= 25
    @setalias 'move' 'found'
  endif
  // Move the item
  if @findalias 'move'
    moveitem 'found' 'backpack'
    pause 800
  endif
  ignoreobject 'found'
endwhile
 

c0d3r

Traveler
Can u make this script to check "item property number/s" too?
what do you mean by property numbers? you can compare values like I did with swing speed increase:
Code:
  if @property 'mana regeneration' 'found' == 2
     ...
  elseif @property 'lower reagent cost' 'found' >= 16
    ...
  endif

you can also create a list and check more than one item graphic, sample:
Code:
...
if not listexists 'armors'
  createlist 'armors'
endif
// Tunic
pushlist! 'armors' 0x13cc
// Leggings
pushlist! 'armors' 0x13cb
for 0 to 'armors'
  while @findtype 'armors[]' 'any' 'container'
    ...
  endwhile
endfor
 

Palanzane

Sorceror
No, you misunderstood me. I meant like "ring with 5 props" thats what i wanted to say with property numbers.
 

c0d3r

Traveler
@Palanzane it is possible, I'd create a score list that would hold item properties and count later:
Code:
// Ask for a container
promptalias 'container'
waitforcontents 'container' 2500
// Create a score list to hold item properties
if not listexists 'score'
  createlist 'score'
endif
// Search for both ring graphics: gold and silver
clearignorelist
while @findtype 0x108a 'any' 'container' or @findtype 0x1f09 'any' 'container'
  // Make sure item score list is empty for each item we find
  clearlist 'score'
  // Check item properties
  waitforproperties 'found' 2500
  if @property 'faster casting' 'found'
    pushlist 'score' 'faster casting'
  elseif @property 'faster cast recovery' 'found' >= 2
    pushlist 'score' 'faster cast recovery'
  elseif @property 'lower mana cost' 'found' >= 3
    pushlist 'score' 'lower mana cost'
  elseif @property 'spell damage increase' 'found' >= 8
    pushlist 'score' 'spell damage increase'
  elseif @property 'damage increase' 'found' >= 15
    pushlist 'score' 'damage increase'
  elseif @property 'enhance potions' 'found' >= 15
    pushlist 'score' 'enhance potions'
  elseif @property 'hit chance increase' 'found' >= 10
    pushlist 'score' 'hit chance increase'
  elseif @property 'defense chance increase' 'found' >= 10
    pushlist 'score' 'defense chance increase'
  elseif @property 'luck' 'found' >= 80
    pushlist 'score' 'luck'
  elseif @property 'physical resist' 'found' >= 6
    pushlist 'score' 'physical resist'
  elseif @property 'fire resist' 'found' >= 6
    pushlist 'score' 'fire resist'
  elseif @property 'cold resist' 'found' >= 6
    pushlist 'score' 'cold resist'
  elseif @property 'poison resist' 'found' >= 6
    pushlist 'score' 'poison resist'
  elseif @property 'energy resist' 'found' >= 6
    pushlist 'score' 'energy resist'
  endif
  // Grab that item if it has at least 4 properties
  if list 'score' >= 4
    // Display item properties
    sysmsg 'Item properties:' 25
    for 0 to 'score'
      sysmsg 'score[]' 80
    endfor
    // Move item to backpack
    moveitem 'found' 'backpack'
    pause 1000
  endif
  ignoreobject 'found'
endwhile
ps: I havent tested that macro so it may have typos
 
Last edited:

Shallan

Sorceror
there is easyuo script for this. it search for 2 props u write ;p

for example hit life leech > 40
swing speed inc = 30

and the name of the weapon
 
Top