UOSteam Resource Key macros

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
User avatar
Incognito
Apprentice Scribe
Posts: 18
Joined: Fri Apr 01, 2016 3:45 am

UOSteam Resource Key macros

Post by Incognito »

There are other scripts for adding resources to your keys but most are very bloated. For instance I used to use a Spellcasters key script that was 270 lines of code. The one you will find here uses 58ish lines and does the same thing. I myself use all of these in one script together but maybe not all of you have all the keys so I split them up.

I will add a Tool House and a Runic House script later.

Anyhow, here you go.

Spell Caster's Key's ***Note: Leave spring water // out because of problem with other vials. It still adds it!

Code: Select all

//Spring water work-around
if not @targettype! '0xe24' '1151'
else
@usetype! '0x176b' '33' 'backpack'
waitforgump 1750433090 15000
replygump 0x68557d42 25
waitfortarget 5000
@targettype! '0xe24' '1151'
@replygump 0x68557d42 0
pause 300
endif
//End of work-around
if not listexists 'spellcasterkeys'
createlist 'spellcasterkeys'
endif
@pushlist 'spellcasterkeys' '0xf7a' // BlackPearl
@pushlist 'spellcasterkeys' '0xf7b' // BloodMoss
@pushlist 'spellcasterkeys' '0xf84' // Garlic
@pushlist 'spellcasterkeys' '0xf85' // Ginseng
@pushlist 'spellcasterkeys' '0xf86' // MandrakeRoot
@pushlist 'spellcasterkeys' '0xf88' // NightShade
@pushlist 'spellcasterkeys' '0xf8c' // SulfurousAsh
@pushlist 'spellcasterkeys' '0xf8d' // SpidersSilk
@pushlist 'spellcasterkeys' '0xf78' // BatWing
@pushlist 'spellcasterkeys' '0xf8f' // GraveDust
@pushlist 'spellcasterkeys' '0xf7d' // DeamonBlood
@pushlist 'spellcasterkeys' '0xf8e' // NoxCrystal
@pushlist 'spellcasterkeys' '0xf8a' // PigIron
@pushlist 'spellcasterkeys' '0xf81' // FertileDirt
@pushlist 'spellcasterkeys' '0x26b7' // ZoogiFungus
@pushlist 'spellcasterkeys' '0x26b8' // TransPowder
@pushlist 'spellcasterkeys' '0xf7e' // Bones
@pushlist 'spellcasterkeys' '0xf80' // DemonBones
@pushlist 'spellcasterkeys' '0xef3' // BlankScrolls
@pushlist 'spellcasterkeys' '0xf0e' // Bottles
@pushlist 'spellcasterkeys' '0x11ea' // Sand
@pushlist 'spellcasterkeys' '0x1422' // BeesWax
//@pushlist 'spellcasterkeys' '0xe24' // SpringWater
@pushlist 'spellcasterkeys' '0xe1f' // DestroyingAngel
@pushlist 'spellcasterkeys' '0x97a' // PetrifiedWood
@pushlist 'spellcasterkeys' '0xf8f' // EtheralPowder
@pushlist 'spellcasterkeys' '0x1f14' // Runes
for 0 to spellcasterkeys
while @findtype 'spellcasterkeys[]'
@setalias 'regs' 'found'
usetype '0x176b' '33' 'backpack'
waitforgump 1750433090 15000
replygump 0x68557d42 25
waitforgump 1750433090 15000
waitfortarget 15000
@target 'regs'
waitforgump 1750433090 15000
pause 300
endwhile
endfor
@replygump 0x68557d42 0
@canceltarget
@removelist 'spellcasterkeys'
@unsetalias 'regs'
sysmsg 'Done with Spellcasters keys.'
Metal Worker's Key's

Code: Select all

if not listexists 'metalkeys'
  createlist 'metalkeys'
endif
@pushlist 'metalkeys' '0x1bf2' // All ingots share same ID
for 0 to metalkeys
  while @findtype 'metalkeys[]'
    @setalias 'ingots' 'found'
    usetype '0x176b' '20' 'backpack'
    waitforgump 4213074123 15000
    replygump 0xfb1e68cb 15
    waitforgump 4213074123 15000
    waitfortarget 15000
    @target 'ingots'
    waitforgump 4213074123 15000
  endwhile
endfor
@replygump 0xfb1e68cb 0
@canceltarget
@removelist 'metalkeys'
@unsetalias 'ingots'
sysmsg 'Done with Metalworkers keys.'
Tailor's Key's

Code: Select all

if not listexists 'tailorkeys'
  createlist 'tailorkeys'
endif
@pushlist 'tailorkeys' '0x1766' // Cloth
@pushlist 'tailorkeys' '0x26b4' // Scales
@pushlist 'tailorkeys' '0x1081' // Leather
for 0 to tailorkeys
  while @findtype 'tailorkeys[]'
    @setalias 'tailorstuff' 'found'
    usetype '0x176b' '69' 'backpack'
    waitforgump 1106836505 15000
    replygump 0x41f8fc19 999
    waitforgump 1106836505 15000
    waitfortarget 15000
    @target 'tailorstuff'
    waitforgump 1106836505 15000
  endwhile
endfor
@replygump 0x41f8fc19 0
@canceltarget
@removelist 'tailorkeys'
@unsetalias 'tailorstuff'
sysmsg 'Done with Tailors keys.'
Gem Pouch

Code: Select all

if not listexists 'gempouch'
  createlist 'gempouch'
endif
@pushlist 'gempouch' '0xf26'  // Diamond
@pushlist 'gempouch' '0xf19'  // Sapphire
@pushlist 'gempouch' '0xf13'  // Ruby
@pushlist 'gempouch' '0xf21'  // Star Sapphire
@pushlist 'gempouch' '0xf10'  // Emerald
@pushlist 'gempouch' '0xf15'  // Citrine
@pushlist 'gempouch' '0xf16'  // Amethyst
@pushlist 'gempouch' '0xf2d'  // Tourmaline
@pushlist 'gempouch' '0xf25'  // Amber
@pushlist 'gempouch' '0x3198' // Blue Diamond
@pushlist 'gempouch' '0x3199' // Brilliant Amber
@pushlist 'gempouch' '0x3192' // Dark Sapphire
@pushlist 'gempouch' '0x3195' // Ecru Citrine
@pushlist 'gempouch' '0x3197' // Fire Ruby
@pushlist 'gempouch' '0x3194' // Perfect Emerald
@pushlist 'gempouch' '0x3193' // Turquoise
@pushlist 'gempouch' '0x3196' // White Pearl
@pushlist 'gempouch' '0x1ea7' // Arcane Gem
for 0 to gempouch
  while @findtype 'gempouch[]'
    @setalias 'gems' 'found'
    usetype '0xe79' '2165' 'backpack'
    waitforgump 309845371 15000
    replygump 0x1277dd7b 30
    waitforgump 309845371 15000
    waitfortarget 15000
    @target 'gems'
    waitforgump 309845371 15000
  endwhile
endfor
@replygump 0x1277dd7b 0
@canceltarget
@removelist 'gempouch'
@unsetalias 'gems'
sysmsg 'Done with Gem pouch.'
Woodworker's Key's

Code: Select all

if not listexists 'woodkeys'
  createlist 'woodkeys'
endif
@pushlist 'woodkeys' '0x1bd4'  // Shafts
@pushlist 'woodkeys' '0x1bd1'  // Feathers
@pushlist 'woodkeys' '0x1bfb'  // Bolts
@pushlist 'woodkeys' '0xf3f'  // Arrows
@pushlist 'woodkeys' '0x1bd7'  // All types of wood
for 0 to woodkeys
  while @findtype 'woodkeys[]'
    @setalias 'woods' 'found'
    usetype '0x176b' '88' 'backpack'
    waitforgump 173511501 15000
    replygump 0xa57934d 17
    waitforgump 173511501 15000
    waitfortarget 15000
    @target 'woods'
    waitforgump 173511501 15000
  endwhile
endfor
@replygump 0xa57934d 0
@canceltarget
@removelist 'woodkeys'
@unsetalias 'woods'
sysmsg 'Done with Woodworkers keys.'
Stoneworker's Key's

Code: Select all

if not listexists 'stonekeys'
  createlist 'stonekeys'
endif
@pushlist 'stonekeys' '0x1779' // All stones share same ID
for 0 to stonekeys
  while @findtype 'stonekeys[]'
    @setalias 'stones' 'found'
    usetype '0x176b' '1161' 'backpack'
    waitforgump 2633467501 15000
    replygump 0x9cf7866d 15
    waitforgump 2633467501 15000
    waitfortarget 15000
    @target 'stones'
    waitforgump 2633467501 15000
  endwhile
endfor
@replygump 0x9cf7866d 0
@canceltarget
@removelist 'stonekeys'
@unsetalias 'stones'
sysmsg 'Done with Stoneworkers keys.'
Locked