Discussion in   Coding Corner   started     6 years ago   February 20, 2018, 06:55:59 PM   by   Bluemoon

Bluemoon's Repository (Steam)

Bluemoon
Offline
6 Posts
Topic :   Bluemoon's Repository (Steam)
6 years ago  February 20, 2018, 06:55:59 PM

This is basically a place to drop my macros so when I share them with people, they can grab them here.


As usual, make sure you check the code first before using a macro, I could be a malicious guy trying to get you to drop your bank on the ground or something.


Melee attack macro with looting and key support for Tailor/Reagent/Ingot/Tool box/Runic tool box. Will attempt to discord mobs, and pick up instruments from your inventory when the previous one wears out. If you have an issue where it doesn't seem to loot artifacts and jewelry, try checking the "Negotiate features with server" box in the General tab of UOSteam.(heavily inspired by the version of Imnotsure)

EDIT: Removed that one, was too clunky, leaving the rest here since it works good afaik.

Bluemoon
Offline
6 Posts
#1 Re :   Bluemoon's Repository (Steam)
6 years ago  February 20, 2018, 06:57:36 PM

Peacemaking with auto-detection of instruments in your backpack once wears out.
Set on loop and enjoy.



Code: [Select]

@clearjournal
//Creating lists
if not listexists 'instru'
  createlist 'instru'
  pushlist 'instru' 0xe9e //Tambourine with red tassle
  pushlist 'instru' 0x2805 //Flute
  pushlist 'instru' 0xe9d //Tambourine
  pushlist 'instru' 0xe9c //Drum
  pushlist 'instru' 0xeb3 //Lute
  pushlist 'instru' 0xeb2 //Lap Harp
  pushlist 'instru' 0xeb1 //Standing Harp
endif
if skill 'peacemaking' < 100
@clearjournal
  useskill 'peacemaking'
  waitfortarget 1000
  if @injournal 'What instrument shall'
    waitfortarget 2000
    for 0 to 'instru'
      if @findtype instru[] 'any' 'backpack'
        setalias 'instrument' 'found'
        useobject 'instrument'
      endif
    endfor
  endif
  target! 'self'
  pause 11000
else
headmsg 'Peacemaking Complete!'
stop
endif

Bluemoon
Offline
6 Posts
#2 Re :   Bluemoon's Repository (Steam)
6 years ago  February 20, 2018, 06:59:23 PM

Spellweaving 0 to 100, set on loop, make sure you have bandages in your inventory (to speed up healing toward the end when using Word of Death) and that the Steam auto-heal is on (Options tab > friends)


Code: [Select]
if skill "spellweaving" == 100
  sysmsg "Spellweaving is 100!"
  stop
elseif mana >= 30
  if skill "spellweaving" < 10
    cast "Nature's Fury"
    waitfortarget 15000
    pause 500
    targettileoffset 0 -1 0
    pause 5000
  elseif skill "spellweaving" < 33
    cast "Immolating Weapon"
    pause 4500
  elseif skill "spellweaving" < 60
    cast "Reaper Form"
    pause 4000
  elseif skill "spellweaving" < 74
    cast "Essence of Wind"
    pause 4000
  elseif skill "spellweaving" < 90
    cast "Wildfire"
    waitfortarget 15000
    pause 500
    target! 'self'
    pause 3000
  elseif skill "spellweaving" < 100
    cast "Word of Death"
    waitfortarget 15000
    target! 'self'
    pause 4000
    while hits < maxhits
      pause 50
    endwhile
  endif
else
  sysmsg "Mana low! Meditating!"
  useskill "meditation"
  while mana < maxmana
    pause 50
  endwhile
endif

Bluemoon
Offline
6 Posts
#3 Re :   Bluemoon's Repository (Steam)
6 years ago  February 20, 2018, 07:02:11 PM

Blacksmithing 30 to 100, you WILL need an ingot key for this, so it pulls out the ingots from there. I tried to make it as efficient as possible, wiki says about 50k ingots for 30 to 100, took me maybe 12k? Might have taken an extra 30 minutes though.


Also I think this is the version from Evolution, I am not sure where I picked the original, anyway I edited ingot key support in there and smelting back what you craft.


Code: [Select]
//***********************
// For getting ingots from Metal Worker Keys
//***********************
if not findalias 'metalkeys'
  headmsg 'Select Metal Workers Keys'
  promptalias 'metalkeys'
endif
//***********************
// Pre-craft routine (makes sure you have 2 Tinker Tool Box, 2 Tongs, Smelts created items, ingots
//***********************
//Ingots checks
if @counttype 0x1bf2 'any' 'backpack' < 100
  useobject 'metalkeys'
  waitforgump 0x6abce12 15000
  replygump 0x6abce12 1
  waitforgump 0x6abce12 15000
  replygump 0x6abce12 0
endif
//Tool box checks
if @counttype 0x1eb8 'any' 'backpack' < 2
  if usetype 0x1eb8
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 8
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 23
    waitforgump 0x38920abd 5000
    pause 1500
  else
    headmsg 'You need 1 tool box (tinkering) minimum in your backpack.' 24
    headmsg 'The macro will then create a second one to ensure' 24
    headmsg 'You never run out of them. Same with the tongs.' 24
    stop
  endif
endif
//Tongs check
if @counttype 0xfbb 'any' 'backpack' < 3
  if usetype 0x1eb8
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 8
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 86
    waitforgump 0x38920abd 15000
  endif
endif
//Blacksmith routine + Smelting
if skill 'Blacksmithy' <  30
  headmsg 'Buy more skill and replay'
  stop
  //Maces (6 ingots per)
elseif skill 'Blacksmithy' < 45
  if usetype 0xfbb 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 64
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 9
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0xf5c' 'any' 'backpack' 'any' '2'
    replygump 0x38920abd 14
    waitfortarget 5000
    target! 'found'
    waitforgump 0x38920abd 5000
  endif
  //Cutlass
elseif skill 'Blacksmithy' < 50
  if usetype 0xfbb 0x0 'backpack'
    waitforgump 0x38920abd 5000
    replygump 0x38920abd 43
    waitforgump 0x38920abd 5000
    replygump 0x38920abd 23
    waitforgump 0x38920abd 5000
  endif
  if @findtype '0x1441' 'any' 'backpack' 'any' '2'
    replygump 0x38920abd 14
    waitfortarget 5000
    target! 'found'
    waitforgump 0x38920abd 5000
  endif
  //Scimitar
elseif skill 'Blacksmithy' < 55
  if usetype 0xfbb 0x0 'backpack'
    waitforgump 0x38920abd 5000
    replygump 0x38920abd 43
    waitforgump 0x38920abd 5000
    replygump 0x38920abd 58
    waitforgump 0x38920abd 5000
  endif
  if @findtype '0x13b6' 'any' 'backpack' 'any' '2'
    replygump 0x38920abd 14
    waitfortarget 5000
    target! 'found'
    waitforgump 0x38920abd 5000
  endif
  //Kryss
elseif skill 'Blacksmithy' < 72
  if usetype 0xfbb 0x0 'backpack'
    waitforgump 0x38920abd 5000
    replygump 0x38920abd 43
    waitforgump 0x38920abd 5000
    replygump 0x38920abd 44
    waitforgump 0x38920abd 5000
  endif
  if @findtype '0x1401' 'any' 'backpack' 'any' '2'
    replygump 0x38920abd 14
    waitfortarget 5000
    target! 'found'
    waitforgump 0x38920abd 5000
  endif
  //Katana
elseif skill 'Blacksmithy' < 83
  if usetype 0xfbb 0x0 'backpack'
    waitforgump 0x38920abd 5000
    replygump 0x38920abd 43
    waitforgump 0x38920abd 5000
    replygump 0x38920abd 37
    waitforgump 0x38920abd 5000
  endif
  if @findtype '0x13ff' 'any' 'backpack' 'any' '2'
    replygump 0x38920abd 14
    waitfortarget 5000
    target! 'found'
    waitforgump 0x38920abd 5000
  endif
  //Short Spear
elseif skill 'Blacksmithy' < 93
  if usetype 0xfbb 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 57
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 44
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0x1403' 'any' 'backpack' 'any' '2'
    replygump 0x38920abd 14
    waitfortarget 5000
    target! 'found'
    waitforgump 0x38920abd 5000
  endif
  //Spear
elseif skill 'Blacksmithy' < 98
  if usetype 0xfbb 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 57
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 58
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0xf62' 'any' 'backpack' 'any' '2'
    replygump 0x38920abd 14
    waitfortarget 5000
    target! 'found'
    waitforgump 0x38920abd 5000
  endif
  //Plate gloves
elseif skill 'Blacksmithy' < 100
  if usetype 0xfbb 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 15
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 9
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0x1414' 'any' 'backpack' 'any' '2'
    replygump 0x38920abd 14
    waitfortarget 5000
    target! 'found'
    waitforgump 0x38920abd 5000
  endif
else
  headmsg '100 Blacksmith!!!'
  stop
endif

Bluemoon
Offline
6 Posts
#4 Re :   Bluemoon's Repository (Steam)
6 years ago  February 20, 2018, 07:06:38 PM

Tailoring, I got lazy and was standing at the tailor in brit, buying bolts of cloths then cutting them up with scissors instead of farming flax or cotton or wool. Took maybe 20k gold (give or take 10k) to GM. If you dont have an ingot key (it pulls ingot from there to craft sewing kits), just comment (add // at the start of each line) the first 4 lines and the part a bit later that is related to it. (Do a document search for 'metalkeys' and comment the lines about gump near it). Oh and make sure you have iron ingots in the backpack if you don't have the key.


Code: [Select]
if not findalias 'metalkeys'
  headmsg 'Select your ingot key'
  promptalias 'metalkeys'
endif
if not findalias 'scissors'
  headmsg 'Select your scissors'
  promptalias 'scissors'
endif
//Ingots checks
if @counttype 0x1bf2 'any' 'backpack' < 20
  useobject 'metalkeys'
  waitforgump 0x6abce12 15000
  replygump 0x6abce12 1
  waitforgump 0x6abce12 15000
  replygump 0x6abce12 0
endif
//Tool box checks
if @counttype 0x1eb8 'any' 'backpack' < 2
  if usetype 0x1eb8
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 8
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 23
    waitforgump 0x38920abd 5000
    pause 1500
  else
    headmsg 'You need 1 tool box (tinkering) minimum in your backpack.' 24
    headmsg 'The macro will then create a second one to ensure' 24
    headmsg 'You never run out of them. Same with the sewing kits.' 24
    stop
  endif
endif
//Sewing kit check
if @counttype 0xf9d 'any' 'backpack' <= 1
  if usetype 0x1eb8
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 8
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 44
    waitforgump 0x38920abd 15000
  endif
endif
//Routine
if skill 'Tailoring' <  30
  headmsg 'Buy more skill and replay'
  stop
  //Short pants (6 cloths per)
elseif skill 'Tailoring' < 35
  if usetype 0xf9d 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 15
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 2
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0x152e' 'any' 'backpack' 'any'
    useobject 'scissors'
    waitfortarget 1000
    @target! 'found'
  endif
  //Fur cape (13 per)
elseif skill 'Tailoring' < 41.4
  if usetype 0xf9d 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 8
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 72
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0x230a' 'any' 'backpack' 'any'
    useobject 'scissors'
    waitfortarget 1000
    @target! 'found'
  endif
  //cloak (14 per)
elseif skill 'Tailoring' < 50
  if usetype 0xf9d 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 8
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 51
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0x1515' 'any' 'backpack' 'any'
    useobject 'scissors'
    waitfortarget 1000
    @target! 'found'
  endif
  //fur boots (12 per)
elseif skill 'Tailoring' < 54
  if usetype 0xf9d 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 29
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 2
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0x2307' 'any' 'backpack' 'any'
    useobject 'scissors'
    waitfortarget 1000
    @target! 'found'
  endif
  //Robes (16 per)
elseif skill 'Tailoring' < 65
  if usetype 0xf9d 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 8
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 58
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0x1f03' 'any' 'backpack' 'any'
    useobject 'scissors'
    waitfortarget 1000
    @target! 'found'
  endif
  //Kasas (10 per)
elseif skill 'Tailoring' < 72
  if usetype 0xf9d 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 1
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 100
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0x2798' 'any' 'backpack' 'any'
    useobject 'scissors'
    waitfortarget 1000
    @target! 'found'
  endif
  //Ninja tabi(10 per)
elseif skill 'Tailoring' < 78
  if usetype 0xf9d 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 29
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 9
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0x2797' 'any' 'backpack' 'any'
    useobject 'scissors'
    waitfortarget 1000
    @target! 'found'
  endif
  //Oil cloths
elseif skill 'Tailoring' < 100
  if usetype 0xf9d 0x0 'backpack'
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 22
    waitforgump 0x38920abd 15000
    replygump 0x38920abd 79
    waitforgump 0x38920abd 15000
  endif
  if @findtype '0x175d' 'any' 'backpack' 'any'
    useobject 'scissors'
    waitfortarget 1000
    @target! 'found'
  endif
else
  headmsg '100 TAILOR!!!'
  stop
endif

Bluemoon
Offline
6 Posts
#5 Re :   Bluemoon's Repository (Steam)
6 years ago  February 20, 2018, 07:12:24 PM

Simple Sheep shearer, start the macro inside a sheep pen and watch your character go berserk on them. (As usual, DO NOT USE RESOURCE GATHERING MACROS AFK. If you get banned its your god damn fault, don't come crying to me)


Code: [Select]
if not findalias 'shearer'
headmsg 'Pick your shearing dagger'
promptalias 'shearer'
endif


while @findtype 0xcf 'any' 'any' 'any' 30 and not dead 0xcf 'any'
  while not @inrange 'found' 1
    if @x 'found' > x 'self' and @y 'found' > y 'self'
      run 'Southeast'
    elseif @x 'found' < x 'self' and @y 'found' > y 'self'
      run 'Southwest'
    elseif @x 'found' > x 'self' and @y 'found' < y 'self'
      run 'Northeast'
    elseif @x 'found' < x 'self' and @y 'found' < y 'self'
      run 'Northwest'
    elseif @x 'found' > x 'self' and @y 'found' == y 'self'
      run 'East'
    elseif @x 'found' < x 'self' and @y 'found' == y 'self'
      run 'West'
    elseif @x 'found' == x 'self' and @y 'found' > y 'self'
      run 'South'
    elseif @x 'found' == x 'self' and @y 'found' < y 'self'
      run 'North'
    endif
  endwhile
  useobject 'shearer'
  waitfortarget 15000
  target 'found'
  waitforjournal 'gathered wool' 2000
  attack 'found'
  @clearjournal
endwhile