1
General UO Chat / Re: Unattended Macro Alert 21 October 2009
« on: October 22, 2009, 10:58:00 PM »
mmmmm.... pi.

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.
my other band should have been the Beetles.Most over rated band in history.
set %debug #false
exevent dropC %targetBox
set %whatToMove TLK
set %tot 0
if %debug
{
set %sourceBox FSWVDRD
set %targetBox SDOTNND
goto Debug
}
redoSB:
gosub setTargToVar sourceBox Select the box with the source of boards you want to move
if #result = failed
halt
if ! #result
goto redoSB
redoTB:
gosub setTargToVar targetBox Select the box you would like to move board to
if #result = failed
halt
if ! #result
goto redoTB
gosub setupDesktop %sourceBox 0 0 %targetbox 250 0
Debug:
MainLoop:
gosub findStack
gosub moveStack #findid %moveAmount
goto MainLoop
sub findStack
finditem %whatToMove C_ , %sourceBox
if #findkind = -1
{
display OK no more boards
halt
}
if %tot >= 60000
set %tot 0
if %tot + #findstack > 60000
set %moveAmount 60000 - %tot
if %tot + #findstack <= 60000
set %moveAmount #findstack
set %tot %tot + %moveAmount
return #findid
sub moveStack
exevent drag %1 %2
wait 22
exevent dropC %targetBox
wait 22
return
;==================================
; Script Name: sub setTargToVar
; Author: Necro|FS
; Version: x.xx
; Client Tested with:
; EUO version tested with:
; Shard OSI / FS: OSI
; Revision Date:
; Public Release: 01-21-05
; Global Variables Used:
; Purpose: Setup variable for whatever you target, plus shows given message.
;==================================
sub setTargToVar
; %1 = name of the variable without the "%"
; %2 = Message to display (optional)
; if #result = failed - user cancelled the target #result = #true if it worked
; example -
; gosub setTargToVar regContainer Please target your REAGENT supply container..
; Purpose - Will set whatever you target to the variable you specify, and uses the message you specify
nameSpace Push
nameSpace local sTTV
if %0 < 1 || %0 = n/a
return
set !0 %0
for !_cnt 1 !0
{
set ! . !_cnt % . !_cnt
}
if !0 = 1
goto sTTVskip
for !_cnt 2 !0
{
if !_msg = n/a
set !_msg ! . !_cnt
else
set !_msg !_msg , #spc , ! . !_cnt
}
str left !_msg 1
set !_msgLetter #strres
str del !_msg 1 1
str lower #strres
set !sysMessages SYS in #opts
if !sysMessages
event sysmessage !_msgLetter , #strres
else
display ok !_msgLetter , #strres
sTTVskip:
set #ltargetid notpick
set #targcurs 1
sTTVTargLoop:
wait 0
if #targcurs <> 1 && #ltargetid = notpick
{
nameSpace Clear
nameSpace Pop
return #false
}
if #ltargetid = notpick
goto sTTVTargLoop
set % , !1 #ltargetid
nameSpace Clear
nameSpace Pop
return #true
;==================================
; Script Name: sub SetupDesktop
; Author: Necro|FS
; Version: 1.10
; Client Tested with: 4.0.3e
; EUO version tested with: 0096
; Shard OSI / FS: OSI / FS
; Revision Date: 08/01/04
; Public Release: 08/01/04
; Global Variables Used: n/a
; Purpose: Opens & Moves gumps to specified locations.
;==================================
sub SetupDesktop
;%1 - Gump request ( #contname )
;%2 - #ContPosX request
;%3 - #ContPosY request
;%4 - %* = optional
;@Purpose: Opens & moves gumps to specified locations;
; Can be included or called; Supports more than one container to open
;@by Necro|FS
;@Possible values for %1 = "ABCDEF" (ID of the Container) / "menu_ABCDEF" (Menu means you
; will be using a gump like the alchemy gump, the id is for the object to be used (a mortar)) /
; optionsgump (configuration) / paperdoll_gump (paperdoll) / status_gump (status) /
; text_gump (journal) / skill_gump (skills list) / spellbook_gump (spellbook) / container_gump
; (Inventory) / radar_gump (Overview) / normal_gump (UO Messenger) / PartyGump (Party Manifest)
nameSpace Push
nameSpace local subSD
set !_parm1 optionsgump_paperdoll_gump_status_gump_text_gump_
+skill_gump_spellbook_gump_container_gump_radar_gump_normal_
+gump_partygump
for !cnt2 1 %0
{
set ! . !cnt2 % . !cnt2
}
set !Runs %0 / 3
for !cnt 1 !Runs
{
set !_useEM #true
set !Parm1 3 * !cnt - 2
set !Parm2 !Parm1 + 1
set !Parm3 !Parm2 + 1
set !Parm1 ! . !Parm1
set !Parm2 ! . !Parm2
set !Parm3 ! . !Parm3
if !Parm1 notIn !_parm1
{
set !_useEM #false
goto openitSUD
}
if !Parm1 = optionsgump
set !macro 0
if !Parm1 = paperdoll_gump
set !macro 1
if !Parm1 = status_gump
set !macro 2
if !Parm1 = text_gump
set !macro 3
if !Parm1 = skill_gump
set !macro 4
if !Parm1 = spellbook_gump
set !macro 5
if !Parm1 = container_gump
set !macro 7
if !Parm1 = radar_gump
set !macro 8
if !Parm1 = normal_gump
set !macro 9
if !Parm1 = PartyGump
set !macro 10
openitSUD:
if !_useEM
event macro 8 !macro
else
{
if menu in !parm1
{
set !_menu #true
str del !parm1 1 5
set !parm1 #strres
}
set #lobjectid !Parm1
event macro 17
}
scanjournal
if You_must_wait in #journal
{
deletejournal
goto openitSUD
}
wait 10
WFSVL:
if !_menu
gosub waitForSysVar contname = generic_gump 2
if !_useEM
gosub waitForSysVar contname = !Parm1 2
if ! !_useEM && !_menu <> #true
gosub waitForSysVar contid = !Parm1 2
if ! #result
goto WFSVL
WFSV2:
else
contpos !Parm2 !Parm3
gosub waitForSysVar contposx = !Parm2 contposy = !Parm3
if ! #result
goto WFSV2
}
nameSpace Clear
nameSpace Pop
return
sub waitForSysVar
; Author: Quintok / Raziel
{
nameSpace Push
nameSpace local WFSV
set !cnt %0 / 3
if ( %0 % 3 = 1 )
set !timeOut #scnt + % . %0
else
set !timeOut #scnt + 5
for !i 1 !cnt
{
set !offset 3 * !i - 2
set !evaluation !offset + 1
set !value !offset + 2
if ! ( # . % . !offset % . !evaluation % . !value )
set !i 0
if #scnt > !timeout
{
nameSpace Clear
nameSpace Pop
return #false
}
}
}
nameSpace Clear
nameSpace Pop
return #true
start:
set %find TLK
set %full 60000
set %wait 10
gosub getboards
gosub stacking
return
sub getboards
finditem %find
if #findstack < %full
{
set %pile #findid
return
}
ignoreitem
return
sub stacking
finditem %find
if #findid = %pile
{
ignoreitem
return
}
loop:
set %source #findid
finditem %pile
wait 5
set %count ( %full - #findstack )
exevent drag %source %count
wait 10
exevent dropC %pile
wait 10
finditem %pile
if #findstack = %full
{
goto start
}
goto loop