Inscription Kasma Easyuo Olan Varmı ?? |
Ultima Online Forum -> Yardımcı Programlar |
Yazar
Mesaj
direk scripti yazmakta fayda var
Spoiler:
;-----------------------------------------------------------
; Script Name: CEOTurboInscription
; Author: CEO
; Version: 2.1b
; Client Tested with: 7.0.0.4
; EUO version tested with: 1.5_154
; Shard OSI / FS: OSI
; Revision Date: 100209
; Public Release: 061105
; Global Variables Used: *CEOTurboInscription
; Purpose: Trains Inscription from 25 to GM.
;-------------------------------------------------------------
; 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 CEOTurboInscription
; 2. Follow the step-by-step setup.
; 3. Identify Secure (or it'll use your bankbox automatically)
; 4. Identify Resource container. Your 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.1b
set #lpc 1000
set %scriptname CEOTurboInscription
set %skillname inscription
set %scriptstart #scnt
set %scriptstart2 %scriptstart
set %gaintime %scriptstart
set %versioncheck #true
set %initializing #true
menu font transparent #false
;=============================================
; 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.
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 15.0, which is min skill required to make Flecther tool's easily.
set %tinkerskillreq 150
; 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 / 75
; 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
;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 #false if whispering doesn't open the bank or your pet doesn't hear you.
; Probably only freeshard required.
set %whisperon #true
;Change this to #false if you're having problems with #clilang. Note: The client needs to be in
;english to reliably detect a bank trashcan. If you set this to #false and are training at a bank
;make sure to train at a spot that the script won't be confused which chest is the trashcan or
;change the text in %trashcantext with your bank's trashcan wording when you mouse over it.
set %checklang #true
;Used for calculating the total estimated costs. Set to the cost you're able to buy scrolls for.
set %costofscrolls 5
; For RunUO and WorldSave avoidance
set %_worldsavejournalindex #jindex
; The shard type, if shardType fails for this set %eashard to either #true or #false
gosub shardType
set %eaShard #result
if %eaShard
{
set %tinkertoolsel 4
set %makelast_clicky 450
set %exitbutton 20
}
else
{
set %tinkertoolsel 3
set %exitbutton 18
}
; Position in tinkering menu to make skill tool
set %toolbuttonsel 3
;=============================================
; NOTHING BELOW THIS LINE SHOULD NEED CHANGING.
; DO SO AT YOUR OWN RISK!
;=============================================
set %beepongain #true
set %resourcebagid n/a
set %gvar %scriptname
gosub getGlobalVar %gvar %scriptname #charid menu_windowx NOLOCK
gosub getGlobalVar %gvar %scriptname #charid menu_windowy NOLOCK
gosub getGlobalVar %gvar %scriptname #charid bank_securex NOLOCK
gosub getGlobalVar %gvar %scriptname #charid bank_securey NOLOCK
gosub getGlobalVar %gvar %scriptname #charid resource_bagx NOLOCK
gosub getGlobalVar %gvar %scriptname #charid resource_bagy NOLOCK
gosub getGlobalVar %gvar %scriptname #charid hideme NOLOCK
gosub getGlobalVar %gvar %scriptname #charid beepongain NOLOCK
gosub getGlobalVar %gvar %scriptname #charid ingotsused NOLOCK
if ! #result
{
set %ingotsused 0
gosub putGlobalVar %gvar %scriptname #charid ingotsused
}
gosub getGlobalVar %gvar %scriptname #charid meditatecharacter NOLOCK
; load regstats
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regJUF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regKZF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regRZF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regJZF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regWZF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regSZF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regKUF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regMZF NOLOCK
gosub initializeRegStats #false
;=============================================
set %gumpx 50
set %gumpy 50
if %slowconnection
{
set %gumpwait 10
set %shortwait 10
set %wait1 20
set %wait2 30
set %longwait 70
set %dragwait 10
}
else
{
set %gumpwait 5
set %shortwait 5
set %wait1 10
set %wait2 15
set %longwait 40
set %dragwait 5
}
;==================== Do some validating before we start
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 *CEOTurboInscription_TimeToSell #false
set %atbank #false
set %euoTopic 16364
set %goldtype POF
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 %ballotboxtype EWH
set %chest_findmod 32_19
set %tinkertools GTL_KTL_JTL
set %makelasttinker #false
set %ironingots ENK
set %scrolls DPF
set %scrollcount 0
set %allKnownScrolls QXL_PXL_AYL_ZXL_CYL_BYL_NXL_WXL_VXL_YXL_XXL_IYL_HYL_KYL_JYL_EYL
+_DYL_GYL_FYL_STL_RTL_UTL_TTL_OTL_NTL_QTL_PTL_AUL_ZTL_CUL_BUL_WTL
+_VTL_YTL_XTL_IUL_HUL_KUL_JUL_EUL_DUL_GUL_FUL_QUL_PUL_SUL_RUL_MUL
+_LUL_OUL_NUL_YUL_XUL_AVL_ZUL_UUL_TUL_WUL_VUL_GVL_FVL_IVL_HVL_CVL
set %last_scrollcount n/a
gosub setupRegTables
set %ironselected #false
set %SkillToolTypes PBG
set %ingotToolAmount 1
set %cleanup #false
set %InRemoveNonEssentials #false
set %bpmsgon #true
set %dimcolor green
set %brown $ , 87b8de
set %lastresourcecount 0
set %NoEventProperty #false
gosub CheckEventProperty
if ! #result
{
set %bankfound #true
set %whisperon #false
set %NoEventProperty #true
}
gosub verifySpellBook
; 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
if %eashard
{
set %train1 CEO1
set %train2 CEO2
set %train3 CEO3
set %train4 CEO4
}
else
{
set %train1 RunUO1
set %train2 RunUO2
set %train3 RunUO3
set %train4 RunUO4
}
set %totalTrainingMethods 4
set %ud1 %totalTrainingMethods + 1
set %ud2 %totalTrainingMethods + 2
set %train . %ud1 inscription1.txt
set %train . %ud2 inscription2.txt
gosub getGlobalVar %gvar %scriptname #charid train_method NOLOCK
if ! #result
{
set %train_method 1
gosub putGlobalVar %gvar %scriptname #charid train_method
}
;=====================
set %default_bankfound %bankfound
gosub statusbarup
gosub SetUpSkills
;gosub skillchart
;halt
set #lpc 250
set %firstmenu #true
set %adjusttimer 0
gosub countresource %scrolls #false
set %last_scrollcount #result
set %scrollcount #result
SetupMain:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
;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
gosub gmcheck
gosub checkMaxMana
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
SetupCont1:
gosub gmcheck
;gosub MaterialsToResource %scrolls scrolls
gosub MaterialsToResource %ironingots ingots
gosub MaterialsToResource %goldtype gold
gosub CleanoutPack
gosub RemoveNonEssentials 0
gosub removeAllKnownScrolls
gosub MaterialsToResource %scrolls scrolls
gosub RemoveRegs #true
gosub calcmaxweight
set %startweight %maxweight - %backpackweight
set %maxscrolls %startweight / 2 - 5
set %maxregs ( ( %startweight / 2 ) / %totalregs . %currentitem ) * 8
if %maxregs < 500
set %maxregs 500
set %maxtokeep %maxscrolls - 5
gosub ignoreColoredIngots
gosub ignoreBadPens scribe
gosub CheckForResources
gosub CountTinkerKits #true
gosub countresource %product . %currentitem #true
set %lastresourcecount #result
set %firstattempt #true
set %retrycount 11
MainLoop:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
gosub statusbarup
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 #contname <> generic_gump
{
set %retrycount %retrycount + 1
wait %gumpwait
if %retrycount = 5
gosub bringGumpForward
menu delete status
menu text status 50 5 Waiting for inscription gump ( , %retrycount , ) , #dot
goto MainLoop
}
;if ( #contposx <> %gumpx || #contposy <> %gumpy ) && #contname = generic_gump
; contpos %gumpx %gumpy
gosub CheckMana
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
gosub CheckTimeToDump
gosub CheckForResources
;if ! #result && ! %stackable . %currentitem
; 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
scrolls:
gosub countresource %resource . %currentitem #false
set %_result #result
set %scrollcount %_result
gosub recordscrolls
if %_result < %needed . %currentitem
{
set %loopcheck %loopcheck + 1
if %loopcheck > 5
{
display ok Hmm, there appears to be a problem getting$
+more scrolls, you may be overwieght or$have too many items in your backpack.$$
+Hit OK, correct the problem and then resume script.$$Pausing.
gosub NeedMore scrolls
menu delete status
menu text status 50 5 Getting more scrolls.
set %return #false
wait %wait1
set %loopcheck 0
goto scrolls
}
gosub RemoveNonEssentials 0
gosub removeAllKnownScrolls
scrolls2:
set %amt %maxscrolls
if %amt < 25
set %amt 25
if ( %amt + %_result ) < %needed . %currentitem
set %amt %needed . %currentitem - %_result
menu delete status
menu text status 50 5 Getting more scrolls ( , %amt , ).
gosub GetMoreResources %resource . %currentitem %amt
if ! #result
{
gosub NeedMore scrolls
menu delete status
menu text status 50 5 Getting more scrolls.
gosub countresource %resource . %currentitem #false
set %scrollcount #result
set %last_scrollcount %scrollcount
gosub displayMainResourceCount %scrollcount
set %return #false
wait %wait1
goto scrolls
}
gosub countresource %resource . %currentitem #false
set %scrollcount #result
set %last_scrollcount %scrollcount
gosub displayMainResourceCount %scrollcount
set %return #false
goto scrolls
}
if ! %return
set %last_scrollcount %scrollcount
checkregs:
for %i 1 %totalregs . %currentitem
{
set %regtofind reg , %currentitem , %i
gosub countresource % . %regtofind #false
if #result > 0
goto checknextreg
needregs:
set %amt %maxregs
set %regtype % . %regtofind
set %regdisplay %regname . %regtype
menu delete status
menu text status 50 5 Getting more %regdisplay , ( , %amt , ).
gosub GetMoreResources %regtype %amt
if ! #result
{
gosub NeedMore %regname . %regtype
menu delete status
menu text status 50 5 Getting more %regdisplay , ( , %amt , ).
set %return #false
wait %wait1
goto checkregs
}
checknextreg:
}
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
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
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
GMR1B:
if %_findstack > 1
msg %resourceamt $
wait %wait2
if #contname = stack_gump
{
contpos 0 0
wait %wait1
set %contx #contposx + 35
set %conty #contposy + 35
click %contx %conty
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
wait %shortwait
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
{
contpost 0 0
wait %wait1
set %contx #contposx + 35
set %conty #contposy + 35
click %contx %conty n
set %mtr2 %mtr2 + 1
wait %wait2
if %mtr2 < 3
goto MTR2
}
set %mtr3 0
MTR3:
wait %wait2
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
gosub MaterialsToResource %ironingots ingots
goto FSK1
return ; not needed
sub UseSkillTool
wait %shortwait
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 RemoveRegs #false
gosub RemoveNonEssentials 0
}
gosub ignoreBadPens scribe
menu delete status
menu text status 50 5 Getting more Inscription 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
set %ingotsused %ingotsused + 1
gosub putGlobalVar %gvar %scriptname #charid ingotsused
menu font size 8
menu font color silver
menu delete skilltoolsused
menu text skilltoolsused %skilltoolx %skilltooly %skilltoolsused
menu delete ingotsused
menu text ingotsused 105 %skilltooly %ingotsused
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 %skilltoolx %skilltooly %skilltoolsused
menu font size 9
menu font color lime
gosub countresource %resource . %currentitem #false
set %scrollcount #result
gosub recordscrolls
ignoreitem reset 1
set %retrycount 11
wait %wait1
return
}
gosub ClearMenuGump
gosub NeedMore Inscription_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 xxx
for %i 1 %maxSkillTools
{
TSK1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
if G in #charstatus
set #menubutton pause
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 xxx
set %makelasttinker #false
gosub MakeTinkerTools
if ! #result
return %SkillToolsmade
}
goto TSK1
}
gosub MakeSkillTool
if #result = -1
return %SkillToolsmade
if #result = 0
goto TSK1
set %i #result
set %SkillToolsmade %i
gosub countresource %resource . %currentitem #false
set %scrollcount #result
gosub recordscrolls
}
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 statusbarup
set %ingotamt 2 - %backpack_ingots
menu delete status
menu text status 50 5 Getting more ingots ( , %ingotamt , ).
gosub GetMoreResources %ironingots %ingotamt
if ! #result
return #false
set %ingotsused %ingotsused + %ingotamt
menu font size 8
menu font color silver
menu delete ingotsused
menu text ingotsused 105 %skilltooly %ingotsused
menu font color lime
menu font size 9
gosub putGlobalVar %gvar %scriptname #charid ingotsused
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 ! %ironselected
gosub selectIron
gosub makefirstitem %tinkertoolsel 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 < %ingotToolAmount
{
wait %wait1
gosub RemoveNonEssentials 0
gosub RemoveRegs #false
finditem %SkillToolTypes C_ , %backpackID
set %skillToolsmade #findcnt
if %maxskilltools = %skillToolsmade
return %maxskilltools
set %amt ( ( %maxskilltools - %SkillToolsmade ) * %ingotToolAmount ) -%backpack_ingots
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 %ingotsused %ingotsused + ( %ingotcount - %backpack_ingots )
gosub putGlobalVar %gvar %scriptname #charid ingotsused
menu font size 8
menu font color silver
menu delete ingotsused
menu text ingotsused 105 %skilltooly %ingotsused
menu font color lime
menu font size 9
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 xxx
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 xxx
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
}
if ! %ironselected
gosub selectIron
set %makelasttinker #true
if %runuo
{
gosub makefirstitem %tinkertoolsel 98
gosub MakeFirstitem 99 98
gosub MakeFirstItem 99 %toolbuttonsel
goto tinkeringdone
}
gosub makefirstitem %tinkertoolsel 98
gosub MakeFirstitem 99 98
gosub MakeFirstItem 99 %toolbuttonsel
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 9999
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 0
gosub removeAllKnownScrolls
gosub RemoveRegs #false
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.
display ok The script is going to pause now because you are out$of a resource it needs to continue.$
+$$EXTREMELY IMPORTANT: Anything you buy/restock,$you MUST put in the resource bag before resuming!$
+If you don't, the script may make you overweight$and BREAK!
set #menubutton pause
gosub pause
set %adjusttimer 0
gosub CheckForBank
if ! #result
gosub GetSecureContainer
gosub GetResourceBag
set %retrycount 11
gosub check4BoughtPens
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
}
set %backpackid #backpackid
GBPI1:
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 font size 30
menu font style b
menu font bgcolor skyblue
menu font color black
set %y %menusizey / 2 - 45
menu text gtext 55 %y Skill Gain!
if %beepongain
{
sound
wait 2
goto CheckForGain1
}
wait 5
CheckForGain1:
menu font size 9
menu font style n
menu font color lime
menu font bgcolor black
menu delete status
menu text status 50 5 Inscription Gain!
menu delete gtext
gosub GainStats
gosub NewItemcheck
gosub gmcheck
return
sub NewItemcheck
gosub SelectItemToMake
set %newitem #result
if %currentitem <> %newitem
{
gosub skillchangedisplay
gosub countresource %scrolls #false
set %scrollcount #result
gosub recordscrolls
gosub RemoveNonEssentials 0
gosub removeAllKnownScrolls
set %currentitem %newitem
gosub RemoveRegs #true
set %maxregs ( ( %startweight / 2 ) / %totalregs . %currentitem ) * 8
if %maxregs < 500
set %maxregs 500
set %lastresourcecount 0
gosub displayRegTitles
gosub RedisplayResourceStats #true
gosub displayStatDesc
gosub checkMaxMana
set %firstattempt #true
set %retrycount 11
}
return
sub GMCheck
if ( ( %skillcap = #skill ) || ( %maxskillcap <= #skill ) ) && ! %debug
{
wait %wait1
sound
gosub RemoveNonEssentials 0
gosub removeAllKnownScrolls
gosub RemoveRegs #true
gosub ClearMenuGump
set %cleanup #true
gosub MaterialsToResource %SkillToolTypes skilltools
gosub MaterialsToResource %tinkertools tinkertools
gosub MaterialsToResource %ironingots ingots
gosub MaterialsToResource %scrolls scrolls
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 170 + ( %totalstats * 15 )
set %endbsstats %startbsstats + 85
set %menusizey %endbsstats + 30
menu window size 300 %menusizey
menu window title CEOTurboInscription %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 sheader 10 5 Status:
menu text etheader 10 20 Elapsed Time:
menu text cmheader 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 font color %brown
menu text h1 75 %y Inscription 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 105 105 :
gosub displayStatDesc
menu font size 8
menu font color lime
menu shape myshape1 3 120 99 1 3 7 5 yellow 3 white
set %y %y + 15
menu shape myshape1 3 %y 294 1 3 7 5 gray 2 white
set %y %y + 5
set %regstaty %y
gosub displayRegTitles
menu font size 8
menu font color silver
set %skilltooly %regstaty + 30
menu text h1 5 %skilltooly Tools:
menu text h1 70 %skilltooly Ingots:
menu delete skilltoolsused
set %skilltoolx 39
menu text skilltoolsused %skilltoolx %skilltooly %skilltoolsused
menu delete ingotsused
set %x skilltoolx + 105
menu text ingotsused %x %skilltooly %ingotsused
menu font size 7
set %y %skilltooly + 2
menu text h1 139 %y Method: %train . %train_method
menu font size 9
menu font color %brown
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 color %brown
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 %brown
set %y %startbsstats + 70
menu font size 7
menu text h3 10 %y Inscription
menu font size 9
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 style u
set %y %startbsstats + 40
menu font color %brown
menu text h1 5 %y Skillcap
menu font color white
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
str len %desc . %currentitem
if #strres > 16
menu font size 8
menu text making 107 35 %desc . %currentitem
menu font size 9
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
gosub displayMainResourceCount %scrollcount
menu font color lime
menu font style n
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
;halt
if ! %debug
menu hideeuo
return
sub calctotalcosts
menu font color yellow
set %tcosts 0
; ingots only
set %tcosts %tcosts + %stat_totals_scrolls * %stat_cost1 + %ingotsused * 12
set %tcosts %tcosts + %stat_totals_regJUF * %regcostJUF + %stat_totals_regKZF * %regcostKZF
set %tcosts %tcosts + %stat_totals_regRZF * %regcostRZF + %stat_totals_regJZF * %regcostJZF
set %tcosts %tcosts + %stat_totals_regWZF * %regcostWZF + %stat_totals_regSZF * %regcostSZF
set %tcosts %tcosts + %stat_totals_regKUF * %regcostKUF + %stat_totals_regMZF * %regcostMZF
menu delete tcost
menu text tcost 58 85 %tcosts
menu font color lime
return
sub ResetStats
set #menubutton N/A
Display YesNo Do you want to erase all statistics and start over?
if #dispres = no
return
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 %stat_totals_attempts 0
gosub putGlobalVar %gvar %scriptname #charid stat_totals_attempts
set %startetime 0
gosub putGlobalVar %gvar %scriptname #charid _totaletime
set %skilltoolsused 0
gosub putGlobalVar %gvar %scriptname #charid skilltoolsused
set %_startskill #skill
gosub putGlobalVar %gvar %scriptname #charid _startskill
set %stat_totals_scrolls 0
gosub putGlobalVar %gvar %scriptname #charid stat_totals_scrolls
set %ingotsused 0
gosub putGlobalVar %gvar %scriptname #charid ingotsused
; now delete all the stats
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_poison
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_lightning
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_paralyze
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_invisibility
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_explosion
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_flamestrike
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_recall
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_mark
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_gatetravel
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_resurrection
if %train_method = %ud1 || %train_method = %ud2
{
for %i 1 %skillTableSize
{
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_ , %desc . %i
}
}
gosub CreateStatTable
set #menubutton N/A
set %lastehours N/A
set %lastemins N/A
set %lastesecs N/A
set %firstmenu #true
gosub initializeRegStats #true
gosub initmenu
return
sub displayStatDesc
menu font size 8
for %i 1 %totalstats
{
menu font color %dimcolor
if %i = 1
menu font color %brown
if %stat_desc . %i = %desc . %currentitem
menu font color lime
set %y 105 + ( %i * 15 )
menu delete %stat_desc , %i
str len %stat_desc . %i
if #strres > 14
menu font size 7
if #strres > 17
menu font size 6
menu text %stat_desc , %i 5 %y %stat_desc . %i
menu font size 8
menu font color lime
menu text h1 105 %y :
}
menu font color lime
menu font size 9
menu shape myshape1 3 120 99 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:
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
wait 5
if #menubutton = closed
{
if %debug
halt
gosub PayPalPopup
terminate euo
}
if #menubutton = easyuo
gosub runbrowser
if #menubutton = donate
gosub PayPalExecute
set #menubutton N/A
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 color %brown
menu font size 8
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 size 9
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
set %x 405
if exec in #opts
set %x 360
menu text h1 %x 230 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 223 90 20 Rate it now!
menu button donate 455 245 90 20 Donate
}
menu font bgcolor black
menu font color gray
menu font size 8
menu text h1 %1 265 This script is copyright by the author under the terms of
menu text h1 %1 280 the CEO Public License (CPL) at:
menu font color white
menu text h1 %1 300 http://www.easyuo.com/forum/viewtopic.php?p=3585
menu font size 8
menu font color gray
return
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 %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 %i = 0
menu font color yellow
if %i = 1
menu font color %brown
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 %brown
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 %brown
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 SkillChartpause
gosub PauseSetup1
menu delete pause
menu font bgcolor teal
menu font color black
menu delete return
menu button resume 145 %returny 60 20 Resume
set #menubutton N/A
set %elaspedtime #scnt - %scriptstart
set %totaletime %startetime + %elaspedtime
set %_totaletime %totaletime
gosub putGlobalVar %gvar %scriptname #charid _totaletime
set #menubutton n/a
SCPause1:
gosub DisconnectCheck
wait %shortwait
if #menubutton = N/A
goto SCPause1
if #menubutton = closed
gosub closed
menu delete ptext
set %startetime %_totaletime
set %scriptstart #scnt
menu delete resume
menu font bgcolor teal
menu font color black
menu button Return 120 %returny 120 20 Return to Inscription
set #menubutton N/A
menu font bgcolor black
menu font color lime
return
sub Pause
PauseStart:
gosub PauseSetup1
set %returnbywarmode #false
set %returnbyselling #false
if *CEOTurboFletcher_TimeToSell
{
set %returnbyselling #true
set *CEOTurboFletcher_resume #false
goto Pause0
}
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
}
Pause0:
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
if %returnbyselling && *CEOTurboFletcher_resume
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 pauseSetup1
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.
}
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
}
set #menubutton N/A
menu hide
halt
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
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
gosub statusbarup
set %charweight 0
if %noeventproperty
goto cmw1
gosub getBackPackWeight
set %backpackweight #result
set %charweight #weight - %backpackweight
cmw1:
set %maxweight #maxweight - %charweight
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
menu delete status
menu text status 50 5 Looks like you're at a bank.
contpos %bank_securex %bank_securey
wait %wait1
set %securecontainerid N/A
if #contsize = 180_240
{
set %securecontainerid #contid
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
}
if %securecontainerid = N/A
goto CFB1
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust your bank box now.
if %sysmessages
event SysMessage Adjust your bank box now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
if #contid = %securecontainerid && ( #contposx <> %bank_securex || #contposy <> %bank_securey )
{
set %bank_securex #contposx
set %bank_securey #contposy
gosub putGlobalVar %gvar %scriptname #charid bank_securex
gosub putGlobalVar %gvar %scriptname #charid bank_securey
}
}
menu delete status
return #true
}
set %atbank #false
return #false
sub GetSecureContainer
set %securecontainerid N/A
gosub getGlobalVar %gvar %scriptname #charid securecontainerid
GSC1:
if %securecontainerid <> N/A
{
menu delete status
menu text status 50 5 Re-opening secure container.
wait %shortwait
set %blinkmsg #true
goto GSC3
}
set %adjusttimer 8
menu font color white
menu delete status
menu text status 50 5 Target your SECURE container now!
set %blinkmsg #true
set %blinktime #scnt2 + 5
set #targcurs 1
wait %wait1
if %sysmessages
event SysMessage Target your SECURE container now!
looptgt2:
wait 3
if %blinktime < #scnt2
{
set %blinktime #scnt2 + 5
if %blinkmsg
{
menu delete status
set %blinkmsg #false
goto GSC2
}
menu text status 50 5 Target your SECURE container now!
set %blinkmsg #true
}
GSC2:
if #targcurs = 1
goto looptgt2
wait %wait1
finditem #ltargetid G_2
if ( #findkind = -1 || #finddist > 2 ) || ( #findkind <> -1 && #findtype in %badcontainers )
{
menu font color red
menu delete status
menu text status 50 5 Invalid container. Try again.
menu font color white
if %sysmessages
event SysMessage container. Try Again.
wait 3s
display ok The container you identified is not a valid$
+container. It is two far away or an invalid type( , #findtype , ).$$
+Please use a standard wooden or metal$
+chest within 2 paces of your character.$
set #targcurs 1
wait %wait1
goto looptgt2
}
set #lobjectid #ltargetid
event macro 17
wait %wait2
if #contname <> container_gump || #contid <> #lobjectid
{
menu font color red
menu delete status
menu text status 50 5 Invalid container. Try again.
menu font color white
if %sysmessages
event SysMessage container. Try Again.
wait 3s
display ok The object you identified with type: #findtype , #spc , does$
+not show as being a container according to$
+EasyUO's Container Info variables.$$
+Please use a standard wooden or metal$
+chest within 2 paces of your character.$
set #targcurs 1
wait %wait1
goto looptgt2
}
set %securecontainerid #ltargetid
GSC3:
finditem %securecontainerid G_2
if #findkind = -1
{
menu font color red
menu delete status
menu text status 50 5 SECURE container not found.
menu font color white
if %sysmessages
event SysMessage SECURE container not found.
wait 3s
set %securecontainerid N/A
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
set %resourcebagid N/A
gosub putGlobalVar %gvar %scriptname #charid resourcebagid
set %adjusttimer 8
goto GSC1
}
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
menu font color lime
nextcpos %bank_securex %bank_securey
set #lobjectid %securecontainerid
GSC4:
gosub resetjournal
wait %wait2
event macro 17 0
wait %wait1
gosub FindJournalMessage must_wait
if #result
{
menu delete status
menu text status 50 5 Retrying Secure box open.
if %sysmessages
event SysMessage Retrying Secure box open.
wait %wait2
wait %longwait
goto GSC4
}
if #contid = %securecontainerid
contpos %bank_securex %bank_securey
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust secure bag now.
if %sysmessages
event SysMessage Adjust secure bag now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
if #contid = %securecontainerid && ( #contposx <> %bank_securex || #contposy <> %bank_securey )
{
set %bank_securex #contposx
set %bank_securey #contposy
gosub putGlobalVar %gvar %scriptname #charid bank_securex
gosub putGlobalVar %gvar %scriptname #charid bank_securey
}
}
menu delete status
wait %longwait
return
sub SetUpSkills
chooseskill magery
wait 1
set %magery #skill
chooseskill chivalry
wait 1
set %chivalry #skill
chooseskill hiding
wait 1
set %hideskill #skill
chooseskill tinkering
wait 1
set %tinkerskill #skill
chooseskill %skillname
wait 1
if #skillLock <> up
{
menu delete status
menu text status 50 5 %skillname Skill is down or locked.
display ok Your %skillname skill is down! $Pointless to run this script don't you think?$
menu hide
halt
}
if #skill < 250 && ! %debug
{
menu font size 13
menu delete status
menu text status 5 94 Go buy some %skillname skill!
display ok This script requires that you go buy your %skillname $skill up to at least 25 or train manually.$$
+Please do so and restart the script, thank you.
menu hide
halt
}
gosub getGlobalVar %gvar %scriptname #charid _startskill
if ! #result || %_startskill = N/A
{
set %_startskill #skill
gosub putGlobalVar %gvar %scriptname #charid _startskill
}
set %startskill #skill
set %currentskill #skill
set %skillcap #skillcap
gosub SetupSkillTable
gosub SelectItemToMake
set %currentitem #result
return
sub SelectItemToMake
for %i 1 %skillTableSize
{
if %low . %i <= %currentskill && %currentskill <= %high . %i
return %i
}
return %skillTableSize
sub StatusBarUp
;purpose - make sure the status bar is up on the char
IF #charname = N/A
{
Event Macro 8 2
wait %wait2
set %retrycount 11
}
return
sub SkillChart
set %tm %train_method
set %starting_desc %desc . %currentitem
SC1:
menu clear
set %skilltablebase 150
set %windo
; Script Name: CEOTurboInscription
; Author: CEO
; Version: 2.1b
; Client Tested with: 7.0.0.4
; EUO version tested with: 1.5_154
; Shard OSI / FS: OSI
; Revision Date: 100209
; Public Release: 061105
; Global Variables Used: *CEOTurboInscription
; Purpose: Trains Inscription from 25 to GM.
;-------------------------------------------------------------
; 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 CEOTurboInscription
; 2. Follow the step-by-step setup.
; 3. Identify Secure (or it'll use your bankbox automatically)
; 4. Identify Resource container. Your 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.1b
set #lpc 1000
set %scriptname CEOTurboInscription
set %skillname inscription
set %scriptstart #scnt
set %scriptstart2 %scriptstart
set %gaintime %scriptstart
set %versioncheck #true
set %initializing #true
menu font transparent #false
;=============================================
; 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.
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 15.0, which is min skill required to make Flecther tool's easily.
set %tinkerskillreq 150
; 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 / 75
; 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
;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 #false if whispering doesn't open the bank or your pet doesn't hear you.
; Probably only freeshard required.
set %whisperon #true
;Change this to #false if you're having problems with #clilang. Note: The client needs to be in
;english to reliably detect a bank trashcan. If you set this to #false and are training at a bank
;make sure to train at a spot that the script won't be confused which chest is the trashcan or
;change the text in %trashcantext with your bank's trashcan wording when you mouse over it.
set %checklang #true
;Used for calculating the total estimated costs. Set to the cost you're able to buy scrolls for.
set %costofscrolls 5
; For RunUO and WorldSave avoidance
set %_worldsavejournalindex #jindex
; The shard type, if shardType fails for this set %eashard to either #true or #false
gosub shardType
set %eaShard #result
if %eaShard
{
set %tinkertoolsel 4
set %makelast_clicky 450
set %exitbutton 20
}
else
{
set %tinkertoolsel 3
set %exitbutton 18
}
; Position in tinkering menu to make skill tool
set %toolbuttonsel 3
;=============================================
; NOTHING BELOW THIS LINE SHOULD NEED CHANGING.
; DO SO AT YOUR OWN RISK!
;=============================================
set %beepongain #true
set %resourcebagid n/a
set %gvar %scriptname
gosub getGlobalVar %gvar %scriptname #charid menu_windowx NOLOCK
gosub getGlobalVar %gvar %scriptname #charid menu_windowy NOLOCK
gosub getGlobalVar %gvar %scriptname #charid bank_securex NOLOCK
gosub getGlobalVar %gvar %scriptname #charid bank_securey NOLOCK
gosub getGlobalVar %gvar %scriptname #charid resource_bagx NOLOCK
gosub getGlobalVar %gvar %scriptname #charid resource_bagy NOLOCK
gosub getGlobalVar %gvar %scriptname #charid hideme NOLOCK
gosub getGlobalVar %gvar %scriptname #charid beepongain NOLOCK
gosub getGlobalVar %gvar %scriptname #charid ingotsused NOLOCK
if ! #result
{
set %ingotsused 0
gosub putGlobalVar %gvar %scriptname #charid ingotsused
}
gosub getGlobalVar %gvar %scriptname #charid meditatecharacter NOLOCK
; load regstats
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regJUF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regKZF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regRZF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regJZF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regWZF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regSZF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regKUF NOLOCK
gosub getGlobalVar %gvar %scriptname #charid stat_totals_regMZF NOLOCK
gosub initializeRegStats #false
;=============================================
set %gumpx 50
set %gumpy 50
if %slowconnection
{
set %gumpwait 10
set %shortwait 10
set %wait1 20
set %wait2 30
set %longwait 70
set %dragwait 10
}
else
{
set %gumpwait 5
set %shortwait 5
set %wait1 10
set %wait2 15
set %longwait 40
set %dragwait 5
}
;==================== Do some validating before we start
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 *CEOTurboInscription_TimeToSell #false
set %atbank #false
set %euoTopic 16364
set %goldtype POF
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 %ballotboxtype EWH
set %chest_findmod 32_19
set %tinkertools GTL_KTL_JTL
set %makelasttinker #false
set %ironingots ENK
set %scrolls DPF
set %scrollcount 0
set %allKnownScrolls QXL_PXL_AYL_ZXL_CYL_BYL_NXL_WXL_VXL_YXL_XXL_IYL_HYL_KYL_JYL_EYL
+_DYL_GYL_FYL_STL_RTL_UTL_TTL_OTL_NTL_QTL_PTL_AUL_ZTL_CUL_BUL_WTL
+_VTL_YTL_XTL_IUL_HUL_KUL_JUL_EUL_DUL_GUL_FUL_QUL_PUL_SUL_RUL_MUL
+_LUL_OUL_NUL_YUL_XUL_AVL_ZUL_UUL_TUL_WUL_VUL_GVL_FVL_IVL_HVL_CVL
set %last_scrollcount n/a
gosub setupRegTables
set %ironselected #false
set %SkillToolTypes PBG
set %ingotToolAmount 1
set %cleanup #false
set %InRemoveNonEssentials #false
set %bpmsgon #true
set %dimcolor green
set %brown $ , 87b8de
set %lastresourcecount 0
set %NoEventProperty #false
gosub CheckEventProperty
if ! #result
{
set %bankfound #true
set %whisperon #false
set %NoEventProperty #true
}
gosub verifySpellBook
; 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
if %eashard
{
set %train1 CEO1
set %train2 CEO2
set %train3 CEO3
set %train4 CEO4
}
else
{
set %train1 RunUO1
set %train2 RunUO2
set %train3 RunUO3
set %train4 RunUO4
}
set %totalTrainingMethods 4
set %ud1 %totalTrainingMethods + 1
set %ud2 %totalTrainingMethods + 2
set %train . %ud1 inscription1.txt
set %train . %ud2 inscription2.txt
gosub getGlobalVar %gvar %scriptname #charid train_method NOLOCK
if ! #result
{
set %train_method 1
gosub putGlobalVar %gvar %scriptname #charid train_method
}
;=====================
set %default_bankfound %bankfound
gosub statusbarup
gosub SetUpSkills
;gosub skillchart
;halt
set #lpc 250
set %firstmenu #true
set %adjusttimer 0
gosub countresource %scrolls #false
set %last_scrollcount #result
set %scrollcount #result
SetupMain:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
;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
gosub gmcheck
gosub checkMaxMana
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
SetupCont1:
gosub gmcheck
;gosub MaterialsToResource %scrolls scrolls
gosub MaterialsToResource %ironingots ingots
gosub MaterialsToResource %goldtype gold
gosub CleanoutPack
gosub RemoveNonEssentials 0
gosub removeAllKnownScrolls
gosub MaterialsToResource %scrolls scrolls
gosub RemoveRegs #true
gosub calcmaxweight
set %startweight %maxweight - %backpackweight
set %maxscrolls %startweight / 2 - 5
set %maxregs ( ( %startweight / 2 ) / %totalregs . %currentitem ) * 8
if %maxregs < 500
set %maxregs 500
set %maxtokeep %maxscrolls - 5
gosub ignoreColoredIngots
gosub ignoreBadPens scribe
gosub CheckForResources
gosub CountTinkerKits #true
gosub countresource %product . %currentitem #true
set %lastresourcecount #result
set %firstattempt #true
set %retrycount 11
MainLoop:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
gosub statusbarup
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 #contname <> generic_gump
{
set %retrycount %retrycount + 1
wait %gumpwait
if %retrycount = 5
gosub bringGumpForward
menu delete status
menu text status 50 5 Waiting for inscription gump ( , %retrycount , ) , #dot
goto MainLoop
}
;if ( #contposx <> %gumpx || #contposy <> %gumpy ) && #contname = generic_gump
; contpos %gumpx %gumpy
gosub CheckMana
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
gosub CheckTimeToDump
gosub CheckForResources
;if ! #result && ! %stackable . %currentitem
; 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
scrolls:
gosub countresource %resource . %currentitem #false
set %_result #result
set %scrollcount %_result
gosub recordscrolls
if %_result < %needed . %currentitem
{
set %loopcheck %loopcheck + 1
if %loopcheck > 5
{
display ok Hmm, there appears to be a problem getting$
+more scrolls, you may be overwieght or$have too many items in your backpack.$$
+Hit OK, correct the problem and then resume script.$$Pausing.
gosub NeedMore scrolls
menu delete status
menu text status 50 5 Getting more scrolls.
set %return #false
wait %wait1
set %loopcheck 0
goto scrolls
}
gosub RemoveNonEssentials 0
gosub removeAllKnownScrolls
scrolls2:
set %amt %maxscrolls
if %amt < 25
set %amt 25
if ( %amt + %_result ) < %needed . %currentitem
set %amt %needed . %currentitem - %_result
menu delete status
menu text status 50 5 Getting more scrolls ( , %amt , ).
gosub GetMoreResources %resource . %currentitem %amt
if ! #result
{
gosub NeedMore scrolls
menu delete status
menu text status 50 5 Getting more scrolls.
gosub countresource %resource . %currentitem #false
set %scrollcount #result
set %last_scrollcount %scrollcount
gosub displayMainResourceCount %scrollcount
set %return #false
wait %wait1
goto scrolls
}
gosub countresource %resource . %currentitem #false
set %scrollcount #result
set %last_scrollcount %scrollcount
gosub displayMainResourceCount %scrollcount
set %return #false
goto scrolls
}
if ! %return
set %last_scrollcount %scrollcount
checkregs:
for %i 1 %totalregs . %currentitem
{
set %regtofind reg , %currentitem , %i
gosub countresource % . %regtofind #false
if #result > 0
goto checknextreg
needregs:
set %amt %maxregs
set %regtype % . %regtofind
set %regdisplay %regname . %regtype
menu delete status
menu text status 50 5 Getting more %regdisplay , ( , %amt , ).
gosub GetMoreResources %regtype %amt
if ! #result
{
gosub NeedMore %regname . %regtype
menu delete status
menu text status 50 5 Getting more %regdisplay , ( , %amt , ).
set %return #false
wait %wait1
goto checkregs
}
checknextreg:
}
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
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
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
GMR1B:
if %_findstack > 1
msg %resourceamt $
wait %wait2
if #contname = stack_gump
{
contpos 0 0
wait %wait1
set %contx #contposx + 35
set %conty #contposy + 35
click %contx %conty
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
wait %shortwait
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
{
contpost 0 0
wait %wait1
set %contx #contposx + 35
set %conty #contposy + 35
click %contx %conty n
set %mtr2 %mtr2 + 1
wait %wait2
if %mtr2 < 3
goto MTR2
}
set %mtr3 0
MTR3:
wait %wait2
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
gosub MaterialsToResource %ironingots ingots
goto FSK1
return ; not needed
sub UseSkillTool
wait %shortwait
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 RemoveRegs #false
gosub RemoveNonEssentials 0
}
gosub ignoreBadPens scribe
menu delete status
menu text status 50 5 Getting more Inscription 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
set %ingotsused %ingotsused + 1
gosub putGlobalVar %gvar %scriptname #charid ingotsused
menu font size 8
menu font color silver
menu delete skilltoolsused
menu text skilltoolsused %skilltoolx %skilltooly %skilltoolsused
menu delete ingotsused
menu text ingotsused 105 %skilltooly %ingotsused
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 %skilltoolx %skilltooly %skilltoolsused
menu font size 9
menu font color lime
gosub countresource %resource . %currentitem #false
set %scrollcount #result
gosub recordscrolls
ignoreitem reset 1
set %retrycount 11
wait %wait1
return
}
gosub ClearMenuGump
gosub NeedMore Inscription_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 xxx
for %i 1 %maxSkillTools
{
TSK1:
if %runuo
gosub CEOWorldSaveChecker save_in_1_minute world_is_saving world_save_complete 45 120
if G in #charstatus
set #menubutton pause
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 xxx
set %makelasttinker #false
gosub MakeTinkerTools
if ! #result
return %SkillToolsmade
}
goto TSK1
}
gosub MakeSkillTool
if #result = -1
return %SkillToolsmade
if #result = 0
goto TSK1
set %i #result
set %SkillToolsmade %i
gosub countresource %resource . %currentitem #false
set %scrollcount #result
gosub recordscrolls
}
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 statusbarup
set %ingotamt 2 - %backpack_ingots
menu delete status
menu text status 50 5 Getting more ingots ( , %ingotamt , ).
gosub GetMoreResources %ironingots %ingotamt
if ! #result
return #false
set %ingotsused %ingotsused + %ingotamt
menu font size 8
menu font color silver
menu delete ingotsused
menu text ingotsused 105 %skilltooly %ingotsused
menu font color lime
menu font size 9
gosub putGlobalVar %gvar %scriptname #charid ingotsused
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 ! %ironselected
gosub selectIron
gosub makefirstitem %tinkertoolsel 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 < %ingotToolAmount
{
wait %wait1
gosub RemoveNonEssentials 0
gosub RemoveRegs #false
finditem %SkillToolTypes C_ , %backpackID
set %skillToolsmade #findcnt
if %maxskilltools = %skillToolsmade
return %maxskilltools
set %amt ( ( %maxskilltools - %SkillToolsmade ) * %ingotToolAmount ) -%backpack_ingots
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 %ingotsused %ingotsused + ( %ingotcount - %backpack_ingots )
gosub putGlobalVar %gvar %scriptname #charid ingotsused
menu font size 8
menu font color silver
menu delete ingotsused
menu text ingotsused 105 %skilltooly %ingotsused
menu font color lime
menu font size 9
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 xxx
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 xxx
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
}
if ! %ironselected
gosub selectIron
set %makelasttinker #true
if %runuo
{
gosub makefirstitem %tinkertoolsel 98
gosub MakeFirstitem 99 98
gosub MakeFirstItem 99 %toolbuttonsel
goto tinkeringdone
}
gosub makefirstitem %tinkertoolsel 98
gosub MakeFirstitem 99 98
gosub MakeFirstItem 99 %toolbuttonsel
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 9999
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 0
gosub removeAllKnownScrolls
gosub RemoveRegs #false
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.
display ok The script is going to pause now because you are out$of a resource it needs to continue.$
+$$EXTREMELY IMPORTANT: Anything you buy/restock,$you MUST put in the resource bag before resuming!$
+If you don't, the script may make you overweight$and BREAK!
set #menubutton pause
gosub pause
set %adjusttimer 0
gosub CheckForBank
if ! #result
gosub GetSecureContainer
gosub GetResourceBag
set %retrycount 11
gosub check4BoughtPens
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
}
set %backpackid #backpackid
GBPI1:
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 font size 30
menu font style b
menu font bgcolor skyblue
menu font color black
set %y %menusizey / 2 - 45
menu text gtext 55 %y Skill Gain!
if %beepongain
{
sound
wait 2
goto CheckForGain1
}
wait 5
CheckForGain1:
menu font size 9
menu font style n
menu font color lime
menu font bgcolor black
menu delete status
menu text status 50 5 Inscription Gain!
menu delete gtext
gosub GainStats
gosub NewItemcheck
gosub gmcheck
return
sub NewItemcheck
gosub SelectItemToMake
set %newitem #result
if %currentitem <> %newitem
{
gosub skillchangedisplay
gosub countresource %scrolls #false
set %scrollcount #result
gosub recordscrolls
gosub RemoveNonEssentials 0
gosub removeAllKnownScrolls
set %currentitem %newitem
gosub RemoveRegs #true
set %maxregs ( ( %startweight / 2 ) / %totalregs . %currentitem ) * 8
if %maxregs < 500
set %maxregs 500
set %lastresourcecount 0
gosub displayRegTitles
gosub RedisplayResourceStats #true
gosub displayStatDesc
gosub checkMaxMana
set %firstattempt #true
set %retrycount 11
}
return
sub GMCheck
if ( ( %skillcap = #skill ) || ( %maxskillcap <= #skill ) ) && ! %debug
{
wait %wait1
sound
gosub RemoveNonEssentials 0
gosub removeAllKnownScrolls
gosub RemoveRegs #true
gosub ClearMenuGump
set %cleanup #true
gosub MaterialsToResource %SkillToolTypes skilltools
gosub MaterialsToResource %tinkertools tinkertools
gosub MaterialsToResource %ironingots ingots
gosub MaterialsToResource %scrolls scrolls
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 170 + ( %totalstats * 15 )
set %endbsstats %startbsstats + 85
set %menusizey %endbsstats + 30
menu window size 300 %menusizey
menu window title CEOTurboInscription %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 sheader 10 5 Status:
menu text etheader 10 20 Elapsed Time:
menu text cmheader 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 font color %brown
menu text h1 75 %y Inscription 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 105 105 :
gosub displayStatDesc
menu font size 8
menu font color lime
menu shape myshape1 3 120 99 1 3 7 5 yellow 3 white
set %y %y + 15
menu shape myshape1 3 %y 294 1 3 7 5 gray 2 white
set %y %y + 5
set %regstaty %y
gosub displayRegTitles
menu font size 8
menu font color silver
set %skilltooly %regstaty + 30
menu text h1 5 %skilltooly Tools:
menu text h1 70 %skilltooly Ingots:
menu delete skilltoolsused
set %skilltoolx 39
menu text skilltoolsused %skilltoolx %skilltooly %skilltoolsused
menu delete ingotsused
set %x skilltoolx + 105
menu text ingotsused %x %skilltooly %ingotsused
menu font size 7
set %y %skilltooly + 2
menu text h1 139 %y Method: %train . %train_method
menu font size 9
menu font color %brown
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 color %brown
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 %brown
set %y %startbsstats + 70
menu font size 7
menu text h3 10 %y Inscription
menu font size 9
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 style u
set %y %startbsstats + 40
menu font color %brown
menu text h1 5 %y Skillcap
menu font color white
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
str len %desc . %currentitem
if #strres > 16
menu font size 8
menu text making 107 35 %desc . %currentitem
menu font size 9
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
gosub displayMainResourceCount %scrollcount
menu font color lime
menu font style n
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
;halt
if ! %debug
menu hideeuo
return
sub calctotalcosts
menu font color yellow
set %tcosts 0
; ingots only
set %tcosts %tcosts + %stat_totals_scrolls * %stat_cost1 + %ingotsused * 12
set %tcosts %tcosts + %stat_totals_regJUF * %regcostJUF + %stat_totals_regKZF * %regcostKZF
set %tcosts %tcosts + %stat_totals_regRZF * %regcostRZF + %stat_totals_regJZF * %regcostJZF
set %tcosts %tcosts + %stat_totals_regWZF * %regcostWZF + %stat_totals_regSZF * %regcostSZF
set %tcosts %tcosts + %stat_totals_regKUF * %regcostKUF + %stat_totals_regMZF * %regcostMZF
menu delete tcost
menu text tcost 58 85 %tcosts
menu font color lime
return
sub ResetStats
set #menubutton N/A
Display YesNo Do you want to erase all statistics and start over?
if #dispres = no
return
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 %stat_totals_attempts 0
gosub putGlobalVar %gvar %scriptname #charid stat_totals_attempts
set %startetime 0
gosub putGlobalVar %gvar %scriptname #charid _totaletime
set %skilltoolsused 0
gosub putGlobalVar %gvar %scriptname #charid skilltoolsused
set %_startskill #skill
gosub putGlobalVar %gvar %scriptname #charid _startskill
set %stat_totals_scrolls 0
gosub putGlobalVar %gvar %scriptname #charid stat_totals_scrolls
set %ingotsused 0
gosub putGlobalVar %gvar %scriptname #charid ingotsused
; now delete all the stats
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_poison
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_lightning
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_paralyze
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_invisibility
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_explosion
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_flamestrike
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_recall
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_mark
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_gatetravel
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_resurrection
if %train_method = %ud1 || %train_method = %ud2
{
for %i 1 %skillTableSize
{
gosub delGlobalVar %gvar %scriptname #charid STAT_TOTALS_ , %desc . %i
}
}
gosub CreateStatTable
set #menubutton N/A
set %lastehours N/A
set %lastemins N/A
set %lastesecs N/A
set %firstmenu #true
gosub initializeRegStats #true
gosub initmenu
return
sub displayStatDesc
menu font size 8
for %i 1 %totalstats
{
menu font color %dimcolor
if %i = 1
menu font color %brown
if %stat_desc . %i = %desc . %currentitem
menu font color lime
set %y 105 + ( %i * 15 )
menu delete %stat_desc , %i
str len %stat_desc . %i
if #strres > 14
menu font size 7
if #strres > 17
menu font size 6
menu text %stat_desc , %i 5 %y %stat_desc . %i
menu font size 8
menu font color lime
menu text h1 105 %y :
}
menu font color lime
menu font size 9
menu shape myshape1 3 120 99 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:
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
wait 5
if #menubutton = closed
{
if %debug
halt
gosub PayPalPopup
terminate euo
}
if #menubutton = easyuo
gosub runbrowser
if #menubutton = donate
gosub PayPalExecute
set #menubutton N/A
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 color %brown
menu font size 8
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 size 9
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
set %x 405
if exec in #opts
set %x 360
menu text h1 %x 230 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 223 90 20 Rate it now!
menu button donate 455 245 90 20 Donate
}
menu font bgcolor black
menu font color gray
menu font size 8
menu text h1 %1 265 This script is copyright by the author under the terms of
menu text h1 %1 280 the CEO Public License (CPL) at:
menu font color white
menu text h1 %1 300 http://www.easyuo.com/forum/viewtopic.php?p=3585
menu font size 8
menu font color gray
return
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 %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 %i = 0
menu font color yellow
if %i = 1
menu font color %brown
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 %brown
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 %brown
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 SkillChartpause
gosub PauseSetup1
menu delete pause
menu font bgcolor teal
menu font color black
menu delete return
menu button resume 145 %returny 60 20 Resume
set #menubutton N/A
set %elaspedtime #scnt - %scriptstart
set %totaletime %startetime + %elaspedtime
set %_totaletime %totaletime
gosub putGlobalVar %gvar %scriptname #charid _totaletime
set #menubutton n/a
SCPause1:
gosub DisconnectCheck
wait %shortwait
if #menubutton = N/A
goto SCPause1
if #menubutton = closed
gosub closed
menu delete ptext
set %startetime %_totaletime
set %scriptstart #scnt
menu delete resume
menu font bgcolor teal
menu font color black
menu button Return 120 %returny 120 20 Return to Inscription
set #menubutton N/A
menu font bgcolor black
menu font color lime
return
sub Pause
PauseStart:
gosub PauseSetup1
set %returnbywarmode #false
set %returnbyselling #false
if *CEOTurboFletcher_TimeToSell
{
set %returnbyselling #true
set *CEOTurboFletcher_resume #false
goto Pause0
}
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
}
Pause0:
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
if %returnbyselling && *CEOTurboFletcher_resume
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 pauseSetup1
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.
}
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
}
set #menubutton N/A
menu hide
halt
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
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
gosub statusbarup
set %charweight 0
if %noeventproperty
goto cmw1
gosub getBackPackWeight
set %backpackweight #result
set %charweight #weight - %backpackweight
cmw1:
set %maxweight #maxweight - %charweight
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
menu delete status
menu text status 50 5 Looks like you're at a bank.
contpos %bank_securex %bank_securey
wait %wait1
set %securecontainerid N/A
if #contsize = 180_240
{
set %securecontainerid #contid
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
}
if %securecontainerid = N/A
goto CFB1
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust your bank box now.
if %sysmessages
event SysMessage Adjust your bank box now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
if #contid = %securecontainerid && ( #contposx <> %bank_securex || #contposy <> %bank_securey )
{
set %bank_securex #contposx
set %bank_securey #contposy
gosub putGlobalVar %gvar %scriptname #charid bank_securex
gosub putGlobalVar %gvar %scriptname #charid bank_securey
}
}
menu delete status
return #true
}
set %atbank #false
return #false
sub GetSecureContainer
set %securecontainerid N/A
gosub getGlobalVar %gvar %scriptname #charid securecontainerid
GSC1:
if %securecontainerid <> N/A
{
menu delete status
menu text status 50 5 Re-opening secure container.
wait %shortwait
set %blinkmsg #true
goto GSC3
}
set %adjusttimer 8
menu font color white
menu delete status
menu text status 50 5 Target your SECURE container now!
set %blinkmsg #true
set %blinktime #scnt2 + 5
set #targcurs 1
wait %wait1
if %sysmessages
event SysMessage Target your SECURE container now!
looptgt2:
wait 3
if %blinktime < #scnt2
{
set %blinktime #scnt2 + 5
if %blinkmsg
{
menu delete status
set %blinkmsg #false
goto GSC2
}
menu text status 50 5 Target your SECURE container now!
set %blinkmsg #true
}
GSC2:
if #targcurs = 1
goto looptgt2
wait %wait1
finditem #ltargetid G_2
if ( #findkind = -1 || #finddist > 2 ) || ( #findkind <> -1 && #findtype in %badcontainers )
{
menu font color red
menu delete status
menu text status 50 5 Invalid container. Try again.
menu font color white
if %sysmessages
event SysMessage container. Try Again.
wait 3s
display ok The container you identified is not a valid$
+container. It is two far away or an invalid type( , #findtype , ).$$
+Please use a standard wooden or metal$
+chest within 2 paces of your character.$
set #targcurs 1
wait %wait1
goto looptgt2
}
set #lobjectid #ltargetid
event macro 17
wait %wait2
if #contname <> container_gump || #contid <> #lobjectid
{
menu font color red
menu delete status
menu text status 50 5 Invalid container. Try again.
menu font color white
if %sysmessages
event SysMessage container. Try Again.
wait 3s
display ok The object you identified with type: #findtype , #spc , does$
+not show as being a container according to$
+EasyUO's Container Info variables.$$
+Please use a standard wooden or metal$
+chest within 2 paces of your character.$
set #targcurs 1
wait %wait1
goto looptgt2
}
set %securecontainerid #ltargetid
GSC3:
finditem %securecontainerid G_2
if #findkind = -1
{
menu font color red
menu delete status
menu text status 50 5 SECURE container not found.
menu font color white
if %sysmessages
event SysMessage SECURE container not found.
wait 3s
set %securecontainerid N/A
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
set %resourcebagid N/A
gosub putGlobalVar %gvar %scriptname #charid resourcebagid
set %adjusttimer 8
goto GSC1
}
gosub putGlobalVar %gvar %scriptname #charid securecontainerid
menu font color lime
nextcpos %bank_securex %bank_securey
set #lobjectid %securecontainerid
GSC4:
gosub resetjournal
wait %wait2
event macro 17 0
wait %wait1
gosub FindJournalMessage must_wait
if #result
{
menu delete status
menu text status 50 5 Retrying Secure box open.
if %sysmessages
event SysMessage Retrying Secure box open.
wait %wait2
wait %longwait
goto GSC4
}
if #contid = %securecontainerid
contpos %bank_securex %bank_securey
if %adjusttimer <> 0
{
menu delete status
menu text status 50 5 Adjust secure bag now.
if %sysmessages
event SysMessage Adjust secure bag now, you have , #spc , %adjusttimer , #spc , seconds.
gosub waittimer %adjusttimer
if #contid = %securecontainerid && ( #contposx <> %bank_securex || #contposy <> %bank_securey )
{
set %bank_securex #contposx
set %bank_securey #contposy
gosub putGlobalVar %gvar %scriptname #charid bank_securex
gosub putGlobalVar %gvar %scriptname #charid bank_securey
}
}
menu delete status
wait %longwait
return
sub SetUpSkills
chooseskill magery
wait 1
set %magery #skill
chooseskill chivalry
wait 1
set %chivalry #skill
chooseskill hiding
wait 1
set %hideskill #skill
chooseskill tinkering
wait 1
set %tinkerskill #skill
chooseskill %skillname
wait 1
if #skillLock <> up
{
menu delete status
menu text status 50 5 %skillname Skill is down or locked.
display ok Your %skillname skill is down! $Pointless to run this script don't you think?$
menu hide
halt
}
if #skill < 250 && ! %debug
{
menu font size 13
menu delete status
menu text status 5 94 Go buy some %skillname skill!
display ok This script requires that you go buy your %skillname $skill up to at least 25 or train manually.$$
+Please do so and restart the script, thank you.
menu hide
halt
}
gosub getGlobalVar %gvar %scriptname #charid _startskill
if ! #result || %_startskill = N/A
{
set %_startskill #skill
gosub putGlobalVar %gvar %scriptname #charid _startskill
}
set %startskill #skill
set %currentskill #skill
set %skillcap #skillcap
gosub SetupSkillTable
gosub SelectItemToMake
set %currentitem #result
return
sub SelectItemToMake
for %i 1 %skillTableSize
{
if %low . %i <= %currentskill && %currentskill <= %high . %i
return %i
}
return %skillTableSize
sub StatusBarUp
;purpose - make sure the status bar is up on the char
IF #charname = N/A
{
Event Macro 8 2
wait %wait2
set %retrycount 11
}
return
sub SkillChart
set %tm %train_method
set %starting_desc %desc . %currentitem
SC1:
menu clear
set %skilltablebase 150
set %windo
1. sayfa (Toplam 1 sayfa) [ 4 mesaj ] |
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız |
World of UO - Age of Shadows Sunucusu © 2003 - 2020