;----------------------------------------------------------- ; Script Name: CEOTurboSmithy ; Author: CEO ; Version: 2.0b ; Client Tested with: 4.0.10b ; EUO version tested with: 1_42.00A5 ; Shard OSI / FS: OSI ; Revision Date: 05/24/05 ; Public Release: 042504 ; Purpose: Trains Smithy to 120. ;------------------------------------------------------------- ; ; Instructions: ; ; 1. Start CEOTurboSmithy ; 2. Follow the step-by-step setup. ; 3. Identify Secure (or it'll use your bankbox automatically) ; 4. Identify Resource container. This bag 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.0b set #lpc 1000 set %scriptname CEOTurboSmithy set %skillname blacksmithy set %scriptstart #scnt set %scriptstart2 %scriptstart set %gaintime %scriptstart set %versioncheck #true set %initializing #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 most ; of the variables here. ;============================================= ; Set to #true to leave EUO window opened and ignore skillcap. 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 ; 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 ; Minimum skill required before attempting to tinker ; In tenths, defaults to 35.0, which is min skill required to make tongs. set %tinkerskillreq 350 ; 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 ;Number of times to trying recalling if failure set %recallretries 3 ; 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 ;Set this for the level of transparency you want for the main status display. set %menutransparency 87 ; Close EasyUO when the menu window is closed. set %exitonclose #true ;set this to something else if you wish to use something other then iron to train. ;1=iron, 2=dull copper, 3=shadow, 4=copper, 5=bronze, 6=gold, 7=agapite, 8=verite, 9=valorite set %ingotselect 1 ; For RunUO and WorldSave avoidance set %_worldsavejournalindex #jindex ;================== ; BEGIN PACKY SETUP ;================== ;Please Note: This script does just about everything for you automatically. I decided to add ;packy support for rails/recalls, but force you to learn a little bit of EasyUO in order to use it. ;That is only fair, given how many of my TurboScripts do everything for you. So consider this ;a learning challenge. DO NOT ask in the TurboSmithy thread questions on how to get the ;packy ID or problems with it. I've tested this with a packy and it's solid. Any problems you ;have will be 99% related to improper IDs. Figure it out, find them for yourself, and learn ;a little bit of EasyUO in the process. There are plenty of resources on the EasyUO board ;that'll show you how to get IDs of animals and backpacks. Good luck! ; ;set to true if you're using a rail or recall and you have a packy/pet you want to stay with you. ;For recall your packy needs to be bonded, you should know this though right? set %packy #false ;set this to the ID of your pack animal. set %packyanimalid n/a ;set this to the ID of the backpack of your packy, not the packy, the BACKPACK. If you can't get this ;one you really shouldn't be foolin' around here. This is probably the harder of the two to get. ;Hint: Container Info and #contid set %packybackpackid n/a ;X/Y coords to put the packy's backpack. 0/0 should be fine, but if not move it here. set %packybackpackx 0 set %packybackpacky 0 ;Maximum number of ingots to put in packy set %packymaxingots 15000 ;================= ; END PACKY SETUP ;================= ;============================================= ; NOTHING BELOW THIS LINE SHOULD NEED CHANGING. ; DO SO AT YOUR OWN RISK! ;============================================= set %moongates JEF_OTF set %userails #false set %beepongain #true set %resourcebagid n/a set %gvar %scriptname set %rvar CEOTurboSmithyRail 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 userails NOLOCK gosub getGlobalVar %gvar %scriptname #charid userecall NOLOCK gosub getGlobalVar %gvar %scriptname #charid bankrune NOLOCK gosub getGlobalVar %gvar %scriptname #charid forgerune NOLOCK ;============================================= 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 } gosub validateMiningSkill ;====================================================== ;setup ingot color table ; set %ingotcolor1 0 set %ingotcost1 10 set %ingotcolor2 2419 set %ingotcost2 80 set %ingotcolor3 2406 set %ingotcost3 100 set %ingotcolor4 2413 set %ingotcost4 120 set %ingotcolor5 2418 set %ingotcost5 140 set %ingotcolor6 2213 set %ingotcost6 180 set %ingotcolor7 2425 set %ingotcost7 160 set %ingotcolor8 2207 set %ingotcost8 180 set %ingotcolor9 2219 set %ingotcost9 200 ;====================================================== set %atbank #false set %atforge #true set %euoTopic 6137 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 %tinkertools GTL_KTL_JTL set %makelasttinker #false set %ironingots ENK set %ironselected #false set %tinkerironselected #false set %SkillToolTypes OBG_TBG set %smithyTools TLH_FBG_GBG_OLH set %scorptypes BIG set %runetypes QWL set %cleanup #false set %railloaded #false set %InRemoveNonEssentials #false set %bpmsgon #true set %dimcolor green gosub CheckEventProperty if ! #result { set %runuo #true 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 ;===================== Get Training Method set %train1 Stratics set %train2 UOPower1 set %train3 UOPower2 set %train4 UOPower3 set %train5 UOPower4 set %train6 CEO1 set %train7 Warlocke1 set %train8 Warlocke2 set %train9 Warlocke3 set %train10 UraThayne set %train11 funkyff set %train12 RunUO1 set %train13 RunUO2 set %train14 RunUO3 set %totalTrainingMethods 14 set %ud1 %totalTrainingMethods + 1 set %ud2 %totalTrainingMethods + 2 set %train . %ud1 smithy1.txt set %train . %ud2 smithy2.txt gosub getGlobalVar %gvar %scriptname #charid train_method NOLOCK if ! #result { set %train_method 6 gosub putGlobalVar %gvar %scriptname #charid train_method } ;===================== set %default_bankfound %bankfound if %packy { if %packyanimalid = n/a || %packybackpackid = n/a set %packy #false } gosub statusbarup gosub SetUpSkills menu font transparent #false ;gosub skillchart ;halt set #lpc 200 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 255 5 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 DetermineBankorForge gosub gmcheck SetupCont1: if %runuo gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120 gosub ignoreColoredIngots if %atbank gosub bankrun gosub CheckForResources gosub CountTinkerKits #true set %firstattempt #true set %retrycount 11 gosub CyberPopeIdiotProof MainLoop: if %runuo gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120 gosub DisconnectCheck 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 if %retrycount = 5 gosub bringGumpForward menu delete status menu text status 50 5 Waiting for Blacksmithy 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 } gosub recycle %currentitem if #result goto MainLoop3 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 MainLoop3: gosub DisplayResourceStats 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: gosub countresource %resource . %currentitem #false set %_result #result set %ingotcount %_result gosub recordIngots if %_result < %needed . %currentitem { 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: gosub statusbarup 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 { if %userails && %atforge { gosub bankrun goto ingots } gosub NeedMore ingots menu delete status menu text status 50 5 Getting more ingots. gosub countresource %resource . %currentitem #false set %ingotcount #result set %last_ingotcount %ingotcount gosub displayIngotCount set %return #false wait %wait1 goto ingots } gosub countresource %resource . %currentitem #false set %ingotcount #result set %last_ingotcount %ingotcount gosub displayIngotCount set %return #false wait %wait1 gosub CountPackyIngots goto ingots } if ! %return set %last_ingotcount %ingotcount if %userails && %atbank gosub BankToForge return %return sub GetMoreResources ; sub to get more resources, %1 resource, %2 amount , If present us %3, %4 for drop click coordso drop. set %resourcetype %1 set %resourceamt %2 set %resource_clickother #false if %0 > 3 { set %resource_clickother #true set %resource_clickx %3 set %resource_clicky %4 } if %resourceamt < 1 set %resourceamt 1 gosub ClearMenuGump GMR1: if %runuo gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120 finditem %resourcetype C if #findkind <> -1 { set %_findstack #findstack set %_findid #findid if #findbagid = %backpackid || ( %resource_clickother && %packy && #findbagid = %packybackpackid ) { ignoreitem #findid backpack goto GMR1 } if ( #findtype in %ironingots && #findcol <> %ingotcolor . %ingotselect ) { 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 GMR1B: if %_findstack > 1 msg %resourceamt $ wait %wait2 if #contname = stack_gump goto GMR1B set %gmr2 0 GMR2: if %resource_clickother { click %resource_clickx %resource_clicky p goto GMR3 } click %backpackx %backpacky p GMR3: 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 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 set %_MTRbackpackid %backpackid if %0 > 2 set %_MTRbackpackid %3 gosub ClearMenuGump MTR1: if %runuo gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120 finditem %_MTRType C_ , %_MTRbackpackid 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: finditem %skilltooltypes C_ , %backpackid if #findkind <> -1 { set %SkillToolID #findid return } gosub GetMoreSkillTools if %atbank gosub MaterialsToResource %scorptypes wrong_tools if %userails && %atbank gosub BankToForge 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 set %clickx %gumpx + 27 set %clicky %gumpy + 50 + ( %1 * 20 ) set %MF1_G 0 MF1_GumpWait: if #contname <> generic_gump { set %MF1_G %MF1_G + 1 if %MF1_G > 15 return #false wait %gumpwait goto MF1_GumpWait } click %clickx %clicky if %2 = 99 return #true if %slowconnection wait %longwait wait %wait2 %wait1 wait %wait1 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 if %slowconnection wait %longwait wait %wait1 return #true sub GetMoreSkillTools gosub statusbarup if #weight > %maxweight gosub RemoveNonEssentials menu delete status menu text status 50 5 Getting more tongs. set %skilltools 0 GMSK1: gosub GetMoreResources %SkillToolTypes 1 if #result { set %skilltools %skilltools + 1 set %skilltoolsused %skilltoolsused + 1 gosub putGlobalVar %gvar %scriptname #charid skilltoolsused set %stat_thisgain1 %stat_thisgain1 + 1 set %stat_totals_ingots %stat_totals_ingots + 1 gosub putGlobalVar %gvar %scriptname #charid stat_totals_ingots menu font color silver menu font size 8 menu delete skilltoolsused menu text skilltoolsused %skilltooly %skilltoolx %skilltoolsused menu font size 9 menu font color lime ignoreitem %SkillToolID 1 if %skilltools >= %maxskilltools { ignoreitem reset 1 return } goto GMSK1 } if %skilltools = 0 { gosub TinkerSkillTools if #result > 0 { set %skilltoolsused %skilltoolsused + #result gosub putGlobalVar %gvar %scriptname #charid skilltoolsused gosub ClearMenuGump menu font color silver menu font size 8 menu delete skilltoolsused menu text skilltoolsused %skilltooly %skilltoolx %skilltoolsused menu font size 9 menu font color lime ignoreitem reset 1 gosub countresource %ironingots #false set %ingotcount #result gosub recordIngots ;set %firstattempt #true set %retrycount 11 wait %wait1 return } gosub ClearMenuGump if %userails && %atforge { gosub bankrun finditem %SkillToolTypes C_ , %backpackid if #findkind <> -1 { ignoreitem reset 1 return } } gosub NeedMore tongs 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 xxxx for %i 1 %maxSkillTools { TSK1: if %runuo gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120 if #menubutton = pause gosub pause gosub CountTinkerKits #true if ( #result = 0 ) || ( #result = 1 && %min_uses < 10 ) || ( %NoEventProperty && #result = 1 ) { menu delete status menu text status 50 5 Getting more Tinker tools. gosub GetMoreResources %tinkertools 1 if ! #result { set #lobjectid xxxx set %makelasttinker #false gosub MakeTinkerTools if ! #result return %SkillToolsmade } goto TSK1 } gosub MakeSkillTool set %_result #result gosub countresource %ironingots #false set %ingotcount #result gosub recordIngots set #result %_result if #result = -1 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 { set %ingotcount #findstack gosub recordIngots gosub statusbarup set %ingotamt ( %maxweight - #weight - 15 ) * 10 menu delete status menu text status 50 5 Getting more ingots ( , %ingotamt , ). gosub GetMoreResources %ironingots %ingotamt if ! #result return #false gosub countresource %ironingots #false set %ingotcount #result gosub displayIngotCount set %last_ingotcount %ingotcount gosub CountPackyIngots goto MTT1 } menu delete status menu text status 50 5 Tinkering Tinker tools. gosub CountTinkerKits #true finditem %tinkertoolsid if #findkind = -1 return #false set %makelasttinker #false set #lobjectid %tinkertoolsid event macro 17 0 wait %longwait if ! %tinkerironselected gosub tinkerselectIron 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 %skillname tool ( , %_temp , / , %maxSkillTools , ). finditem %ironingots C_ , %backpackid set %backpack_ingots #findstack if #findkind = -1 || #findstack < 2 { set %ingotcount #findstack gosub recordIngots gosub statusbarup set %ingotamt ( %maxweight - #weight - 15 ) * 10 menu delete status menu text status 50 5 Getting more ingots ( , %ingotamt , ). gosub GetMoreResources %ironingots %ingotamt if ! #result return -1 gosub countresource %ironingots #false set %ingotcount #result gosub displayIngotCount set %last_ingotcount %ingotcount gosub CountPackyIngots 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 xxxx 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 xxxx goto MST2 } set %mst3 %mst3 + 1 wait %gumpwait goto MST3 } set %gumpx #contposx set %gumpy #contposy wait %gumpwait if %makelasttinker { set %clickx %gumpx + %makelast_clickx set %clicky %gumpy + %makelast_clicky click %clickx %clicky f goto tinkeringdone } if ! %tinkerironselected gosub tinkerselectIron wait %wait1 %wait1 gosub MakeFirstItem 3 98 wait %longwait %wait2 gosub MakeFirstItem 99 3 wait %longwait finditem %SkillToolTypes C_ , %backpackID if #findkind <> -1 { set %_temp 1 set %makelasttinker #true } menu delete status menu text status 50 5 Tinkering %skillname tool ( , %_temp , / , %maxSkillTools , ). 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 set %adjusttimer 0 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 if %bpmsgon { menu delete status menu text status 50 5 Getting Backpack ID } 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 MUST be inside your Secure bag or Bank box.$ +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 ;bring up a target event macro 13 3 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 font size 30 menu font style b menu font bgcolor silver menu font color black set %y %menusizey / 2 - 30 menu text gtext 55 %y Skill Gain! if %beepongain sound menu font size 9 menu font style n menu font color lime menu font bgcolor black menu delete status menu text status 50 5 Blacksmithy Gain! wait %wait1 menu delete gtext gosub GainStats gosub NewItemcheck gosub gmcheck return sub NewItemcheck gosub SelectItemToMake set %newitem #result if %currentitem <> %newitem { gosub skillchangedisplay gosub RemoveNonEssentials set %currentitem %newitem set %maxingots ( 3 * %needed . %currentitem ) gosub RedisplayResourceStats #true gosub displayStatDesc set %firstattempt #true set %retrycount 11 } return sub GMCheck if ( ( %skillcap = #skill ) || ( %maxskillcap <= #skill ) ) && ! %debug { wait %wait1 sound gosub RemoveNonEssentials gosub ClearMenuGump set %cleanup #true if %userails { if %atforge gosub ForgeToBank if %default_bankfound = n/a { gosub CheckforBank2 set %bankfound #result } set %adjusttimer 0 gosub CheckForBank if ! #result goto gmcheck1 gosub GetResourceBag } gosub MaterialsToResource %SkillToolTypes tongs gosub MaterialsToResource %tinkertools tinkertools gosub MaterialsToResource %ironingots ingots gosub MaterialsToResource %scorptypes wrong_tools if %packy { gosub openPackyBackPack gosub MaterialsToResource %SkillToolTypes tongs %packybackpackid gosub MaterialsToResource %tinkertools tinkertools %packybackpackid gosub MaterialsToResource %ironingots ingots %packybackpackid } sound gmcheck1: 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 <> n/a ) && ( %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 set %y %startbsstats + 70 menu delete g1 menu text g1 130 %y #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 set %startresourcestats 60 set %startbsstats 140 + ( %totalstats * 15 ) set %endbsstats %startbsstats + 85 set %menusizey %endbsstats + 30 menu window size 300 %menusizey menu window title CEOTurboSmithy %version menu window transparent 0 menu show %menu_windowx %menu_windowy menu window color black menu font bgcolor BLACK menu font color red 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 %startbsstats 294 1 3 7 5 blue 3 white menu shape myshape1 3 %endbsstats 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 set %y %startbsstats + 3 menu text h1 85 %y Blacksmithy 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 Tongs used: menu delete skilltoolsused set %skilltooly 72 menu text skilltoolsused %skilltooly %skilltoolx %skilltoolsused menu text h1 110 %skilltoolx Method: %train . %train_method menu font size 9 menu font color blue menu font style b set %y %startbsstats + 25 menu text h1 5 %y Last gain at: menu font size 8 menu font color fuchsia menu font align right set %y %y + 15 menu text h1 130 %y Total menu text h1 190 %y Current menu text h1 250 %y Gain set %y %y + 15 menu font style bu menu text h2 130 %y Skill menu text h2 190 %y Gains menu text h2 250 %y Rate menu font style b menu font align left menu font color red menu font size 9 set %y %startbsstats + 70 menu text h3 25 %y Blacksmithy 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 set %y %startbsstats + 40 menu text h1 5 %y 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 set %y %startbsstats + 55 if %maxskillcap = N/A menu text skillcap 13 %y %skillcap else menu text skillcap 2 %y %skillcap , ( , %maxskillcap , ) menu font color lime menu text making 107 35 %desc . %currentitem set %firstmenu #false menu font bgcolor teal menu font color black set %y %endbsstats + 5 menu button hide 5 %y 60 20 Hide menu button pause 120 %y 60 20 Pause menu button InitialSetup 235 %y 60 20 Setup menu button resetstats 255 %startresourcestats 40 19 Reset set %y %startbsstats - 18 menu button SkillChart 226 %y 70 16 Skill Chart menu font bgcolor black menu font color lime menu font style n if %initializing { menu show %menu_windowx %menu_windowy wait 1 gosub fadein set %initializing #false } menu window transparent %menutransparency menu show %menu_windowx %menu_windowy ;halt if ! %debug menu hideeuo return sub calctotalcosts menu font color yellow set %tcosts 0 ; ingots only set %tcosts %tcosts + ( %stat_totals_ingots * %stat_cost1 ) 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 menu font size 30 menu font style b menu font bgcolor silver menu font color black set %y %menusizey / 2 - 30 set %x 300 / 2 - 100 menu text gtext %x %y Please Wait sound menu font size 9 menu font style n menu font bgcolor black menu font color lime 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 %temp stat_totals_ , %stat_desc . %i set % . %temp 0 gosub delGlobalVar %gvar %scriptname #charid %temp } set %_startskill #skill gosub putGlobalVar %gvar %scriptname #charid _startskill ; now delete all the stats gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_war_axes gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_bascinets gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_broadswords gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_warforks gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_pikes gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_ring_gloves gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_mauls gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_longswords gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_scimitars gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_axes gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_spears gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_plate_arms gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_plate_legs gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_cutlasses gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_katanas gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_daggers gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_maces gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_krysses gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_Short_Spears gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_Plate_gorgets gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_Plate_gloves gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_Plate_Helms gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_plate_tunics gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_CHAOS_SHIELDS gosub CreateStatTable 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 %dimcolor if %i = 1 menu font color silver if %stat_desc . %i = %desc . %currentitem 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 menu shape myshape1 3 120 94 1 3 7 5 yellow 3 white return sub floatgain set #lpc 10 menu delete pause menu delete hide menu delete InitialSetup menu delete resetstats menu delete SkillChart menu window transparent 100 set %setupx #clixres / 2 - ( 600 / 2 ) set %setupy #cliyres / 2 - ( %menusizey / 2 ) menu window size 600 %menusizey menu Shape greybox 300 0 300 %menusizey 3 7 2 gray 7 black menu font style n menu font bgcolor teal menu font color black set %y %endbsstats + 5 menu button closed 130 %y 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: wait 10 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 %c1 #random % 30 + 10 menu font size %c1 menu delete gm menu font transparent #true menu text gm %x %y #skill if #menubutton = closed { if %debug halt gosub PayPalPopup terminate euo halt } 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 %skillname from %_startskill to %maxskillcap , ! , ! , ! else menu text h1 %1 30 You've trained %skillname from %_startskill to #skillcap , ! , ! , ! menu font style i menu font color white menu text h1 %1 50 Now that %scriptname 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 font size 12 menu text h1 320 340 http://www.easyuo.com/t.php?t= , %euotopic menu font size 8 menu font color gray return sub runbrowser execute http://www.easyuo.com/t.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 %skillgain #skill - %startskill set %time X , #time set %time1 #scnt set %rate %skillgain * 3600 / ( #scnt - %scriptstart2 ) set %y %startbsstats + 70 menu font align right menu text g1 130 %y #skill menu text g2 190 %y %skillgain menu text g3 250 %y %rate gosub RedisplayResourceStats #false if %startskill <> %currentskill { gosub FormatTime %time menu delete time set %y %startbsstats + 25 menu text time 77 %y #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 %y ( , %eghours , h , #spc , %egmins , m , #spc , %egsecs , s , #spc , used) set %gaintime %time1 } return sub RedisplayResourceStats ;%1 #true include totals set %fulldisplay %1 menu font align right for %i 0 %totalstats { menu font color %dimcolor if %stat_desc . %i = %desc . %currentitem menu font color lime 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 140 %x %stat_thisgain . %i menu delete stat_lastgain , %i menu text stat_lastgain , %i 195 %x %stat_lastgain . %i if %fulldisplay gosub DisplayResourceStats2 %i } menu font color lime menu font align left return sub RedrawResourceStats menu font align right for %i 0 %totalstats { menu font color %dimcolor if %i = 0 menu font color yellow if %i = 1 menu font color silver if %stat_desc . %i = %desc . %currentitem menu font color lime set %x 105 + ( %i * 15 ) menu delete stat_thisgain , %i menu text stat_thisgain , %i 140 %x %stat_thisgain . %i menu delete stat_lastgain , %i menu text stat_lastgain , %i 195 %x %stat_lastgain . %i menu delete stat_totals , %i set %temp stat_totals_ , %stat_desc . %i menu text stat_totals , %i 263 %x % . %temp set %lastdisplay . %i % . temp } menu font color lime menu font align left return sub DisplayResourceStats menu font align right set %stat_thisgain0 %stat_thisgain0 + 1 set %stat_totals_attempts %stat_totals_attempts + 1 gosub putGlobalVar %gvar %scriptname #charid stat_totals_attempts if %lastdisplay0 <> %stat_totals_attempts { menu font color yellow set %lastdisplay0 %stat_totals_attempts gosub DisplayResourceStats2 0 } if %lastdisplay1 <> %stat_totals_ingots { menu font color silver set %lastdisplay0 %stat_totals_ingots gosub DisplayResourceStats2 1 } set %statindex %statindex . %currentitem set %temp stat_totals_ , %stat_desc . %statindex menu font color lime if %lastdisplay . %statindex <> % . %temp { set %lastdisplay . %statindex % . %temp gosub DisplayResourceStats2 %statindex } gosub calctotalcosts menu font align left return sub DisplayResourceStats2 set %index %1 set %temp stat_totals_ , %stat_desc . %index set %x 105 + ( %index * 15 ) menu delete stat_thisgain , %index menu text stat_thisgain , %index 140 %x %stat_thisgain . %index menu delete stat_totals , %index menu text stat_totals , %index 263 %x % . %temp 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 set %y %menusizey / 2 - 30 menu text ptext 85 %y 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 set %y %endbsstats + 5 menu button resume 120 %y 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: if %runuo gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120 gosub DisconnectCheck wait 5 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 set %y %endbsstats + 5 menu button hide 5 %y 60 20 Hide menu button pause 120 %y 60 20 Pause menu button InitialSetup 235 %y 60 20 Setup menu button resetstats 255 %startresourcestats 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 gosub ClearMenuGump if %exitonclose && ! %debug { gosub PayPalPopup terminate euo halt } halt 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 %userails && %atforge return 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 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 set %retry #true CFB1: gosub resetjournal nextcpos %bank_securex %bank_securey gosub OpenBank wait %longwait gosub FindJournalMessage Bank_Container if #result { set %atbank #true set %atforge #false 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 } if ( %userails && %userecall <> 0 ) && %retry { gosub forgetobank set %retry #false goto CFB1 } set %atbank #false set %atforge #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 de