;==================================
; Script Name: Drag Potions To Corner (of Pack)
; Author: Necro|FS
; Version: 1.10
; Client Tested with: 4.0.3b
; EUO version tested with: 1.42.0088
; Shard OSI / FS: OSI - Chesapeake
; Revision Date: 08.04.2004
; Public Release: 6.13.2004
; Global Variables Used: n/a
; Purpose: Moves those annoying potions to a corner (user specified) after restock.
;==================================
; Inventory X Y coords on your screen
set %BagX 0
set %BagY 0
;----------NO SETUP-------------
gosub showEUOMenu1
; get the position via GUI
gosub MenuSelection
if #Result = closed
halt
Menu Hide
; setup Postions and variables
gosub SetVars #Result
; setup Desktop
gosub SetupDesktop container_gump %BagX %BagY
;set Drop Locations & ignore locations
gosub SetupDropLocs
start:
; speed up for ignoring items
set #lpc 10
finditem UUF_ZUF_XUF_YUF_NUF_TUF_AVF_OUF C_ , #backpackid
if #findkind > -1
{
if #findx <= %IgnoreXLeft && #findy <= %IgnoreYBottom && #findx >= %IgnoreXRight && #findy >= %IgnoreYTop
{
ignoreitem #findid
goto start
}
; slow down for dragging
set #lpc 1
event drag #findid
drop:
click %x %y
wait 8
if #CONTNAME = drag_gump
goto drop
ignoreitem #findid
goto start
}
msg done
halt
sub SetupDropLocs
return
sub SetVars
if %1 = cmd1 6
set %x 50
set %y 50
set %IgnoreXLeft 45
set %IgnoreYBottom 66
set %IgnoreXRight 45
set %IgnoreYTop 66
if %1 = cmd2 6
set %x 110
set %y 50
set %IgnoreXLeft 88
set %IgnoreYBottom 66
set %IgnoreXRight 88
set %IgnoreYTop 66
if %1 = cmd3 6
set %x 180
set %y 50
set %IgnoreXLeft 141
set %IgnoreYBottom 66
set %IgnoreXRight 141
set %IgnoreYTop 66
if %1 = cmd4 6
set %x 50
set %y 107
set %IgnoreXLeft 45
set %IgnoreYBottom 93
set %IgnoreXRight 45
set %IgnoreYTop 86
if %1 = cmd5 6
set %x 185
set %y 107
set %IgnoreXLeft 141
set %IgnoreYBottom 93
set %IgnoreXRight 111
set %IgnoreYTop 86
if %1 = cmd6 6
set %x 50
set %y 150
set %IgnoreXLeft 45
set %IgnoreYBottom 130
set %IgnoreXRight 45
set %IgnoreYTop 116
if %1 = cmd7 6
set %x 110
set %y 150
set %IgnoreXLeft 88
set %IgnoreYBottom 130
set %IgnoreXRight 88
set %IgnoreYTop 116
if %1 = cmd8 6
set %x 185
set %y 150
set %IgnoreXLeft 141
set %IgnoreYBottom 130
set %IgnoreXRight 141
set %IgnoreYTop 116
return
sub MenuSelection
set #menubutton n/a
MSGetBut:
wait 0
if #menubutton = n/a
goto MSGetBut
else
return #MenuButton
sub SetupDesktop
; Opens & moves gumps to specified locations
; Can be included or called
; Supports mroe than one container to open
; by Necro|FS
; parm %1 - Gump name in #contname
; %2 - #ContPosX
; %3 - #ContPosY
; %4 - %* = optional
;
; - Possible values for %1 = 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
for !cnt2 1 %0
{
set ! . !cnt2 % . !cnt2
}
set !Runs %0 / 3
for !cnt 1 !Runs
{
set !Parm1 3 * !cnt - 2
set !Parm2 !Parm1 + 1
set !Parm3 !Parm2 + 1
set !Parm1 ! . !Parm1
set !Parm2 ! . !Parm2
set !Parm3 ! . !Parm3
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:
event macro 8 !macro
scanjournal
if You_must_wait in #journal
{
deletejournal
goto openitSUD
}
wait 10
WFSVL:
gosub waitForSysVar contname = !Parm1 2
if ! #result
goto WFSVL
else
contpos !Parm2 !Parm3
WFSV2:
gosub waitForSysVar contposx = !Parm2 contposy = !Parm3
if ! #result
goto WFSV2
}
nameSpace Clear
nameSpace Pop
return
;Smeritor's waitForSysVar
sub waitForSysVar
nameSpace Push
nameSpace local WFSV
if %0 < 4 || %4 = N/A
set !timeOut 0
else
set !timeOut #scnt + 5
_waitForLoop:
if #scnt > !timeOut
{
nameSpace Clear
nameSpace Pop
return #false
}
if ! ( # . %1 %2 %3 )
goto _waitForLoop
nameSpace Clear
nameSpace Pop
return #true
;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
menu Clear
menu Window Title Click Location !
menu Window Color BtnFace
menu Window Size 160 192
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 0 0 162 192 3 7 1 Black 7 White
menu Shape EUOShape2 0 0 161 41 2 7 1 Black 7 Maroon
menu Shape EUOShape3 0 0 161 21 3 7 1 Maroon 7 Maroon
menu Shape EUOShape4 0 0 9 193 3 7 1 Black 7 Maroon
menu Shape EUOShape5 152 0 9 193 3 7 1 Black 7 Maroon
menu Shape EUOShape6 0 164 161 29 3 7 1 Black 7 Maroon
menu Shape EUOShape7 68 168 25 21 5 7 3 Yellow 7 Maroon
menu Shape EUOShape8 72 177 17 3 3 7 1 Black 7 Yellow
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Button cmd1 8 40 49 37 Top Left
menu Button cmd2 56 40 49 37 T Center
menu Button cmd3 104 40 49 37 Top Right
menu Button cmd4 8 76 73 53 Mid Left
menu Button cmd5 80 76 73 53 Mid Right
menu Button cmd6 8 128 49 37 Low Left
menu Button cmd7 56 128 49 37 L Middle
menu Button cmd8 104 128 49 37 L Right
menu Show 421 270
return
;--------- EasyUO Menu Designer Code End ---------
; Script Name: Drag Potions To Corner (of Pack)
; Author: Necro|FS
; Version: 1.10
; Client Tested with: 4.0.3b
; EUO version tested with: 1.42.0088
; Shard OSI / FS: OSI - Chesapeake
; Revision Date: 08.04.2004
; Public Release: 6.13.2004
; Global Variables Used: n/a
; Purpose: Moves those annoying potions to a corner (user specified) after restock.
;==================================
; Inventory X Y coords on your screen
set %BagX 0
set %BagY 0
;----------NO SETUP-------------
gosub showEUOMenu1
; get the position via GUI
gosub MenuSelection
if #Result = closed
halt
Menu Hide
; setup Postions and variables
gosub SetVars #Result
; setup Desktop
gosub SetupDesktop container_gump %BagX %BagY
;set Drop Locations & ignore locations
gosub SetupDropLocs
start:
; speed up for ignoring items
set #lpc 10
finditem UUF_ZUF_XUF_YUF_NUF_TUF_AVF_OUF C_ , #backpackid
if #findkind > -1
{
if #findx <= %IgnoreXLeft && #findy <= %IgnoreYBottom && #findx >= %IgnoreXRight && #findy >= %IgnoreYTop
{
ignoreitem #findid
goto start
}
; slow down for dragging
set #lpc 1
event drag #findid
drop:
click %x %y
wait 8
if #CONTNAME = drag_gump
goto drop
ignoreitem #findid
goto start
}
msg done
halt
sub SetupDropLocs
return
sub SetVars
if %1 = cmd1 6
set %x 50
set %y 50
set %IgnoreXLeft 45
set %IgnoreYBottom 66
set %IgnoreXRight 45
set %IgnoreYTop 66
if %1 = cmd2 6
set %x 110
set %y 50
set %IgnoreXLeft 88
set %IgnoreYBottom 66
set %IgnoreXRight 88
set %IgnoreYTop 66
if %1 = cmd3 6
set %x 180
set %y 50
set %IgnoreXLeft 141
set %IgnoreYBottom 66
set %IgnoreXRight 141
set %IgnoreYTop 66
if %1 = cmd4 6
set %x 50
set %y 107
set %IgnoreXLeft 45
set %IgnoreYBottom 93
set %IgnoreXRight 45
set %IgnoreYTop 86
if %1 = cmd5 6
set %x 185
set %y 107
set %IgnoreXLeft 141
set %IgnoreYBottom 93
set %IgnoreXRight 111
set %IgnoreYTop 86
if %1 = cmd6 6
set %x 50
set %y 150
set %IgnoreXLeft 45
set %IgnoreYBottom 130
set %IgnoreXRight 45
set %IgnoreYTop 116
if %1 = cmd7 6
set %x 110
set %y 150
set %IgnoreXLeft 88
set %IgnoreYBottom 130
set %IgnoreXRight 88
set %IgnoreYTop 116
if %1 = cmd8 6
set %x 185
set %y 150
set %IgnoreXLeft 141
set %IgnoreYBottom 130
set %IgnoreXRight 141
set %IgnoreYTop 116
return
sub MenuSelection
set #menubutton n/a
MSGetBut:
wait 0
if #menubutton = n/a
goto MSGetBut
else
return #MenuButton
sub SetupDesktop
; Opens & moves gumps to specified locations
; Can be included or called
; Supports mroe than one container to open
; by Necro|FS
; parm %1 - Gump name in #contname
; %2 - #ContPosX
; %3 - #ContPosY
; %4 - %* = optional
;
; - Possible values for %1 = 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
for !cnt2 1 %0
{
set ! . !cnt2 % . !cnt2
}
set !Runs %0 / 3
for !cnt 1 !Runs
{
set !Parm1 3 * !cnt - 2
set !Parm2 !Parm1 + 1
set !Parm3 !Parm2 + 1
set !Parm1 ! . !Parm1
set !Parm2 ! . !Parm2
set !Parm3 ! . !Parm3
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:
event macro 8 !macro
scanjournal
if You_must_wait in #journal
{
deletejournal
goto openitSUD
}
wait 10
WFSVL:
gosub waitForSysVar contname = !Parm1 2
if ! #result
goto WFSVL
else
contpos !Parm2 !Parm3
WFSV2:
gosub waitForSysVar contposx = !Parm2 contposy = !Parm3
if ! #result
goto WFSV2
}
nameSpace Clear
nameSpace Pop
return
;Smeritor's waitForSysVar
sub waitForSysVar
nameSpace Push
nameSpace local WFSV
if %0 < 4 || %4 = N/A
set !timeOut 0
else
set !timeOut #scnt + 5
_waitForLoop:
if #scnt > !timeOut
{
nameSpace Clear
nameSpace Pop
return #false
}
if ! ( # . %1 %2 %3 )
goto _waitForLoop
nameSpace Clear
nameSpace Pop
return #true
;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
menu Clear
menu Window Title Click Location !
menu Window Color BtnFace
menu Window Size 160 192
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 0 0 162 192 3 7 1 Black 7 White
menu Shape EUOShape2 0 0 161 41 2 7 1 Black 7 Maroon
menu Shape EUOShape3 0 0 161 21 3 7 1 Maroon 7 Maroon
menu Shape EUOShape4 0 0 9 193 3 7 1 Black 7 Maroon
menu Shape EUOShape5 152 0 9 193 3 7 1 Black 7 Maroon
menu Shape EUOShape6 0 164 161 29 3 7 1 Black 7 Maroon
menu Shape EUOShape7 68 168 25 21 5 7 3 Yellow 7 Maroon
menu Shape EUOShape8 72 177 17 3 3 7 1 Black 7 Yellow
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Button cmd1 8 40 49 37 Top Left
menu Button cmd2 56 40 49 37 T Center
menu Button cmd3 104 40 49 37 Top Right
menu Button cmd4 8 76 73 53 Mid Left
menu Button cmd5 80 76 73 53 Mid Right
menu Button cmd6 8 128 49 37 Low Left
menu Button cmd7 56 128 49 37 L Middle
menu Button cmd8 104 128 49 37 L Right
menu Show 421 270
return
;--------- EasyUO Menu Designer Code End ---------
Commenta