;-----------------------------------------------------------
; Script Name: CEOTurboTinker
; Author: CEO
; Version: 2.0d
; Client Tested with: 5.0.1c
; EUO version tested with: 1_42_00A5
; Shard OSI / FS: OSI
; Revision Date: 051805
; Public Release: 032804
; Purpose: Trains Tinkering to 100.
;-------------------------------------------------------------
; This script is copyright by CEO under the CEO Public License (CPL) at: http://www.easyuo.com/forum/viewtopic.php?p=3585
;
' Instructions:
;
; 1. Start CEOTurboTinker
; 3. Identify Secure (or it'll use your bankbox automatically)
; 4. Identify Resource container. The resource container MUST be inside your Secure or bankbox.
; Make sure to have all necessary ingots/tools in your resource container.
; NOTE: ANY opened bag with resources will be used, the resource
; container is also used to drop left over tinkering stuff.
; The script automatically learns your bank/secure/resources setup using
; the CEO*filesystem. To reset these, start the script away from your resource
; container and away from the bank.
; 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
; blocking it. It can be just about any valid container type.
;
initevents
set %version 2.0d
set #lpc 200
set %scriptname CEOTurboTinker
set %scriptstart #scnt
set %scriptstart2 %scriptstart
set %gaintime %scriptstart
set %versioncheck #true
;=============================================
; User configuration section
; Most of these defaults should be fine. Please understand
; what you're doing before changing. The interactive setup will also override anything
; you set here.
;=============================================
; 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 #true
; 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
; Default x/y cords for the EasyUO menu window
set %menu_windowx N/A
set %menu_windowy N/A
; Default x/y cords for bank box or secure screen position.
set %bank_securex 460
set %bank_securey 390
; Default 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 or bank trash chest when opened.
set %trash_barrelx 0
set %trash_barrely 0
; These are the types for the bank dumpsters. There may be more so I've included
; them in this section.
set %bankgarbage IKF_BUD_JIF_HIF_IIF_KIF
; 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 %trashcantext trash
; Minimum skill required before attempting to tinker
; In tenths, defaults to 30.0 ... Kind of meanless in this script so set a skill min.
set %tinkerskillreq 249
; Maximum number of tinker tools to tinker at one time - Based on Weight. Min of 3. Force to your own number if you want.
set %maxskilltools #maxweight / 60
;set %maxskilltools 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
; 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
; If you're on a freeshard with different menu configurations the below variables are for the
; click points for Make Last RELATIVE to the Tinker 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
; For RunUO and WorldSave avoidance
set %_worldsavejournalindex #jindex
;=============================================
; NOTHING BELOW THIS LINE SHOULD NEED CHANGING.
; DO SO AT YOUR OWN RISK!
;=============================================
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
;=============================================
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
set %train1 CEO1
set %train2 RunUO1
set %train3 RunUO2
set %totalTrainingMethods 3
set %ud1 %totalTrainingMethods + 1
set %ud2 %totalTrainingMethods + 2
set %train . %ud1 tinker1.txt
set %train . %ud2 tinker2.txt
gosub getGlobalVar %gvar %scriptname #charid train_method NOLOCK
if ! #result
{
set %train_method 1
gosub putGlobalVar %gvar %scriptname #charid train_method
}
set %gumpx 50
set %gumpy 50
if %slowconnection
{
set %gumpwait 10
set %shortwait 10
set %wait1 20
set %wait2 30
set %longwait 70
}
else
{
set %gumpwait 5
set %shortwait 5
set %wait1 10
set %wait2 15
set %longwait 40
}
;==================== Do some validating before we start
gosub CheckEUOVersion 1 41 102 euomajor euominor euobuild
if ! #result
{
menu hideeuo
str del %euobuild 1 1
display ok Your Environment:$$EasyUO Version: %euomajor , #dot , %euominor , #spc , ( , build , #spc , #strres , )$
+Client: #CLIVER $$
+This script requires EasyUO version 1.41 (build 0066) or higher.$$
+Sorry you can not use %scriptname , #dot , #spc Halting.
if %debug
{
display ok #euover #cliver #opts
}
menu hide
halt
}
if ( %euobuild = x006d || %euobuild = x006e || %euobuild = x006f || %euobuild = x0070 )
{
menu hideeuo
display ok Your Environment:$$EasyUO Version: %euomajor , #dot , %euominor , #spc , ( , build , #spc , #strres , )$
+Client: #CLIVER $$
+You are using a buggy build, please get the$
+latest EasyUO from the EasyUO Website.$$Halting.
menu hide
halt
}
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
halt
}
if G in #charstatus
{
event macro 6 0
wait %wait1
}
;======================================================
set %atbank #false
set %talkietalkie #true
set %euoTopic 5702
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
set %badcontainers CVD_OVD_EVD_QVD_BKF
set %chesttypes JIF_HIF_IIF_KIF
set %chest_findmod 32_19
set %trashbarreltype BKF
set %trashcanid N/A
set %tinkertools GTL_KTL_JTL
set %makelasttinker #false
set %ironingots ENK
set %ironselected #false
set %moongates JEF_OTF
set %bodbooks DYM
set %SkillToolTypes %tinkertools
set %cleanup #false
set %NoEventProperty #false
gosub CheckEventProperty
if ! #result
{
set %bankfound #true
set %bankgarbage %bankgarbage , _ , %trashbarreltype
set %NoEventProperty #true
}
; Zero Stats
;recall saved stats
set %skilltoolsused 0
gosub getGlobalVar %gvar %scriptname #charid skilltoolsused NOLOCK
if ! #result
{
set %skilltoolsused 0
gosub putGlobalVar %gvar %scriptname #charid skilltoolsused
}
gosub getGlobalVar %gvar %scriptname #charid totaletime
if ! #result
{
set %totaletime 0
gosub putGlobalVar %gvar %scriptname #charid totaletime
}
;
set %startetime %totaletime
if %maxskilltools > 10
set %maxskilltools 10
if %maxskilltools < 3
set %maxskilltools 3
gosub SetUpSkills
gosub setupStats
;gosub skillchart
linespercycle 40
SetupMain:
;set %menu_windowx N/A
set %adjusttimer 0
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 now that you've started!$$Script Halted.$
menu hide
halt
}
set %firstmenu #true
gosub initmenu
goto SetupCont1
}
set %firstmenu #true
gosub initmenu
menu font bgcolor $4488ff
menu font color black
menu button InitialSetupMain 210 17 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 = initialsetupMain || #menubutton = initialsetup )
{
set %menu_windowx n/a
set #menubutton n/a
menu font size 9
goto SetupMain
}
if #scnt < %timer
goto Setuptimer
menu delete InitialSetupMain
menu font size 9
gosub AutoSetup
gosub gmcheck
SetupCont1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45
gosub CheckForResources
set %last_ingotcount %ingotcount
gosub CountTinkerKits #true
gosub RemoveNonEssentials
gosub cleanOutPack
gosub calcmaxweight
set %last_productcount 0
gosub GetMaxtoKeep
set %firstattempt #true
set %retrycount 11
;halt
MainLoop:
gosub statusbarup
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45
wait 1
if G in #charstatus
set #menubutton pause
if #menubutton <> N/A
gosub #menubutton
gosub DisplayElapsedTime
gosub HideMe
finditem %SkillToolID C_ , %backpackID
if #findkind = -1 || %retrycount > 10
{
gosub CheckForResources
gosub FindSkillTool
gosub UseSkillTool
wait %gumpwait
set %retrycount 0
if ! %ironselected
gosub selectIron
}
if #contname <> generic_gump
{
set %retrycount %retrycount + 1
wait %gumpwait
menu delete status
menu text status 50 5 Waiting for tinkering gump ( , %retrycount , ) , #dot
goto MainLoop
}
if %firstattempt
{
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 %nextpage . %currentitem = 1
{
gosub MakeFirstItem %category . %currentitem 98
if ! #result
goto MainLoop
wait %wait1
gosub MakeFirstItem 99 %selection . %currentitem
if ! #result
goto MainLoop
goto MainLoop1
}
gosub MakeFirstItem %category . %currentitem %selection . %currentitem
if ! #result
goto MainLoop
MainLoop1:
set %firstattempt #false
wait %wait2
goto MainLoop2
}
menu delete status
menu text status 50 5 Make last.
set %gumpx #contposx
set %gumpy #contposy
set %clickx %gumpx + %makelast_clickx
set %clicky %gumpy + %makelast_clicky
click %clickx %clicky f
MainLoop2:
set %retrycount 0
wait %gumpwait
gosub CheckForResources
if ! #result
goto MainLoop
set %ingots_used 0
if %last_ingotcount <> %ingotcount
{
set %ingots_used %last_ingotcount - %ingotcount
if %ingots_used < 0 || ( %debug && %ingots_used > 10 )
set %ingots_used 0
set %last_ingotcount %ingotcount
set %stat_thisgain1 %stat_thisgain1 + %ingots_used
set %stat_totals1 %stat_totals1 + %ingots_used
gosub putGlobalVar %gvar %scriptname #charid stat_totals1
if %ingots_used = %needed . %currentitem
{
gosub countresource %product . %currentitem %discardTrashBarrel . %currentitem
if %last_productcount <> #result
{
set %dif #result - %last_productcount
if %dif <= 0 || %dif > 10
set %dif 1
set %last_productcount #result
set %statindex %statindex . %currentitem
set %stat_thisgain . %statindex %stat_thisgain . %statindex + %dif
set %stat_totals . %statindex %stat_totals . %statindex + %dif
gosub putGlobalVar %gvar %scriptname #charid stat_totals , %statindex . %currentitem
if #weight > 405 || ( %atbank && %discardTrashBarrel . %currentitem && ( #weight > %maxweight ) )
gosub RemoveNonEssentials
}
}
}
if #weight > 405 || ( %atbank && %discardTrashBarrel . %currentitem && #weight > ( %maxweight - 5 ) )
gosub RemoveNonEssentials
gosub CheckTinkerKits
gosub DisplayResourceStats
gosub CheckTimeToDump
gosub CheckForGain
Goto MainLoop
halt
sub CheckForResources
menu delete status
menu text status 50 5 Checking resources.
set %return #true
set %loopcheck 0
;pause
ingots:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
gosub countresource %resource . %currentitem #false
set %result #result
if %result < %needed . %currentitem
{
set %ingotcount %result
gosub displayIngotCount
set %loopcheck %loopcheck + 1
if %loopcheck > 5
{
display ok Hmm, there appears to be a problem getting$
+more ingots, you may be overwieght or$have too many items in your backpack.$$
+Hit OK, correct the problem and then resume script.$$Pausing.
gosub NeedMore ingots
menu delete status
menu text status 50 5 Getting more ingots.
set %return #false
wait %wait1
set %loopcheck 0
goto ingots
}
gosub RemoveNonEssentials
ingots2:
set %amt ( %maxweight - #weight - 10 ) * 10
menu delete status
menu text status 50 5 Getting more ingots ( , %amt , ).
gosub GetMoreResources %resource . %currentitem %amt
if ! #result
{
gosub NeedMore ingots
menu delete status
menu text status 50 5 Getting more ingots.
set %return #false
wait %wait1
goto ingots
}
set %return #false
wait %wait1
goto ingots
}
set %ingotcount %result
if ! %return
set %last_ingotcount %ingotcount
gosub displayIngotCount
return %return
sub GetMoreResources
; sub to get more resources, %1 resource, %2 amount
set %resourcetype %1
set %resourceamt %2
if %resourceamt < 1
set %resourceamt 1
gosub ClearMenuGump
gosub statusbarup
GMR1:
finditem %resourcetype C
if #findkind <> -1
{
set %findstack #findstack
set %findid #findid
if #findbagid = %backpackid
{
ignoreitem #findid backpack
goto GMR1
}
if ( #findtype in %ironingots && #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 || #LLIFTEDKIND = 1
{
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
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
ignoreitem reset backpack
set %retrycount 11
return #true
}
gosub GetPaperDollXY
menu delete pdwarning
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
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
MTR1:
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 || #LLIFTEDKIND = 1
{
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 FindSkillTool
FSK1:
gosub CountTinkerKits #true
if #result <> 0
{
set %SkillToolID %tinkertoolsid
return
}
gosub GetMoreSkillTools
goto FSK1
return ; not needed
sub UseSkillTool
set #lobjectid %SkillToolID
event macro 17 0
wait %wait1
return
sub MakeFirstItem
; %1 = category , %2 = selection
set %gumpx #contposx
set %gumpy #contposy
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 %shortwait
if #contname <> generic_gump
{
set %mfi %mfi + 1
if %mfi > 15
return #false
goto MFI1
}
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
return #true
sub GetMoreSkillTools
if #weight > %maxweight
gosub RemoveNonEssentials
menu delete status
menu text status 50 5 Getting more tinker tools.
set %skilltools 0
GMSK1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
gosub GetMoreResources %SkillToolTypes 1
if #result
{
set %skilltools %skilltools + 1
set %skilltoolsused %skilltoolsused + 1
gosub putGlobalVar %gvar %scriptname #charid skilltoolsused
menu font color silver
menu font size 8
menu delete skilltoolsused
menu text skilltoolsused 75 %skilltoolx %skilltoolsused
menu font size 9
menu font color lime
ignoreitem %SkillToolID 1
if %skilltools >= %maxskilltools
{
ignoreitem reset 1
set %stat_thisgain1 %stat_thisgain1 + ( %skilltools * 3 )
set %stat_totals1 %stat_totals1 + ( %skilltools * 3 )
gosub putGlobalVar %gvar %scriptname #charid stat_totals1
return
}
goto GMSK1
}
if %skilltools = 0
{
gosub TinkerSkillTools
if #result > 0
{
set %skilltoolsused %skilltoolsused + #result
gosub putGlobalVar %gvar %scriptname #charid skilltoolsused
set %stat_thisgain1 %stat_thisgain1 + ( #result * 3 )
set %stat_totals1 %stat_totals1 + ( #result * 3 )
gosub putGlobalVar %gvar %scriptname #charid stat_totals1
menu font color silver
menu font size 8
menu delete skilltoolsused
menu text skilltoolsused 75 %skilltoolx %skilltoolsused
menu font size 9
menu font color lime
ignoreitem reset 1
gosub countresource %ironingots #false
set %ingotcount #result
set %last_ingotcount %ingotcount
gosub displayIngotCount
set %firstattempt #true
set %retrycount 11
return
}
gosub NeedMore Tinker_Tools
finditem %SkillToolTypes C_ , %backpackid
if #findkind <> -1
{
ignoreitem reset 1
return
}
goto GMSK1
}
ignoreitem reset 1
return
sub TinkerSkillTools
if %tinkerskill < %tinkerskillreq
return 0
set %SkillToolsmade 0
set %makelasttinker #false
set #lobjectid n/a
for %i 1 %maxSkillTools
{
TSK1:
if #menubutton = pause
gosub pause
; gosub CountTinkerKits #true
; if ( #result = 0 ) || ( #result = 1 && %min_uses < 10 )
; {
; menu delete status
; menu text status 50 5 Getting more Tinker tools.
; gosub GetMoreResources %tinkertools 1
; if ! #result
; {
; set #lobjectid n/a
; set %makelasttinker #false
; gosub MakeTinkerTools
; if ! #result
; return %SkillToolsmade
; }
; goto TSK1
; }
gosub MakeSkillTool
if #result = -1 || #result = 0
return %SkillToolsmade
; if #result = 0
; goto TSK1
set %i #result
set %SkillToolsmade %i
}
return %SkillToolsmade
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
{
gosub RemoveNonEssentials
set %amt ( %maxweight - #weight - 15 ) * 10
menu delete status
menu text status 50 5 Getting more ingots ( , %amt , ).
gosub GetMoreResources %ironingots %amt
if ! #result
return #false
gosub countresource %ironingots #false
set %ingotcount #result
set %last_ingotcount %ingotcount
goto MTT1
}
menu delete status
menu text status 50 5 Tinkering Tinker's tools.
gosub CountTinkerKits #true
finditem %tinkertoolsid
if #findkind = -1
return #false
set %makelasttinker #false
set #lobjectid %tinkertoolsid
event macro 17 0
wait %longwait
gosub makefirstitem 3 4
wait %longwait
gosub CountTinkerKits #false
if #result < 2
goto MTT1
set %firstattempt #true
set %retrycount 11
return #true
sub MakeSkillTool
set %temp %SkillToolsmade + 1
MST1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
menu delete status
menu text status 50 5 Tinkering Tinker tool ( , %temp , / , %maxSkillTools , ).
finditem %ironingots C_ , %backpackid
set %backpack_ingots #findstack
if #findkind = -1 || #findstack < 2
{
gosub RemoveNonEssentials
set %amt ( %maxweight - #weight - 15 ) * 10
menu delete status
menu text status 50 5 Getting more ingots ( , %amt , ).
gosub GetMoreResources %ironingots %amt
if ! #result
return -1
gosub countresource %ironingots #false
set %ingotcount #result
set %last_ingotcount %ingotcount
goto MST1
}
set %mst2 0
MST2:
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 n/a
goto MST2
}
gosub CountTinkerKits #true
finditem %tinkertoolsid C_ , %backpackid
if #findkind = -1
return 0
set %tinkertoolsid #findid
if #lobjectid <> %tinkertoolsid
{
set #lobjectid %tinkertoolsid
event macro 17 0
wait %wait1
}
set %MST3 0
MST3:
if #contname <> generic_gump
{
if %mst3 > 10
{
set %makelasttinker #false
set #lobjectid n/a
goto MST2
}
set %mst3 %mst3 + 1
wait %gumpwait
goto MST3
}
wait %gumpwait
if %makelasttinker
{
set %gumpx #contposx
set %gumpy #contposy
set %clickx %gumpx + %makelast_clickx
set %clicky %gumpy + %makelast_clicky
click %clickx %clicky f
goto tinkeringdone
}
gosub makefirstitem 3 4
set %makelasttinker #true
tinkeringdone:
wait %wait1 %wait1
finditem %SkillToolTypes C_ , %backpackID
return #findcnt
sub GetUsesRemaining
if %NoEventProperty
return 50
; %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 %checkall %1
set %ctk 0
set %min_uses 999
CTK1:
finditem %tinkertools C_ , %backpackid
if #findcnt > 1 && ! %checkall
return #findcnt
if #findkind <> -1
{
set %findid #findid
event property %findid
wait %shortwait
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
set %1 %1
sound
gosub RemoveNonEssentials
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 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 6
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 %shortwait
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
sound
menu delete status
menu text status 50 5 Tinker Gain!
gosub GainStats
wait %shortwait
menu window color black
gosub NewItemcheck
gosub gmcheck
return
sub NewItemcheck
gosub SelectItemToMake
set %newitem #result
if %currentitem <> %newitem
{
gosub skillchangedisplay
set %currentitem %newitem
gosub RemoveNonEssentials
gosub displayStatDesc
set %firstattempt #true
set %retrycount 11
}
return
sub GMCheck
if ( ( %skillcap = #skill ) || ( %maxskillcap <= #skill ) ) && ! %debug
{
sound
gosub ClearMenuGump
sound
set %cleanup #true
gosub MaterialsToResource %tinkertools tinkertools
gosub MaterialsToResource %ironingots ingots
gosub RemoveNonEssentials
sound
menu font transparent #true
set #menubutton N/A
set %lastehours N/A
set %lastemins N/A
set %lastesecs N/A
set %firstmenu #true
gosub initmenu
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!
}
menu font transparent #true
menu font color lime
menu delete making
menu text making 107 35 %desc30
sound
menu font style b
menu font align right
menu delete g1
menu text g1 130 290 #skill
menu font align left
menu font style n
menu font bgcolor black
menu font color lime
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.
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 %hideme #false
return #false
}
menu delete status
menu text status 50 5 Hidden, waiting 12 seconds.
wait 12s
return #true
sub initmenu
if %initializing
gosub fadeout
menu clear
;menu font transparent #true
set %menusizey 340
menu window size 300 %menusizey
menu window title CEOTurboTinker %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 294 1 3 7 5 blue 3 white
menu shape myshape1 3 218 294 1 3 7 5 blue 3 white
menu shape myshape1 3 308 294 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 85 55 Resource Statistics
menu text h1 85 220 Tinker Statistics
menu font size 9
menu font color fuchsia
menu font style b
menu font size 8
menu text h1 115 75 This
menu text h1 170 75 Last
menu font style bu
menu text h1 115 90 Gain
menu text h1 170 90 Gain
menu text h1 235 90 Total
menu font style n
menu font size 8
menu font color yellow
menu text h1 5 105 Attempts
menu font color white
menu text h1 100 105 :
gosub displayStatDesc
menu font size 8
menu font color lime
menu shape myshape1 3 120 94 1 3 7 5 yellow 3 white
set %skilltoolx %x + 20
menu font color silver
menu text h1 10 %skilltoolx Tinker Tools:
menu delete skilltoolsused
menu text skilltoolsused 75 %skilltoolx %skilltoolsused
menu font size 9
menu font color blue
menu font style b
menu text h1 5 245 Last gain at:
menu font size 8
menu font color fuchsia
menu font align right
menu text h1 130 260 Total
menu text h1 190 260 Current
menu text h1 250 260 Gain
menu font style bu
menu text h2 130 275 Skill
menu text h2 190 275 Gains
menu text h2 250 275 Rate
menu font style b
menu font align left
menu font color red
menu font size 9
menu text h3 35 290 Tinkering
menu font color lime
menu font style n
if %firstmenu
gosub GainStats
menu font align left
gosub RedrawResourceStats
gosub DisplayElapsedTime
menu font align right
menu font align left
menu font color white
menu font style u
menu text h1 5 260 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 275 %skillcap
else
menu text skillcap 2 275 %skillcap , ( , %maxskillcap , )
menu font color lime
menu text making 107 35 %desc . %currentitem
menu font bgcolor teal
menu font color black
menu button hide 5 315 60 20 Hide
menu button pause 120 315 60 20 Pause
menu button InitialSetup 235 315 60 20 Setup
menu button resetstats 255 196 40 19 Reset
menu button SkillChart 275 223 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
set %firstmenu #false
menu font bgcolor black
menu font color lime
menu font style n
;halt
return
sub calctotalcosts
menu font color yellow
set %tcosts 0
for %i 1 %totalstats
{
set %tcosts %tcosts + ( %stat_totals . %i * %stat_cost . %i )
}
menu delete tcost
menu text tcost 55 85 %tcosts
menu font color lime
return
sub ResetStats
set #menubutton N/A
Display YesNo Are you sure you want to erase all statistics and start over?
if #dispres = no
return #false
set %_totaletime 0
set %startetime 0
gosub putGlobalVar %gvar %scriptname #charid totaletime
set %skilltoolsused 0
gosub putGlobalVar %gvar %scriptname #charid skilltoolsused
for %i 0 %totalstats
{
set %stat_thisgain . %i 0
set %stat_lastgain . %i 0
set %stat_totals . %i 0
gosub putGlobalVar %gvar %scriptname #charid stat_totals , %i
}
set %startskill #skill
gosub putGlobalVar %gvar %scriptname #charid _startskill
set #menubutton N/A
set %lastehours N/A
set %lastemins N/A
set %lastesecs N/A
set %firstmenu #true
gosub initmenu
return #true
sub displayStatDesc
menu font size 8
for %i 1 %totalstats
{
menu font color red
if %i = 1
menu font color silver
if %i = ( %currentitem + 1 )
menu font color lime
set %x 105 + ( %i * 15 )
menu delete %stat_desc . %i
menu text %stat_desc . %i 5 %x %stat_desc . %i
menu font color lime
menu text h1 100 %x :
}
menu font color lime
menu font size 9
return
sub floatgain
set #lpc 10
menu delete pause
menu delete hide
menu delete InitialSetup
menu delete resetstats
menu delete SkillChart
set %setupx #clixres / 2 - ( 600 / 2 )
set %setupy #cliyres / 2 - ( 340 / 2 )
menu window size 600 340
menu Shape greybox 300 0 300 340 3 7 2 gray 7 black
menu font style n
menu font bgcolor teal
menu font color black
menu button closed 130 315 60 20 Exit
menu font color lime
set #menubutton N/A
gosub begtext 305
menu font size 25
menu font bgcolor black
set %wincount 0
set %buttoncount 0
menu show %setupx %setupy
gm1:
set %x #random % 590
set %y #random % 295
set %c1 #random % 255
set %c2 #random % 255
set %c3 #random % 255
menu font color %c1 , %c2 , %c3
set %wincount %wincount + 1
if %wincount > 2
{
set %c1 #random % 255
set %c2 #random % 255
set %c3 #random % 255
menu window color %c1 , %c2 , %c3
set %wincount 0
set %buttoncount %buttoncount + 1
menu font size 9
set %c1 #random % 255
set %c2 #random % 255
set %c3 #random % 255
menu font bgcolor %c1 , %c2 , %c3
menu font color white
if %buttoncount = 1
menu button closed 130 315 60 20 Exit
if %buttoncount = 2
{
set %buttoncount 0
menu button easyuo 455 225 90 20 Rate it now!
}
menu font bgcolor black
}
set %c1 #random % 30 + 10
menu font size %c1
menu delete gm
menu font transparent #true
menu text gm %x %y #skill
wait 5
if #menubutton = closed
{
if %debug
halt
gosub paypalpopup
terminate euo
}
if #menubutton = easyuo
gosub runbrowser
goto gm1
sub BegText
menu font color red
menu font bgcolor black
menu font style b
menu font size 15
menu text h1 377 5 Congratulations!
menu font size 9
menu font style n
menu font color lime
if %maxskillcap <> N/A
menu text h1 %1 30 You've trained Tinkering from %startskill to %maxskillcap , ! , ! , !
else
menu text h1 %1 30 You've trained Tinkering from %startskill to #skillcap , ! , ! , !
menu font style i
menu font color white
menu text h1 %1 50 Now that CEOTurboTinker has done its job can
menu text h1 %1 65 I ask a small favor of you?
menu font style n
menu font color yellow
menu text h1 %1 90 I spent several hours of my time creating this
menu text h1 %1 105 script. Can you please spend a few minutes and
menu text h1 %1 120 visit the EasyUO website and drop me a message?
menu text h1 %1 135 You may need to register, but it'll only take a few
menu text h1 %1 150 moments.
menu text h1 %1 170 I'd also appreciate it if you could post your stats
menu text h1 %1 185 and rate the script. Doing so will bring me much
menu text h1 %1 200 joy and will encourage more scripts like this one. :-)
menu font size 12
menu font color white
menu font style b
menu text h1 360 225 Thank You!
menu font style n
menu font size 9
menu font bgcolor teal
menu font color black
if exec in #opts
menu button easyuo 455 225 90 20 Rate it now!
menu font bgcolor black
menu font color gray
menu font size 8
menu text h1 %1 250 This script is copyright by the author under the terms of
menu text h1 %1 265 the CEO Public License (CPL) at:
menu font color white
menu text h1 %1 285 http://www.easyuo.com/forum/viewtopic.php?p=3585
menu font color gray
menu text h1 %1 305 Any questions? For more information or to rate this script
menu text h1 %1 320 please visit:
menu font color white
menu text h1 370 320 http://www.easyuo.com/forum/viewtopic.php?t= , %euotopic
menu font color gray
return
;This script is copyright by CEO under the CEO Public License (CPL) at: http://www.easyuo.com/forum/viewtopic.php?p=3585
sub runbrowser
execute http://www.easyuo.com/forum/viewtopic.php?t= , %euotopic
set #menubutton N/A
return
sub DisplayElapsedTime
set %elaspedtime #scnt - %scriptstart
set %totaletime %startetime + %elaspedtime
set %_totaletime %totaletime
gosub putGlobalVar %gvar %scriptname #charid _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 %tinkeringgain #skill - %startskill
set %time X , #time
set %time1 #scnt
set %rate %tinkeringgain * 3600 / ( #scnt - %scriptstart2 )
menu font align right
menu text g1 130 290 #skill
menu text g2 190 290 %tinkeringgain
menu text g3 250 290 %rate
for %i 0 %totalstats
{
set %stat_lastgain . %i %stat_thisgain . %i
set %stat_thisgain . %i 0
set %x 105 + ( %i * 15 )
menu delete stat_thisgain , %i
menu text stat_thisgain , %i 137 %x %stat_thisgain . %i
menu delete stat_lastgain , %i
menu text stat_lastgain , %i 192 %x %stat_lastgain . %i
}
menu font align left
if %startskill <> %currentskill
{
gosub FormatTime %time
menu delete time
menu text time 77 245 #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 245 ( , %eghours , h , #spc , %egmins , m , #spc , %egsecs , s , #spc , used)
set %gaintime %time1
}
return
sub DisplayResourceStats
menu font align right
set %stat_thisgain0 %stat_thisgain0 + 1
set %stat_totals0 %stat_totals0 + 1
gosub putGlobalVar %gvar %scriptname #charid stat_totals0
for %index 0 %totalstats
{
if %lastdisplay . %index <> %stat_totals . %index
{
set %lastdisplay . %index %stat_totals . %index
set %x 105 + ( %index * 15 )
menu delete stat_thisgain , %index
menu text stat_thisgain , %index 137 %x %stat_thisgain . %index
menu delete stat_totals , %index
menu text stat_totals , %index 260 %x %stat_totals . %index
}
}
gosub calctotalcosts
menu font align left
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
PauseStart:
sound
menu font transparent #true
menu font size 30
menu font color red
menu font style b
menu text ptext 85 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 120 315 60 20 Resume
menu delete hide
menu delete InitialSetup
menu delete resetstats
set #menubutton N/A
set %elaspedtime #scnt - %scriptstart
set %totaletime %startetime + %elaspedtime
set %_totaletime %totaletime
gosub putGlobalVar %gvar %scriptname #charid totaletime
Pause1:
gosub DisconnectCheck
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
if G in #charstatus
set %returnbywarmode #true
if %returnbywarmode && G notin #charstatus
set #menubutton resume
wait %shortwait
if #menubutton = N/A
goto Pause1
if #menubutton = skillchart
{
gosub skillchart
goto pauseStart
}
menu delete ptext
set %startetime %totaletime
set %scriptstart #scnt
if #menubutton = closed
gosub closed
menu delete resume
menu font bgcolor teal
menu font color black
menu button pause 120 315 60 20 Pause
menu button hide 5 315 60 20 Hide
menu button InitialSetup 235 315 60 20 Setup
menu button resetstats 255 196 40 19 Reset
set #menubutton N/A
set %retrycount 11
menu font bgcolor black
menu font color lime
return
sub closed
set %elaspedtime #scnt - %scriptstart
set %totaletime %startetime + %elaspedtime
set %_totaletime %totaletime
gosub putGlobalVar %gvar %scriptname #charid _totaletime
if %exitonclose && ! %debug
{
gosub paypalpopup
terminate euo
}
halt
set #menubutton N/A
return
sub AutoSetup
gosub gmcheck
if %hideme = N/A && %hideskill > %hideskillreq
set %hideme #true
if %hideme = N/A
set %hideme #false
menu show
gosub GetBackPackID
menu show
gosub GetPaperDollXY
menu show
menu delete pdwarning
gosub calcmaxweight
if %bankfound = N/A
{
gosub checkforbank2
set %bankfound #result
}
if %atbank || %bankfound
gosub CheckForBank
menu show
if ! #result
gosub GetSecureContainer
gosub GetResourceBag
menu show
return
sub calcmaxweight
set %maxweight #maxweight
if #maxweight > 400
set %maxweight 400
set %maxweight %maxweight - ( %maxSkillTools * 2 ) - 5
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 %shortwait
if bank in #property || mint in #property || Atri-Aur 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 || fortune 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
gosub resetjournal
CFB1:
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
}
return #false
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 %longw