Discussion in   Coding Corner   started     8 months ago   August 28, 2023, 09:47:59 AM   by   Leetstreet2

UOS SCRIPT WITH LOTS PRETTY CLEAR NOTATIONS

Leetstreet2
Offline
1 Posts
Topic :   UOS SCRIPT WITH LOTS PRETTY CLEAR NOTATIONS
8 months ago  August 28, 2023, 09:47:59 AM

In Case anyone is looking to better understand UOS and how it works I found a few scripts I wrote way back when probably ten years ago. I used to add lots of notations because it helped me keep things straight. This might help you too. 

//Author: Xcess
//Title: Carepentry Trainer
//[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
//Max Skill Select / Item Id's
//[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
@removelist 'CRVariables'
if not listexists 'CRVariables'
 createlist 'CRVariables'
 pushlist 'CRVariables' 100 //Max Carpentry LvL..0
 pushlist 'CRVariables' 0x1bd7 //Boards
 pushlist 'CRVariables' 0x1eb8 //Tinker Tool
 pushlist 'CRVariables' 0x1034 //Saw..3
 //Recycle List
 pushlist 'CRVariables' 0xe3f // Medium Crates
 pushlist 'CRVariables' 0xe3d // Large Crates
 pushlist 'CRVariables' 0xe89 // Quarter Staffs.
 pushlist 'CRVariables' 0x13f8 // Gnarled Staffs
 pushlist 'CRVariables' // Black Staffs.
 pushlist 'CRVariables' // Wild Staffs.
endif
//[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
//Carpentry Supply Container
//[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
if not @findalias 'CRcont'
 promptalias 'CRcont'
endif
if not @findalias 'trash'
 promptalias 'trash'
endif
//[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
//START OF SCRIPT TO RUN UNTIL MAX
//[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
while skill 'Carpentry' < CRVariables[0]
 //[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
 //Checks for Boards
 //[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
 if not @findtype CRVariables[1] 0x0 'backpack' 300 0
  movetype CRVariables[1] 'CRcont' 'backpack' 0x0 0 0 0 1000
  pause 1500
 endif
 //[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
 //Skill Guide
 //[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
 //********************************
 //Use the Saw
 //********************************
 @usetype CRVariables[3]
 waitforgump 949095101 3000
 //********************************
 //Buckler
 if skill 'Carpentry' < 30
  sysmsg 'Go Train at NPC'
  stop
  //Medium Crate
 elseif skill 'Carpentry' <= 48
  replygump 0x38920abd 15
  waitforgump 949095101 15000
  replygump 0x38920abd 16
  waitforgump 949095101 15000
  //Large Crate
 elseif skill 'Carpentry' <= 53
  replygump 0x38920abd 15
  waitforgump 949095101 15000
  replygump 0x38920abd 23
  waitforgump 949095101 15000
  //Wooden Shield
 elseif skill 'Carpentry' <= 60
  replygump 0x38920abd 29
  waitforgump 949095101 15000
  replygump 0x38920abd 2
  waitforgump 949095101 15000
  //Fukiyas
 elseif skill 'Carpentry' <= 74
  useobject 0x42b34c0a
  waitforgump 949095101 15000
  replygump 0x38920abd 30
  waitforgump 949095101 15000
  //Quarter Staff
 elseif skill 'Carpentry' <= 79
  replygump 0x38920abd 16
  waitforgump 949095101 15000
  replygump 0x38920abd 9
  waitforgump 949095101 15000
  //Gnarled Staff
 elseif skill 'Carpentry' <= 103.9
  replygump 0x38920abd 16
  waitforgump 949095101 15000
  replygump 0x38920abd 16
  waitforgump 949095101 15000
  //Black Staff
 elseif skill 'Carpentry' <=
  //Wild Staff
 elseif skill 'Carpentry' <
 endif
 //[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
 //Makes Last Item 15 Times
 //[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
 for 15
  replygump 0x38920abd 21
  waitforgump 949095101 15000
 endfor
 //[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
 //Recycles The Items
 //[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
 for 4 to 'CRVariables'
  while @findtype CRVariables[]
   replygump 0x38920abd 14
   waitfortarget 2000
   targettype CRVariables[]
   waitforgump 0x38920abd 2000
  endwhile
 endfor
 while @movetype 0x100e 'backpack' 'trash' 0 0 0 0x0
 endwhile
 while @movetype 0x1b7a 'backpack' 'trash' 0 0 0 0x0
 endwhile
 while @movetype 0x27aa 'backpack' 'trash' 0 0 0 0x0
 endwhile
endwhile
//[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]
//Le End of Ze World
//[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]=[=]