Arkadaslar Tai KAsma Scripti Arıyorum |
Yazar
Mesaj
;-----------------------------------------------------------
; Script Name: CEOTurboCutter
; Author: CEO
; Version: 2.0
; Client Tested with: 4.0..10b
; EUO version tested with: 1_42_00A5
; Shard OSI / FS: OSI
; Revision Date: 043005
; Public Release: 012704
; Purpose: This script goes along with CEOTurboTailor. It gets ran FIRST.
;-------------------------------------------------------------
;-------------------------------------------------------------
; Instructions:
;
; 1. Start CEOTurboCutter
; 2. See CEOTurboTailor for additional instructions.
; This script is USELESS by itself!
initevents
set %version 2.0
;=============================================
; User configuration section
; Most of these defaults should be fine. Please understand
; what you're doing before changing.
;=============================================
; If you are getting alot of "You must wait" message while running, increase this number.
; You don't need to increase till all the messages goway, just enough so that it doesn't
; fail so much that it loses tra
set %cuttingdelay 5
; Set these to your x/y cords for the EasyUO menu window
set %menu_windowx 350
set %menu_windowy 20
;
; Advanced user configs. === Only change if you understand EasyUO!!!!!
;
; If you have execute enabled modify this to the path of
; EasyUO and you can start CEOTurboTailor automatically.
set %easyuopath C:\easyuo\easyuo.exe
; The filename you called CEOTurboTailor. Default should work. If it needs to be a full
; path, adjust to your needs.
set %CEOTurboTailor CEOTurboTailor.txt
;
; if you set this to #true and you have exec enabled (assumes you know what you're doing
; above), CEOTurboTailor will start automatically.
set %autostart #false
;
set %gvar CEOTurboTailor
set %scriptname CEOTurbocutter
;=============================================
; NOTHING BELOW THIS LINE SHOULD NEED CHANGING.
; DO SO AT YOUR OWN RISK!
;=============================================
set %debug #false
set %520 520_ , #charid
set %521 521_ , #charid
set %522 522_ , #charid
set %uncuttables PPH_WPH_BQH_QPH_AQH_VPH_YPH_ZPH_CQH_XPH
set %scissortypes KAG_JAG
set %backpackid #backpackid
set %backpacktype ZJF_KUD
set %backpackcount 0
set %wait1 20
set %sp #false
if Siege in #shard
set %sp #true
set * . %520 N/A
set * . %521 IDLE
gosub initmenu
gosub GetScissors
if ! #result
{
menu hideeuo
display ok No scissors were found. You need one pair of scissors in the main backpack.$$Script halted.
menu hide
halt
}
gosub GetBackPackID
set %idledcount 0
if %autostart && EXEC in #opts
gosub start
gosub SetupScreen
gosub initmenu
set %lasttype * . %521
set #menubutton N/A
Cutter:
if %sp
gosub GetScissors
if * . %520 = done
gosub done
if * . %520 = terminate
gosub terminator
if #menubutton = CLOSED
{
menu hide
halt
}
if * . %521 in %uncuttables
{
menu font color yellow
set * . %522 IDLE
menu delete d522
menu text d522 55 10 * . %522
menu delete d521
menu text d521 55 25 None
menu font color lime
wait 2s
gosub Pause
goto cutter
}
set %Cuttercount 0
Cutter2:
finditem * . %521 C_ , %backpackid
if #findkind <> -1
{
set %cutid #findid
set %cuttercount %cuttercount + 1
if %cuttercount = 1
{
menu font color lime
set * . %522 CUTTING
menu delete d522
menu text d522 55 10 * . %522
goto Cutter3
}
if %cuttercount < 4
{
menu font color blue
set * . %522 CUTTING
menu delete d522
menu text d522 55 10 * . %522
goto Cutter3
}
if %cuttercount < 8
{
menu font color yellow
set * . %522 CUTTING-
menu delete d522
menu text d522 55 10 * . %522
goto Cutter3
}
if %cuttercount < 15
{
menu font color red
set * . %522 CUTTING--
menu delete d522
menu text d522 55 10 * . %522
goto Cutter3
}
menu font bgcolor red
menu font color black
set * . %522 CUTTING---
menu delete d522
menu text d522 55 10 * . %522
menu font bgcolor black
Cutter3:
SET #LTARGETID #findid
set #lTargetKind 1
if %sp
gosub GetScissors
SET #LOBJECTID %scissorid
wait %cuttingdelay
EVENT MACRO 17 0
TARGET 3s
EVENT MACRO 22
wait %cuttingdelay
set %idlecount 0
if Scissors_cannot in #sysmsg
{
set %uncuttables %uncuttables , _ , * . %521
ignoreitem %cutid
goto cutter
}
if MUST_WAIT in #sysmsg && %cuttingdelay < 20
{
set %cuttingdelay %cuttingdelay + 1
wait %cuttingdelay
menu font color yellow
menu delete cutinfo
menu text cutinfo 5 55 (Delay= , %cuttingdelay , )
goto cutter2
}
ignoreitem %cutid cutlist
goto Cutter2
}
set %idlecount %idlecount + 1
if %idlecount > 3
{
menu font color yellow
set * . %522 IDLE
menu delete d522
menu text d522 55 10 * . %522
ignoreitem reset cutlist
}
if %lasttype <> * . %521
{
set %lasttype * . %521
menu font color white
menu delete d521
menu text d521 55 25 * . %521
}
wait %wait1
if %idlecount > 1
gosub Pause
goto Cutter
sub Pause
if * . %520 <> PAUSE
return
menu font color yellow
menu delete d520
menu text d520 55 40 * . %520
set * . %522 PAUSED
menu delete d522
menu text d522 55 10 * . %522
PauseLoop:
wait 5
if * . %520 = PAUSE
goto PauseLoop
menu delete d520
menu text d520 55 40 * . %520
return
sub initmenu
menu clear
menu window size 180 70
menu window title CEOTurboCut , %version
menu window color black
menu font color white
menu font bgcolor black
menu font size 9
menu font style n
menu text h1 5 10 Status:
menu text d522 55 10 * . %522
menu text h2 5 25 Type:
menu text d521 55 25 * . %521
menu text h3 5 40 Control:
menu font color lime
menu text d520 55 40 * . %520
menu show %menu_windowx %menu_windowy
menu hideeuo
menu show %menu_windowx %menu_windowy
menu font size 9
menu font color lime
return
sub GetScissors
set %backpackopened #false
GS1:
finditem %scissortypes C_ , #backpackid
if #findkind <> -1
{
set %scissorid #findid
return #true
}
if ! %backpackopened
{
event macro 8 7
wait 1s
set %backpackopened #true
goto GS1
}
;set * . %520 HALTED
set * . %521 NO , #spc , SCISSORS!
set * . %522 ERROR
set * . %520 terminate
menu delete d522
menu delete d521
menu delete d520
menu font color red
menu text d522 55 10 * . %522
menu text d521 55 25 * . %521
menu text d520 55 40 * . %520
display ok You need at least one pair of scissors in your char's main opened backpack! Halting...
halt
;---------------------
sub SetupScreen
menu clear
menu window size 365 295
menu window title CEOTurboCut , %version
menu window color gray
menu font color blue
menu font bgcolor gray
menu font size 12
menu font style ub
menu text h1 110 5 Setup Instructions
menu font style b
menu font color yellow
menu font size 9
menu text h1 5 40 1. Backpack setup:
menu text h1 5 150 2. Resource Container:
menu font bgcolor red
menu font color black
menu text h1 8 165 (Resource container
menu text h1 8 180 must be in bank box
menu text h1 8 195 or house secure.)
menu font bgcolor gray
menu font color lime
menu text h1 125 40 ONE pair Scissors (REQUIRED)
menu font style n
menu font color white
menu text h1 125 55 Sewing Kit
menu text h1 125 70 Resources (cloth or leather)
menu font color blue
menu text h1 5 85 Backpack must be OPENED. You can start with just scissors
menu text h1 5 100 as long as the sewing kits (or Tinker's tools) and resources
menu text h1 5 115 needed to make items at your skill level are in the resource
menu text h1 5 130 container.
menu font color white
menu text h1 140 150 Cloth, Leather, and Bone (if needed)
menu text h1 140 165 Sewing Kits (or Tinker's Tools)
menu text h1 140 180 Tinker's Tools
menu text h1 140 195 Ingots (If Tinkering)
menu font color blue
menu text h1 5 210 You can actually put any of these items in any opened container.
menu text h1 5 225 The resource container AND your paperdoll must not be blocked!
menu text h1 5 240 Bandaids and other items will be returned to resource container
menu text h1 5 255 as needed.
menu font bgcolor red
menu font color black
menu font style b
menu text h1 75 255 Cloth MUST be all same color (stackable).
menu font bgcolor gray
menu font style n
menu font color yellow
set %setupx #clixres / 2 - ( 365 / 2 )
set %setupy #cliyres / 2 - ( 295 / 2 )
menu show %setupx %setupy
set * . %522 PAUSED
if EXEC in #opts
{
menu font bgcolor teal
menu font color black
menu button Start 320 275 40 20 Start
menu font bgcolor black
menu font color yellow
}
set #menubutton N/A
WaitforCut:
if #menubutton = start
gosub start
menu font bgcolor red
menu text h1 110 280 Start CEOTurboTailor now.
wait 5
menu font bgcolor gray
menu text h1 110 280 Start CEOTurboTailor now.
wait 5
if * . %520 <> CUT
goto waitforCut
return
sub start
execute %easyuopath %CEOTurboTailor
set #menubutton N/A
menu delete start
return
sub done
set #menubutton N/A
chooseskill tail
set * . %522 PAUSED
menu clear
menu font size 9
menu window size 300 295
menu window title CEOTurboCut , %version
menu window color black
menu font color lime
menu font bgcolor black
menu font style b
menu text h1 5 5 Congratulations! You've reached your skillcap.
menu font style ni
menu font color white
menu text h1 5 30 Now that CEOTurboTailor has done its job can
menu text h1 5 45 I ask a small favor of you?
menu font style n
menu font color yellow
menu text h1 5 70 I spent several hours of my time creating this
menu text h1 5 85 script. Can you please spend a few minutes and
menu text h1 5 100 visit the EasyUO website and drop me a message?
menu text h1 5 115 You may need to register, but it'll only take a few
menu text h1 5 130 moments.
menu text h1 5 150 I'd also appreciate it if you could post your stats
menu text h1 5 165 and rate the script. Doing so will bring me much
menu text h1 5 180 joy and will encourage more scripts like this one. :-)
menu font size 12
menu font color white
menu font style b
menu text h1 105 200 Thank You!
menu font style n
menu font size 9
if exec in #opts
menu button easyuo 10 200 90 20 Rate it now!
;set %setupx #clixres / 2 - ( 300 / 2 )
;set %setupy #cliyres / 2 - ( 295 / 2 )
menu show 230 20
menu font color red
menu font style u
menu text h1 45 225 Skill Start
menu text h1 125 225 Skillcap
menu text h1 190 225 Elasped Time
menu text h1 125 255 Cloth
menu text h1 185 255 Leather
menu text h1 255 255 Bone
menu font style n
menu text h1 45 255 Resources:
menu text h1 5 270 Attempts:
menu font color lime
menu font align right
gosub getGlobalVar %gvar CEOTurboTailor #charid skillstart
menu text h1 93 240 %skillstart
menu text h1 165 240 #skill
gosub getGlobalVar %gvar CEOTurboTailor #charid scripttime
set %totaletime %scripttime
set %ehours %totaletime / 3600
set %emins ( %totaletime / 60 ) - ( %ehours * 60 )
set %esecs %totaletime % 60
menu text h1 265 240 %ehours , h , #spc , %emins , m , #spc , %esecs , s
menu font color white
menu font align left
gosub getGlobalVar %gvar CEOTurboTailor #charid attempts3
gosub getGlobalVar %gvar CEOTurboTailor #charid clothused3
gosub getGlobalVar %gvar CEOTurboTailor #charid leatherused3
gosub getGlobalVar %gvar CEOTurboTailor #charid boneused3
menu text h1 60 270 %attempts3
menu font align right
menu text h1 153 270 %clothused3
menu text h1 225 270 %leatherused3
menu text h1 282 270 %boneused3
menu font align left
set #menubutton N/A
done1:
wait 5
if * . %520 = terminate
set #menubutton terminate
if #menubutton = N/A
goto done1
if #menubutton = easyuo
{
gosub runbrowser
set #menubutton N/A
goto done1
}
gosub terminator
return
sub terminator
if %debug
halt
set * . %520 terminate
terminate euo
return
sub runbrowser
execute http://www.easyuo.com/forum/viewtopic.php?t=3878
return
sub displaydiagnostics
display ok %1 , #spc , %2 $ %3 , #spc , %4 $ %5 , #spc , %6
return
==================================
; Script Name: CEO's * variable management subs (pseudo filesystem)
; Author: CEO
; Version: 1.1
; Client Tested with: 4.0.1b
; EUO version tested with: 1_41_103
; Shard OSI / FS: OSI
; Revision Date: 040219
; Public Release: 040219
; Globals Used: User specified (2 total)
; Purpose: Allows you to use a * variable as a pseudo-filesystem
;=======================================
; CEO's global variable management subs:
; getGlobalVar . putGlobalVar . delGlobalVar
;=======================================
;
;ver 1.1
;changed the lock file to use *variablename_lock so it'll work with any named *variable
;
Sub getGlobalVar
;ver 1.0 posted 19Feb04 by CEO
;purpose: Allows you to store multiple variables in one global variable unique to
; each player and script. getGlobaVar retrieves a value from a global variable.
;@returns: #result = #false if variable not found, #true if found
; % . %3 contains variable value
;%1 is the global/persistant variable to use ( %1 + 1 is used for locking)
;%2 is the script identifer or pseudo filename
;%3 is #charid or pseudo filename
;%4 is the variable to search for and return in %. %3
;%5 is for lock control. By default getGlobalVar uses a lock to return a value. In some cases you may want to
; retrieve a variable (mostly for speed) without needing a lock as long as you are aware of
any potentional conflicts, that very rarely may occur. Set this param to NOLOCK to access
global storage without a lock.
;sample usage:
; gosub getGlobalVar 50 MyScript #charid backpackid
; Using global var *50 finds the variable labeled MyScript#charidbackpackid and returns it in %backpackid
;
; gosub getGlobalVar 50 MyScript #charid clothstat NOLOCK
; Using global var *50 find the variable labeled MyScript#charidclothstat and returns it in %clothstat without using a lock
; Warning: do not use *1000. * %1 + 1 is used for locking and there is no *1001!
nameSpace push
nameSpace local #systime , _ , %2 , _ , %3 , _ , %4 , _ , GET
set !lpc #lpc
set #lpc 1000
set !lock %1 , _lock
if ( %0 = 5 ) && ( %5 = NOLOCK )
goto getGlobalVar_skiplock
set !lockcount 0
getGlobalVar_waitforlock:
if * . !lock <> N/A && * . !lock <> #nsname
{
wait 1 4
set !lockcount !lockcount + 1
if !lockcount < 10
goto getGlobalVar_waitforlock
if * . !lock <> N/A
{
set !currentlock * . !lock
if !currentlock = N/A
goto getGlobalVar_waitforlock
str pos !currentlock _
set !strres #strres - 1
str left !currentlock !strres
set !systime #systime - #strres
if !systime < 10000 ; if over 10 seconds assume a broken lock and take it
{
set !lockcount 0
goto getGlobalVar_waitforlock
}
}
}
set * . !lock #nsname
wait 3 2
if * . !lock <> #nsname
{
set !lockcount 0
goto getGlobalVar_waitforlock
}
getGlobalVar_skiplock:
set !global * . %1
set !varName %2 , ^ , %3 , ^ , %4 , |
str pos !global !varName
set #result #strres <> 0
if #result
{
set !varNamePos #strres
str len !varName
set !delString !varNamePos + #strres - 1
str del !global 1 !delString
set !global #strres
str pos !global |
set !varNamePos #strres - 1
str left !global !varNamePos
set % . %4 #strres
}
if ( %0 < 5 || %5 <> NOLOCK ) && * . !lock = #nsname
set * . !lock N/A
set #lpc !lpc
nameSpace Clear
nameSpace Pop
return #result
Bu cutter için..
; Script Name: CEOTurboCutter
; Author: CEO
; Version: 2.0
; Client Tested with: 4.0..10b
; EUO version tested with: 1_42_00A5
; Shard OSI / FS: OSI
; Revision Date: 043005
; Public Release: 012704
; Purpose: This script goes along with CEOTurboTailor. It gets ran FIRST.
;-------------------------------------------------------------
;-------------------------------------------------------------
; Instructions:
;
; 1. Start CEOTurboCutter
; 2. See CEOTurboTailor for additional instructions.
; This script is USELESS by itself!
initevents
set %version 2.0
;=============================================
; User configuration section
; Most of these defaults should be fine. Please understand
; what you're doing before changing.
;=============================================
; If you are getting alot of "You must wait" message while running, increase this number.
; You don't need to increase till all the messages goway, just enough so that it doesn't
; fail so much that it loses tra
set %cuttingdelay 5
; Set these to your x/y cords for the EasyUO menu window
set %menu_windowx 350
set %menu_windowy 20
;
; Advanced user configs. === Only change if you understand EasyUO!!!!!
;
; If you have execute enabled modify this to the path of
; EasyUO and you can start CEOTurboTailor automatically.
set %easyuopath C:\easyuo\easyuo.exe
; The filename you called CEOTurboTailor. Default should work. If it needs to be a full
; path, adjust to your needs.
set %CEOTurboTailor CEOTurboTailor.txt
;
; if you set this to #true and you have exec enabled (assumes you know what you're doing
; above), CEOTurboTailor will start automatically.
set %autostart #false
;
set %gvar CEOTurboTailor
set %scriptname CEOTurbocutter
;=============================================
; NOTHING BELOW THIS LINE SHOULD NEED CHANGING.
; DO SO AT YOUR OWN RISK!
;=============================================
set %debug #false
set %520 520_ , #charid
set %521 521_ , #charid
set %522 522_ , #charid
set %uncuttables PPH_WPH_BQH_QPH_AQH_VPH_YPH_ZPH_CQH_XPH
set %scissortypes KAG_JAG
set %backpackid #backpackid
set %backpacktype ZJF_KUD
set %backpackcount 0
set %wait1 20
set %sp #false
if Siege in #shard
set %sp #true
set * . %520 N/A
set * . %521 IDLE
gosub initmenu
gosub GetScissors
if ! #result
{
menu hideeuo
display ok No scissors were found. You need one pair of scissors in the main backpack.$$Script halted.
menu hide
halt
}
gosub GetBackPackID
set %idledcount 0
if %autostart && EXEC in #opts
gosub start
gosub SetupScreen
gosub initmenu
set %lasttype * . %521
set #menubutton N/A
Cutter:
if %sp
gosub GetScissors
if * . %520 = done
gosub done
if * . %520 = terminate
gosub terminator
if #menubutton = CLOSED
{
menu hide
halt
}
if * . %521 in %uncuttables
{
menu font color yellow
set * . %522 IDLE
menu delete d522
menu text d522 55 10 * . %522
menu delete d521
menu text d521 55 25 None
menu font color lime
wait 2s
gosub Pause
goto cutter
}
set %Cuttercount 0
Cutter2:
finditem * . %521 C_ , %backpackid
if #findkind <> -1
{
set %cutid #findid
set %cuttercount %cuttercount + 1
if %cuttercount = 1
{
menu font color lime
set * . %522 CUTTING
menu delete d522
menu text d522 55 10 * . %522
goto Cutter3
}
if %cuttercount < 4
{
menu font color blue
set * . %522 CUTTING
menu delete d522
menu text d522 55 10 * . %522
goto Cutter3
}
if %cuttercount < 8
{
menu font color yellow
set * . %522 CUTTING-
menu delete d522
menu text d522 55 10 * . %522
goto Cutter3
}
if %cuttercount < 15
{
menu font color red
set * . %522 CUTTING--
menu delete d522
menu text d522 55 10 * . %522
goto Cutter3
}
menu font bgcolor red
menu font color black
set * . %522 CUTTING---
menu delete d522
menu text d522 55 10 * . %522
menu font bgcolor black
Cutter3:
SET #LTARGETID #findid
set #lTargetKind 1
if %sp
gosub GetScissors
SET #LOBJECTID %scissorid
wait %cuttingdelay
EVENT MACRO 17 0
TARGET 3s
EVENT MACRO 22
wait %cuttingdelay
set %idlecount 0
if Scissors_cannot in #sysmsg
{
set %uncuttables %uncuttables , _ , * . %521
ignoreitem %cutid
goto cutter
}
if MUST_WAIT in #sysmsg && %cuttingdelay < 20
{
set %cuttingdelay %cuttingdelay + 1
wait %cuttingdelay
menu font color yellow
menu delete cutinfo
menu text cutinfo 5 55 (Delay= , %cuttingdelay , )
goto cutter2
}
ignoreitem %cutid cutlist
goto Cutter2
}
set %idlecount %idlecount + 1
if %idlecount > 3
{
menu font color yellow
set * . %522 IDLE
menu delete d522
menu text d522 55 10 * . %522
ignoreitem reset cutlist
}
if %lasttype <> * . %521
{
set %lasttype * . %521
menu font color white
menu delete d521
menu text d521 55 25 * . %521
}
wait %wait1
if %idlecount > 1
gosub Pause
goto Cutter
sub Pause
if * . %520 <> PAUSE
return
menu font color yellow
menu delete d520
menu text d520 55 40 * . %520
set * . %522 PAUSED
menu delete d522
menu text d522 55 10 * . %522
PauseLoop:
wait 5
if * . %520 = PAUSE
goto PauseLoop
menu delete d520
menu text d520 55 40 * . %520
return
sub initmenu
menu clear
menu window size 180 70
menu window title CEOTurboCut , %version
menu window color black
menu font color white
menu font bgcolor black
menu font size 9
menu font style n
menu text h1 5 10 Status:
menu text d522 55 10 * . %522
menu text h2 5 25 Type:
menu text d521 55 25 * . %521
menu text h3 5 40 Control:
menu font color lime
menu text d520 55 40 * . %520
menu show %menu_windowx %menu_windowy
menu hideeuo
menu show %menu_windowx %menu_windowy
menu font size 9
menu font color lime
return
sub GetScissors
set %backpackopened #false
GS1:
finditem %scissortypes C_ , #backpackid
if #findkind <> -1
{
set %scissorid #findid
return #true
}
if ! %backpackopened
{
event macro 8 7
wait 1s
set %backpackopened #true
goto GS1
}
;set * . %520 HALTED
set * . %521 NO , #spc , SCISSORS!
set * . %522 ERROR
set * . %520 terminate
menu delete d522
menu delete d521
menu delete d520
menu font color red
menu text d522 55 10 * . %522
menu text d521 55 25 * . %521
menu text d520 55 40 * . %520
display ok You need at least one pair of scissors in your char's main opened backpack! Halting...
halt
;---------------------
sub SetupScreen
menu clear
menu window size 365 295
menu window title CEOTurboCut , %version
menu window color gray
menu font color blue
menu font bgcolor gray
menu font size 12
menu font style ub
menu text h1 110 5 Setup Instructions
menu font style b
menu font color yellow
menu font size 9
menu text h1 5 40 1. Backpack setup:
menu text h1 5 150 2. Resource Container:
menu font bgcolor red
menu font color black
menu text h1 8 165 (Resource container
menu text h1 8 180 must be in bank box
menu text h1 8 195 or house secure.)
menu font bgcolor gray
menu font color lime
menu text h1 125 40 ONE pair Scissors (REQUIRED)
menu font style n
menu font color white
menu text h1 125 55 Sewing Kit
menu text h1 125 70 Resources (cloth or leather)
menu font color blue
menu text h1 5 85 Backpack must be OPENED. You can start with just scissors
menu text h1 5 100 as long as the sewing kits (or Tinker's tools) and resources
menu text h1 5 115 needed to make items at your skill level are in the resource
menu text h1 5 130 container.
menu font color white
menu text h1 140 150 Cloth, Leather, and Bone (if needed)
menu text h1 140 165 Sewing Kits (or Tinker's Tools)
menu text h1 140 180 Tinker's Tools
menu text h1 140 195 Ingots (If Tinkering)
menu font color blue
menu text h1 5 210 You can actually put any of these items in any opened container.
menu text h1 5 225 The resource container AND your paperdoll must not be blocked!
menu text h1 5 240 Bandaids and other items will be returned to resource container
menu text h1 5 255 as needed.
menu font bgcolor red
menu font color black
menu font style b
menu text h1 75 255 Cloth MUST be all same color (stackable).
menu font bgcolor gray
menu font style n
menu font color yellow
set %setupx #clixres / 2 - ( 365 / 2 )
set %setupy #cliyres / 2 - ( 295 / 2 )
menu show %setupx %setupy
set * . %522 PAUSED
if EXEC in #opts
{
menu font bgcolor teal
menu font color black
menu button Start 320 275 40 20 Start
menu font bgcolor black
menu font color yellow
}
set #menubutton N/A
WaitforCut:
if #menubutton = start
gosub start
menu font bgcolor red
menu text h1 110 280 Start CEOTurboTailor now.
wait 5
menu font bgcolor gray
menu text h1 110 280 Start CEOTurboTailor now.
wait 5
if * . %520 <> CUT
goto waitforCut
return
sub start
execute %easyuopath %CEOTurboTailor
set #menubutton N/A
menu delete start
return
sub done
set #menubutton N/A
chooseskill tail
set * . %522 PAUSED
menu clear
menu font size 9
menu window size 300 295
menu window title CEOTurboCut , %version
menu window color black
menu font color lime
menu font bgcolor black
menu font style b
menu text h1 5 5 Congratulations! You've reached your skillcap.
menu font style ni
menu font color white
menu text h1 5 30 Now that CEOTurboTailor has done its job can
menu text h1 5 45 I ask a small favor of you?
menu font style n
menu font color yellow
menu text h1 5 70 I spent several hours of my time creating this
menu text h1 5 85 script. Can you please spend a few minutes and
menu text h1 5 100 visit the EasyUO website and drop me a message?
menu text h1 5 115 You may need to register, but it'll only take a few
menu text h1 5 130 moments.
menu text h1 5 150 I'd also appreciate it if you could post your stats
menu text h1 5 165 and rate the script. Doing so will bring me much
menu text h1 5 180 joy and will encourage more scripts like this one. :-)
menu font size 12
menu font color white
menu font style b
menu text h1 105 200 Thank You!
menu font style n
menu font size 9
if exec in #opts
menu button easyuo 10 200 90 20 Rate it now!
;set %setupx #clixres / 2 - ( 300 / 2 )
;set %setupy #cliyres / 2 - ( 295 / 2 )
menu show 230 20
menu font color red
menu font style u
menu text h1 45 225 Skill Start
menu text h1 125 225 Skillcap
menu text h1 190 225 Elasped Time
menu text h1 125 255 Cloth
menu text h1 185 255 Leather
menu text h1 255 255 Bone
menu font style n
menu text h1 45 255 Resources:
menu text h1 5 270 Attempts:
menu font color lime
menu font align right
gosub getGlobalVar %gvar CEOTurboTailor #charid skillstart
menu text h1 93 240 %skillstart
menu text h1 165 240 #skill
gosub getGlobalVar %gvar CEOTurboTailor #charid scripttime
set %totaletime %scripttime
set %ehours %totaletime / 3600
set %emins ( %totaletime / 60 ) - ( %ehours * 60 )
set %esecs %totaletime % 60
menu text h1 265 240 %ehours , h , #spc , %emins , m , #spc , %esecs , s
menu font color white
menu font align left
gosub getGlobalVar %gvar CEOTurboTailor #charid attempts3
gosub getGlobalVar %gvar CEOTurboTailor #charid clothused3
gosub getGlobalVar %gvar CEOTurboTailor #charid leatherused3
gosub getGlobalVar %gvar CEOTurboTailor #charid boneused3
menu text h1 60 270 %attempts3
menu font align right
menu text h1 153 270 %clothused3
menu text h1 225 270 %leatherused3
menu text h1 282 270 %boneused3
menu font align left
set #menubutton N/A
done1:
wait 5
if * . %520 = terminate
set #menubutton terminate
if #menubutton = N/A
goto done1
if #menubutton = easyuo
{
gosub runbrowser
set #menubutton N/A
goto done1
}
gosub terminator
return
sub terminator
if %debug
halt
set * . %520 terminate
terminate euo
return
sub runbrowser
execute http://www.easyuo.com/forum/viewtopic.php?t=3878
return
sub displaydiagnostics
display ok %1 , #spc , %2 $ %3 , #spc , %4 $ %5 , #spc , %6
return
==================================
; Script Name: CEO's * variable management subs (pseudo filesystem)
; Author: CEO
; Version: 1.1
; Client Tested with: 4.0.1b
; EUO version tested with: 1_41_103
; Shard OSI / FS: OSI
; Revision Date: 040219
; Public Release: 040219
; Globals Used: User specified (2 total)
; Purpose: Allows you to use a * variable as a pseudo-filesystem
;=======================================
; CEO's global variable management subs:
; getGlobalVar . putGlobalVar . delGlobalVar
;=======================================
;
;ver 1.1
;changed the lock file to use *variablename_lock so it'll work with any named *variable
;
Sub getGlobalVar
;ver 1.0 posted 19Feb04 by CEO
;purpose: Allows you to store multiple variables in one global variable unique to
; each player and script. getGlobaVar retrieves a value from a global variable.
;@returns: #result = #false if variable not found, #true if found
; % . %3 contains variable value
;%1 is the global/persistant variable to use ( %1 + 1 is used for locking)
;%2 is the script identifer or pseudo filename
;%3 is #charid or pseudo filename
;%4 is the variable to search for and return in %. %3
;%5 is for lock control. By default getGlobalVar uses a lock to return a value. In some cases you may want to
; retrieve a variable (mostly for speed) without needing a lock as long as you are aware of
any potentional conflicts, that very rarely may occur. Set this param to NOLOCK to access
global storage without a lock.
;sample usage:
; gosub getGlobalVar 50 MyScript #charid backpackid
; Using global var *50 finds the variable labeled MyScript#charidbackpackid and returns it in %backpackid
;
; gosub getGlobalVar 50 MyScript #charid clothstat NOLOCK
; Using global var *50 find the variable labeled MyScript#charidclothstat and returns it in %clothstat without using a lock
; Warning: do not use *1000. * %1 + 1 is used for locking and there is no *1001!
nameSpace push
nameSpace local #systime , _ , %2 , _ , %3 , _ , %4 , _ , GET
set !lpc #lpc
set #lpc 1000
set !lock %1 , _lock
if ( %0 = 5 ) && ( %5 = NOLOCK )
goto getGlobalVar_skiplock
set !lockcount 0
getGlobalVar_waitforlock:
if * . !lock <> N/A && * . !lock <> #nsname
{
wait 1 4
set !lockcount !lockcount + 1
if !lockcount < 10
goto getGlobalVar_waitforlock
if * . !lock <> N/A
{
set !currentlock * . !lock
if !currentlock = N/A
goto getGlobalVar_waitforlock
str pos !currentlock _
set !strres #strres - 1
str left !currentlock !strres
set !systime #systime - #strres
if !systime < 10000 ; if over 10 seconds assume a broken lock and take it
{
set !lockcount 0
goto getGlobalVar_waitforlock
}
}
}
set * . !lock #nsname
wait 3 2
if * . !lock <> #nsname
{
set !lockcount 0
goto getGlobalVar_waitforlock
}
getGlobalVar_skiplock:
set !global * . %1
set !varName %2 , ^ , %3 , ^ , %4 , |
str pos !global !varName
set #result #strres <> 0
if #result
{
set !varNamePos #strres
str len !varName
set !delString !varNamePos + #strres - 1
str del !global 1 !delString
set !global #strres
str pos !global |
set !varNamePos #strres - 1
str left !global !varNamePos
set % . %4 #strres
}
if ( %0 < 5 || %5 <> NOLOCK ) && * . !lock = #nsname
set * . !lock N/A
set #lpc !lpc
nameSpace Clear
nameSpace Pop
return #result
Bu cutter için..
;-----------------------------------------------------------
; Script Name: CEOTurboTailor
; Author: CEO
; Version: 2.2
; Client Tested with: 7.0.0.4
; EUO version tested with: 1_5_154
; Shard OSI / FS: OSI
; Revision Date: 10/05/09
; Public Release: 012704
; Purpose: Trains tailoring to 120 FAST.
;-------------------------------------------------------------
; Instructions:
;
; 1. Start CEOTurboCutter
; 2. Start CEOTurboTailor
; 3. Identify Secure (or it'll use your bankbox automatically)
; 4. Identify Resource container.
; Make sure to have cloth, leather, bone, sewing kits.
; Also iron ingots and tinker tools if you will be making your own kits.
; NOTE: ANY opened bag with resources will be used, the resource
; container is also used to drop cut bandages to when making
; oil cloths.
; The script automatically learns your bank/secure/resources setup using
; persistant vars *524 and *525. To reset these, start the script away from the
; bank or out of range of your secure container.
; 5. If you're making bone armor, be sure to be within 2 paces of a house's trash barrel OR
; at a bank with a trash can within 12 paces. Script automatically finds these and will use
; them to discard your bone armor.
;
; Note: Your paperdoll MUST be visible and the backpack in the paperdoll VISIBLE with
; nothing blocking it's view as the script drops direct to the backpack.
; The resource container in your secure or bank box must also be visible with nothing
; block it. It can be just about any valid container type.
;
initevents
set %scriptname CEOTurboTailor
set %version 2.2
set %scriptstart #scnt
set %gaintime %scriptstart
set %initializing #true
linespercycle 100
;=============================================
; User configuration section
; Most of these defaults should be fine. Please understand
; what you're doing before changing.
;=============================================
; Set to #true to leave EUO window opened.
set %debug #false
if ! %debug
gosub initializing
; Set to #true to enable system messages to the journal during setup
; This is mostly for people that are having StayOnTop problems.
set %sysmessages #false
; Will autoset to #true if hiding is over 35. Otherwise set to #true
; to force trying, or #false to never try. Set to #true if you're in a house. It'll always work.
set %hideme N/A
; set this to unhide after x number of unsuccesful attempts without a gain. Sometimes working another skill
; will kick in a gain. To disable this, set to a high number like 9999. If you haven't gained after 9999 attempts
; something else is wrong!
set %unhideat 80
; Minimum skill required to try hiding. Set lower if you want to attempt even if you
; may fail. In tenths, defaults to 35.0.
set %hideskillreq 350
; Set these to your x/y cords for the EasyUO menu window
set %menu_windowx n/a
set %menu_windowy 20
;Set this for the level of transparency you want for the main status display.
set %menutransparency 87
; Set these to your x/y cords for bank box or secure screen position.
set %bank_securex 460
set %bank_securey 390
; Set these to your x/y cords for resource bag on screen position.
set %resource_bagx 630
set %resource_bagy 390
; Set these to your x/y cords for the house's trash barrel. This MUST be out of the area
; the tailoring/tinker menu comes up!
set %trash_barrelx 0
set %trash_barrely 0
; Always use normal leather.
; 1=normal, 2=spined, 3=horned, 4=barbed.
set %leathertype 1
; If you'd rather make bone items near the top levels set to #true otherwise
; it'll do studded sleeves instead of bone helmets.
set %makebone #false
; Minimum skill required before attempting to tinker sewing kits or
; tinker's tools. In tenths, defaults to 30.0
set %tinkerskillreq 300
; Maximum number of sewing kits to tinker at one time - Based on Weight. Min of 3. Force to your own number if you want.
set %maxsewingkits #maxweight / 60
;set %maxsewingkits 5
; Set to #true if you're slow and/or having timing issues. If persistant timing
; problems see the wait vars further down and change to higher numbers.
set %slowconnection #false
; These are the types for the bank dumpsters. There may be more so I've included
; them in this section.
set %bankgarbage IKF_BUD_HIF
; Leave this at N/A for a more intelligent bank checking method and less chance of saying
; "BANK BANK" at your house. If it fails to detect a bank you use, set to #true.
set %bankfound N/A
; Estimate costs of doing business: Change these to reflect your shard
set %cost_of_cloth 2
set %cost_of_leather 8
set %cost_of_bone 10
; set to #true if you want to select what to make and not use the skills table
set %makeyourown #false
; If you're on a freeshard with different menu configurations the below variables are for the
; click points for Make Last RELATIVE to the Tailor gump's position of 50/50.
; You may need to adjust to your shard's menu configuration.
; NOTE: This script was written for OSI and latest client. The Make Item feature and these
; variables may allow you to use it, but no promises!
set %makelast_clickx 285
set %makelast_clicky 410
; set this to a maximum skillcap if you want to stop at a certain point.
; Leave at N/A to use your real cap. In tenths, IE, GM=1000, 99.5=995, etc...
set %maxskillcap n/a
; Close EasyUO when the menu window is closed.
set %exitonclose #true
; Set this to the word in your bank's trashcan.
; "trash" is the common one. But if it's a freeshard and something else you'll need to change
set %trashcantext1 trash
set %trashcantext2 garbage
; Set this to false if your not running UOSE
set %uose_menu #true
; For RunUO and WorldSave avoidance
set %_worldsavejournalindex #jindex
; The shard type, if shardType fails for this set %eashard to either #true or #false
gosub shardType
set %eaShard #result
if %eaShard
{
set %tinkertoolsel 4
set %makelast_clicky 450
set %exitbutton 20
; Position in tinkering menu to make skill tool
set %toolbuttonsel 7
}
else
{
set %tinkertoolsel 3
set %exitbutton 18
set %toolbuttonsel 7
}
;
; If you use RKCharacterSetup you can change the custom stuff on a per character basis
; with that method..
;CALL RKCharacterSetup.txt CEOTurboTailor
;=============================================
; NOTHING BELOW THIS LINE SHOULD NEED CHANGING.
; DO SO AT YOUR OWN RISK!
;=============================================
set %520 520_ , #charid
set %521 521_ , #charid
set %522 522_ , #charid
set %gvar %scriptname
gosub getGlobalVar %gvar %scriptname #charid menu_windowx NOLOCK
gosub getGlobalVar %gvar %scriptname #charid menu_windowy NOLOCK
gosub getGlobalVar %gvar %scriptname #charid bank_securex NOLOCK
gosub getGlobalVar %gvar %scriptname #charid bank_securey NOLOCK
gosub getGlobalVar %gvar %scriptname #charid resource_bagx NOLOCK
gosub getGlobalVar %gvar %scriptname #charid resource_bagy NOLOCK
gosub getGlobalVar %gvar %scriptname #charid hideme NOLOCK
gosub getGlobalVar %gvar %scriptname #charid beepongain NOLOCK
gosub getGlobalVar %gvar %scriptname #charid securecontainerid NOLOCK
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
;===================== Get Training Method
if %eashard
{
set %train1 CEO1
set %train2 CEO_UOSE1
set %train3 Stratics1
set %train4 Stratics_UOSE1
set %totalTrainingMethods 4
}
else
{
set %train1 RunUO1
set %train2 RunUO_UOSE1
set %train3 RunUO2
set %train4 RunUO2_scryptor
set %totalTrainingMethods 4
}
set %ud1 %totalTrainingMethods + 1
set %ud2 %totalTrainingMethods + 2
set %train . %ud1 tailor1.txt
set %train . %ud2 tailor2.txt
gosub getGlobalVar %gvar %scriptname #charid train_method NOLOCK
if ! #result
{
set %train_method 1
gosub putGlobalVar %gvar %scriptname #charid train_method
}
;gosub setupskills
;gosub skillchart
;halt
;=====================
set %default_bankfound %bankfound
set %gumpx 50
set %gumpy 50
if %slowconnection
{
set %gumpwait 10
set %wait1 20
set %wait2 30
set %longwait 70
}
else
{
set %gumpwait 5
set %wait1 10
set %wait2 15
set %longwait 40
}
if %sysmessages && sys notin #opts
{
set %sysmessages #false
display ok Unable to use Event Sysmessages. You have the$flag enabled in the script, but EasyUO must also$
+be configured. See :$$Options->Configuration->Enable Event Sysmessages$$ in the EasyUO menu bar to turn it on.$$Script Halted.
menu hide
sound
halt
}
if G in #charstatus
{
event macro 6 0
wait %wait1
}
set %oilcloth RTI
set %bandaids ZLF
set %clothtypes BUI_CUI_GUI_DUI
set %bolttypes IAG_CAG_NAG_BAG_ZZF
set %scissortypes KAG_JAG
set %weighcheck #true
set %getbolts #true
set %skipClearMenuGump #false
set %leathertypes JJG_MJG
set %bonetypes GUF
set %bonearmortypes PPH_WPH_BQH_QPH_AQH_VPH_YPH_ZPH_CQH_XPH
set %invalidtypes IWI_XVL_ , %clothtypes , _ , %bolttypes , _
set %lcolor1 0
set %lcolor2 2220
set %lcolor3 2117
set %lcolor4 2129
set %defaultleathertype %leathertype
set %bagtypes CKF_LKF_ZJF_JIF_HIF_KIF_IIF_CUD_HKF_VMF_BUD_WMF_TMF_UMF_KKF_ZTD_
+ABG_CTD_AUD_SPF_JKF_OKF_OVH_KUD
set %badcontainers CVD_OVD_EVD_QVD_BKF
set %chesttypes JIF_HIF_IIF_KIF
set %chest_findmod 32_19
set %trashbarreltype BKF
set %tinkertools JTL_GTL_KTL
set %makelasttinker #false
set %ironselected #false
set %ironingots ENK
set %sewingkittypes HAG
set %trashcanid N/A
set %unhidetext ?!.,'/
; Zero Stats
set %attempts 0
set %unhidecount 0
for %i 1 3
{
set %attempts . %i 0
set %clothused . %i 0
set %leatherused . %i 0
set %boneused . %i 0
}
;recall saved stats
gosub getGlobalVar %gvar %scriptname #charid attempts3 NOLOCK
if ! #result
{
set %attempts3 0
gosub putGlobalVar %gvar %scriptname #charid attempts3
}
gosub getGlobalVar %gvar %scriptname #charid clothused3 NOLOCK
if ! #result
{
set %clothused3 0
gosub putGlobalVar %gvar %scriptname #charid clothused3
}
gosub getGlobalVar %gvar %scriptname #charid leatherused3 NOLOCK
if ! #result
{
set %leatherused3 0
gosub putGlobalVar %gvar %scriptname #charid leatherused3
}
gosub getGlobalVar %gvar %scriptname #charid boneused3 NOLOCK
if ! #result
{
set %boneused3 0
gosub putGlobalVar %gvar %scriptname #charid boneused3
}
gosub getGlobalVar %gvar %scriptname #charid scripttime NOLOCK
if ! #result
{
set %scripttime 0
gosub putGlobalVar %gvar %scriptname #charid scripttime
}
set %_scripttime %scripttime
if %maxsewingkits > 10
set %maxsewingkits 10
if %maxsewingkits < 3
set %maxsewingkits 3
gosub statusbarup
gosub SetUpSkills
set * . %521 %product . %currentitem
set * . %520 cut
wait %wait2
set * . %520 pause
gosub WaitforPause
linespercycle 40
menu font transparent #false
SetupMain:
set %adjusttimer 0
;set %menu_windowx n/a
if %menu_windowx = N/A
{
set %menu_windowx 535
gosub putGlobalVar %gvar %scriptname #charid menu_windowx
gosub InitialSetup
if ! #result
{
menu hideeuo
Display OK You must run setup the first time this script is used!$$Script Halted.$
menu hide
halt
}
set %firstmenu #true
gosub initmenu
goto SetupCont1
}
set %firstmenu #true
gosub initmenu
gosub gmcheck
menu font bgcolor $4488ff
menu font color black
menu button InitialSetup 215 31 40 20 Setup
menu font bgcolor black
menu font color lime
menu font size 7
set %timer #scnt + 5
Setuptimer:
wait 5
set %timeout %timer - #scnt
menu delete status
menu text status 50 5 Press SETUP now to reconfigure. ( , %timeout , #spc , seconds)
if #menubutton = initialsetup
{
set %menu_windowx n/a
set #menubutton n/a
menu font size 9
goto SetupMain
}
if #scnt < %timer
goto Setuptimer
menu delete InitialSetup
menu font size 9
gosub AutoSetup
gosub gmcheck
SetupCont1:
if %makeyourown
gosub makeyourown
gosub RemoveNonEssentials
gosub MaterialsToResource %ironingots ingots
gosub cutupbolts
set %firstattempt #true
set %leatherselected #false
set %retrycount 11
;--------------------------------------------------- Gentleman, start your scissors!
MainLoop:
set * . %520 cut
;wait %gumpwait
if G in #charstatus
set #menubutton pause
if #menubutton <> N/A
gosub #menubutton
gosub DisplayElapsedTime
gosub HideMe
finditem %sewkitid C_ , %backpackID
if #findkind = -1 || %retrycount > 10
{
gosub CheckForResources
gosub FindSewingKit
gosub UseSewingKit
wait %gumpwait
set %retrycount 0
}
if #contname <> generic_gump
{
set %retrycount %retrycount + 1
wait %gumpwait
menu delete status
menu text status 50 5 Waiting for tailoring menu , ( , %retrycount , ).
goto MainLoop
}
set %gumpx #contposx
set %gumpy #contposy
if %firstattempt
{
set * . %521 %product . %currentitem
if %leather . %currentitem <> 0 && ! %leatherselected
{
menu delete status
menu text status 50 5 Selecting leather type.
wait %gumpwait
gosub makefirstitem 16 %leathertype
if ! #result
goto MainLoop
set %leatherselected #true
set %firstattempt #true
wait %gumpwait
set %retrycount 11
goto MainLoop
}
menu delete status
menu text status 50 5 Making first item.
str len %desc . %currentitem
if #strres > 16
menu font size 8
menu delete making
menu text making 107 35 %desc . %currentitem
menu font size 9
wait %gumpwait
if ! %makeyourown
{
if %nextpage . %currentitem = 1
{
gosub MakeFirstItem %category . %currentitem 98
if ! #result
goto MainLoop
wait %wait1
gosub MakeFirstItem 99 %selection . %currentitem
if ! #result
goto MainLoop
set %firstattempt #false
goto MainLoop1
}
gosub MakeFirstItem %category . %currentitem %selection . %currentitem
if ! #result
goto MainLoop
}
set %firstattempt #false
wait %wait2
}
else
{
menu delete status
menu text status 50 5 Make last.
set %clickx %gumpx + %makelast_clickx
set %clicky %gumpy + %makelast_clicky
click %clickx %clicky f
}
MainLoop1:
set %retrycount 0
wait %gumpwait
if * . %522 = CUTTING-
wait %wait2 %wait2
if * . %522 = CUTTING--
wait %longwait %longwait
if * . %522 = CUTTING---
{
menu delete status
menu text status 50 5 Waiting for cutter.
set * . %520 PAUSE
gosub WaitforPause
}
gosub CheckForResources
if ! #result
goto MainLoop
gosub DisplayResourceStats
gosub CheckForGain
if ( %product . %currentitem = %oilcloth ) && ( %weightcheck ) && ( #weight > #maxweight )
{
gosub MaterialsToResource %bandaids bandaids
set %weightcheck #false
}
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
Goto MainLoop
halt
sub CheckForResources
gosub statusbarup
menu delete status
menu text status 50 5 Checking resources.
set %return #true
set %loopcheck 0
cloth:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
if %cloth . %currentitem <> 0
{
gosub countresource %resource . %currentitem
if #result < %cloth . %currentitem
{
if * . %522 <> IDLE && * . %522 <> Paused
goto cloth
set %loopcheck %loopcheck + 1
if %loopcheck > 5
{
display ok Hmm, there appears to be a problem getting$
+more cloth, you may be overwieght or$have too many items in your backpack.$$
+Hit OK, correct the problem and then resume script.$$Pausing.
gosub NeedMore Cloth
gosub CheckforMultipleCloths
menu delete status
menu text status 50 5 Getting more cloth.
set %return #false
set %getbolts #true
wait %wait1
set %loopcheck 0
goto cloth
}
if %product . %currentitem = %oilcloth
gosub MaterialsToResource %bandaids bandaids
set %weightcheck #true
set %amt ( %maxweight - #weight - 10 ) * 10
set %boltamount ( %maxweight - #weight - 10 ) / 5
if %amt < %cloth . %currentitem
set %amt %cloth . %currentitem
if %boltamount < 1
goto cloth2
if %getbolts
{
menu delete status
menu text status 50 5 Check for bolts ( , %boltamount , ).
gosub GetMoreResources %bolttypes %boltamount
if ! #result
{
set %getbolts #false
goto cloth
}
wait %wait2
gosub cutupbolts
set %return #false
wait %wait1
goto cloth
}
cloth2:
menu delete status
menu text status 50 5 Getting more cloth ( , %amt , ).
gosub GetMoreResources %resource . %currentitem %amt
if ! #result
{
gosub NeedMore Cloth
gosub CheckforMultipleCloths
menu delete status
menu text status 50 5 Getting more cloth.
gosub cutupbolts
set %return #false
set %getbolts #true
wait %wait1
goto cloth
}
set %return #false
wait %wait1
goto cloth
}
return %return
}
set %getbone #false
leather:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
if %bone . %currentitem = 0
set %leatheramt %maxweight - #weight - 10 - %used . %currentitem
gosub countresource %resource . %currentitem
if #result < %leather . %currentitem
{
if * . %522 <> IDLE && * . %522 <> Paused
goto leather
if %bone . %currentitem <> 0
{
gosub CalcItemAmounts
gosub CountBone
if #result >= %maxbone
gosub DumpBone
}
if %leatheramt < %leather . %currentitem
set %leatheramt %leather . %currentitem
menu delete status
menu text status 50 5 Getting more leather ( , %leatheramt , ).
gosub GetMoreResources %resource . %currentitem %leatheramt
set %getbone #true
if ! #result
{
gosub NeedMore Leather
menu delete status
menu text status 50 5 Getting more leather.
set %return #false
wait %wait1
goto leather
}
set %return #false
wait %wait1
goto leather
}
if %bone . %currentitem = 0
return %return
bones:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
finditem %bonetypes c_ , %backpackID
if ( #findkind = -1 ) || ( #findkind <> -1 && #findstack < %bone . %currentitem ) || %getbone
{
set %getbone #false
gosub CalcItemAmounts
gosub CountBone
if #result >= %maxbone
gosub DumpBone
if %boneamt < %bone . %currentitem
set %boneamt %bone . %currentitem
menu delete status
menu text status 50 5 Getting more bones ( , %boneamt , ).
gosub GetMoreResources %bonetypes %boneamt
if ! #result
{
gosub NeedMore Bones
menu delete status
menu text status 50 5 Getting more bones.
wait %wait1
goto bones
}
set %return #false
wait %wait1
goto bones
}
return %return
sub CalcItemAmounts
set %leatherstack 0
set %bonestack 0
finditem %resource . %currentitem c_ , %backpackID
if #findkind <> -1
set %leatherstack #findstack
finditem %bonetypes c_ , %backpackID
if #findkind <> -1
set %bonestack #findstack
set %temp ( %maxweight - #weight ) + %leatherstack + %bonestack
set %temp1 ( %temp ) - ( %temp / 3 )
set %boneamt ( ( ( %temp - %temp1 - 5 ) / 2 ) * 2 )
set %leatheramt ( %boneamt * 2 ) - %leatherstack
set %boneamt %boneamt - %bonestack
set %maxbone 5
return
sub GetMoreResources
; sub to get more resources, %1 resource, %2 amount
set %resourcetype %1
set %resourceamt %2
set * . %520 PAUSE
gosub WaitforPause
gosub ClearMenuGump
if %resourceamt < 1
set %resourceamt 1
GMR1:
finditem %resourcetype C
if #findkind <> -1
{
set %_findstack #findstack
set %_findid #findid
if #findbagid = %backpackid
{
ignoreitem #findid backpack
goto GMR1
}
if ( #findtype in %leathertypes && #findcol <> %lcolor . %leathertype ) || ( #findtype in %ironingots && #findcol <> 0 ) || ( #findtype in %sewingkittypes && #findcol <> 0 )
{
ignoreitem #findid wrongcolor
goto GMR1
}
if #findstack < %resourceamt
set %resourceamt #findstack
finditem %backpackid C_ , #charid
if #findkind <> -1
{
set #findmod 140_220
set %backpackx #findx
set %backpacky #findy
event drag %_findid
wait %wait2
if %_findstack > 1
msg %resourceamt $
wait %wait2
set %gmr2 0
GMR2:
click %backpackx %backpacky p
wait %wait1
if #contname = drag_gump
{
set %gmr2 %gmr2 + 1
menu font color yellow
menu delete status
menu text status 50 5 Drop on backpack, retrying ( , %gmr2 , ).
sound
wait %wait2
if %gmr2 < 3
{
gosub GetPaperDollXY
goto GMR2
}
display ok A problem occured trying to drop to your paperdoll's$
+backpack. Make sure the backpack icon is not blocked.$
+Press OK, then drop the resource manually, correct$the problem and resume the script.$
gosub pause
menu font color lime
menu delete status
menu text status 50 5 Checking for more resources.
}
menu font color lime
set * . %520 CUT
ignoreitem reset backpack
set %retrycount 11
return #true
}
gosub GetPaperDollXY
menu delete pdwarning
if %bone . %currentitem <> 0
gosub LocateTheDump
gosub CheckForBank
if ! #result
gosub GetSecureContainer
gosub GetResourceBag
goto GMR1
}
ignoreitem reset backpack
return #false
sub MaterialsToResource
; %1 = type , %2 = name
set %_MTRType %1
set %_MTRName %2
gosub ClearMenuGump
MTR1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
finditem %_MTRType C_ , %backpackid
if #findkind <> -1
{
set %_MTRfindid #findid
set %_MTRfindstack #findstack
str lower %_MTRName
menu delete status
menu text status 50 5 Moving #strres , #spc , to resource.
finditem %resourcebagid
set #findmod 25_7
if #findtype in %chesttypes
set #findmod %chest_findmod
if #findkind <> -1
{
event drag %_MTRfindid
set %mtr2 0
MTR2:
wait %wait2
if %_MTRfindstack <> 1
msg $
if #contname = stack_gump
{
set %mtr2 %mtr2 + 1
wait %wait2
if %mtr2 < 3
goto MTR2
}
set %mtr3 0
MTR3:
wait %wait1
click #findx #findy p
wait %wait1
if #contname = drag_gump
{
set %mtr3 %mtr3 + 1
menu font color yellow
menu delete status
menu text status 50 5 Retrying #strres , #spc , to resource ( , %mtr3 , ).
sound
wait %wait2
if %mtr3 < 3
goto MTR3
display ok A problem is occuring trying to drop #strres on to$your resource container. Make sure the container is$
+not blocked. Press OK, drop the #strres manually,$correct the problem and resume the script.$
gosub pause
}
menu font color lime
ignoreitem %_MTRfindid mtr
goto MTR1
}
ignoreitem reset mtr
return #false
}
ignoreitem reset mtr
return #true
sub WaitforPause
WaitforPause1:
set * . %520 pause
wait 5
if * . %522 <> PAUSED
goto WaitforPause1
wait %wait1
return
sub FindSewingKit
FSK1:
finditem %sewingkittypes C_ , %backpackID
if #findkind <> -1
{
set %sewkitid #findid
return
}
set * . %520 PAUSE
gosub WaitforPause
gosub GetMoreSewingKits
set * . %520 CUT
goto FSK1
return ; not needed
sub UseSewingKit
set * . %520 PAUSE
gosub WaitforPause
set #lobjectid %sewkitid
event macro 17 0
wait %wait1
set * . %520 CUT
return
sub MakeFirstItem
set %gumpx #contposx
set %gumpy #contposy
; %1 = category , %2 = selection
if %1 = 99
goto MFI1
wait %gumpwait
set %clickx %gumpx + 27
set %clicky %gumpy + 50 + ( %1 * 20 )
set %MF1_G 0
MF1_GumpWait:
wait %gumpwait
if #contname <> generic_gump
{
set %MF1_G %MF1_G + 1
if %MF1_G > 15
return #false
goto MF1_GumpWait
}
click %clickx %clicky f
if %slowconnection
wait %longwait
wait %wait2 %wait1
wait %wait1
if %2 = 99
return #true
set %mfi 0
MFI1:
wait %gumpwait
if #contname <> generic_gump
{
set %mfi %mfi + 1
if %mfi > 15
return #false
goto MFI1
}
set %gumpx #contposx
set %gumpy #contposy
MFI2:
if %2 = 98
{
set %clickx %gumpx + 385
set %clicky %gumpy + 270
goto MFI3
}
;set %clicky 100 + %2 * 20
set %clickx %gumpx + 235
set %clicky %gumpy + 50 + ( %2 * 20 )
MFI3:
click %clickx %clicky f
if %slowconnection
wait %longwait
wait %wait1 %wait1
return #true
sub GetMoreSewingKits
menu delete status
menu text status 50 5 Getting more sewing kits.
set %sewkits 0
GMSK1:
gosub GetMoreResources %sewingkittypes 1
if #result
{
set %sewkits %sewkits + 1
ignoreitem %sewkitid 1
if %sewkits >= %maxsewingkits
{
ignoreitem reset 1
return
}
goto GMSK1
}
if %sewkits = 0
{
gosub TinkerSewingKits
if #result > 0
{
ignoreitem reset 1
gosub ClearMenuGump
wait %wait2
return
}
gosub ClearMenuGump
gosub NeedMore sewingkits
ignoreitem reset 1
return
; goto GMSK1
}
ignoreitem reset 1
return
sub TinkerSewingKits
if %tinkerskill < %tinkerskillreq
return 0
set %retrycount 11
set %sewingkitsmade 0
set %makelasttinker #false
set #LOBJECTID xxx
for %i 1 %maxsewingkits
{
TSK1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
if #menubutton = pause
gosub pause
gosub CountTinkerKits
if ( #result = 0 ) || ( #result = 1 && %min_uses < 10 )
{
menu delete status
menu text status 50 5 Getting more Tinker's tools.
gosub GetMoreResources %tinkertools 1
if ! #result
{
gosub MakeTinkerTools
if ! #result
return %sewingkitsmade
}
set %makelasttinker #false
goto TSK1
}
gosub MakeSewingKit
if #result = -1
return %sewingkitsmade
if #result = 0
goto TSK1
set %i #result
set %sewingkitsmade %i
}
wait %wait1
return %sewingkitsmade
sub MakeTinkerTools
MTT1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
finditem %ironingots C_ , %backpackid
set %backpack_ingots #findstack
if #findkind = -1 || #findstack < 2
{
set %ingotamt 2 + ( ( %maxsewingkits - %sewingkitsmade ) * 2 ) - %backpack_ingots
menu delete status
menu text status 50 5 Getting more ingots ( , %ingotamt , ).
gosub GetMoreResources %ironingots %ingotamt
if ! #result
return #false
goto MTT1
}
menu delete status
menu text status 50 5 Tinkering Tinker's tools.
finditem %tinkertoolsid
if #findkind = -1
return #false
set %makelasttinker #false
set #LOBJECTID %tinkertoolsid
gosub WaitforPause
event macro 17 0
wait %longwait
if ! %ironselected
gosub selectIron
gosub makefirstitem %tinkertoolsel 4
wait %longwait
gosub CountTinkerKits
if #result < 2
goto MTT1
return #true
sub MakeSewingKit
set %_temp %sewingkitsmade + 1
menu delete status
menu text status 50 5 Tinkering sewing kit ( , %_temp , / , %maxsewingkits , ).
MSK1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
finditem %ironingots C_ , %backpackid
set %backpack_ingots #findstack
if #findkind = -1 || #findstack < 2
{
set %ingotamt ( ( %maxsewingkits - %sewingkitsmade ) * 2 ) - %backpack_ingots
menu delete status
menu text status 50 5 Getting more ingots ( , %ingotamt , ).
gosub GetMoreResources %ironingots %ingotamt
if ! #result
return -1
goto MSK1
}
set %mst2 0
MST2:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
set %mst2 %mst2 + 1
if %mst2 > 5
{
display ok Hmm, There appears to be a problem getting a tinker$
+menu to appear. No tinker tools? Something in the wrong place?$
+Please correct the problem. Pausing.
gosub pause
set %mst2 0
set %makelasttinker #false
set #LOBJECTID xxx
goto MST2
}
finditem %tinkertoolsid C_ , %backpackid
if #findkind = -1
return 0
gosub WaitforPause
if #lobjectid <> %tinkertoolsid
{
set #LOBJECTID %tinkertoolsid
event macro 17 0
wait %wait2
}
set %MST3 0
MST3:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
if #contname <> generic_gump
{
if %mst3 > 10
{
set %makelasttinker #false
set #LOBJECTID xxx
goto MST2
}
set %mst3 %mst3 + 1
wait %gumpwait
goto MST3
}
wait %gumpwait
set %gumpx #contposx
set %gumpy #contposy
if %makelasttinker
{
set %clickx %gumpx + %makelast_clickx
set %clicky %gumpy + %makelast_clicky
click %clickx %clicky f
goto MSK2
}
if ! %ironselected
gosub selectIron
gosub makefirstitem %tinkertoolsel %toolbuttonsel
set %makelasttinker #true
MSK2:
wait %gumpwait
finditem %sewingkittypes C_ , %backpackID
if #findkind <> -1
return #findcnt
return 0
sub SelectIron
menu delete status
menu text status 50 5 Selecting iron ingots.
gosub makefirstitem 16 1
set %ironselected #true
return
sub ClearMenuGump
if %skipClearMenuGump
return
savePix 55 55 1
set %pixcol1 #pixcol
savePix 55 476 1
set %pixcol2 #pixcol
savePix 572 481 1
set %pixcol3 #pixcol
if %pixcol1 = 7568251 || %pixcol2 = 7568251 || %pixcol3 = 7568251
{
if %pixcol1 = 7568251
{
click 55 55 f ; bring the gump forward if it's not already
goto CMG2
}
if %pixcol2 = 7568251
{
click 55 476 f ; bring the gump forward if it's not already
goto CMG2
}
if %pixcol3 = 7568251
{
click 572 481 f ; bring the gump forward if it's not already
goto CMG2
}
}
set %waittime #scnt + 2
CMG1:
if #contname <> generic_gump && %waittime > #scnt
goto CMG1
if #contname <> generic_gump
return
CMG2:
gosub makefirstitem %exitbutton 99
set %retrycount 11
wait %wait1
return
sub GetUsesRemaining
; %1 = #property
set %_1 %1
str pos %_1 :
set %temp #strres
str del %_1 1 %temp
set %_1 #strres
str pos %_1 $
set %temp #strres
str del %_1 %temp 999
return #strres
sub CountTinkerKits
set %ctk 0
set %min_uses 999
set %tinkertoolsid n/a
CTK1:
finditem %tinkertools C_ , %backpackid
if #findkind <> -1
{
set %_findid #findid
event property %_findid
wait 5
gosub GetUsesRemaining #property
if #result < %min_uses
{
set %min_uses #result
set %tinkertoolsid %_findid
}
ignoreitem #findid ctk
set %ctk %ctk + 1
goto CTK1
}
ignoreitem reset ctk
return %ctk
sub NeedMore
sound
menu font bgcolor red
menu font color black
menu delete status
str lower %1
menu text status 50 5 Need more #strres , #dot , #spc , Paused.
menu font bgcolor black
menu font color lime
if %sysmessages
event sysmessage Need more #strres , #dot , #spc , Paused.
set #menubutton pause
gosub pause
gosub LocateTheDump
gosub CheckForBank
if ! #result
gosub GetSecureContainer
gosub GetResourceBag
set %retrycount 11
return
sub FindJournalMessage
set %jc 1
FJM1:
scanjournal %jc
if #journal = N/A
return #false
for %_i 1 %0
{
if % . %_i in #journal
{
deletejournal
return #true
}
}
set %jc %jc + 1
goto FJM1
sub resetjournal
scanjournal 1
deletejournal
return
sub GetBackPackID
gosub getGlobalVar 1 COMMON #charid backpackid
if %backpackid <> N/A
{
_openbackpack:
event macro 8 1
wait %wait2
wait %wait1
finditem %backpackid C_ , #charid
if #findkind <> -1
{
event macro 8 7
wait %wait2
wait %wait1
goto GBPI2
}
}
GBPI1:
if #backpackid <> N/A && #backpackid <> YC
{
set %backpackid #backpackid
gosub putGlobalVar 1 COMMON #charid backpackid
goto _openbackpack
}
set %adjusttimer 8
gosub resetjournal
wait %wait2
event macro 8 7
wait %wait1
gosub FindJournalMessage must_wait
if #result || #contname <> container_gump
{
if %bpmsgon
{
menu delete status
menu text status 50 5 Retrying backpack open.
}
wait %longwait
wait %longwait
set %adjusttimer 8
goto GBPI1
}
set %backpackid #contid
gosub putGlobalVar 1 COMMON #charid backpackid
GBPI2:
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust your backpack now.
if %sysmessages
event SysMessage Adjust your backpack now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
}
wait %longwait
menu delete status
return
sub countscissors
set %scissorcount 0
cs1:
finditem %scissortypes C
if #findkind <> -1
{
set %scissorcount %scissorcount + 1
ignoreitem #findid scissors
goto cs1
}
ignoreitem reset scissors
return %scissorcount
sub GetPaperDollXY
gosub statusbarup
finditem %backpackid C_ , #charid
if #findkind <> -1
{
set #findmod 140_220
set %backpackx #findx
set %backpacky #findy
wait %longwait
return
}
event macro 8 1
menu delete status
menu text status 50 5 Adjust your paperdoll now.
gosub waittimer 5
menu font bgcolor red
menu font color black
menu text pdwarning 1 20 DON'T MOVE YOUR PAPERDOLL ANYMORE!
menu font bgcolor black
menu font color lime
menu delete status
menu text status 50 5 Getting Paperdoll Info
GPDXY1:
if #contname <> paperdoll_gump
{
gosub resetjournal
wait 5
wait %wait2
event macro 8 1
wait %wait1
gosub FindJournalMessage must_wait
if #result || #contname <> paperdoll_gump
{
menu delete status
menu text status 50 5 Retrying Paperdoll open.
wait %longwait
wait %longwait
goto GPDXY1
}
}
set %paperdollx #contposx
set %paperdolly #contposy
set %backpackx #contposx + 140
set %backpacky #contposy + 220
wait %longwait
return
sub GetResourceBag
GRB1:
gosub getGlobalVar %gvar %scriptname #charid resourcebagid
if %resourcebagid <> N/A
{
menu delete status
menu text status 50 5 Re-opening resource container.
wait %shortwait
set %blinkmsg #true
goto GRB3
}
set %adjusttimer 8
menu font color white
menu delete status
menu text status 50 5 Target your resource container now!
set %blinkmsg #true
set %blinktime #scnt2 + 5
set #targcurs 1
wait %wait1
if %sysmessages
event SysMessage Target your resource container now!
looptgt:
wait 3
if %blinktime < #scnt2
{
set %blinktime #scnt2 + 5
if %blinkmsg
{
menu delete status
set %blinkmsg #false
goto GRB2
}
menu text status 50 5 Target your resource container now!
set %blinkmsg #true
}
GRB2:
if #targcurs = 1
goto looptgt
finditem #ltargetid C_ , %securecontainerid
if #findkind = -1
{
menu delete status
menu font color red
menu text status 50 5 Not in Secure/Bank Box. Try Again.
menu font color white
if %sysmessages
event SysMessage Not in Secure/Bank Box. Try Again.
wait 3s
display YesNo This bag doesn't appear to be in the right place.$
+Possibly a freeshard issue? If it looks ok to you$
+Press YES to use it anyway, or NO to retry.
if #dispres = yes
goto GRB2B
set #targcurs 1
wait %wait1
goto looptgt
}
GRB2B:
if #findtype notin %bagtypes
{
menu delete status
menu font color red
menu text status 50 5 Resource container type invalid ( , #findtype , ).
if %sysmessages
event SysMessage Resource container type invalid.
wait 3s
display ok The container type you have selected is a type that %scriptname , $
+does not know. A regular chest or bag bought from the provisioners is$
+recommended. Please use a different type bag.$$Unknown Type: , #spc , #findtype $$Script Paused.
gosub pause
menu delete status
set %blinkmsg #false
menu font color white
set #targcurs 1
wait %wait1
goto looptgt
}
set %resourcebagid #ltargetid
GRB3:
finditem %resourcebagid C_ , %securecontainerid
set #findmod 25_7
if #findtype in %chesttypes
set #findmod %chest_findmod
if #findkind = -1
{
menu delete status
menu font color red
menu text status 50 5 Resource container not found.
menu font color white
if %sysmessages
event SysMessage Resource container not found.
wait 3s
set %resourcebagid N/A
gosub putGlobalVar %gvar %scriptname #charid resourcebagid
goto GRB1
}
gosub putGlobalVar %gvar %scriptname #charid resourcebagid
menu font color lime
set #lobjectid %resourcebagid
GRB4:
gosub resetjournal
wait %wait1
nextCPos %resource_bagx %resource_bagy
event macro 17 0
wait %wait2
gosub FindJournalMessage must_wait
if #result
{
menu delete status
menu text status 50 5 Retrying resource open.
if %sysmessages
event SysMessage Retrying resource open.
wait %longwait
wait %longwait
goto GRB4
}
if #contid = %resourcebagid
contpos %resource_bagx %resource_bagy
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust resource bag now.
if %sysmessages
event SysMessage Adjust resource bag now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
if #contid = %resourcebagid && ( #contposx <> %resource_bagx || #contposy <> %resource_bagy )
{
set %resource_bagx #contposx
set %resource_bagy #contposy
gosub putGlobalVar %gvar %scriptname #charid resource_bagx
gosub putGlobalVar %gvar %scriptname #charid resource_bagy
}
}
wait %longwait
menu delete status
return
sub CheckForGain
if %currentskill = #skill
return
set %currentskill #skill
menu window color red
if %beepongain
sound
menu delete status
menu text status 50 5 Tailor Gain!
gosub GainStats
wait 5
menu window color black
if %makeyourown
{
gosub gmcheck
return
}
gosub SelectItemToMake
set %newitem #result
set %lastcloth %cloth . %currentitem
if %currentitem <> %newitem
{
gosub skillchangedisplay
CFG1:
if * . %522 = CUTTING
{
wait 5
goto CFG1
}
set * . %520 PAUSE
gosub WaitforPause
set %currentitem %newitem
gosub RemoveNonEssentials
set %firstattempt #true
set * . %521 %product . %currentitem
gosub LocateTheDump
set %retrycount 11
}
gosub gmcheck
return
sub GMCheck
if ( ( #skill = %skillcap ) || ( %maxskillcap <= #skill ) ) && ! %debug
{
gosub DisplayElapsedTime
gosub putGlobalVar %gvar %scriptname #charid scripttime
set * . %520 cut
wait %wait1
set * . %520 pause
gosub WaitforPause
sound
if #contname = generic_gump
gosub ClearMenuGump
menu font color lime
menu delete making
menu text making 107 35 %desc30
sound
gosub statusbarup
set %skipClearMenuGump #false
gosub MaterialsToResource %leathertypes leather
set %skipClearMenuGump #true
gosub MaterialsToResource %clothtypes cloth
gosub MaterialsToResource %bonetypes bone
sound
gosub MaterialsToResource %bandaids bandaids
gosub MaterialsToResource %sewingkittypes sewingkits
gosub MaterialsToResource %tinkertools tinkertools
gosub MaterialsToResource %ironingots ingots
sound
if %bone . %currentitem <> 0
{
finditem %product . %currentitem C_ , #backpackid
if #findkind <> -1
gosub DumpBone
}
menu delete status
menu font color red
menu font bgcolor white
menu text status 50 5 Congratulations, skillcap reached!
if %maxskillcap = #skill
{
menu delete status
menu text status 50 5 Yahoo, maxskillcap reached!
}
sound
menu font style b
menu font align right
menu delete g1
menu text g1 100 246 #skill
menu font align left
set * . %520 done
menu font style n
menu font bgcolor black
menu font color lime
gosub DisplayElapsedTime
gosub recordTurboStats
gosub floatgain
halt
}
return
sub HideMe
if ! %hideme || H in #charstatus
return #true
set %ht 0
set %retrycount 11
menu show
menu delete status
menu text status 50 5 Attempting to hide.
set * . %520 pause
wait %wait1
HM1:
event macro 13 21
wait %wait1
if H notin #charstatus && %ht < 5
{
set %ht %ht + 1
menu delete status
menu font color yellow
menu text status 50 5 Hiding failed! Retrying.. ( , %ht , )
menu font color lime
wait 12s
goto HM1
}
if H notin #charstatus
{
menu delete status
menu font color red
menu text status 50 5 Hiding failed, you suck at hiding.
menu font color lime
wait 12s
set * . %520 cut
return #false
}
menu delete status
menu text status 50 5 Hidden, waiting 12 seconds.
wait 12s
set * . %520 cut
return #true
sub initmenu
if %initializing
gosub fadeout
menu clear
menu window size 260 295
menu window title CEOTurboTailor %version
menu window color black
menu font bgcolor BLACK
menu font color red
menu show %menu_windowx %menu_windowy
menu font size 9
menu text hstatus 10 5 Status:
menu text h1 10 20 Elapsed Time:
menu text h1 10 35 Currently Making:
menu shape myshape1 3 53 254 1 3 7 5 blue 3 white
menu shape myshape1 3 173 254 1 3 7 5 blue 3 white
menu shape myshape1 3 263 254 1 3 7 5 blue 3 white
set #menubutton N/A
menu font size 11
menu font color white
menu font style ub
menu text h1 65 55 Resource Statistics
menu text h1 70 175 Tailoring Statistics
menu font size 9
menu font color fuchsia
menu font style b
menu font size 8
menu text h1 90 75 This
menu text h1 145 75 Last
menu font style bu
menu text h1 90 90 Gain
menu text h1 145 90 Gain
menu text h1 200 90 Total
menu font size 9
menu font color red
menu font style b
menu text h1 5 105 Attempts
menu text h1 5 120 Cloth
menu text h1 5 135 Leather
menu text h1 5 150 Bone
menu text h1 60 105 :
menu text h1 60 120 :
menu text h1 60 135 :
menu text h1 60 150 :
menu text h1 60 246 :
menu text h1 5 200 Last gain at:
menu font size 8
menu font color fuchsia
menu font align right
menu text h1 100 215 Total
menu text h1 160 215 Current
menu text h1 220 215 Gain
menu font style bu
menu text h2 100 230 Skill
menu text h2 160 230 Gains
menu text h2 220 230 Rate
menu font style b
menu font align left
menu font color red
menu font size 9
menu text h3 10 246 Tailoring
menu font color lime
menu font style n
if %firstmenu
gosub GainStats
menu font align left
gosub DisplayElapsedTime
menu font align right
menu text a3 225 105 %attempts3
menu text c3 225 120 %clothused3
menu text l3 225 135 %leatherused3
menu text b3 225 150 %boneused3
menu font align left
menu font color white
menu font style u
menu text h1 5 215 Skillcap
menu text h1 7 70 Est. Cost
menu font style n
menu text h1 60 85 gp
menu font align right
gosub calctotalcosts
menu font align left
if %maxskillcap = N/A
menu text skillcap 13 230 %skillcap
else
menu text skillcap 2 230 %skillcap , ( , %maxskillcap , )
menu font color lime
menu text making 107 35 %desc . %currentitem
menu font bgcolor teal
menu font color black
menu button pause 100 270 60 20 Pause
menu button hide 5 270 60 20 Hide
menu button makeyourown 190 270 65 20 Make Item
;menu button InitialSetup 215 31 40 20 Setup
menu button resetstats 215 56 40 20 Reset
menu button SkillChart 235 180 20 15 SC
if %initializing
{
menu show %menu_windowx %menu_windowy
wait 1
gosub fadein
set %initializing #false
}
menu show %menu_windowx %menu_windowy
menu window transparent %menutransparency
if ! %debug
menu hideeuo
menu font bgcolor black
menu font color lime
set %firstmenu #false
;halt
return
sub Initializing
menu window transparent 100
menu clear
menu window size 240 170
menu window title %scriptname %version
set %skill_windowx ( #clixres - 240 ) / 2
set %skill_windowy ( #cliyres - 150 ) / 2
menu window color gray
menu font bgcolor gray
menu show %skill_windowx %skill_windowy
if ! %debug
menu hideeuo
gosub popuptext
menu font color black
menu font size 10
menu font style b
menu text i1 5 5 Welcome to CEOTurboTailor!
menu font size 8
menu font style n
menu font color navy
menu text h1 5 25 This script is copyright by the author under the
menu text h1 5 40 terms of the CEO Public License (CPL) at:
menu font color white
menu font size 7
menu text h1 5 60 http://www.easyuo.com/forum/viewtopic.php?p=3585
menu font size 12
menu font color yellow
menu text i1 15 90 Initializing, Please wait...
menu font size 15
menu font color red
menu text i1 35 115 Make sure cutter is
menu text i1 75 140 STARTED!
menu font bgcolor black
menu font color lime
gosub fadein
wait 5s
return
sub popuptext
for %i 1 17
{
wait 1
menu font size %i
set %textposy 130 / 2 + %i / 2 - %i
set %textposx 260 / 2 - ( 5 * %i ) - %i / 2
menu delete p1
menu text p1 %textposx %textposy CEOTurboTailor!
}
wait 20
set %a10 aaaaaa
set %a11 bbbbbb
set %a12 ccccccc
set %a13 dddddd
set %a14 eeeeee
set %a15 ffffff
for %i 0 15
{
wait 2
menu font color $ , %i , %i , %i , %i , %i , %i
if %i > 9
menu font color $ , %a . %i
menu text p1 %textposx %textposy CEOTurboTailor!
}
wait 30
gosub fadeout
menu delete p1
return
sub fadeout
for %i 100 1
{
wait 1
set %i %i - 5
menu window transparent %i
}
menu window transparent 0
return
sub fadein
menu window transparent 0
menu show
for %i 1 100
{
wait 1
set %i %i + 5
menu window transparent %i
}
menu window transparent 100
return
sub calctotalcosts
menu font color yellow
set %tcosts %clothused3 * %cost_of_cloth + %leatherused3 * %cost_of_leather + %boneused3 * %cost_of_bone
menu delete tcost
menu text tcost 55 85 %tcosts
menu font color lime
return
sub ResetStats
set #menubutton N/A
Display YesNo Do you want to erase all statistics and start over?
if #dispres = no
return
set %_530 0
set %attempts 0
for %i 1 3
{
set %attempts . %i 0
set %clothused . %i 0
set %leatherused . %i 0
set %boneused . %i 0
menu delete a . %i
menu delete c . %i
menu delete l . %i
menu delete b . %i
}
;reset Globals
set %skillstart %currentskill
gosub putGlobalVar %gvar %scriptname #charid skillstart
set %attempts3 0
set %clothused3 0
set %leatherused3 0
set %boneused3 0
set %scripttime 0
set %_scripttime 0
gosub putGlobalVar %gvar %scriptname #charid attempts3
gosub putGlobalVar %gvar %scriptname #charid clothused3
gosub putGlobalVar %gvar %scriptname #charid leatherused3
gosub putGlobalVar %gvar %scriptname #charid boneused3
gosub putGlobalVar %gvar %scriptname #charid scripttime
gosub redrawstats
menu font align right
gosub calctotalcosts
menu font align left
return
sub floatgain
menu delete pause
menu delete hide
menu delete makeyourown
menu delete resetstats
menu delete SkillChart
menu font style n
menu font bgcolor teal
menu font color black
menu button closed 100 270 60 20 Exit
set #menubutton N/A
menu font color lime
menu font size 25
menu font bgcolor black
gm1:
set %x #random % 269
set %y #random % 295
set %c1 #random % 255
set %c2 #random % 255
set %c3 #random % 255
menu font color %c1 , %c2 , %c3
set %c1 #random % 255
set %c2 #random % 255
set %c3 #random % 255
menu font bgcolor %c1 , %c2 , %c3
set %c1 #random % 255
set %c2 #random % 255
set %c3 #random % 255
menu window color %c1 , %c2 , %c3
set %c1 #random % 30 + 10
menu font size %c1
menu delete gm
menu text gm %x %y #skill
wait 3
if #menubutton = closed || * . %520 = terminate
{
set * . %520 terminate
gosub paypalpopup
terminate euo
}
goto gm1
sub DisplayElapsedTime
menu show
set %elaspedtime #scnt - %scriptstart
set %totaletime %_scripttime + %elaspedtime
set %scripttime %totaletime
set %ehours %totaletime / 3600
set %emins ( %totaletime / 60 ) - ( %ehours * 60 )
menu font color white
if %lastehours <> %ehours
{
set %lastehours %ehours
menu delete ehours
menu text ehours 95 20 %ehours , h
}
if %lastemins <> %emins
{
set %lastemins %emins
menu delete emins
menu text emins 120 20 %emins , m
}
menu font color lime
return ; remove this you want seconds display
menu font color white
set %esecs %totaletime % 60
if %lastesecs <> %esecs
{
set %lastesecs %esecs
menu delete esecs
menu text esecs 150 20 %esecs , s
}
menu font color lime
return
sub GainStats
menu delete g1
menu delete g2
menu delete g3
set %tailorgain #skill - %startskill
set %time X , #time
set %time1 #scnt
set %rate %tailorgain * 3600 / ( #scnt - %scriptstart )
menu font align right
menu text g1 100 246 #skill
menu text g2 160 246 %tailorgain
menu text g3 220 246 %rate
menu font align left
set %unhidecount 0
set %attempts2 %attempts1
set %attempts1 0
set %clothused2 %clothused1
set %clothused1 0
set %leatherused2 %leatherused1
set %leatherused1 0
set %boneused2 %boneused1
set %boneused1 0
menu font align right
for %i 1 2
{
menu delete a . %i
menu delete c . %i
menu delete l . %i
menu delete b . %i
}
menu text a1 113 105 %attempts1
menu text c1 113 120 %clothused1
menu text l1 113 135 %leatherused1
menu text b1 113 150 %boneused1
menu text a2 168 105 %attempts2
menu text c2 168 120 %clothused2
menu text l2 168 135 %leatherused2
menu text b2 168 150 %boneused2
menu font align left
if %startskill <> %currentskill
{
gosub FormatTime %time
menu delete time
menu text time 77 200 #result
set %egain %time1 - %gaintime
set %eghours %egain / 3600
set %egmins ( %egain / 60 ) - ( %eghours * 60 )
set %egsecs %egain % 60
menu delete time2
menu text time2 130 200 ( , %eghours , h , #spc , %egmins , m , #spc , %egsecs , s , #spc , used)
set %gaintime %time1
}
return
sub DisplayResourceStats
set %attempts1 %attempts1 + 1
set %unhidecount %unhidecount + 1
set %attempts3 %attempts3 + 1
menu font align right
menu delete a1
menu delete a3
menu text a1 113 105 %attempts1
menu text a3 225 105 %attempts3
gosub putGlobalVar %gvar %scriptname #charid attempts3
if %cloth . %currentitem <> 0
{
set %clothused1 %clothused1 + %used . %currentitem
set %clothused3 %clothused3 + %used . %currentitem
gosub putGlobalVar %gvar %scriptname #charid clothused3
menu delete c1
menu delete c3
menu text c1 113 120 %clothused1
menu text c3 225 120 %clothused3
}
if %leather . %currentitem <> 0
{
set %leatherused1 %leatherused1 + %used . %currentitem
set %leatherused3 %leatherused3 + %used . %currentitem
gosub putGlobalVar %gvar %scriptname #charid leatherused3
menu delete l1
menu delete l3
menu text l1 113 135 %leatherused1
menu text l3 225 135 %leatherused3
}
if %bone . %currentitem <> 0
{
set %boneused1 %boneused1 + %bone . %currentitem
set %boneused3 %boneused3 + %bone . %currentitem
gosub putGlobalVar %gvar %scriptname #charid boneused3
menu delete b1
menu delete b3
menu text b1 113 150 %boneused1
menu text b3 225 150 %boneused3
}
gosub calctotalcosts
menu font align left
if %hideme && H in #charstatus && %unhidecount > %unhideat
{
menu delete status
menu text status 50 5 Unhiding due to no gains.
gosub WaitforPause
set %rnd ( #random % 5 ) + 1
str mid %unhidetext %rnd 1
event macro 3 1 #strres
set %unhidecount 0
}
return
sub FormatTime
str ins %1 : 4
set %1 #strres
str ins %1 : 7
set %1 #strres
str del %1 1 1
set %1 #strres
return %1
sub hide
set %hideme #true
set #menubutton N/A
return
sub Pause
set %elaspedtime #scnt - %scriptstart
set %totaletime %_scripttime + %elaspedtime
set %scripttime %totaletime
gosub putGlobalVar %gvar %scriptname #charid scripttime
sound
set %firstattempt #true
;menu window color gray
menu font transparent #true
menu font size 30
menu font color red
menu font style b
menu text ptext 62 120 Paused
menu font size 9
menu font style n
menu font color lime
menu font transparent #false
if %sysmessages
{
event sysmessage Paused. Press the resume button or toggle out
event sysmessage of warmode. If not in warmode, toggle to war/peace.
}
set %returnbywarmode #false
if G in #charstatus
{
menu delete status
menu font color yellow
menu text status 50 5 Paused via warmode.
menu font color green
set %returnbywarmode #true
}
menu delete pause
menu font bgcolor teal
menu font color black
menu button resume 100 270 60 20 Resume
gosub WaitforPause
set #menubutton N/A
Pause1:
if G in #charstatus
set %returnbywarmode #true
if %returnbywarmode && G notin #charstatus
set #menubutton resume
wait 5
if #menubutton = N/A
goto Pause1
menu delete ptext
if #menubutton = closed
gosub closed
menu delete resume
menu button pause 100 270 60 20 Pause
set #menubutton N/A
set %retrycount 11
menu window color black
menu font bgcolor black
menu font color lime
set %scriptstart #scnt
set %gaintime %scriptstart
set %_scripttime %scripttime
set * . %521 %product . %currentitem
return
sub closed
set %skipClearMenuGump #false
gosub ClearMenuGump
set %elaspedtime #scnt - %scriptstart
set %totaletime %_scripttime + %elaspedtime
set %scripttime %totaletime
gosub putGlobalVar %gvar %scriptname #charid scripttime
if %exitonclose && ! %debug
{
set * . %520 terminate
terminate euo
}
set #menubutton N/A
return
sub AutoSetup
if %hideme = N/A && %hideskill > %hideskillreq
set %hideme #true
if %hideme = N/A
set %hideme #false
menu show
set %bpmsgon #true
gosub GetBackPackID
menu show
gosub GetPaperDollXY
menu show
menu delete pdwarning
gosub calcmaxweight
if %default_bankfound = N/A
{
gosub checkforbank2
set %bankfound #result
}
if %atbank || %bankfound
gosub CheckForBank
menu show
if ! #result
gosub GetSecureContainer
gosub GetResourceBag
menu show
gosub LocateTheDump
gosub CheckforMultipleCloths
return
sub LocateTheDump
if %bone . %currentitem <> 0
{
if ! %atbank
gosub FindDumpster
if %atbank
gosub FindTrashCan 12
}
return
sub calcmaxweight
set %maxweight #maxweight
if #maxweight > 400
set %maxweight 400
set %maxweight %maxweight - ( %maxSkillTools * 2 ) - 5
return
sub CountBone
set %cbh 0
CBH1:
finditem %product . %currentitem C_ , %backpackid
if #findkind <> -1
{
set %cbh %cbh + 1
ignoreitem #findid bone
goto CBH1
}
ignoreitem reset bone
return %cbh
sub DumpBone
wait %wait2
if ! %atbank
{
gosub FindDumpster
nextcpos %trash_barrelx %trash_barrely
set #lobjectid %trashcanid
wait %wait2
event macro 17 0
wait %longwait
contpos %trash_barrelx %trash_barrely
wait %wait1
set %trash_clickx %trash_barrelx + 30
set %trash_clicky %trash_barrely + 160
gosub MoveBonestoTrash
}
if %atbank
{
set %charposx #charposx
set %charposy #charposy
gosub FindTrashCan 12
move #findx #findy 2 4s
gosub FindTrashCan 2
nextcpos %trash_barrelx %trash_barrely
set #lobjectid %trashcanid
wait %wait2
event macro 17 0
wait %longwait
contpos %trash_barrelx %trash_barrely
wait %wait1
set %trash_clickx %trash_barrelx + 90
set %trash_clicky %trash_barrely + 150
gosub MoveBonestoTrash
move %charposx %charposy 0 4s
gosub CheckForBank
gosub GetResourceBag
}
return
sub MoveBonestoTrash
set %ba1 0
gosub resetjournal
MBT1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
wait 5 10
finditem %product . %currentitem C_ , %backpackid
;finditem ZLF C_ , %backpackid ; testline so I don't have to really use bone...
if #findkind <> -1
{
set %ba1 %ba1 + 1
menu delete status
menu text status 50 5 Dumping bone armor ( , %ba1 , ).
event drag #findid
set %mbt2 0
MBT2:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
wait %wait1
click %trash_clickx %trash_clicky p
wait %wait1
if #lliftedkind <> 0
{
set %mbt2 %mbt2 + 1
if %mbt2 > 3
{
if %mbt2 > 9
{
menu delete status
menu text status 50 5 Aborting dump.
display ok There is a problem transferring items to your trashcan.$You will need to do it manually.$Pausing script.$
gosub pause
return
}
menu delete status
menu text status 50 5 Dump Problems, Trying again...
set #lobjectid %trashcanid
event macro 17 0
contpos %trash_barrelx %trash_barrely
goto MBT2
}
goto MBT2
}
wait %wait1
set %mbt2 0
goto MBT1
}
return
sub FindDumpster
FD1:
menu delete status
menu text status 50 5 Locating dumpster.
set %trash_clickx 0
set %trash_clicky 0
finditem %trashbarreltype G_2
if #findkind <> -1
{
set %trashcanid #findid
return #true
}
gosub NoDumpster
goto FD1
return #false
sub NoDumpster
sound
menu font bgcolor red
menu font color black
menu delete status
menu text status 50 5 You're not near a trash barrel!
menu font bgcolor black
menu font color lime
set #menubutton pause
gosub pause
return
sub FindTrashCan
set %_distance %1
FTC1:
menu delete status
if %bpmsgon
menu text status 50 5 Locating trashcan.
set %trashx 0
set %trashy 0
finditem %bankgarbage G_ , %_distance
if #findkind <> -1
{
if ! %NoEventProperty
{
if #clilang <> enu && %checklang
{
menu hideeuo
display ok # , clilang = #CLILANG $$Your client must be in english mode in order to detect the bank trashcan. Add the following$
+line to your uo.cfg files. $$Note: The line must be added for each character's desktop file.$$
+UserLanguageCodeString=ENU$$Script_Halted.$$
menu hide
halt
}
event property #findid
if %trashcantext1 notin #property && %trashcantext2 notin #property
{
ignoreitem #findid badtrash
goto FTC1
}
}
if abs ( #findz - #charposz ) > 5
{
ignoreitem #findid badtrash
goto FTC1
}
set %trashcanid #findid
return #true
}
menu delete status
if %bpmsgon
menu text status 50 5 Locating trashcan.
goto FTC1
return #false
sub NoTrashCan
sound
menu font bgcolor red
menu font color black
menu delete status
menu text status 50 5 You're not near a Bank Trash Can!
menu font bgcolor black
menu font color lime
set #menubutton pause
gosub pause
return
sub CheckforBank2
set %housesigns GNE_INE_SNE_UNE_ONE_QNE_AOE_QJE_
+COE_WNE_YNE_IOE_KOE_EOE_GOE_SJE_UJE_OJE_AKE_
+CKE_WJE_YJE_IKE_KKE_EKE_GKE_QKE_SKE_MKE_OKE_
+YKE_ALE_UKE_WKE_GLE_ILE_CLE_ELE_OLE_QLE_KLE_
+MLE_WLE_YLE_SLE_ULE_CRE_ERE_YQE_ARE_KRE_MRE_
+GRE_IRE_LRE_HKE_XJE
CFB12:
finditem %housesigns
if #findkind <> -1
{
event property #findid
wait 5
if bank in #property || mint in #property
return #true
ignoreitem #findid bankcheck
goto CFB12
}
set %pc 0
CFB22:
finditem HS_IS
if #findkind <> -1
{
set %pc %pc + 1
if #findrep = 7
{
event property #findid
if banker in #property || minter in #property
return #true
ignoreitem #findid bankcheck
goto CFB22
}
ignoreitem #findid bankcheck
goto CFB22
}
if %pc > 10
return #true
return #false
sub CheckForBank
if ! %bankfound
return #false
menu delete status
menu text status 50 5 Checking for bank.
wait %shortwait
set %retry #true
CFB1:
gosub resetjournal
nextcpos %bank_securex %bank_securey
gosub openBank
wait %longwait
gosub FindJournalMessage Bank_Container
if #result
{
set %atbank #true
menu delete status
menu text status 50 5 Looks like you're at a bank.
contpos %bank_securex %bank_securey
wait %wait1
set %securecontainerid N/A
if #contsize = 180_240
{
set %securecontainerid #contid
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
}
if %securecontainerid = N/A
goto CFB1
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust your bank box now.
if %sysmessages
event SysMessage Adjust your bank box now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
if #contid = %securecontainerid && ( #contposx <> %bank_securex || #contposy <> %bank_securey )
{
set %bank_securex #contposx
set %bank_securey #contposy
gosub putGlobalVar %gvar %scriptname #charid bank_securex
gosub putGlobalVar %gvar %scriptname #charid bank_securey
}
}
menu delete status
return #true
}
set %atbank #false
return #false
sub Openbank
if %runuo
{
msg bank$
return
}
msg #smc , #spc , bank$
return
sub GetSecureContainer
set %securecontainerid N/A
gosub getGlobalVar %gvar %scriptname #charid securecontainerid
GSC1:
if %securecontainerid <> N/A
{
menu delete status
menu text status 50 5 Re-opening secure container.
wait %shortwait
set %blinkmsg #true
goto GSC3
}
set %adjusttimer 8
menu font color white
menu delete status
menu text status 50 5 Target your SECURE container now!
set %blinkmsg #true
set %blinktime #scnt2 + 5
set #targcurs 1
wait %wait1
if %sysmessages
event SysMessage Target your SECURE container now!
looptgt2:
wait 3
if %blinktime < #scnt2
{
set %blinktime #scnt2 + 5
if %blinkmsg
{
menu delete status
set %blinkmsg #false
goto GSC2
}
menu text status 50 5 Target your SECURE container now!
set %blinkmsg #true
}
GSC2:
if #targcurs = 1
goto looptgt2
wait %wait1
finditem #ltargetid G_2
if ( #findkind = -1 || #finddist > 2 ) || ( #findkind <> -1 && #findtype in %badcontainers )
{
menu font color red
menu delete status
menu text status 50 5 Invalid container. Try again.
menu font color white
if %sysmessages
event SysMessage container. Try Again.
wait 3s
display ok The container you identified is not a valid$
+container. It is two far away or an invalid type( , #findtype , ).$$
+Please use a standard wooden or metal$
+chest within 2 paces of your character.$
set #targcurs 1
wait %wait1
goto looptgt2
}
set #lobjectid #ltargetid
event macro 17
wait %wait2
if #contname <> container_gump || #contid <> #lobjectid
{
menu font color red
menu delete status
menu text status 50 5 Invalid container. Try again.
menu font color white
if %sysmessages
event SysMessage container. Try Again.
wait 3s
display ok The object you identified with type: #findtype , #spc , does$
+not show as being a container according to$
+EasyUO's Container Info variables.$$
+Please use a standard wooden or metal$
+chest within 2 paces of your character.$
set #targcurs 1
wait %wait1
goto looptgt2
}
set %securecontainerid #ltargetid
GSC3:
finditem %securecontainerid G_2
if #findkind = -1
{
menu font color red
menu delete status
menu text status 50 5 SECURE container not found.
menu font color white
if %sysmessages
event SysMessage SECURE container not found.
wait 3s
set %securecontainerid N/A
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
set %resourcebagid N/A
gosub putGlobalVar %gvar %scriptname #charid resourcebagid
set %adjusttimer 8
goto GSC1
}
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
menu font color lime
nextcpos %bank_securex %bank_securey
set #lobjectid %securecontainerid
GSC4:
gosub resetjournal
wait %wait2
event macro 17 0
wait %wait1
gosub FindJournalMessage must_wait
if #result
{
menu delete status
menu text status 50 5 Retrying Secure box open.
if %sysmessages
event SysMessage Retrying Secure box open.
wait %wait2
wait %longwait
goto GSC4
}
if #contid = %securecontainerid
contpos %bank_securex %bank_securey
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust secure bag now.
if %sysmessages
event SysMessage Adjust secure bag now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
if #contid = %securecontainerid && ( #contposx <> %bank_securex || #contposy <> %bank_securey )
{
set %bank_securex #contposx
set %bank_securey #contposy
gosub putGlobalVar %gvar %scriptname #charid bank_securex
gosub putGlobalVar %gvar %scriptname #charid bank_securey
}
}
menu delete status
wait %longwait
return
sub makeyourown
MYO0:
display yesno Using this option will allow you to make your first item and then$
+the script will Make Last until you stop it or select the Make Item$
+button again. Do you want to continue?$$
+Yes=Make Item, No=Use Skill Chart
if #dispres = NO
{
set %retrycount 11
set #menubutton N/A
gosub SelectItemToMake
set %currentitem #result
gosub RemoveNonEssentials
set %firstattempt #true
set %makeyourown #false
set %leathertype %defaultleathertype
set * . %520 cut
return
}
set %packcloth 0
set %packleather 0
set %packbone 0
set %cloth99 0
set %leather99 0
set %bone99 0
gosub FindSewingKit
gosub UseSewingKit
set * . %520 pause
gosub WaitforPause
menu delete status
menu text status 50 5 Examining backpack contents.
MYO1:
finditem * C_ , %backpackid
if #findkind <> -1
{
if #findtype in %clothtypes
set %packcloth #findstack
if #findtype in %leathertypes
set %packleather #findstack
if #findtype in %bonetypes
set %packbone #findstack
ignoreitem #findid backpack
goto MYO1
}
MYO2:
menu font bgcolor blue
menu font color white
menu delete status
menu text status 50 5 Make your item now.
wait 5
finditem * C_ , %backpackid
if #findkind = -1
{
menu font bgcolor white
menu font color blue
menu delete status
menu text status 50 5 Make your item now.
wait 5
goto MYO2
}
menu font bgcolor black
menu font color lime
menu delete status
menu text status 50 5 New item detected.
set %product99 #findtype
event property #findid
;what got used?
ignoreitem reset backpack
if %packcloth <> 0
{
finditem %clothtypes C_ , %backpackid
if #findkind = -1
{
set %cloth99 %packcloth
set %resource99 %clothtypes
goto MYO3
}
if #findstack <> %packcloth
{
set %cloth99 %packcloth - #findstack
set %resource99 %clothtypes
g
; Script Name: CEOTurboTailor
; Author: CEO
; Version: 2.2
; Client Tested with: 7.0.0.4
; EUO version tested with: 1_5_154
; Shard OSI / FS: OSI
; Revision Date: 10/05/09
; Public Release: 012704
; Purpose: Trains tailoring to 120 FAST.
;-------------------------------------------------------------
; Instructions:
;
; 1. Start CEOTurboCutter
; 2. Start CEOTurboTailor
; 3. Identify Secure (or it'll use your bankbox automatically)
; 4. Identify Resource container.
; Make sure to have cloth, leather, bone, sewing kits.
; Also iron ingots and tinker tools if you will be making your own kits.
; NOTE: ANY opened bag with resources will be used, the resource
; container is also used to drop cut bandages to when making
; oil cloths.
; The script automatically learns your bank/secure/resources setup using
; persistant vars *524 and *525. To reset these, start the script away from the
; bank or out of range of your secure container.
; 5. If you're making bone armor, be sure to be within 2 paces of a house's trash barrel OR
; at a bank with a trash can within 12 paces. Script automatically finds these and will use
; them to discard your bone armor.
;
; Note: Your paperdoll MUST be visible and the backpack in the paperdoll VISIBLE with
; nothing blocking it's view as the script drops direct to the backpack.
; The resource container in your secure or bank box must also be visible with nothing
; block it. It can be just about any valid container type.
;
initevents
set %scriptname CEOTurboTailor
set %version 2.2
set %scriptstart #scnt
set %gaintime %scriptstart
set %initializing #true
linespercycle 100
;=============================================
; User configuration section
; Most of these defaults should be fine. Please understand
; what you're doing before changing.
;=============================================
; Set to #true to leave EUO window opened.
set %debug #false
if ! %debug
gosub initializing
; Set to #true to enable system messages to the journal during setup
; This is mostly for people that are having StayOnTop problems.
set %sysmessages #false
; Will autoset to #true if hiding is over 35. Otherwise set to #true
; to force trying, or #false to never try. Set to #true if you're in a house. It'll always work.
set %hideme N/A
; set this to unhide after x number of unsuccesful attempts without a gain. Sometimes working another skill
; will kick in a gain. To disable this, set to a high number like 9999. If you haven't gained after 9999 attempts
; something else is wrong!
set %unhideat 80
; Minimum skill required to try hiding. Set lower if you want to attempt even if you
; may fail. In tenths, defaults to 35.0.
set %hideskillreq 350
; Set these to your x/y cords for the EasyUO menu window
set %menu_windowx n/a
set %menu_windowy 20
;Set this for the level of transparency you want for the main status display.
set %menutransparency 87
; Set these to your x/y cords for bank box or secure screen position.
set %bank_securex 460
set %bank_securey 390
; Set these to your x/y cords for resource bag on screen position.
set %resource_bagx 630
set %resource_bagy 390
; Set these to your x/y cords for the house's trash barrel. This MUST be out of the area
; the tailoring/tinker menu comes up!
set %trash_barrelx 0
set %trash_barrely 0
; Always use normal leather.
; 1=normal, 2=spined, 3=horned, 4=barbed.
set %leathertype 1
; If you'd rather make bone items near the top levels set to #true otherwise
; it'll do studded sleeves instead of bone helmets.
set %makebone #false
; Minimum skill required before attempting to tinker sewing kits or
; tinker's tools. In tenths, defaults to 30.0
set %tinkerskillreq 300
; Maximum number of sewing kits to tinker at one time - Based on Weight. Min of 3. Force to your own number if you want.
set %maxsewingkits #maxweight / 60
;set %maxsewingkits 5
; Set to #true if you're slow and/or having timing issues. If persistant timing
; problems see the wait vars further down and change to higher numbers.
set %slowconnection #false
; These are the types for the bank dumpsters. There may be more so I've included
; them in this section.
set %bankgarbage IKF_BUD_HIF
; Leave this at N/A for a more intelligent bank checking method and less chance of saying
; "BANK BANK" at your house. If it fails to detect a bank you use, set to #true.
set %bankfound N/A
; Estimate costs of doing business: Change these to reflect your shard
set %cost_of_cloth 2
set %cost_of_leather 8
set %cost_of_bone 10
; set to #true if you want to select what to make and not use the skills table
set %makeyourown #false
; If you're on a freeshard with different menu configurations the below variables are for the
; click points for Make Last RELATIVE to the Tailor gump's position of 50/50.
; You may need to adjust to your shard's menu configuration.
; NOTE: This script was written for OSI and latest client. The Make Item feature and these
; variables may allow you to use it, but no promises!
set %makelast_clickx 285
set %makelast_clicky 410
; set this to a maximum skillcap if you want to stop at a certain point.
; Leave at N/A to use your real cap. In tenths, IE, GM=1000, 99.5=995, etc...
set %maxskillcap n/a
; Close EasyUO when the menu window is closed.
set %exitonclose #true
; Set this to the word in your bank's trashcan.
; "trash" is the common one. But if it's a freeshard and something else you'll need to change
set %trashcantext1 trash
set %trashcantext2 garbage
; Set this to false if your not running UOSE
set %uose_menu #true
; For RunUO and WorldSave avoidance
set %_worldsavejournalindex #jindex
; The shard type, if shardType fails for this set %eashard to either #true or #false
gosub shardType
set %eaShard #result
if %eaShard
{
set %tinkertoolsel 4
set %makelast_clicky 450
set %exitbutton 20
; Position in tinkering menu to make skill tool
set %toolbuttonsel 7
}
else
{
set %tinkertoolsel 3
set %exitbutton 18
set %toolbuttonsel 7
}
;
; If you use RKCharacterSetup you can change the custom stuff on a per character basis
; with that method..
;CALL RKCharacterSetup.txt CEOTurboTailor
;=============================================
; NOTHING BELOW THIS LINE SHOULD NEED CHANGING.
; DO SO AT YOUR OWN RISK!
;=============================================
set %520 520_ , #charid
set %521 521_ , #charid
set %522 522_ , #charid
set %gvar %scriptname
gosub getGlobalVar %gvar %scriptname #charid menu_windowx NOLOCK
gosub getGlobalVar %gvar %scriptname #charid menu_windowy NOLOCK
gosub getGlobalVar %gvar %scriptname #charid bank_securex NOLOCK
gosub getGlobalVar %gvar %scriptname #charid bank_securey NOLOCK
gosub getGlobalVar %gvar %scriptname #charid resource_bagx NOLOCK
gosub getGlobalVar %gvar %scriptname #charid resource_bagy NOLOCK
gosub getGlobalVar %gvar %scriptname #charid hideme NOLOCK
gosub getGlobalVar %gvar %scriptname #charid beepongain NOLOCK
gosub getGlobalVar %gvar %scriptname #charid securecontainerid NOLOCK
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
;===================== Get Training Method
if %eashard
{
set %train1 CEO1
set %train2 CEO_UOSE1
set %train3 Stratics1
set %train4 Stratics_UOSE1
set %totalTrainingMethods 4
}
else
{
set %train1 RunUO1
set %train2 RunUO_UOSE1
set %train3 RunUO2
set %train4 RunUO2_scryptor
set %totalTrainingMethods 4
}
set %ud1 %totalTrainingMethods + 1
set %ud2 %totalTrainingMethods + 2
set %train . %ud1 tailor1.txt
set %train . %ud2 tailor2.txt
gosub getGlobalVar %gvar %scriptname #charid train_method NOLOCK
if ! #result
{
set %train_method 1
gosub putGlobalVar %gvar %scriptname #charid train_method
}
;gosub setupskills
;gosub skillchart
;halt
;=====================
set %default_bankfound %bankfound
set %gumpx 50
set %gumpy 50
if %slowconnection
{
set %gumpwait 10
set %wait1 20
set %wait2 30
set %longwait 70
}
else
{
set %gumpwait 5
set %wait1 10
set %wait2 15
set %longwait 40
}
if %sysmessages && sys notin #opts
{
set %sysmessages #false
display ok Unable to use Event Sysmessages. You have the$flag enabled in the script, but EasyUO must also$
+be configured. See :$$Options->Configuration->Enable Event Sysmessages$$ in the EasyUO menu bar to turn it on.$$Script Halted.
menu hide
sound
halt
}
if G in #charstatus
{
event macro 6 0
wait %wait1
}
set %oilcloth RTI
set %bandaids ZLF
set %clothtypes BUI_CUI_GUI_DUI
set %bolttypes IAG_CAG_NAG_BAG_ZZF
set %scissortypes KAG_JAG
set %weighcheck #true
set %getbolts #true
set %skipClearMenuGump #false
set %leathertypes JJG_MJG
set %bonetypes GUF
set %bonearmortypes PPH_WPH_BQH_QPH_AQH_VPH_YPH_ZPH_CQH_XPH
set %invalidtypes IWI_XVL_ , %clothtypes , _ , %bolttypes , _
set %lcolor1 0
set %lcolor2 2220
set %lcolor3 2117
set %lcolor4 2129
set %defaultleathertype %leathertype
set %bagtypes CKF_LKF_ZJF_JIF_HIF_KIF_IIF_CUD_HKF_VMF_BUD_WMF_TMF_UMF_KKF_ZTD_
+ABG_CTD_AUD_SPF_JKF_OKF_OVH_KUD
set %badcontainers CVD_OVD_EVD_QVD_BKF
set %chesttypes JIF_HIF_IIF_KIF
set %chest_findmod 32_19
set %trashbarreltype BKF
set %tinkertools JTL_GTL_KTL
set %makelasttinker #false
set %ironselected #false
set %ironingots ENK
set %sewingkittypes HAG
set %trashcanid N/A
set %unhidetext ?!.,'/
; Zero Stats
set %attempts 0
set %unhidecount 0
for %i 1 3
{
set %attempts . %i 0
set %clothused . %i 0
set %leatherused . %i 0
set %boneused . %i 0
}
;recall saved stats
gosub getGlobalVar %gvar %scriptname #charid attempts3 NOLOCK
if ! #result
{
set %attempts3 0
gosub putGlobalVar %gvar %scriptname #charid attempts3
}
gosub getGlobalVar %gvar %scriptname #charid clothused3 NOLOCK
if ! #result
{
set %clothused3 0
gosub putGlobalVar %gvar %scriptname #charid clothused3
}
gosub getGlobalVar %gvar %scriptname #charid leatherused3 NOLOCK
if ! #result
{
set %leatherused3 0
gosub putGlobalVar %gvar %scriptname #charid leatherused3
}
gosub getGlobalVar %gvar %scriptname #charid boneused3 NOLOCK
if ! #result
{
set %boneused3 0
gosub putGlobalVar %gvar %scriptname #charid boneused3
}
gosub getGlobalVar %gvar %scriptname #charid scripttime NOLOCK
if ! #result
{
set %scripttime 0
gosub putGlobalVar %gvar %scriptname #charid scripttime
}
set %_scripttime %scripttime
if %maxsewingkits > 10
set %maxsewingkits 10
if %maxsewingkits < 3
set %maxsewingkits 3
gosub statusbarup
gosub SetUpSkills
set * . %521 %product . %currentitem
set * . %520 cut
wait %wait2
set * . %520 pause
gosub WaitforPause
linespercycle 40
menu font transparent #false
SetupMain:
set %adjusttimer 0
;set %menu_windowx n/a
if %menu_windowx = N/A
{
set %menu_windowx 535
gosub putGlobalVar %gvar %scriptname #charid menu_windowx
gosub InitialSetup
if ! #result
{
menu hideeuo
Display OK You must run setup the first time this script is used!$$Script Halted.$
menu hide
halt
}
set %firstmenu #true
gosub initmenu
goto SetupCont1
}
set %firstmenu #true
gosub initmenu
gosub gmcheck
menu font bgcolor $4488ff
menu font color black
menu button InitialSetup 215 31 40 20 Setup
menu font bgcolor black
menu font color lime
menu font size 7
set %timer #scnt + 5
Setuptimer:
wait 5
set %timeout %timer - #scnt
menu delete status
menu text status 50 5 Press SETUP now to reconfigure. ( , %timeout , #spc , seconds)
if #menubutton = initialsetup
{
set %menu_windowx n/a
set #menubutton n/a
menu font size 9
goto SetupMain
}
if #scnt < %timer
goto Setuptimer
menu delete InitialSetup
menu font size 9
gosub AutoSetup
gosub gmcheck
SetupCont1:
if %makeyourown
gosub makeyourown
gosub RemoveNonEssentials
gosub MaterialsToResource %ironingots ingots
gosub cutupbolts
set %firstattempt #true
set %leatherselected #false
set %retrycount 11
;--------------------------------------------------- Gentleman, start your scissors!
MainLoop:
set * . %520 cut
;wait %gumpwait
if G in #charstatus
set #menubutton pause
if #menubutton <> N/A
gosub #menubutton
gosub DisplayElapsedTime
gosub HideMe
finditem %sewkitid C_ , %backpackID
if #findkind = -1 || %retrycount > 10
{
gosub CheckForResources
gosub FindSewingKit
gosub UseSewingKit
wait %gumpwait
set %retrycount 0
}
if #contname <> generic_gump
{
set %retrycount %retrycount + 1
wait %gumpwait
menu delete status
menu text status 50 5 Waiting for tailoring menu , ( , %retrycount , ).
goto MainLoop
}
set %gumpx #contposx
set %gumpy #contposy
if %firstattempt
{
set * . %521 %product . %currentitem
if %leather . %currentitem <> 0 && ! %leatherselected
{
menu delete status
menu text status 50 5 Selecting leather type.
wait %gumpwait
gosub makefirstitem 16 %leathertype
if ! #result
goto MainLoop
set %leatherselected #true
set %firstattempt #true
wait %gumpwait
set %retrycount 11
goto MainLoop
}
menu delete status
menu text status 50 5 Making first item.
str len %desc . %currentitem
if #strres > 16
menu font size 8
menu delete making
menu text making 107 35 %desc . %currentitem
menu font size 9
wait %gumpwait
if ! %makeyourown
{
if %nextpage . %currentitem = 1
{
gosub MakeFirstItem %category . %currentitem 98
if ! #result
goto MainLoop
wait %wait1
gosub MakeFirstItem 99 %selection . %currentitem
if ! #result
goto MainLoop
set %firstattempt #false
goto MainLoop1
}
gosub MakeFirstItem %category . %currentitem %selection . %currentitem
if ! #result
goto MainLoop
}
set %firstattempt #false
wait %wait2
}
else
{
menu delete status
menu text status 50 5 Make last.
set %clickx %gumpx + %makelast_clickx
set %clicky %gumpy + %makelast_clicky
click %clickx %clicky f
}
MainLoop1:
set %retrycount 0
wait %gumpwait
if * . %522 = CUTTING-
wait %wait2 %wait2
if * . %522 = CUTTING--
wait %longwait %longwait
if * . %522 = CUTTING---
{
menu delete status
menu text status 50 5 Waiting for cutter.
set * . %520 PAUSE
gosub WaitforPause
}
gosub CheckForResources
if ! #result
goto MainLoop
gosub DisplayResourceStats
gosub CheckForGain
if ( %product . %currentitem = %oilcloth ) && ( %weightcheck ) && ( #weight > #maxweight )
{
gosub MaterialsToResource %bandaids bandaids
set %weightcheck #false
}
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
Goto MainLoop
halt
sub CheckForResources
gosub statusbarup
menu delete status
menu text status 50 5 Checking resources.
set %return #true
set %loopcheck 0
cloth:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
if %cloth . %currentitem <> 0
{
gosub countresource %resource . %currentitem
if #result < %cloth . %currentitem
{
if * . %522 <> IDLE && * . %522 <> Paused
goto cloth
set %loopcheck %loopcheck + 1
if %loopcheck > 5
{
display ok Hmm, there appears to be a problem getting$
+more cloth, you may be overwieght or$have too many items in your backpack.$$
+Hit OK, correct the problem and then resume script.$$Pausing.
gosub NeedMore Cloth
gosub CheckforMultipleCloths
menu delete status
menu text status 50 5 Getting more cloth.
set %return #false
set %getbolts #true
wait %wait1
set %loopcheck 0
goto cloth
}
if %product . %currentitem = %oilcloth
gosub MaterialsToResource %bandaids bandaids
set %weightcheck #true
set %amt ( %maxweight - #weight - 10 ) * 10
set %boltamount ( %maxweight - #weight - 10 ) / 5
if %amt < %cloth . %currentitem
set %amt %cloth . %currentitem
if %boltamount < 1
goto cloth2
if %getbolts
{
menu delete status
menu text status 50 5 Check for bolts ( , %boltamount , ).
gosub GetMoreResources %bolttypes %boltamount
if ! #result
{
set %getbolts #false
goto cloth
}
wait %wait2
gosub cutupbolts
set %return #false
wait %wait1
goto cloth
}
cloth2:
menu delete status
menu text status 50 5 Getting more cloth ( , %amt , ).
gosub GetMoreResources %resource . %currentitem %amt
if ! #result
{
gosub NeedMore Cloth
gosub CheckforMultipleCloths
menu delete status
menu text status 50 5 Getting more cloth.
gosub cutupbolts
set %return #false
set %getbolts #true
wait %wait1
goto cloth
}
set %return #false
wait %wait1
goto cloth
}
return %return
}
set %getbone #false
leather:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
if %bone . %currentitem = 0
set %leatheramt %maxweight - #weight - 10 - %used . %currentitem
gosub countresource %resource . %currentitem
if #result < %leather . %currentitem
{
if * . %522 <> IDLE && * . %522 <> Paused
goto leather
if %bone . %currentitem <> 0
{
gosub CalcItemAmounts
gosub CountBone
if #result >= %maxbone
gosub DumpBone
}
if %leatheramt < %leather . %currentitem
set %leatheramt %leather . %currentitem
menu delete status
menu text status 50 5 Getting more leather ( , %leatheramt , ).
gosub GetMoreResources %resource . %currentitem %leatheramt
set %getbone #true
if ! #result
{
gosub NeedMore Leather
menu delete status
menu text status 50 5 Getting more leather.
set %return #false
wait %wait1
goto leather
}
set %return #false
wait %wait1
goto leather
}
if %bone . %currentitem = 0
return %return
bones:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
finditem %bonetypes c_ , %backpackID
if ( #findkind = -1 ) || ( #findkind <> -1 && #findstack < %bone . %currentitem ) || %getbone
{
set %getbone #false
gosub CalcItemAmounts
gosub CountBone
if #result >= %maxbone
gosub DumpBone
if %boneamt < %bone . %currentitem
set %boneamt %bone . %currentitem
menu delete status
menu text status 50 5 Getting more bones ( , %boneamt , ).
gosub GetMoreResources %bonetypes %boneamt
if ! #result
{
gosub NeedMore Bones
menu delete status
menu text status 50 5 Getting more bones.
wait %wait1
goto bones
}
set %return #false
wait %wait1
goto bones
}
return %return
sub CalcItemAmounts
set %leatherstack 0
set %bonestack 0
finditem %resource . %currentitem c_ , %backpackID
if #findkind <> -1
set %leatherstack #findstack
finditem %bonetypes c_ , %backpackID
if #findkind <> -1
set %bonestack #findstack
set %temp ( %maxweight - #weight ) + %leatherstack + %bonestack
set %temp1 ( %temp ) - ( %temp / 3 )
set %boneamt ( ( ( %temp - %temp1 - 5 ) / 2 ) * 2 )
set %leatheramt ( %boneamt * 2 ) - %leatherstack
set %boneamt %boneamt - %bonestack
set %maxbone 5
return
sub GetMoreResources
; sub to get more resources, %1 resource, %2 amount
set %resourcetype %1
set %resourceamt %2
set * . %520 PAUSE
gosub WaitforPause
gosub ClearMenuGump
if %resourceamt < 1
set %resourceamt 1
GMR1:
finditem %resourcetype C
if #findkind <> -1
{
set %_findstack #findstack
set %_findid #findid
if #findbagid = %backpackid
{
ignoreitem #findid backpack
goto GMR1
}
if ( #findtype in %leathertypes && #findcol <> %lcolor . %leathertype ) || ( #findtype in %ironingots && #findcol <> 0 ) || ( #findtype in %sewingkittypes && #findcol <> 0 )
{
ignoreitem #findid wrongcolor
goto GMR1
}
if #findstack < %resourceamt
set %resourceamt #findstack
finditem %backpackid C_ , #charid
if #findkind <> -1
{
set #findmod 140_220
set %backpackx #findx
set %backpacky #findy
event drag %_findid
wait %wait2
if %_findstack > 1
msg %resourceamt $
wait %wait2
set %gmr2 0
GMR2:
click %backpackx %backpacky p
wait %wait1
if #contname = drag_gump
{
set %gmr2 %gmr2 + 1
menu font color yellow
menu delete status
menu text status 50 5 Drop on backpack, retrying ( , %gmr2 , ).
sound
wait %wait2
if %gmr2 < 3
{
gosub GetPaperDollXY
goto GMR2
}
display ok A problem occured trying to drop to your paperdoll's$
+backpack. Make sure the backpack icon is not blocked.$
+Press OK, then drop the resource manually, correct$the problem and resume the script.$
gosub pause
menu font color lime
menu delete status
menu text status 50 5 Checking for more resources.
}
menu font color lime
set * . %520 CUT
ignoreitem reset backpack
set %retrycount 11
return #true
}
gosub GetPaperDollXY
menu delete pdwarning
if %bone . %currentitem <> 0
gosub LocateTheDump
gosub CheckForBank
if ! #result
gosub GetSecureContainer
gosub GetResourceBag
goto GMR1
}
ignoreitem reset backpack
return #false
sub MaterialsToResource
; %1 = type , %2 = name
set %_MTRType %1
set %_MTRName %2
gosub ClearMenuGump
MTR1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
finditem %_MTRType C_ , %backpackid
if #findkind <> -1
{
set %_MTRfindid #findid
set %_MTRfindstack #findstack
str lower %_MTRName
menu delete status
menu text status 50 5 Moving #strres , #spc , to resource.
finditem %resourcebagid
set #findmod 25_7
if #findtype in %chesttypes
set #findmod %chest_findmod
if #findkind <> -1
{
event drag %_MTRfindid
set %mtr2 0
MTR2:
wait %wait2
if %_MTRfindstack <> 1
msg $
if #contname = stack_gump
{
set %mtr2 %mtr2 + 1
wait %wait2
if %mtr2 < 3
goto MTR2
}
set %mtr3 0
MTR3:
wait %wait1
click #findx #findy p
wait %wait1
if #contname = drag_gump
{
set %mtr3 %mtr3 + 1
menu font color yellow
menu delete status
menu text status 50 5 Retrying #strres , #spc , to resource ( , %mtr3 , ).
sound
wait %wait2
if %mtr3 < 3
goto MTR3
display ok A problem is occuring trying to drop #strres on to$your resource container. Make sure the container is$
+not blocked. Press OK, drop the #strres manually,$correct the problem and resume the script.$
gosub pause
}
menu font color lime
ignoreitem %_MTRfindid mtr
goto MTR1
}
ignoreitem reset mtr
return #false
}
ignoreitem reset mtr
return #true
sub WaitforPause
WaitforPause1:
set * . %520 pause
wait 5
if * . %522 <> PAUSED
goto WaitforPause1
wait %wait1
return
sub FindSewingKit
FSK1:
finditem %sewingkittypes C_ , %backpackID
if #findkind <> -1
{
set %sewkitid #findid
return
}
set * . %520 PAUSE
gosub WaitforPause
gosub GetMoreSewingKits
set * . %520 CUT
goto FSK1
return ; not needed
sub UseSewingKit
set * . %520 PAUSE
gosub WaitforPause
set #lobjectid %sewkitid
event macro 17 0
wait %wait1
set * . %520 CUT
return
sub MakeFirstItem
set %gumpx #contposx
set %gumpy #contposy
; %1 = category , %2 = selection
if %1 = 99
goto MFI1
wait %gumpwait
set %clickx %gumpx + 27
set %clicky %gumpy + 50 + ( %1 * 20 )
set %MF1_G 0
MF1_GumpWait:
wait %gumpwait
if #contname <> generic_gump
{
set %MF1_G %MF1_G + 1
if %MF1_G > 15
return #false
goto MF1_GumpWait
}
click %clickx %clicky f
if %slowconnection
wait %longwait
wait %wait2 %wait1
wait %wait1
if %2 = 99
return #true
set %mfi 0
MFI1:
wait %gumpwait
if #contname <> generic_gump
{
set %mfi %mfi + 1
if %mfi > 15
return #false
goto MFI1
}
set %gumpx #contposx
set %gumpy #contposy
MFI2:
if %2 = 98
{
set %clickx %gumpx + 385
set %clicky %gumpy + 270
goto MFI3
}
;set %clicky 100 + %2 * 20
set %clickx %gumpx + 235
set %clicky %gumpy + 50 + ( %2 * 20 )
MFI3:
click %clickx %clicky f
if %slowconnection
wait %longwait
wait %wait1 %wait1
return #true
sub GetMoreSewingKits
menu delete status
menu text status 50 5 Getting more sewing kits.
set %sewkits 0
GMSK1:
gosub GetMoreResources %sewingkittypes 1
if #result
{
set %sewkits %sewkits + 1
ignoreitem %sewkitid 1
if %sewkits >= %maxsewingkits
{
ignoreitem reset 1
return
}
goto GMSK1
}
if %sewkits = 0
{
gosub TinkerSewingKits
if #result > 0
{
ignoreitem reset 1
gosub ClearMenuGump
wait %wait2
return
}
gosub ClearMenuGump
gosub NeedMore sewingkits
ignoreitem reset 1
return
; goto GMSK1
}
ignoreitem reset 1
return
sub TinkerSewingKits
if %tinkerskill < %tinkerskillreq
return 0
set %retrycount 11
set %sewingkitsmade 0
set %makelasttinker #false
set #LOBJECTID xxx
for %i 1 %maxsewingkits
{
TSK1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
if #menubutton = pause
gosub pause
gosub CountTinkerKits
if ( #result = 0 ) || ( #result = 1 && %min_uses < 10 )
{
menu delete status
menu text status 50 5 Getting more Tinker's tools.
gosub GetMoreResources %tinkertools 1
if ! #result
{
gosub MakeTinkerTools
if ! #result
return %sewingkitsmade
}
set %makelasttinker #false
goto TSK1
}
gosub MakeSewingKit
if #result = -1
return %sewingkitsmade
if #result = 0
goto TSK1
set %i #result
set %sewingkitsmade %i
}
wait %wait1
return %sewingkitsmade
sub MakeTinkerTools
MTT1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
finditem %ironingots C_ , %backpackid
set %backpack_ingots #findstack
if #findkind = -1 || #findstack < 2
{
set %ingotamt 2 + ( ( %maxsewingkits - %sewingkitsmade ) * 2 ) - %backpack_ingots
menu delete status
menu text status 50 5 Getting more ingots ( , %ingotamt , ).
gosub GetMoreResources %ironingots %ingotamt
if ! #result
return #false
goto MTT1
}
menu delete status
menu text status 50 5 Tinkering Tinker's tools.
finditem %tinkertoolsid
if #findkind = -1
return #false
set %makelasttinker #false
set #LOBJECTID %tinkertoolsid
gosub WaitforPause
event macro 17 0
wait %longwait
if ! %ironselected
gosub selectIron
gosub makefirstitem %tinkertoolsel 4
wait %longwait
gosub CountTinkerKits
if #result < 2
goto MTT1
return #true
sub MakeSewingKit
set %_temp %sewingkitsmade + 1
menu delete status
menu text status 50 5 Tinkering sewing kit ( , %_temp , / , %maxsewingkits , ).
MSK1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
finditem %ironingots C_ , %backpackid
set %backpack_ingots #findstack
if #findkind = -1 || #findstack < 2
{
set %ingotamt ( ( %maxsewingkits - %sewingkitsmade ) * 2 ) - %backpack_ingots
menu delete status
menu text status 50 5 Getting more ingots ( , %ingotamt , ).
gosub GetMoreResources %ironingots %ingotamt
if ! #result
return -1
goto MSK1
}
set %mst2 0
MST2:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
set %mst2 %mst2 + 1
if %mst2 > 5
{
display ok Hmm, There appears to be a problem getting a tinker$
+menu to appear. No tinker tools? Something in the wrong place?$
+Please correct the problem. Pausing.
gosub pause
set %mst2 0
set %makelasttinker #false
set #LOBJECTID xxx
goto MST2
}
finditem %tinkertoolsid C_ , %backpackid
if #findkind = -1
return 0
gosub WaitforPause
if #lobjectid <> %tinkertoolsid
{
set #LOBJECTID %tinkertoolsid
event macro 17 0
wait %wait2
}
set %MST3 0
MST3:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
if #contname <> generic_gump
{
if %mst3 > 10
{
set %makelasttinker #false
set #LOBJECTID xxx
goto MST2
}
set %mst3 %mst3 + 1
wait %gumpwait
goto MST3
}
wait %gumpwait
set %gumpx #contposx
set %gumpy #contposy
if %makelasttinker
{
set %clickx %gumpx + %makelast_clickx
set %clicky %gumpy + %makelast_clicky
click %clickx %clicky f
goto MSK2
}
if ! %ironselected
gosub selectIron
gosub makefirstitem %tinkertoolsel %toolbuttonsel
set %makelasttinker #true
MSK2:
wait %gumpwait
finditem %sewingkittypes C_ , %backpackID
if #findkind <> -1
return #findcnt
return 0
sub SelectIron
menu delete status
menu text status 50 5 Selecting iron ingots.
gosub makefirstitem 16 1
set %ironselected #true
return
sub ClearMenuGump
if %skipClearMenuGump
return
savePix 55 55 1
set %pixcol1 #pixcol
savePix 55 476 1
set %pixcol2 #pixcol
savePix 572 481 1
set %pixcol3 #pixcol
if %pixcol1 = 7568251 || %pixcol2 = 7568251 || %pixcol3 = 7568251
{
if %pixcol1 = 7568251
{
click 55 55 f ; bring the gump forward if it's not already
goto CMG2
}
if %pixcol2 = 7568251
{
click 55 476 f ; bring the gump forward if it's not already
goto CMG2
}
if %pixcol3 = 7568251
{
click 572 481 f ; bring the gump forward if it's not already
goto CMG2
}
}
set %waittime #scnt + 2
CMG1:
if #contname <> generic_gump && %waittime > #scnt
goto CMG1
if #contname <> generic_gump
return
CMG2:
gosub makefirstitem %exitbutton 99
set %retrycount 11
wait %wait1
return
sub GetUsesRemaining
; %1 = #property
set %_1 %1
str pos %_1 :
set %temp #strres
str del %_1 1 %temp
set %_1 #strres
str pos %_1 $
set %temp #strres
str del %_1 %temp 999
return #strres
sub CountTinkerKits
set %ctk 0
set %min_uses 999
set %tinkertoolsid n/a
CTK1:
finditem %tinkertools C_ , %backpackid
if #findkind <> -1
{
set %_findid #findid
event property %_findid
wait 5
gosub GetUsesRemaining #property
if #result < %min_uses
{
set %min_uses #result
set %tinkertoolsid %_findid
}
ignoreitem #findid ctk
set %ctk %ctk + 1
goto CTK1
}
ignoreitem reset ctk
return %ctk
sub NeedMore
sound
menu font bgcolor red
menu font color black
menu delete status
str lower %1
menu text status 50 5 Need more #strres , #dot , #spc , Paused.
menu font bgcolor black
menu font color lime
if %sysmessages
event sysmessage Need more #strres , #dot , #spc , Paused.
set #menubutton pause
gosub pause
gosub LocateTheDump
gosub CheckForBank
if ! #result
gosub GetSecureContainer
gosub GetResourceBag
set %retrycount 11
return
sub FindJournalMessage
set %jc 1
FJM1:
scanjournal %jc
if #journal = N/A
return #false
for %_i 1 %0
{
if % . %_i in #journal
{
deletejournal
return #true
}
}
set %jc %jc + 1
goto FJM1
sub resetjournal
scanjournal 1
deletejournal
return
sub GetBackPackID
gosub getGlobalVar 1 COMMON #charid backpackid
if %backpackid <> N/A
{
_openbackpack:
event macro 8 1
wait %wait2
wait %wait1
finditem %backpackid C_ , #charid
if #findkind <> -1
{
event macro 8 7
wait %wait2
wait %wait1
goto GBPI2
}
}
GBPI1:
if #backpackid <> N/A && #backpackid <> YC
{
set %backpackid #backpackid
gosub putGlobalVar 1 COMMON #charid backpackid
goto _openbackpack
}
set %adjusttimer 8
gosub resetjournal
wait %wait2
event macro 8 7
wait %wait1
gosub FindJournalMessage must_wait
if #result || #contname <> container_gump
{
if %bpmsgon
{
menu delete status
menu text status 50 5 Retrying backpack open.
}
wait %longwait
wait %longwait
set %adjusttimer 8
goto GBPI1
}
set %backpackid #contid
gosub putGlobalVar 1 COMMON #charid backpackid
GBPI2:
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust your backpack now.
if %sysmessages
event SysMessage Adjust your backpack now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
}
wait %longwait
menu delete status
return
sub countscissors
set %scissorcount 0
cs1:
finditem %scissortypes C
if #findkind <> -1
{
set %scissorcount %scissorcount + 1
ignoreitem #findid scissors
goto cs1
}
ignoreitem reset scissors
return %scissorcount
sub GetPaperDollXY
gosub statusbarup
finditem %backpackid C_ , #charid
if #findkind <> -1
{
set #findmod 140_220
set %backpackx #findx
set %backpacky #findy
wait %longwait
return
}
event macro 8 1
menu delete status
menu text status 50 5 Adjust your paperdoll now.
gosub waittimer 5
menu font bgcolor red
menu font color black
menu text pdwarning 1 20 DON'T MOVE YOUR PAPERDOLL ANYMORE!
menu font bgcolor black
menu font color lime
menu delete status
menu text status 50 5 Getting Paperdoll Info
GPDXY1:
if #contname <> paperdoll_gump
{
gosub resetjournal
wait 5
wait %wait2
event macro 8 1
wait %wait1
gosub FindJournalMessage must_wait
if #result || #contname <> paperdoll_gump
{
menu delete status
menu text status 50 5 Retrying Paperdoll open.
wait %longwait
wait %longwait
goto GPDXY1
}
}
set %paperdollx #contposx
set %paperdolly #contposy
set %backpackx #contposx + 140
set %backpacky #contposy + 220
wait %longwait
return
sub GetResourceBag
GRB1:
gosub getGlobalVar %gvar %scriptname #charid resourcebagid
if %resourcebagid <> N/A
{
menu delete status
menu text status 50 5 Re-opening resource container.
wait %shortwait
set %blinkmsg #true
goto GRB3
}
set %adjusttimer 8
menu font color white
menu delete status
menu text status 50 5 Target your resource container now!
set %blinkmsg #true
set %blinktime #scnt2 + 5
set #targcurs 1
wait %wait1
if %sysmessages
event SysMessage Target your resource container now!
looptgt:
wait 3
if %blinktime < #scnt2
{
set %blinktime #scnt2 + 5
if %blinkmsg
{
menu delete status
set %blinkmsg #false
goto GRB2
}
menu text status 50 5 Target your resource container now!
set %blinkmsg #true
}
GRB2:
if #targcurs = 1
goto looptgt
finditem #ltargetid C_ , %securecontainerid
if #findkind = -1
{
menu delete status
menu font color red
menu text status 50 5 Not in Secure/Bank Box. Try Again.
menu font color white
if %sysmessages
event SysMessage Not in Secure/Bank Box. Try Again.
wait 3s
display YesNo This bag doesn't appear to be in the right place.$
+Possibly a freeshard issue? If it looks ok to you$
+Press YES to use it anyway, or NO to retry.
if #dispres = yes
goto GRB2B
set #targcurs 1
wait %wait1
goto looptgt
}
GRB2B:
if #findtype notin %bagtypes
{
menu delete status
menu font color red
menu text status 50 5 Resource container type invalid ( , #findtype , ).
if %sysmessages
event SysMessage Resource container type invalid.
wait 3s
display ok The container type you have selected is a type that %scriptname , $
+does not know. A regular chest or bag bought from the provisioners is$
+recommended. Please use a different type bag.$$Unknown Type: , #spc , #findtype $$Script Paused.
gosub pause
menu delete status
set %blinkmsg #false
menu font color white
set #targcurs 1
wait %wait1
goto looptgt
}
set %resourcebagid #ltargetid
GRB3:
finditem %resourcebagid C_ , %securecontainerid
set #findmod 25_7
if #findtype in %chesttypes
set #findmod %chest_findmod
if #findkind = -1
{
menu delete status
menu font color red
menu text status 50 5 Resource container not found.
menu font color white
if %sysmessages
event SysMessage Resource container not found.
wait 3s
set %resourcebagid N/A
gosub putGlobalVar %gvar %scriptname #charid resourcebagid
goto GRB1
}
gosub putGlobalVar %gvar %scriptname #charid resourcebagid
menu font color lime
set #lobjectid %resourcebagid
GRB4:
gosub resetjournal
wait %wait1
nextCPos %resource_bagx %resource_bagy
event macro 17 0
wait %wait2
gosub FindJournalMessage must_wait
if #result
{
menu delete status
menu text status 50 5 Retrying resource open.
if %sysmessages
event SysMessage Retrying resource open.
wait %longwait
wait %longwait
goto GRB4
}
if #contid = %resourcebagid
contpos %resource_bagx %resource_bagy
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust resource bag now.
if %sysmessages
event SysMessage Adjust resource bag now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
if #contid = %resourcebagid && ( #contposx <> %resource_bagx || #contposy <> %resource_bagy )
{
set %resource_bagx #contposx
set %resource_bagy #contposy
gosub putGlobalVar %gvar %scriptname #charid resource_bagx
gosub putGlobalVar %gvar %scriptname #charid resource_bagy
}
}
wait %longwait
menu delete status
return
sub CheckForGain
if %currentskill = #skill
return
set %currentskill #skill
menu window color red
if %beepongain
sound
menu delete status
menu text status 50 5 Tailor Gain!
gosub GainStats
wait 5
menu window color black
if %makeyourown
{
gosub gmcheck
return
}
gosub SelectItemToMake
set %newitem #result
set %lastcloth %cloth . %currentitem
if %currentitem <> %newitem
{
gosub skillchangedisplay
CFG1:
if * . %522 = CUTTING
{
wait 5
goto CFG1
}
set * . %520 PAUSE
gosub WaitforPause
set %currentitem %newitem
gosub RemoveNonEssentials
set %firstattempt #true
set * . %521 %product . %currentitem
gosub LocateTheDump
set %retrycount 11
}
gosub gmcheck
return
sub GMCheck
if ( ( #skill = %skillcap ) || ( %maxskillcap <= #skill ) ) && ! %debug
{
gosub DisplayElapsedTime
gosub putGlobalVar %gvar %scriptname #charid scripttime
set * . %520 cut
wait %wait1
set * . %520 pause
gosub WaitforPause
sound
if #contname = generic_gump
gosub ClearMenuGump
menu font color lime
menu delete making
menu text making 107 35 %desc30
sound
gosub statusbarup
set %skipClearMenuGump #false
gosub MaterialsToResource %leathertypes leather
set %skipClearMenuGump #true
gosub MaterialsToResource %clothtypes cloth
gosub MaterialsToResource %bonetypes bone
sound
gosub MaterialsToResource %bandaids bandaids
gosub MaterialsToResource %sewingkittypes sewingkits
gosub MaterialsToResource %tinkertools tinkertools
gosub MaterialsToResource %ironingots ingots
sound
if %bone . %currentitem <> 0
{
finditem %product . %currentitem C_ , #backpackid
if #findkind <> -1
gosub DumpBone
}
menu delete status
menu font color red
menu font bgcolor white
menu text status 50 5 Congratulations, skillcap reached!
if %maxskillcap = #skill
{
menu delete status
menu text status 50 5 Yahoo, maxskillcap reached!
}
sound
menu font style b
menu font align right
menu delete g1
menu text g1 100 246 #skill
menu font align left
set * . %520 done
menu font style n
menu font bgcolor black
menu font color lime
gosub DisplayElapsedTime
gosub recordTurboStats
gosub floatgain
halt
}
return
sub HideMe
if ! %hideme || H in #charstatus
return #true
set %ht 0
set %retrycount 11
menu show
menu delete status
menu text status 50 5 Attempting to hide.
set * . %520 pause
wait %wait1
HM1:
event macro 13 21
wait %wait1
if H notin #charstatus && %ht < 5
{
set %ht %ht + 1
menu delete status
menu font color yellow
menu text status 50 5 Hiding failed! Retrying.. ( , %ht , )
menu font color lime
wait 12s
goto HM1
}
if H notin #charstatus
{
menu delete status
menu font color red
menu text status 50 5 Hiding failed, you suck at hiding.
menu font color lime
wait 12s
set * . %520 cut
return #false
}
menu delete status
menu text status 50 5 Hidden, waiting 12 seconds.
wait 12s
set * . %520 cut
return #true
sub initmenu
if %initializing
gosub fadeout
menu clear
menu window size 260 295
menu window title CEOTurboTailor %version
menu window color black
menu font bgcolor BLACK
menu font color red
menu show %menu_windowx %menu_windowy
menu font size 9
menu text hstatus 10 5 Status:
menu text h1 10 20 Elapsed Time:
menu text h1 10 35 Currently Making:
menu shape myshape1 3 53 254 1 3 7 5 blue 3 white
menu shape myshape1 3 173 254 1 3 7 5 blue 3 white
menu shape myshape1 3 263 254 1 3 7 5 blue 3 white
set #menubutton N/A
menu font size 11
menu font color white
menu font style ub
menu text h1 65 55 Resource Statistics
menu text h1 70 175 Tailoring Statistics
menu font size 9
menu font color fuchsia
menu font style b
menu font size 8
menu text h1 90 75 This
menu text h1 145 75 Last
menu font style bu
menu text h1 90 90 Gain
menu text h1 145 90 Gain
menu text h1 200 90 Total
menu font size 9
menu font color red
menu font style b
menu text h1 5 105 Attempts
menu text h1 5 120 Cloth
menu text h1 5 135 Leather
menu text h1 5 150 Bone
menu text h1 60 105 :
menu text h1 60 120 :
menu text h1 60 135 :
menu text h1 60 150 :
menu text h1 60 246 :
menu text h1 5 200 Last gain at:
menu font size 8
menu font color fuchsia
menu font align right
menu text h1 100 215 Total
menu text h1 160 215 Current
menu text h1 220 215 Gain
menu font style bu
menu text h2 100 230 Skill
menu text h2 160 230 Gains
menu text h2 220 230 Rate
menu font style b
menu font align left
menu font color red
menu font size 9
menu text h3 10 246 Tailoring
menu font color lime
menu font style n
if %firstmenu
gosub GainStats
menu font align left
gosub DisplayElapsedTime
menu font align right
menu text a3 225 105 %attempts3
menu text c3 225 120 %clothused3
menu text l3 225 135 %leatherused3
menu text b3 225 150 %boneused3
menu font align left
menu font color white
menu font style u
menu text h1 5 215 Skillcap
menu text h1 7 70 Est. Cost
menu font style n
menu text h1 60 85 gp
menu font align right
gosub calctotalcosts
menu font align left
if %maxskillcap = N/A
menu text skillcap 13 230 %skillcap
else
menu text skillcap 2 230 %skillcap , ( , %maxskillcap , )
menu font color lime
menu text making 107 35 %desc . %currentitem
menu font bgcolor teal
menu font color black
menu button pause 100 270 60 20 Pause
menu button hide 5 270 60 20 Hide
menu button makeyourown 190 270 65 20 Make Item
;menu button InitialSetup 215 31 40 20 Setup
menu button resetstats 215 56 40 20 Reset
menu button SkillChart 235 180 20 15 SC
if %initializing
{
menu show %menu_windowx %menu_windowy
wait 1
gosub fadein
set %initializing #false
}
menu show %menu_windowx %menu_windowy
menu window transparent %menutransparency
if ! %debug
menu hideeuo
menu font bgcolor black
menu font color lime
set %firstmenu #false
;halt
return
sub Initializing
menu window transparent 100
menu clear
menu window size 240 170
menu window title %scriptname %version
set %skill_windowx ( #clixres - 240 ) / 2
set %skill_windowy ( #cliyres - 150 ) / 2
menu window color gray
menu font bgcolor gray
menu show %skill_windowx %skill_windowy
if ! %debug
menu hideeuo
gosub popuptext
menu font color black
menu font size 10
menu font style b
menu text i1 5 5 Welcome to CEOTurboTailor!
menu font size 8
menu font style n
menu font color navy
menu text h1 5 25 This script is copyright by the author under the
menu text h1 5 40 terms of the CEO Public License (CPL) at:
menu font color white
menu font size 7
menu text h1 5 60 http://www.easyuo.com/forum/viewtopic.php?p=3585
menu font size 12
menu font color yellow
menu text i1 15 90 Initializing, Please wait...
menu font size 15
menu font color red
menu text i1 35 115 Make sure cutter is
menu text i1 75 140 STARTED!
menu font bgcolor black
menu font color lime
gosub fadein
wait 5s
return
sub popuptext
for %i 1 17
{
wait 1
menu font size %i
set %textposy 130 / 2 + %i / 2 - %i
set %textposx 260 / 2 - ( 5 * %i ) - %i / 2
menu delete p1
menu text p1 %textposx %textposy CEOTurboTailor!
}
wait 20
set %a10 aaaaaa
set %a11 bbbbbb
set %a12 ccccccc
set %a13 dddddd
set %a14 eeeeee
set %a15 ffffff
for %i 0 15
{
wait 2
menu font color $ , %i , %i , %i , %i , %i , %i
if %i > 9
menu font color $ , %a . %i
menu text p1 %textposx %textposy CEOTurboTailor!
}
wait 30
gosub fadeout
menu delete p1
return
sub fadeout
for %i 100 1
{
wait 1
set %i %i - 5
menu window transparent %i
}
menu window transparent 0
return
sub fadein
menu window transparent 0
menu show
for %i 1 100
{
wait 1
set %i %i + 5
menu window transparent %i
}
menu window transparent 100
return
sub calctotalcosts
menu font color yellow
set %tcosts %clothused3 * %cost_of_cloth + %leatherused3 * %cost_of_leather + %boneused3 * %cost_of_bone
menu delete tcost
menu text tcost 55 85 %tcosts
menu font color lime
return
sub ResetStats
set #menubutton N/A
Display YesNo Do you want to erase all statistics and start over?
if #dispres = no
return
set %_530 0
set %attempts 0
for %i 1 3
{
set %attempts . %i 0
set %clothused . %i 0
set %leatherused . %i 0
set %boneused . %i 0
menu delete a . %i
menu delete c . %i
menu delete l . %i
menu delete b . %i
}
;reset Globals
set %skillstart %currentskill
gosub putGlobalVar %gvar %scriptname #charid skillstart
set %attempts3 0
set %clothused3 0
set %leatherused3 0
set %boneused3 0
set %scripttime 0
set %_scripttime 0
gosub putGlobalVar %gvar %scriptname #charid attempts3
gosub putGlobalVar %gvar %scriptname #charid clothused3
gosub putGlobalVar %gvar %scriptname #charid leatherused3
gosub putGlobalVar %gvar %scriptname #charid boneused3
gosub putGlobalVar %gvar %scriptname #charid scripttime
gosub redrawstats
menu font align right
gosub calctotalcosts
menu font align left
return
sub floatgain
menu delete pause
menu delete hide
menu delete makeyourown
menu delete resetstats
menu delete SkillChart
menu font style n
menu font bgcolor teal
menu font color black
menu button closed 100 270 60 20 Exit
set #menubutton N/A
menu font color lime
menu font size 25
menu font bgcolor black
gm1:
set %x #random % 269
set %y #random % 295
set %c1 #random % 255
set %c2 #random % 255
set %c3 #random % 255
menu font color %c1 , %c2 , %c3
set %c1 #random % 255
set %c2 #random % 255
set %c3 #random % 255
menu font bgcolor %c1 , %c2 , %c3
set %c1 #random % 255
set %c2 #random % 255
set %c3 #random % 255
menu window color %c1 , %c2 , %c3
set %c1 #random % 30 + 10
menu font size %c1
menu delete gm
menu text gm %x %y #skill
wait 3
if #menubutton = closed || * . %520 = terminate
{
set * . %520 terminate
gosub paypalpopup
terminate euo
}
goto gm1
sub DisplayElapsedTime
menu show
set %elaspedtime #scnt - %scriptstart
set %totaletime %_scripttime + %elaspedtime
set %scripttime %totaletime
set %ehours %totaletime / 3600
set %emins ( %totaletime / 60 ) - ( %ehours * 60 )
menu font color white
if %lastehours <> %ehours
{
set %lastehours %ehours
menu delete ehours
menu text ehours 95 20 %ehours , h
}
if %lastemins <> %emins
{
set %lastemins %emins
menu delete emins
menu text emins 120 20 %emins , m
}
menu font color lime
return ; remove this you want seconds display
menu font color white
set %esecs %totaletime % 60
if %lastesecs <> %esecs
{
set %lastesecs %esecs
menu delete esecs
menu text esecs 150 20 %esecs , s
}
menu font color lime
return
sub GainStats
menu delete g1
menu delete g2
menu delete g3
set %tailorgain #skill - %startskill
set %time X , #time
set %time1 #scnt
set %rate %tailorgain * 3600 / ( #scnt - %scriptstart )
menu font align right
menu text g1 100 246 #skill
menu text g2 160 246 %tailorgain
menu text g3 220 246 %rate
menu font align left
set %unhidecount 0
set %attempts2 %attempts1
set %attempts1 0
set %clothused2 %clothused1
set %clothused1 0
set %leatherused2 %leatherused1
set %leatherused1 0
set %boneused2 %boneused1
set %boneused1 0
menu font align right
for %i 1 2
{
menu delete a . %i
menu delete c . %i
menu delete l . %i
menu delete b . %i
}
menu text a1 113 105 %attempts1
menu text c1 113 120 %clothused1
menu text l1 113 135 %leatherused1
menu text b1 113 150 %boneused1
menu text a2 168 105 %attempts2
menu text c2 168 120 %clothused2
menu text l2 168 135 %leatherused2
menu text b2 168 150 %boneused2
menu font align left
if %startskill <> %currentskill
{
gosub FormatTime %time
menu delete time
menu text time 77 200 #result
set %egain %time1 - %gaintime
set %eghours %egain / 3600
set %egmins ( %egain / 60 ) - ( %eghours * 60 )
set %egsecs %egain % 60
menu delete time2
menu text time2 130 200 ( , %eghours , h , #spc , %egmins , m , #spc , %egsecs , s , #spc , used)
set %gaintime %time1
}
return
sub DisplayResourceStats
set %attempts1 %attempts1 + 1
set %unhidecount %unhidecount + 1
set %attempts3 %attempts3 + 1
menu font align right
menu delete a1
menu delete a3
menu text a1 113 105 %attempts1
menu text a3 225 105 %attempts3
gosub putGlobalVar %gvar %scriptname #charid attempts3
if %cloth . %currentitem <> 0
{
set %clothused1 %clothused1 + %used . %currentitem
set %clothused3 %clothused3 + %used . %currentitem
gosub putGlobalVar %gvar %scriptname #charid clothused3
menu delete c1
menu delete c3
menu text c1 113 120 %clothused1
menu text c3 225 120 %clothused3
}
if %leather . %currentitem <> 0
{
set %leatherused1 %leatherused1 + %used . %currentitem
set %leatherused3 %leatherused3 + %used . %currentitem
gosub putGlobalVar %gvar %scriptname #charid leatherused3
menu delete l1
menu delete l3
menu text l1 113 135 %leatherused1
menu text l3 225 135 %leatherused3
}
if %bone . %currentitem <> 0
{
set %boneused1 %boneused1 + %bone . %currentitem
set %boneused3 %boneused3 + %bone . %currentitem
gosub putGlobalVar %gvar %scriptname #charid boneused3
menu delete b1
menu delete b3
menu text b1 113 150 %boneused1
menu text b3 225 150 %boneused3
}
gosub calctotalcosts
menu font align left
if %hideme && H in #charstatus && %unhidecount > %unhideat
{
menu delete status
menu text status 50 5 Unhiding due to no gains.
gosub WaitforPause
set %rnd ( #random % 5 ) + 1
str mid %unhidetext %rnd 1
event macro 3 1 #strres
set %unhidecount 0
}
return
sub FormatTime
str ins %1 : 4
set %1 #strres
str ins %1 : 7
set %1 #strres
str del %1 1 1
set %1 #strres
return %1
sub hide
set %hideme #true
set #menubutton N/A
return
sub Pause
set %elaspedtime #scnt - %scriptstart
set %totaletime %_scripttime + %elaspedtime
set %scripttime %totaletime
gosub putGlobalVar %gvar %scriptname #charid scripttime
sound
set %firstattempt #true
;menu window color gray
menu font transparent #true
menu font size 30
menu font color red
menu font style b
menu text ptext 62 120 Paused
menu font size 9
menu font style n
menu font color lime
menu font transparent #false
if %sysmessages
{
event sysmessage Paused. Press the resume button or toggle out
event sysmessage of warmode. If not in warmode, toggle to war/peace.
}
set %returnbywarmode #false
if G in #charstatus
{
menu delete status
menu font color yellow
menu text status 50 5 Paused via warmode.
menu font color green
set %returnbywarmode #true
}
menu delete pause
menu font bgcolor teal
menu font color black
menu button resume 100 270 60 20 Resume
gosub WaitforPause
set #menubutton N/A
Pause1:
if G in #charstatus
set %returnbywarmode #true
if %returnbywarmode && G notin #charstatus
set #menubutton resume
wait 5
if #menubutton = N/A
goto Pause1
menu delete ptext
if #menubutton = closed
gosub closed
menu delete resume
menu button pause 100 270 60 20 Pause
set #menubutton N/A
set %retrycount 11
menu window color black
menu font bgcolor black
menu font color lime
set %scriptstart #scnt
set %gaintime %scriptstart
set %_scripttime %scripttime
set * . %521 %product . %currentitem
return
sub closed
set %skipClearMenuGump #false
gosub ClearMenuGump
set %elaspedtime #scnt - %scriptstart
set %totaletime %_scripttime + %elaspedtime
set %scripttime %totaletime
gosub putGlobalVar %gvar %scriptname #charid scripttime
if %exitonclose && ! %debug
{
set * . %520 terminate
terminate euo
}
set #menubutton N/A
return
sub AutoSetup
if %hideme = N/A && %hideskill > %hideskillreq
set %hideme #true
if %hideme = N/A
set %hideme #false
menu show
set %bpmsgon #true
gosub GetBackPackID
menu show
gosub GetPaperDollXY
menu show
menu delete pdwarning
gosub calcmaxweight
if %default_bankfound = N/A
{
gosub checkforbank2
set %bankfound #result
}
if %atbank || %bankfound
gosub CheckForBank
menu show
if ! #result
gosub GetSecureContainer
gosub GetResourceBag
menu show
gosub LocateTheDump
gosub CheckforMultipleCloths
return
sub LocateTheDump
if %bone . %currentitem <> 0
{
if ! %atbank
gosub FindDumpster
if %atbank
gosub FindTrashCan 12
}
return
sub calcmaxweight
set %maxweight #maxweight
if #maxweight > 400
set %maxweight 400
set %maxweight %maxweight - ( %maxSkillTools * 2 ) - 5
return
sub CountBone
set %cbh 0
CBH1:
finditem %product . %currentitem C_ , %backpackid
if #findkind <> -1
{
set %cbh %cbh + 1
ignoreitem #findid bone
goto CBH1
}
ignoreitem reset bone
return %cbh
sub DumpBone
wait %wait2
if ! %atbank
{
gosub FindDumpster
nextcpos %trash_barrelx %trash_barrely
set #lobjectid %trashcanid
wait %wait2
event macro 17 0
wait %longwait
contpos %trash_barrelx %trash_barrely
wait %wait1
set %trash_clickx %trash_barrelx + 30
set %trash_clicky %trash_barrely + 160
gosub MoveBonestoTrash
}
if %atbank
{
set %charposx #charposx
set %charposy #charposy
gosub FindTrashCan 12
move #findx #findy 2 4s
gosub FindTrashCan 2
nextcpos %trash_barrelx %trash_barrely
set #lobjectid %trashcanid
wait %wait2
event macro 17 0
wait %longwait
contpos %trash_barrelx %trash_barrely
wait %wait1
set %trash_clickx %trash_barrelx + 90
set %trash_clicky %trash_barrely + 150
gosub MoveBonestoTrash
move %charposx %charposy 0 4s
gosub CheckForBank
gosub GetResourceBag
}
return
sub MoveBonestoTrash
set %ba1 0
gosub resetjournal
MBT1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
wait 5 10
finditem %product . %currentitem C_ , %backpackid
;finditem ZLF C_ , %backpackid ; testline so I don't have to really use bone...
if #findkind <> -1
{
set %ba1 %ba1 + 1
menu delete status
menu text status 50 5 Dumping bone armor ( , %ba1 , ).
event drag #findid
set %mbt2 0
MBT2:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
wait %wait1
click %trash_clickx %trash_clicky p
wait %wait1
if #lliftedkind <> 0
{
set %mbt2 %mbt2 + 1
if %mbt2 > 3
{
if %mbt2 > 9
{
menu delete status
menu text status 50 5 Aborting dump.
display ok There is a problem transferring items to your trashcan.$You will need to do it manually.$Pausing script.$
gosub pause
return
}
menu delete status
menu text status 50 5 Dump Problems, Trying again...
set #lobjectid %trashcanid
event macro 17 0
contpos %trash_barrelx %trash_barrely
goto MBT2
}
goto MBT2
}
wait %wait1
set %mbt2 0
goto MBT1
}
return
sub FindDumpster
FD1:
menu delete status
menu text status 50 5 Locating dumpster.
set %trash_clickx 0
set %trash_clicky 0
finditem %trashbarreltype G_2
if #findkind <> -1
{
set %trashcanid #findid
return #true
}
gosub NoDumpster
goto FD1
return #false
sub NoDumpster
sound
menu font bgcolor red
menu font color black
menu delete status
menu text status 50 5 You're not near a trash barrel!
menu font bgcolor black
menu font color lime
set #menubutton pause
gosub pause
return
sub FindTrashCan
set %_distance %1
FTC1:
menu delete status
if %bpmsgon
menu text status 50 5 Locating trashcan.
set %trashx 0
set %trashy 0
finditem %bankgarbage G_ , %_distance
if #findkind <> -1
{
if ! %NoEventProperty
{
if #clilang <> enu && %checklang
{
menu hideeuo
display ok # , clilang = #CLILANG $$Your client must be in english mode in order to detect the bank trashcan. Add the following$
+line to your uo.cfg files. $$Note: The line must be added for each character's desktop file.$$
+UserLanguageCodeString=ENU$$Script_Halted.$$
menu hide
halt
}
event property #findid
if %trashcantext1 notin #property && %trashcantext2 notin #property
{
ignoreitem #findid badtrash
goto FTC1
}
}
if abs ( #findz - #charposz ) > 5
{
ignoreitem #findid badtrash
goto FTC1
}
set %trashcanid #findid
return #true
}
menu delete status
if %bpmsgon
menu text status 50 5 Locating trashcan.
goto FTC1
return #false
sub NoTrashCan
sound
menu font bgcolor red
menu font color black
menu delete status
menu text status 50 5 You're not near a Bank Trash Can!
menu font bgcolor black
menu font color lime
set #menubutton pause
gosub pause
return
sub CheckforBank2
set %housesigns GNE_INE_SNE_UNE_ONE_QNE_AOE_QJE_
+COE_WNE_YNE_IOE_KOE_EOE_GOE_SJE_UJE_OJE_AKE_
+CKE_WJE_YJE_IKE_KKE_EKE_GKE_QKE_SKE_MKE_OKE_
+YKE_ALE_UKE_WKE_GLE_ILE_CLE_ELE_OLE_QLE_KLE_
+MLE_WLE_YLE_SLE_ULE_CRE_ERE_YQE_ARE_KRE_MRE_
+GRE_IRE_LRE_HKE_XJE
CFB12:
finditem %housesigns
if #findkind <> -1
{
event property #findid
wait 5
if bank in #property || mint in #property
return #true
ignoreitem #findid bankcheck
goto CFB12
}
set %pc 0
CFB22:
finditem HS_IS
if #findkind <> -1
{
set %pc %pc + 1
if #findrep = 7
{
event property #findid
if banker in #property || minter in #property
return #true
ignoreitem #findid bankcheck
goto CFB22
}
ignoreitem #findid bankcheck
goto CFB22
}
if %pc > 10
return #true
return #false
sub CheckForBank
if ! %bankfound
return #false
menu delete status
menu text status 50 5 Checking for bank.
wait %shortwait
set %retry #true
CFB1:
gosub resetjournal
nextcpos %bank_securex %bank_securey
gosub openBank
wait %longwait
gosub FindJournalMessage Bank_Container
if #result
{
set %atbank #true
menu delete status
menu text status 50 5 Looks like you're at a bank.
contpos %bank_securex %bank_securey
wait %wait1
set %securecontainerid N/A
if #contsize = 180_240
{
set %securecontainerid #contid
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
}
if %securecontainerid = N/A
goto CFB1
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust your bank box now.
if %sysmessages
event SysMessage Adjust your bank box now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
if #contid = %securecontainerid && ( #contposx <> %bank_securex || #contposy <> %bank_securey )
{
set %bank_securex #contposx
set %bank_securey #contposy
gosub putGlobalVar %gvar %scriptname #charid bank_securex
gosub putGlobalVar %gvar %scriptname #charid bank_securey
}
}
menu delete status
return #true
}
set %atbank #false
return #false
sub Openbank
if %runuo
{
msg bank$
return
}
msg #smc , #spc , bank$
return
sub GetSecureContainer
set %securecontainerid N/A
gosub getGlobalVar %gvar %scriptname #charid securecontainerid
GSC1:
if %securecontainerid <> N/A
{
menu delete status
menu text status 50 5 Re-opening secure container.
wait %shortwait
set %blinkmsg #true
goto GSC3
}
set %adjusttimer 8
menu font color white
menu delete status
menu text status 50 5 Target your SECURE container now!
set %blinkmsg #true
set %blinktime #scnt2 + 5
set #targcurs 1
wait %wait1
if %sysmessages
event SysMessage Target your SECURE container now!
looptgt2:
wait 3
if %blinktime < #scnt2
{
set %blinktime #scnt2 + 5
if %blinkmsg
{
menu delete status
set %blinkmsg #false
goto GSC2
}
menu text status 50 5 Target your SECURE container now!
set %blinkmsg #true
}
GSC2:
if #targcurs = 1
goto looptgt2
wait %wait1
finditem #ltargetid G_2
if ( #findkind = -1 || #finddist > 2 ) || ( #findkind <> -1 && #findtype in %badcontainers )
{
menu font color red
menu delete status
menu text status 50 5 Invalid container. Try again.
menu font color white
if %sysmessages
event SysMessage container. Try Again.
wait 3s
display ok The container you identified is not a valid$
+container. It is two far away or an invalid type( , #findtype , ).$$
+Please use a standard wooden or metal$
+chest within 2 paces of your character.$
set #targcurs 1
wait %wait1
goto looptgt2
}
set #lobjectid #ltargetid
event macro 17
wait %wait2
if #contname <> container_gump || #contid <> #lobjectid
{
menu font color red
menu delete status
menu text status 50 5 Invalid container. Try again.
menu font color white
if %sysmessages
event SysMessage container. Try Again.
wait 3s
display ok The object you identified with type: #findtype , #spc , does$
+not show as being a container according to$
+EasyUO's Container Info variables.$$
+Please use a standard wooden or metal$
+chest within 2 paces of your character.$
set #targcurs 1
wait %wait1
goto looptgt2
}
set %securecontainerid #ltargetid
GSC3:
finditem %securecontainerid G_2
if #findkind = -1
{
menu font color red
menu delete status
menu text status 50 5 SECURE container not found.
menu font color white
if %sysmessages
event SysMessage SECURE container not found.
wait 3s
set %securecontainerid N/A
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
set %resourcebagid N/A
gosub putGlobalVar %gvar %scriptname #charid resourcebagid
set %adjusttimer 8
goto GSC1
}
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
menu font color lime
nextcpos %bank_securex %bank_securey
set #lobjectid %securecontainerid
GSC4:
gosub resetjournal
wait %wait2
event macro 17 0
wait %wait1
gosub FindJournalMessage must_wait
if #result
{
menu delete status
menu text status 50 5 Retrying Secure box open.
if %sysmessages
event SysMessage Retrying Secure box open.
wait %wait2
wait %longwait
goto GSC4
}
if #contid = %securecontainerid
contpos %bank_securex %bank_securey
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust secure bag now.
if %sysmessages
event SysMessage Adjust secure bag now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
if #contid = %securecontainerid && ( #contposx <> %bank_securex || #contposy <> %bank_securey )
{
set %bank_securex #contposx
set %bank_securey #contposy
gosub putGlobalVar %gvar %scriptname #charid bank_securex
gosub putGlobalVar %gvar %scriptname #charid bank_securey
}
}
menu delete status
wait %longwait
return
sub makeyourown
MYO0:
display yesno Using this option will allow you to make your first item and then$
+the script will Make Last until you stop it or select the Make Item$
+button again. Do you want to continue?$$
+Yes=Make Item, No=Use Skill Chart
if #dispres = NO
{
set %retrycount 11
set #menubutton N/A
gosub SelectItemToMake
set %currentitem #result
gosub RemoveNonEssentials
set %firstattempt #true
set %makeyourown #false
set %leathertype %defaultleathertype
set * . %520 cut
return
}
set %packcloth 0
set %packleather 0
set %packbone 0
set %cloth99 0
set %leather99 0
set %bone99 0
gosub FindSewingKit
gosub UseSewingKit
set * . %520 pause
gosub WaitforPause
menu delete status
menu text status 50 5 Examining backpack contents.
MYO1:
finditem * C_ , %backpackid
if #findkind <> -1
{
if #findtype in %clothtypes
set %packcloth #findstack
if #findtype in %leathertypes
set %packleather #findstack
if #findtype in %bonetypes
set %packbone #findstack
ignoreitem #findid backpack
goto MYO1
}
MYO2:
menu font bgcolor blue
menu font color white
menu delete status
menu text status 50 5 Make your item now.
wait 5
finditem * C_ , %backpackid
if #findkind = -1
{
menu font bgcolor white
menu font color blue
menu delete status
menu text status 50 5 Make your item now.
wait 5
goto MYO2
}
menu font bgcolor black
menu font color lime
menu delete status
menu text status 50 5 New item detected.
set %product99 #findtype
event property #findid
;what got used?
ignoreitem reset backpack
if %packcloth <> 0
{
finditem %clothtypes C_ , %backpackid
if #findkind = -1
{
set %cloth99 %packcloth
set %resource99 %clothtypes
goto MYO3
}
if #findstack <> %packcloth
{
set %cloth99 %packcloth - #findstack
set %resource99 %clothtypes
g
1. sayfa (Toplam 1 sayfa) [ 5 mesaj ] |
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız |