Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - beefcake420

Pages: [1]
1
Hello everyone,

I need some help with saving variables so I dont (any hopefully you dont!) have to run setup each time this script is run.  I have done as much reading on the topic as I can find, but alas I cant make heads nor tails of it.  Could someone either point me to a "how to for dummies" on variable saving and recalling or even better help me to understand it by (assisting me with) incorporating it into the following script.

Also, I wanted to mention, this is my first script, so any assistance would be greatly appreciated!

Code: [Select]
;============================================================================
; Script Name: Sin's Mace and Shield Donator
; Author: Sin
; Version: 1.3.0
; Client Tested with: 7.0.25.7
; EUO version tested with: 1.5.214
; Purpose: Donating to brit library for Mace and Shield Reading glasses
;=============================================================================
;***Setup Instructions***
;1. Runebook with position 1 marked to secure, anvil and forge
;2. Runebook with position 2 marked to Library Turn in NPC
;3. Runebook with position 3 marked to alternate Library Turn in NPC location.
;4. A "Workbag" inside your backpack, I used a "Bag" during testing.
;5. At least one tinker tools in the "Workbag"
;6. Top level of secure should contain Iron Ingots only!
;7. BEFORE running script, use a blacksmith hammer to line up the
;8. (cont) Crafting Gump to the upper left corner.
;9. Under "User Options", set the two variables.
;=============================================================================
; User Options
set %setup 1 ;Currently "MUST" be set to 1 to make script work, **Needs Work**
set %max_buckler_amount 59 ; select number of bucklers to make
==============================================================================
;Update Log
;
;Version 1.3.0
;Fixed Tinker Tool Creation.
;Fixed WaitForGump Sub.
;Improved Speed at which bucklers are made.
;Added a number of checks for stability and to ensure script continues
;to run in the event of lag.
;Added an alternate recall spot to library turn in NPC if the first
;position is blocked.
;06/18/2012 Sin
;
;Version 1.2.0
;Added Tinker Tool Creation Function
;When your workbag is down to one tinker tool, another is produced.
;Various code cleanup.
;Still suffers from being prone to cash, need to add better wait for gump
;functions.  Will work on this.
;06/10/2012 Sin
;
;Version 1.1.0
;Changed the way smith hammers were made, now only 3 are made
;Make Tinker Tools not working at this time.
;06/10/12 Sin
;
;Version 1.0.0
;Completed the first version of the script.  Script can not recover from lag
;or glitches very well at this point, but it runs.  Will continue to work on
;recovery ability etc.
;06/10/2012 Sin
==============================================================================
; Script Variables (Item types)
set %ingots ENK
set %tinker_tools JTL
set %smiths_hammer TLH
set %buckler FIK
set %status_bucklers 0
set %status_ingots 0
set %makefirstbuckler 1
set %check 0
set %count 0
set %loop 0
;list
;%time         - Delay Time in "WaitForGump"
;%setup        - Set to 1 to run script currently **NEEDS WORK HERE**
;%runebook     - This is the runebook used in this script
;%secure       - This is the secure container at the house rune location
;%workbag      - This is the workbags ID number
;%donation_npc - This is the ID of the donation NPC
;=============================================================================
; Main Loop
if %setup = 1
   {
   gosub MainSetup
   set %setup 0
   }
repeat
   {
   ;gosub CheckWeight                            ;sub not currently used
   gosub InvisSelf
   gosub GetIngots
   gosub MakeBuckler
   gosub DropIngots
   gosub TurnInBucklers
   }
until #charghost = yes
display ok You have died, halting script.
halt
display ok End of main, error halting
halt
;=============================================================================
sub MainSetup
; Get Runebook ID
display ok Target your runebook
set #targcurs 1
wait 5
repeat
wait 0
until #targcurs = 0
set %runebook #ltargetID
wait 5

; Get workbag ID number
display ok Target your workbag
set #targcurs 1
wait 5
repeat
wait 0
until #targcurs = 0
set %workbag #ltargetID
set #lobjectID %workbag
wait 5
event macro 17 0
wait 5
set #contPosX 850
set #contPosY 520
wait 25

; Get secure ID number
display ok Target your secure container.
set #targcurs 1
wait 5
repeat
wait 0
until #targcurs = 0
set %secure #ltargetID
set #lobjectID %secure
wait 10
event macro 17 0
wait 10
set #contPosX 675
set #contPosY 500
wait 25

; Get Donation NPC ID
gosub TravelToLibrary
display ok Target the reward NPC
set #targcurs 1
wait 5
repeat
wait 0
until #targcurs = 0
set %donation_npc #ltargetID
wait 5
display ok Setup complete, You can leave it to me now
gosub TravelToHome
wait 5

return
;=============================================================================
; Check weight subroutine
sub CheckWeight                                  ;more work to be done with this
set %avail = ( #maxweight - #weight )
return
;=============================================================================
; Cast Invis on Self at Secure
sub InvisSelf
set #ltargetID #charID                           ;set pc as last target
wait 5
event macro 15 43                                ;cast invis spell
wait 50
event macro 22 0                                 ;last target
wait 5
return
;=============================================================================
; Places ingots in backpack
sub GetIngots
oops:                                            ;return if ingots were not put in workbag, trys again
set #lobjectID %secure
wait 10
event macro 17 0
;set #contPosX 675                               ;if you position the secure, it moves the
;set #contPosY 500                               ;position of the workbag for some reason
wait 25
finditem %ingots C_ , %secure
if #findkind = -1
   {
   display ok Your secure container has run out of ingots, Ending Script.
   halt
   }
if #findstack < 1000
   {
   set %stack #findstack
   }
else
    {
    set %stack 1000
    }
exevent drag #findID %stack
wait 10
exevent dropc %workbag
wait 15
finditem %ingots C_ , %workbag                   ;anti lag measure, check to ensure ingots were
if #findkind = -1                                ;placed in workbag.  If not returns and tries
   {                                             ;again.
   goto oops
   }
set %status_ingots ( %status_ingots + %stack )
return
;=============================================================================
; Make Bucklers Loops
sub MakeBuckler
finditem %smiths_hammer C_ , %workbag            ;check to see how many smith hammers
if #findkind = -1                                ;are in the workbag, if 0 makes more
   {
   gosub MakeHammer
   }
finditem %smiths_hammer C_ , %workbag            ;select smith's hammer
set #lobjectID #findID
wait 5
event macro 17 0                                 ;open crafting gump
wait 5
set #contPosX 0                                  ;position gump
set #contPosY 0                                  ;position gump
wait 5
while %makefirstbuckler = 1
   {
   click 25 130 dmc
   wait 5
   gosub WaitForGump
   set #contPosX 0
   set #contPosY 0
   click 233 70 dmc
   wait 5
   gosub WaitForGump
   set %makefirstbuckler  0
   gosub MoreBuck
   click 27 452 dmc                              ;close blacksmithing window
   wait 25
   }
set %makefirstbuckler 1
return
;============================================================
; 1 to 50 bucklers
sub MoreBuck
while %count < %max_buckler_amount
      {
      click 282 453 dmc                          ;click make last button
      wait 10
      gosub WaitForGump                          ;wait for gump to refresh
      if #weight > 450                           ;checks if character is overweight
      {                                          ;if overweight, drops ingots and
      wait 10                                    ;moves to turn in NPC to drop bucklers
      return
      }
      wait 10
      finditem %smiths_hammer C_ , %workbag      ;find hammer in workbag
      if #findkind = -1                          ;checks to see how many hammers there are
          {
          gosub MakeHammer                       ;if 0 go make more
          }
      else
      if %check = 5
         {
         finditem %smiths_hammer C_ , %workbag   ;ensure hammer is targeted
         set #lobjectID #findID                  ;ensure hammer is targeted
         event macro 17 0                        ;lasttarget (activate a new hammer if last broke)
         wait 5
         set #contPosX 0                         ;reposition gump for makelast button
         set #contPosY 0                         ;reposition gump for makelast button
         wait 5
         set %check 0
         }
      else
      set %check %check + 1
      set %count %count + 1
      }
set %count 0
return
;=============================================================================
; Move ingots to secure
sub DropIngots
finditem %ingots C_ , %workbag
wait 5
exevent drag #findid #findstack
wait 10
exevent dropc %secure
set %status_ingots ( %status_ingots - #findstack )
wait 25
return
;=============================================================================
; Turns bucklers into the Donation NPC
sub TurnInBucklers
gosub TravelToLibrary
oops2:
set #lobjectID %donation_npc
event macro 17 0
gosub WaitForGump
wait 5
click 288 214 dmc                                ;select "by bag" option on npc, get target cursor
repeat
      wait 5                                     ;repeat looking until bag target cursor
      finditem %workbag C_ , #backpackid         ;is gone (anti lag measure)
      set #ltargetID #findID
      wait 5
      event macro 22 0                           ;set lasttarget to %workbag, selectlasttarget
until #targcurs = 0
gosub WaitForGump
wait 10
click 606 392 dmc                                ;select "ok" basically
wait 25
      if #weight > 250                           ;checks to see if buckler turn in was succesful
      {                                          ;if not, returns and trys again
      wait 10
      goto oops2
      }
gosub TravelToHome
return
;=============================================================================
; Makes 3 smith's hammers
sub MakeHammer
finditem %tinker_tools C_ , %workbag             ;check for tinker tools
if #findcnt < 2                                  ;if 1 left, make one more
   {
   gosub MakeTinker                              ;make tinker tools
   }
finditem %tinker_tools C_ , %workbag             ;select tinker tools
set #lobjectID #findID
wait 10
event macro 17 0                                 ;open tinkering gump
gosub WaitForGump
set #contPosX 0                                  ;position tinkering gump
set #contPosY 0                                  ;position tinkering gump
wait 10
click 28 131 dmc                                 ;select tools option in gump
gosub WaitForGump
wait 10
click 385 270 dmc                                ;select next page option in gump
gosub WaitForGump
wait 10
click 230 130 dmc                                ;select smith hammer option in gump
gosub WaitForGump
wait 25
;first hammer
click 282 453 dmc                                ;click make last button option in gump
gosub WaitForGump
wait 25
;second hammer
click 282 453 dmc                                ;click make last button option in gump
gosub WaitForGump
wait 25
;third and final hammer
finditem %smiths_hammer C_ , %workbag            ;change last object from tinker tool
set #lobjectID #findID                           ;to smiths hammer
wait 5
return
;=============================================================================
; Makes one tinker tool
sub MakeTinker
finditem %tinker_tools C_ , %workbag             ;check for tinker tools
if #findcnt > 1                                  ;if more then 1 return
   {                                             ;this is to make sure the script doesnt
   return                                        ;make excess tinker tools
   }
finditem %tinker_tools C_ , %workbag
set #lobjectID #findID
wait 10
event macro 17 0                                 ;open tinkering gump
gosub WaitForGump
set #contPosX 0                                  ;position tinkering gump
set #contPosY 0                                  ;position tinkering gump
wait 10
click 28 131 dmc                                 ;select tools option in gump
gosub WaitForGump
wait 10
click 232 130 dmc                                ;select tinker's tools
gosub WaitForGump
wait 10
return
;=============================================================================
; Travel Home to Secure Storage, Anvil, and Forge
sub TravelToHome
recallfailhome:
set %runbook #ltargetID
set #lobjectID %runebook
set %charx_runebook #charposx                    ;set current character position X
set %chary_runebook #charposy                    ;set current character position Y
wait 5
event macro 17 0                                 ;open runebook
wait 10
set #contPosX 0                                  ;position runebook
set #contPosY 0                                  ;position runebook
wait 5
click 138 196 dmc                                ;clicking page 1
wait 10
click 139 145 dmc                                ;selecting home location
wait 10
gosub WaitForRecallHome
return
;=============================================================================
; Wait For Recall Home
sub WaitForRecallHome
set %loop 0
repeat
if %charx_runebook <> #charposx || %chary_runebook <> #charposy
   {
   wait 5
   return
   }
set %loop %loop + 1
until %loop > 200
goto recallfailhome
;=============================================================================
; Travel to Library to Drop off Shields / Select turn in NPC
sub TravelToLibrary
recallfaillibrary:
set %runbook #ltargetID
set #lobjectID %runebook
set %charx_runebook #charposx                    ;set current character position X
set %chary_runebook #charposy                    ;set current character position Y
wait 5
event macro 17 0                                 ;open runebook
wait 10
set #contPosX 0                                  ;position runebook
set #contPosY 0                                  ;position runebook
wait 10
click 138 196 dmc                                ;click page 1
wait 10
click 298 145 dmc                                ;selecting Library Location
wait 10
gosub WaitForRecallLibrary
return
;=============================================================================
; Travel To Library Location 2
sub TravelToLibrary2
set %runbook #ltargetID
set #lobjectID %runebook
set %charx_runebook #charposx                    ;set current character position X
set %chary_runebook #charposy                    ;set current character position Y
wait 5
event macro 17 0                                 ;open runebook
wait 10
set #contPosX 0                                  ;position runebook
set #contPosY 0                                  ;position runebook
wait 10
click 173 195 dmc                                ;click page 2
wait 10
click 139 145 dmc                                ;select recall option
wait 10
gosub WaitForRecallLibrary
return
;=============================================================================
; Wait For Recall Library
sub WaitForRecallLibrary
set %loop 0
repeat
if Something_is_blocking in #sysmsg              ;if primary library rune is blocked
   {
   wait 10
   gosub TravelToLibrary2
   }
if %charx_runebook <> #charposx || %chary_runebook <> #charposy
   {
   wait 5
   return
   }
set %loop %loop + 1
until %loop > 200
goto recallfaillibrary
;=============================================================================
; Wait for gump
sub WaitForGump
set %time #scnt
repeat
if You_mark_ in #sysmsg
   {
   break
   }
if #scnt > ( %time + 5 )
   {
   break
   }
wait 0
until #contname = generic_gump
wait 5
return
;=============================================================================

2
Scripting Chat / New Scripter, A few questions..
« on: June 11, 2012, 07:24:31 PM »
Hello everyone,

I've written a script to turn in bucklers for Mace and Shield Glasses.  I've written a number of macros in my day, and this script works more like a macro.  It currently functions and does its task as long as everything goes perfect, no lag etc.  I desire to make it more advanced by changing the way it waits after recalling etc to make it more lag proof, and "hook" into UO to retrieve some data.

Credit where credit is due:
Initially I downloaded and tried to run "TheReapers Mace and Shield Donator V2.0" but it would not run for me.  Some of this script has been copy/pasted from that script. 

Version 1.2.0 of my script

Code: [Select]
;============================================================================
; Script Name: Sin's Mace and Shield Donator
; Author: Sin
; Version: 1.2.0
; Client Tested with: 7.0.25.7
; EUO version tested with: 1.5.214
; Purpose: Donating to brit library for Mace and Shield Reading glasses
;=============================================================================
;***Setup Instructions***
;1. Runebook with position 1 marked to secure, anvil and forge
;2. Runebook with position 2 marked to Library Turn in NPC
;3. A "Workbag" insdie your backpack, I used a "Bag" during testing.
;4. At least one tinker tools in the "Workbag"
;5. Top level of secure should contain Iron Ingots only!
;6. BEFORE running script, use a blacksmith and tinker tool and line up the
;6. (cont) Crafting Gumps to the upper left corner.
;7. Under "User Options", set the two variables.
;=============================================================================
; User Options
set %setup 1 ;Currently "MUST" be set to 1 to make script work, **Needs Work**
set %max_buckler_amount 59 ; select number of bucklers to make
==============================================================================
;Update Log
;
;Version 1.2.0
;Added Tinker Tool Creation Function
;When your workbag is down to one tinker tool, another is produced.
;Various code cleanup.
;Still suffers from being prone to cash, need to add better wait for gump
;functions.  Will work on this.
;06/10/2012 Sin
;
;Version 1.1.0
;Changed the way smith hammers were made, now only 3 are made
;Make Tinker Tools not working at this time.
;06/10/12 Sin
;
;Version 1.0.0
;Completed the first version of the script.  Script can not recover from lag
;or glitches very well at this point, but it runs.  Will continue to works on
;recovery ability etc.
;06/10/2012 Sin
==============================================================================
; Script Variables (Item types)
set %ingots ENK
set %tinker_tools JTL
set %smiths_hammer TLH
set %buckler FIK
set %status_bucklers 0
set %status_ingots 0
set %makefirstbuckler 1
set %check 0
set %count 0
set %loop 0
set #weight
set #maxweight
;list
;%time         - Delay Time in "WaitForGump"
;%setup        - Set to 1 to run script currently **NEEDS WORK HERE**
;%runebook     - This is the runebook used in this script
;%secure       - This is the secure container at the house rune location
;%workbag      - This is the workbags ID number
;%donation_npc - This is the ID of the donation NPC
;=============================================================================
; Main Loop
if %setup = 1
   {
   gosub MainSetup
   set %setup 0
   }
while %loop < 5
      {
      gosub CheckWeight
      gosub InvisSelf
      gosub GetIngots
      gosub MakeBuckler
      gosub DropIngots
      gosub TurnInBucklers
      }
display ok End of main, error halting
halt
;=============================================================================
sub MainSetup
; Get Runebook ID
display ok Target your runebook
set #targcurs 1
wait 5
repeat
wait 0
until #targcurs = 0
set %runebook #ltargetID
set #lobjectID %runebook
wait 5

; Get workbag ID number
display ok Target your workbag
set #targcurs 1
wait 5
repeat
wait 0
until #targcurs = 0
set %workbag #ltargetID
set #lobjectID %workbag
wait 5
event macro 17 0
wait 5
set #contPosX 850
set #contPosY 520
wait 25

; Get secure ID number
display ok Target your secure container.
set #targcurs 1
wait 5
repeat
wait 0
until #targcurs = 0
set %secure #ltargetID
set #lobjectID %secure
wait 10
event macro 17 0
wait 10
set #contPosX 675
set #contPosY 500
wait 25

; Get Donation NPC ID
gosub TravelToLibrary
display ok Target the reward NPC
set #targcurs 1
wait 5
repeat
wait 0
until #targcurs = 0
set %donation_npc #ltargetID
set #lobjectID %donation_npc
wait 5
display ok Setup complete, You can leave it to me now
gosub TravelToHome
wait 5

return
;=============================================================================
; Check weight subroutine
sub CheckWeight                             ;more work to be done with this
set %avail = ( #maxweight - #weight )
return
;=============================================================================
; Cast Invis on Self at Secure
sub InvisSelf
set #ltargetID #charID                      ;set pc as last target
wait 5
event macro 15 43                           ;cast invis spell
wait 50
event macro 22 0                            ;last target
wait 5
return
;=============================================================================
; Places ingots in backpack
sub GetIngots
set #lobjectID %secure
wait 10
event macro 17 0
;set #contPosX 675                           ;if you position the secure, it moves the
;set #contPosY 500                           ;position of the workbag for some reason
wait 25
finditem %ingots C_ , %secure
if #findkind = -1
   {
   display ok Your secure container has run out of ingots, Ending Script.
   halt
   }
if #findstack < 1000
   {
   set %stack #findstack
   }
else
    {
    set %stack 1000
    }
exevent drag #findID %stack
wait 10
exevent dropc %workbag
wait 15
set %status_ingots ( %status_ingots + %stack )
return
;=============================================================================
; Make Bucklers Loops
sub MakeBuckler
finditem %smiths_hammer C_ , %workbag
if #findkind = -1
   {
   gosub MakeHammer
   }
finditem %smiths_hammer C_ , %workbag
set #lobjectID #findID
wait 5
event macro 17 0
wait 5
set #contPosX 0
set #contPosY 0
wait 5
while %makefirstbuckler = 1
   {
   click 25 130 dmc
   wait 5
   gosub WaitForGump
   set #contPosX 0
   set #contPosY 0
   click 233 70 dmc
   wait 5
   gosub WaitForGump
   set %makefirstbuckler  0
   gosub MoreBuck
   click 27 452 dmc                             ;close blacksmithing window
   wait 25
   }
set %makefirstbuckler 1
Return
;============================================================
; 1 to 50 bucklers
sub MoreBuck
while %count < %max_buckler_amount
      {
      click 282 453 dmc                          ;click make last button
      wait 10
      gosub WaitForGump                          ;wait for gump to refresh
      wait 10
      finditem %smiths_hammer C_ , %workbag      ;find hammer in workbag
      if #findkind = -1                          ;checks to see how many hammers there are
          {
          gosub MakeHammer                       ;if 0 go make more
          }
      else
      if %check = 5
         {
         finditem %smiths_hammer C_ , %workbag   ;ensure hammer is targeted
         set #lobjectID #findID                  ;ensure hammer is targeted
         event macro 17 0                        ;lasttarget (activate a new hammer if last broke)
         wait 5
         set #contPosX 0                         ;reposition gump for makelast button
         set #contPosY 0                         ;reposition gump for makelast button
         wait 5
         set %check 0
         }
      else
      set %check %check + 1
      set %count %count + 1
      }
set %count 0
return
;==================================
; Move ingots to secure
sub DropIngots
finditem %ingots C_ , %workbag
wait 5
exevent drag #findid #findstack
wait 10
exevent dropc %secure
set %status_ingots ( %status_ingots - #findstack )
wait 25
return
;=============================================================================
; Turns bucklers into the Donation NPC
sub TurnInBucklers
gosub TravelToLibrary
set #lobjectID %donation_npc
event macro 17 0
gosub WaitForGump
wait 5
click 288 214 dmc                         ;select "by bag" option on npc, get target cursor
wait 25
finditem %workbag C_ , #backpackid
set #ltargetID #findID
wait 10
event macro 22 0                          ;set lasttarget to %workbag, selectlasttarget
wait 25
click 606 392 dmc                         ;select "ok" basically
wait 25
gosub TravelToHome
return
;=============================================================================
; Makes 3 smith's hammers
sub MakeHammer
finditem %tinker_tools C_ , %workbag     ;check for tinker tools
if #findkind < 2                         ;if 1 left, make one more
   {
   gosub MakeTinker                      ;make tinker tools
   }
finditem %tinker_tools C_ , %workbag     ;select tinker tools
set #lobjectID #findID
repeat
wait 10
event macro 17 0                         ;open tinkering gump
gosub WaitForGump
set #contPosX 0                          ;position tinkering gump
set #contPosY 0                          ;position tinkering gump
wait 10
click 28 131 dmc                         ;select tools option in gump
gosub WaitForGump
wait 10
click 385 270 dmc                        ;select next page option in gump
gosub WaitForGump
wait 10
click 230 130 dmc                        ;select smith hammer option in gump
gosub WaitForGump
wait 25
;first hammer
click 282 453 dmc                        ;click make last button option in gump
gosub WaitForGump
wait 25
;second hammer
click 282 453 dmc                        ;click make last button option in gump
gosub WaitForGump
wait 25
;third and final hammer
finditem %smiths_hammer C_ , %workbag    ;change last object from tinker tool
set #lobjectID #findID                   ;to smiths hammer
wait 5
return
;=============================================================================
; Makes one tinker tool
sub MakeTinker
finditem %tinker_tools C_ , %workbag
set #lobjectID #findID
repeat
wait 10
event macro 17 0                         ;open tinkering gump
gosub WaitForGump
set #contPosX 0                          ;position tinkering gump
set #contPosY 0                          ;position tinkering gump
wait 10
click 28 131 dmc                         ;select tools option in gump
gosub WaitForGump
wait 10
click 232 130 dmc                        ;select tinker's tools
gosub WaitForGump
wait 10
return
;=============================================================================
; Travel Home to Secure Storage, Anvil, and Forge
sub TravelToHome
set %runbook #ltargetID
set #lobjectID %runebook
wait 5
event macro 17 0
wait 10
set #contPosX 0
set #contPosY 0
wait 5
click 138 196 dmc                        ;clicking page 1
wait 10
click 139 145 dmc                        ;selecting home location
wait 10
gosub WaitForGump
return
;=============================================================================
; Travel to Library to Drop off Shields / Select turn in NPC
sub TravelToLibrary
set %runbook #ltargetID
set #lobjectID %runebook
wait 5
event macro 17 0
wait 10
set #contPosX 0
set #contPosY 0
wait 5
click 138 196 dmc                        ;clicking page 1
wait 10
click 298 145 dmc                        ;selecting Library Location
wait 10
gosub WaitForGump
return
;=============================================================================
; Wait for gump
sub WaitForGump
set %time #scnt
repeat
if You_create_ in #sysmsg
   {
   break
   }
if #scnt > ( %time + 5 )
   {
   break
   }
wait 0
until #contname = generic_gump
wait 5
return
;=============================================================================

Post Merge: June 11, 2012, 07:36:21 PM
So my first few questions, be gentle  :D

1. How can I save the variables so that I dont need to rerun the setup each time?

2. I would like to wait for the coordinates of my character to change after recalling, as a more effective waiting method after recalling, something like this:

get charID coordinates                       ;gets home coordinates
set %homecoord                               ;sets as a variable
<recall to library method>                   ;move to library
gosub WaitForRecall                           ;wait for location change, fights lag "in theory"

sub WaitForRecall
get charID coordinates                       ;get library coordinates
set %librarycoord charIDcoord             ;sets as a variable
set %currentcoord ( %librarycoord - %homecorrd ) ;I really doubt this would work, stuck here

Is there a better method of checking for successful recall?

Thank you in advance.
 


3
New member introductions / Introduction Post
« on: June 06, 2012, 07:20:13 PM »
Good evening everyone,

A long long time ago, on a pc long since dead I began to play a game called "Ultima Online".  Being a fan of most of the single player ultima games for years, I couldnt wait to logon and strive to become the avatar!  Well, that was 14 years ago now, and still I play.

Favorite character types (currently) : Gargoyle Thrower
Favorite UO past times : Soloing Champs, Mining (odd I know, its from the old days)
Most Amusing UO moment : First day in game, getting slain by a common cat.
Shard : pacific

As a hobby I tinker around with changing the code of some games.  I like to write simple scripts, and macros.  Simple stuff compared to what you guys are coding I expect.  Have only a little experience with UO scripting as I have usually done it the ol' tried and true method.  Not much for the PvP, I prefer PVM (I'd rather play WITH you than AGAINST you).


See you on the boards!

Pages: [1]