Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.36 KB | None | 0 0
  1. ---------------------------------------------------
  2. -- Script Name: AutoFish
  3. -- Author: MadMartyr
  4. -- Version: 1.7
  5. -- Client Tested with: 7.0.10.1
  6. -- Written with OpenEUO
  7. -- Shard OSI / FS: (OSI)
  8. -- Last Modified:  11/10/2010
  9. -- Description: Automatically fishes down the left side of the boat
  10. --              while monitoring for enemies.  If one shows up, it
  11. --              whips out the bow you select and kills it.  Once
  12. --              the enemy is dead, it will loot various items from
  13. --              its corpse.
  14. --------------------------------------------------
  15. -- Changelog:
  16. --
  17. --           11/10/2010 - v 1.7
  18. --                     1. Added nil exception handilng to hold value acquisition
  19. --                     2. Added client selection.
  20. --
  21. --           11/09/2010 - v 1.6
  22. --                     1. Added differentiation between MiBs and other bottles
  23. --                     2. Now correctly tosses out non-MiB bottles.
  24. --                     3. Now stows cut steaks if weight is above 80% while cutting.
  25. --                     4. Updated boat movement code to stop before changing direction.
  26. --
  27. --           11/08/2010 - v1.5
  28. --                     1. Added routine to cut up fish
  29. --                     2. Added hold weight checking routine
  30. --                     3. Added dagger selection for fish cutting
  31. --                     4. Added stop if Hold is full, and no dagger selected
  32. --
  33. --           11/04/2010 - v1.4
  34. --                     1. Added nets to loot and stow
  35. --                     2. All garbage is now tossed to random tiles
  36. --                     3. Boat movement on empty tile randomized
  37. --                     4. Added auto-dismount
  38. --
  39. --           11/03/2010 - v1.3
  40. --                     1. Fixed trash tossing by increased area
  41. --                     2. Fixed journal scanning
  42. --                     3. Changed wording on Hold selection
  43. --                     4. Gave random start tile for trash tossing
  44. --                     5. Set trash tossing to skip the tile the character is occupying
  45. --
  46. --           11/02/2010 - v1.2
  47. --                     1. Fixed Energy Bolt
  48. --                     2. Added Bandies
  49. --                     3. Various bug fixes
  50. --                     4. Heavy commenting
  51. --
  52. --           11/01/2010 - v1.1
  53. --                     1.  Added trash, storage, and item usage.
  54. --                     2.  Combined trash, storage, and item usage.
  55. --                      
  56.  
  57. function main()
  58.      -- Our main function is where all the magic gets started.
  59.  
  60.      SelectClient()
  61.      
  62.      -- Boots
  63.      intTrash = { 5899, 5900, 5901, 5902, 5903, 5904, 5905, 5906 }
  64.      
  65.      -- Fish types, White Pearls, and Gold to throw in the cargo hold.
  66.      intStore = { 2426, 2427, 2508, 2509, 2510, 2511, 3530, 3821, 5355, 12694, 17154, 17155, 17158, 17159, 17603, 17604, 17605, 17606, 22330 }
  67.  
  68.      -- Items to use up (Mess of Fish)
  69.      intUse = { 2463, 3542 }
  70.  
  71.      -- Loot to pull from the corpses of hostiles.
  72.      intLoot = { 2463, 3530, 3821, 3903, 5355 }
  73.      
  74.      -- Find the fishing pole to use (automatic).
  75.      intPole = FindPole()
  76.      
  77.      -- Let the user select a bow to use.  If none, use Magery.
  78.      intBow = FindBow()
  79.      if intBow == 0 then
  80.           UseMagery = true
  81.      end
  82.      
  83.      -- Let the user select the Boat's hold.
  84.      intHold = FindHold()
  85.      if intHold == 0 then
  86.           UO.ExMsg( UO.CharID, 3, 50, "Items will remain in pack." )
  87.      end
  88.  
  89.      -- Let the user select dagger to use for cutting up the
  90.      -- fish in the hold if it gets full.
  91.      intDagger = FindDagger()
  92.      if intDagger == 0 then
  93.           UO.ExMsg( UO.CharID, 3, 50, "Fish will not be cut." )
  94.      end
  95.  
  96.      -- Start with a clean pack, and no visible corpses.
  97.      CheckWeightAndCut()
  98.      TossStoreAndUse()
  99.      DoLoot()
  100.  
  101.      -- Make sure we have a fishing pole ID.
  102.      if intPole == 0 then
  103.          UO.ExMsg( UO.CharID, 3, 50, "Fishing Pole Not Found!" )
  104.          return
  105.      end
  106.  
  107.      -- Kick things off.
  108.      StartFishing()
  109.  
  110. end
  111.  
  112. function msgbox(default, prompt, title, button, icon)
  113.   if icon == nil then icon = 2 end
  114.   if default == true then default = 1 else default = 0 end
  115.    
  116.   ConfirmDialog = Obj.Create( "TMessageBox" )
  117.   ConfirmDialog.Title = title
  118.   ConfirmDialog.Button = button
  119.   ConfirmDialog.Icon = icon
  120.   ConfirmDialog.Default = default
  121.   return ConfirmDialog.Show( prompt )
  122. end
  123.  
  124. function showmsg(prompt, title)
  125.   msgbox( true, prompt, title, 0,4)
  126. end
  127.  
  128. function SelectClient()
  129.      result = msgbox( true,"Client logged in as: " .. UO.CharName, "Client Selection", 3 )
  130.      if result == 6 then
  131.           -- Yes.
  132.           return
  133.      elseif result == 7 then
  134.           -- No.
  135.           UO.CliNr=UO.CliNr+1
  136.           SelectClient()
  137.           return
  138.      else
  139.           -- Cancel
  140.           showmsg( "Client selection canceled.", "Script Ended" )
  141.           stop()
  142.      end
  143.      
  144.      if UO.CliCnt < UO.CliNr then
  145.           showmsg( "No client found.", "Script Ended" )
  146.           stop()
  147.      end
  148. end
  149.  
  150. function FindHold()
  151.      -- Our method to let the user select their boat's hold.
  152.      UO.LTargetID = 0
  153.  
  154.      UO.ExMsg( UO.CharID, 3, 50, "Select the stowing container (ESC for toon pack)." )
  155.  
  156.      UO.TargCurs = true
  157.      while( UO.TargCurs == true ) do
  158.           wait( 1 )
  159.      end
  160.      
  161.      return UO.LTargetID
  162. end
  163.  
  164. function FindBow()
  165.      -- Our method to let the user select the bow they want to use,
  166.      -- if not using magery.
  167.      UO.LTargetID = 0
  168.      UO.ExMsg( UO.CharID, 3, 50, "Select the bow you wish to use (ESC for Magery)." )
  169.  
  170.      UO.TargCurs = true
  171.      while( UO.TargCurs == true ) do
  172.           wait( 1 )
  173.      end
  174.      
  175.      return UO.LTargetID
  176. end
  177.  
  178. function FindDagger()
  179.      -- Our method to let the user select the dagger they want to use.
  180.      UO.LTargetID = 0
  181.      UO.ExMsg( UO.CharID, 3, 50, "Select the dagger you wish to use (ESC to quit when full)." )
  182.  
  183.      UO.TargCurs = true
  184.      while( UO.TargCurs == true ) do
  185.           wait( 1 )
  186.      end
  187.      
  188.      return UO.LTargetID
  189. end
  190.  
  191. function GetHoldCurrWeight( strIn )
  192.      local itemName, itemContents = UO.Property( intHold )
  193.  
  194.      local commaStart, commaEnd = string.find( itemContents, ", " )
  195.      if commaStart == nil or commaEnd == nil then return 0 end
  196.      local slashStart, slashEnd = string.find( itemContents, "/", commaEnd )
  197.      if slashStart == nil or slashEnd == nil then return 0 end
  198.      local stonesStart, stonesEnd = string.find( itemContents, " Stones", slashEnd )
  199.      if stonesStart == nil or stonesEnd == nil then return 0 end
  200.      local strRet = string.sub( itemContents, commaEnd + 1, slashStart - 1 )
  201.      return tonumber( strRet )
  202. end
  203.  
  204. function GetHoldMaxWeight( strIn )
  205.      local itemName, itemContents = UO.Property( intHold )
  206.  
  207.      local commaStart, commaEnd = string.find( itemContents, ", " )
  208.      if commaStart == nil or commaEnd == nil then return 0 end
  209.      local slashStart, slashEnd = string.find( itemContents, "/", commaEnd )
  210.      if slashStart == nil or slashEnd == nil then return 0 end
  211.      local stonesStart, stonesEnd = string.find( itemContents, " Stones", slashEnd )
  212.      if stonesStart == nil or stonesEnd == nil then return 0 end
  213.      local strRet = string.sub( itemContents, slashEnd + 1, stonesStart - 1 )
  214.      return tonumber( strRet )
  215. end
  216.  
  217. function StartFishing()
  218.      -- Setup all of our positioning variables.
  219.      local intX = UO.CharPosX - 3
  220.      local intY = UO.CharPosY + 3
  221.      local intStartX = UO.CharPosX
  222.      local intStartY = UO.CharPosY
  223.      
  224.      -- Start our main loop
  225.      while true == true do
  226.           -- If the character has moved, reset our positioning variables.
  227.           -- Causes: Spot is fished out, player moved the boat, player
  228.           -- moved the character.
  229.           if UO.CharPosX ~= intStartX or UO.CharPosY ~= intStartY then
  230.                intX = UO.CharPosX - 3
  231.                intY = UO.CharPosY + 3
  232.                intStartX = UO.CharPosX
  233.                intStartY = UO.CharPosY
  234.           end
  235.          
  236.           -- Use the pole
  237.           UO.LObjectID = intPole
  238.           UO.Macro( 17, 0 )
  239.           wait( 1000 )
  240.          
  241.           if UO.SysMsg == "You can't fish while riding or flying!" then
  242.                -- Dismount.
  243.                wait( 500 )
  244.                UO.LObjectID = UO.CharID
  245.                UO.Macro( 17, 0 )
  246.           end
  247.          
  248.           WaitForTargWithTimeout( 500 )
  249.          
  250.           -- Set our tagetting up to fish the specified coords.
  251.           UO.LTargetKind = 3
  252.           UO.LTargetX = intX
  253.           UO.LTargetY = intY
  254.           UO.LTargetZ = UO.CharPosZ
  255.          
  256.           -- And do it.
  257.           UO.Macro( 22, 0 )
  258.          
  259.           wait( 1000 )
  260.          
  261.           -- Wait for our fishing to be finished.  We could have done the next
  262.           -- few steps during this time, but I was seeing some strange
  263.           -- artifacts of the process.
  264.           wait( 9000 )
  265.  
  266.           -- Move on to the next fishing X coord.
  267.           intX = intX + 1
  268.  
  269.           -- We only fish 7 spots on the x plain.  -3x through +3x
  270.           -- Check to make sure we are within this area.
  271.           if intX > UO.CharPosX + 3 then
  272.                -- Moving on the next Y coord.
  273.                intY = intY + 1
  274.                -- Reset our X coord.
  275.                intX = UO.CharPosX - 3
  276.                -- Put everything away.
  277.                TossStoreAndUse()
  278.                wait( 1000 )
  279.           end
  280.          
  281.           -- We start at Y+3, and fish through Y+5.  That means we
  282.           -- we fish two tiles along the Y plain, 14 tiles total.
  283.           -- Check to make sure we are within this area.
  284.           if intY == UO.CharPosY + 5 then
  285.                -- Getting here means that intX should already be reset, so
  286.                -- we'll reset Y.
  287.                intY = UO.CharPosY + 3
  288.                -- Put everything away.
  289.                CheckWeightAndCut()
  290.                TossStoreAndUse()
  291.                wait( 1000 )
  292.           end
  293.          
  294.           -- Check our journal to see if the tile is fished out.
  295.           if isFishedOut() == true then
  296.                -- And, apparently, it is.  Move a few tiles.
  297.                if math.random( 1, 2 ) == 1 then
  298.                     UO.Macro( 1, 0, "left" )
  299.                else
  300.                     UO.Macro( 1, 0, "right" )
  301.                end
  302.                wait( 2500 )
  303.             UO.Macro( 1, 0, "stop" )
  304.             wait( 500 )
  305.                if math.random( 1, 2 ) == 1 then
  306.                     UO.Macro( 1, 0, "forward" )
  307.                else
  308.                     UO.Macro( 1, 0, "reverse" )
  309.                end
  310.                wait( 2500 )
  311.                UO.Macro( 1, 0, "stop" )
  312.           end
  313.          
  314.           -- We're under attack.  Own that bitch up!
  315.           if UO.EnemyID ~= 0 and UO.EnemyHits ~= 0 then
  316.                -- Like I said, asshole...own that bitch up!
  317.                DoBattle()
  318.           end
  319.          
  320.      end          
  321. end
  322.  
  323. function CheckWeightAndCut()
  324.      local intCurrWeight = GetHoldCurrWeight()
  325.      local intMaxWeight = GetHoldMaxWeight()
  326.      if intCurrWeight + UO.Weight >= intMaxWeight then
  327.           if intDagger ~= 0 then
  328.                UO.NextCPosX = 100
  329.                UO.NextCPosY = 100
  330.                UO.LObjectID = intHold
  331.                UO.Macro( 17, 0 )
  332.                wait( 1000 )
  333.          
  334.                UO.ContTop( intHold )
  335.          
  336.                local intCycle
  337.                local intMax = UO.ScanItems( false )
  338.    
  339.                for intCycle = 1,intMax do
  340.                    -- Get all of the info about this item that we need.
  341.                    local ID,Type,Kind,ContID,X,Y = UO.GetItem( intCycle )
  342.                    -- Loop through our keepers array.
  343.                    local intCycle2
  344.                    local intMax2 = table.getn( intStore )
  345.                    for intCycle2 = 1, intMax2 do
  346.                         if Type == intStore[intCycle2] and ContID == intHold then
  347.                              UO.LObjectID = intDagger
  348.                              UO.Macro( 17, 0 )
  349.                              WaitForTargWithTimeout( 1000 )
  350.                              UO.LTargetID = ID
  351.                              UO.Macro( 22, 0 )
  352.                              wait( 2000 )
  353.                              
  354.                         end
  355.                    end
  356.                    
  357.                    if UO.Weight > UO.MaxWeight * 0.80 then
  358.                         StowSteaks()
  359.                    end
  360.               end
  361.           else
  362.               UO.ExMsg( UO.CharID, 3, 50, "Hold full.  Script Ended." )
  363.               stop()
  364.           end
  365.      end  
  366. end
  367.  
  368. function StowSteaks()
  369.      local intCycle
  370.      local intMax = UO.ScanItems( false )
  371.    
  372.      for intCycle = 1,intMax do
  373.           -- Get all of the info about this item that we need.
  374.           local ID,Type,Kind,ContID,X,Y,Z,Stack = UO.GetItem( intCycle )
  375.           if ContID == UO.BackpackID and InStr( Name, "Steak" ) == true then
  376.                UO.Drag( ID, Stack )
  377.                wait( 1000 )
  378.                UO.DropC( intHold )
  379.                wait( 1000 )
  380.           end
  381.      end
  382.      stop()
  383. end
  384.  
  385. function InStr( strFindIn, strToFind )
  386.      if strFindIn == nil or strToFind == nil then
  387.           return false
  388.      end
  389.      
  390.      local strRet = string.match( strFindIn, strToFind )
  391.      if strRet ~= nil then
  392.           return true
  393.      end
  394.      return false
  395. end
  396.  
  397. function WaitForTargWithTimeout(intTimeout)
  398.           while( UO.TargCurs == false ) do
  399.                wait( 1 )
  400.                intTimeout = intTimeout + 1
  401.                if intTimeout >= 500 then
  402.                     break
  403.                end
  404.           end
  405. end
  406.  
  407. function isFishedOut()
  408.      -- We're only gonna scan the last five lines so we don't mistakenly return
  409.      -- true.
  410.  
  411.      local intCycle
  412.      local intMax = UO.ScanJournal(0)
  413.      for intCycle = 0, 5 do
  414.           local strLine = UO.GetJournal( intCycle )
  415.           if strLine == UO.CharName .. ": The fish don't seem to be biting here." then
  416.                -- Tile is empty, move on.
  417.                return true
  418.           end  
  419.      end
  420.      
  421.      return false
  422. end
  423.  
  424. function TossStoreAndUse()
  425.     --Loop through all items found in the backpack.
  426.     local intCycle
  427.     local intMax = UO.ScanItems( false )
  428.    
  429.     for intCycle = 1,intMax do
  430.          
  431.          -- Get all of the info about this item that we need.
  432.          local ID,Type,Kind,ContID,X,Y,Z,Stack = UO.GetItem( intCycle )
  433.          
  434.          -- Toss bottles that aren't MiBs.
  435.          if Type == 2463 and ContID == UO.BackpackID then
  436.               local bottleName, bottleInfo = UO.Property( ID )
  437.               if bottleName ~= "A Message In A Bottle" then
  438.                    -- Bitch ain't worth shit.  Toss it.
  439.                    UO.Drag( ID, Stack )
  440.                    wait( 1000 )
  441.                    UO.DropG( UO.CharPosX + math.random( -2, 2 ), UO.CharPosY + math.random( -2, 2 ) )
  442.                    wait( 1000 )
  443.               end
  444.          end                          
  445.  
  446.          -- Loop through our trash array.
  447.          local intCycle2
  448.          local intMax2 = table.getn( intTrash )
  449.          for intCycle2 = 1, intMax2 do
  450.               if Type == intTrash[intCycle2] and ContID == UO.BackpackID then
  451.                    -- Bitch ain't worth shit.  Toss it.
  452.                    UO.Drag( ID, Stack )
  453.                    wait( 1000 )
  454.                    UO.DropG( UO.CharPosX + math.random( -2, 2 ), UO.CharPosY + math.random( -2, 2 ) )
  455.                    wait( 1000 )
  456.               end
  457.          end
  458.          
  459.          -- Loop through our keepers array.
  460.          if intHold ~= 0 then
  461.               intMax2 = table.getn( intStore )
  462.               for intCycle2 = 1, intMax2 do
  463.                   if Type == intStore[intCycle2] and ContID == UO.BackpackID then
  464.                         -- Good shit, stow it.
  465.                         UO.Drag( ID, Stack )
  466.                         wait( 1000 )
  467.                         UO.DropC( intHold )
  468.                         wait( 1000 )
  469.                    end
  470.               end
  471.          end            
  472.  
  473.          -- Loop through our array of stuff to use (MiB, special fish, etc.)
  474.          intMax2 = table.getn( intUse )
  475.          for intCycle2 = 1, intMax2 do
  476.              if Type == intUse[intCycle2] and ContID == UO.BackpackID then
  477.                   UO.LObjectID = ID
  478.                   UO.Macro( 17, 0 )
  479.                   wait( 1000 )
  480.               end
  481.          end            
  482.     end
  483. end
  484.  
  485. function DoBattle()
  486.      -- Time to kick some ass.
  487.      if UseMagery == true then
  488.           -- This attempts to ensure that we're not needlessly casting.  When it's
  489.           -- dead, stop.
  490.           while UO.EnemyID ~= 0 and UO.EnemyHits ~= 0 do
  491.                -- Cast Energy Bolt
  492.                UO.Macro( 15, 41 )
  493.                
  494.                wait( 3000 )
  495.                -- Wait for the Target cursor.
  496.                while( UO.TargCurs == false ) do
  497.                      wait( 1 )
  498.                end
  499.                
  500.                -- Target the current enemy.  We don't cache this in case you have
  501.                -- multiple enemies around.
  502.                UO.LTargetID = UO.EnemyID
  503.                UO.LTargetKind = 1 -- Thanks for the tip, PetKiller.
  504.                UO.Macro( 22, 0 )
  505.                wait( 2000 )
  506.                
  507.                -- See if we're in trouble.  Could be changed to 1/2 HP, but 3/4 HP
  508.                -- worked best for me.
  509.                if UO.Hits < UO.MaxHits - (UO.MaxHits / 4) then
  510.                     -- Cast Greater Heal
  511.                     UO.Macro(15, 28)
  512.                
  513.                     wait( 3000 )
  514.                    
  515.                     -- Wait for the Target cursor.
  516.                     while( UO.TargCurs == false ) do
  517.                           wait( 1 )
  518.                     end
  519.                    
  520.                     -- Target self
  521.                     UO.LTargetID = UO.CharID
  522.                     UO.Macro( 22, 0 )
  523.                
  524.                     wait( 1000 )                                              
  525.                    
  526.                end
  527.           end
  528.      else
  529.      
  530.           -- Equip the bow and whip it's candy ass.
  531.           UO.LObjectID = intBow
  532.           UO.Macro( 37, 0 )
  533.  
  534.           while UO.EnemyID ~= 0 and UO.EnemyHits ~= 0 do
  535.                -- We need to heal.  Using bandies.
  536.                if UO.Hits < UO.MaxHits - (UO.MaxHits / 4) then
  537.                     UO.LObjectID = FindBandies()
  538.                     UO.Macro(37, 0)
  539.                
  540.                     wait( 3000 )
  541.                     -- Wait for the Target cursor.
  542.                     while( UO.TargCurs == false ) do
  543.                           wait( 1 )
  544.                     end
  545.                    
  546.                     -- Target the character
  547.                     UO.LTargetID = UO.CharID
  548.                     UO.LTargetKind = 1
  549.                     UO.Macro( 22, 0 )
  550.                
  551.                     wait( 3000 )                                              
  552.                
  553.                     -- Re-equip the bow, just in case.
  554.                     UO.LObjectID = intBow
  555.                     UO.Macro( 37, 0 )
  556.                    
  557.                end
  558.           end
  559.      end
  560.      wait( 1000 )
  561.      
  562.      -- Bitch is dead.  Get your booty.
  563.      DoLoot()
  564. end
  565.  
  566. function DoLoot()
  567.     -- Find the corpse(s)
  568.     local intCycle
  569.     local intMax = UO.ScanItems( false )
  570.    
  571.     -- Loop through all items
  572.     for intCycle = 1,intMax do
  573.          
  574.          -- Get all of the info about this item that we need.
  575.          local corpseID,corpseType,corpseKind,corpseContID = UO.GetItem( intCycle )
  576.          
  577.          -- If it's the corpse.
  578.          if corpseType == 8198 then
  579.               -- I'm pretty sure Type 8198 is just a Sea Serpent corpse, but
  580.               -- we're not really worried about looting Water Elems.
  581.              
  582.               -- Move the corpse pack gump.  Not really needed, but I like it asshole.
  583.               UO.NextCPosX = 100        
  584.               UO.NextCPosY = 100        
  585.  
  586.               -- Open the gump.
  587.               UO.LObjectID = corpseID
  588.               UO.Macro( 17, 0, "" )
  589.               wait( 1000 )
  590.              
  591.               -- Loop through all items to get only what's in the corpse.
  592.               local intCycle2
  593.               local intMax2 = UO.ScanItems( true )
  594.               for intCycle2 = 1, intMax2 do
  595.                   local itemID,itemType,itemKind,itemContID = UO.GetItem( intCycle2 )
  596.          
  597.                   -- It's in the corpse.
  598.                   if itemContID == UO.ContID then
  599.                         -- Loop through and make sure it's the loot we want.
  600.                         local intCycle3
  601.                         local intMax3 = table.getn( intLoot )
  602.                         for intCycle3 = 1, intMax3 do
  603.                              if itemType == intLoot[intCycle3] then
  604.                                   -- Loot match, grab it!  Quick!
  605.                                   UO.Drag( itemID, 999 )
  606.                                   wait( 1000 )
  607.                                   UO.DropC( UO.BackpackID )
  608.                                   wait( 1000 )
  609.                              end
  610.                         end
  611.                    end                                
  612.               end
  613.              
  614.               -- Hide the corpse we just raided and move on.
  615.               UO.HideItem( corpseID )
  616.          end            
  617.     end
  618.  
  619. end
  620.  
  621. function FindPole()
  622.     --Loop through all items
  623.     local intCycle
  624.     local intMax = UO.ScanItems( false )
  625.    
  626.     for intCycle = 1,intMax do
  627.          
  628.          -- Get all of the info about this item that we need.
  629.          local ID,Type,Kind,ContID,X,Y = UO.GetItem( intCycle )
  630.          
  631.          -- If it's a pole, use it.
  632.          if Type == 3519 then
  633.               return ID
  634.          end            
  635.     end
  636. end
  637.  
  638. function FindBandies()
  639.     --Loop through all items
  640.     local intCycle
  641.     local intMax = UO.ScanItems( false )
  642.    
  643.     for intCycle = 1,intMax do
  644.          
  645.          -- Get all of the info about this item that we need.
  646.          local ID,Type,Kind,ContID,X,Y = UO.GetItem( intCycle )
  647.          
  648.          -- If it's bandies, we're usin' it!
  649.          if Type == 3617 then
  650.               return ID
  651.          end            
  652.     end
  653. end
  654.  
  655. -- Without this next line, the script will NOT work.
  656. -- This line initiates the entire runtime process.
  657. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement