Trying to add a Timer in there for Hours/sec/min but having problems
any way u could help out or add on in there for me ?
Well, I thought about adding a timer for this as well, just to keep track of the amount of ore/hour easier. So I've added a few changes to the original script to add a built-in timer...
Hope this can help you out.
First, you need to replace sub DropnStock with this:
(Actually I just added the line "gosub frneotimer" there, but I posted the entire sub again as to avoid any problems where you should place the gosub)
sub DropnStock
gosub frneotimer
finditem %SecureID
while #findkind = -1
{
gosub TM_TravelFromRuneBook %TravelMethod 1 1 %RunebookID
if %ToBank = yes
{
event macro 1 0 Bank
gosub GumpWait container_gump container_gump 180_240 ;bankbox
}
finditem %SecureID
}
set #lobjectid %SecureID
event macro 17
gosub GumpWait %SecureGmpName %SecureGmpName %SecureGmpSize
wait %mWait
;Deal with ghost items in pack by re-opening
event macro 8 7
wait %lWait
;Drop Items
Repeat
finditem %AllMinedTypes C_ , #backpackid
while #findkind <> -1
{
if #findtype IN %GemTypes
set %DropBag %GemBagID
if #findtype IN %CrystalBRTypes
set %DropBag %GemBagID
if #findtype IN %GoldTypes
set %DropBag %SecureID
if #findtype IN %OreTypes
set %DropBag %OreBagID
if #findtype IN %StoneTypes
set %DropBag %GemBagID
if #findtype IN %BlackrockTypes && #findcol <> 0
set %DropBag %BlkRkBagID
exevent drag #findid #findstack
wait %dragWait
exevent dropc %DropBag
wait %dragWait
;SOMETIHNG HERE THAT CONFIRMS THE ITEM HAS BEEN MOVED TO THE SECURE BEFORE COUNTING SO COUNTERS STOP GETTING EFF'd UP WHEN BANKBOX FULL
gosub ResourceCnt #findtype #findstack #findcol
gosub TM_NGFS_SaveVariables XIIxMining
finditem %AllMinedTypes C_ , #backpackid
}
Until #findkind = -1
;Stock Items
if %ToTinker = yes
{
finditem %IngotTypes C_ , #backpackid
if #findstack < 20
{
set %amount 20 - #findstack
finditem %IngotTypes C_ , %SecureID
if #findstack < %amount
{
display You need to have at least 20 iron ingots to continue, get some more ingots and resume. Script pausing.
Gosub Pause
}
else
{
exevent drag #findid %amount
wait %dragWait
exevent dropc #backpackid
wait %dragWait
}
}
repeat
finditem %TinkerToolTypes C_ , #backpackid
set !_cnt #findcnt
if !_cnt < 2
{
finditem %TinkerToolTypes C_ , %SecureID
if #findkind = -1
gosub Tinker Tools
else
{
exevent drag #findid
wait %dragWait
exevent dropc #backpackid
wait %dragWait
}
}
else
{
if #findkind = -1
{
Display You seem to be out of tinker tools with no way to make more. Script pausing.
Gosub Pause
}
}
until !_cnt > 1
}
finditem %MineToolTypes C_ , #backpackid
while #findcnt < 2
{
set %amount 2 - #findcnt
while %amount > 0
{
finditem %MineToolTypes C_ , %SecureID
if #findcnt < 1
{
if %ToTinker = no
{
display You are out of mining tools, get more tools and resume. Script pausing.
gosub Pause
}
if %ToTinker = yes
{
gosub Tinker Shovel
finditem %MineToolTypes C_ , #backpackid
set %amount %amount - #findcnt
}
}
else
{
exevent drag #findid
wait %dragWait
exevent dropc #backpackid
wait %dragWait
set %amount %amount - 1
}
}
}
gosub MenuButtonCheck
Return
Also, you should replace the original "sub Display_M_Tracking" with this one. All I did was add the Timer to this sub. And also, the time will start counting as soon as this menu appears.
sub Display_M_Tracking
set %starttime #scnt
set %runtime 0h:00m:00s
menu Clear
menu Window Title XIIxOveR's Mining For Dummies
menu Window Color Gray
menu Window Size 391 300
menu Font Transparent #true
menu Font Align Right
menu Shape M_TrackingBorder 8 24 377 273 4 7 3 Maroon 7 Gray
menu Font Name Comic Sans MS
menu Font Size 10
menu Font Style bi
menu Font Color Black
menu Font Transparent #false
menu Font Align Center
menu Font BGColor Gray
menu Text Title 45 0 XIIxMining Resource Tracking System
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style b
menu Text IronCnt 28 48 Iron:
menu Text DullCnt 28 72 Dull:
menu Text ShadCnt 28 96 Shad:
menu Text CoppCnt 28 120 Copp:
menu Text BronCnt 28 144 Bron:
menu Text GoldCnt 28 168 Gold:
menu Text AgapCnt 28 192 Agap:
menu Text VariCnt 28 216 Veri:
menu Text ValoCnt 28 240 Valo:
menu Text EcruCnt 120 48 Ecru:
menu Text FireCnt 120 72 Fire:
menu Text TurqCnt 120 96 Turq:
menu Text BlueCnt 120 120 Blue:
menu Text PerfCnt 120 144 Perf:
menu Text DarkCnt 120 168 Dark:
menu Text BlacCnt 120 192 Blac:
menu Text CrysCnt 120 216 Crys:
menu Text SandCnt 120 240 Sand:
menu Text DiamCnt 212 48 Diam:
menu Text RubyCnt 212 72 Ruby:
menu Text StarCnt 212 96 Star:
menu Text SappCnt 212 120 Sapp:
menu Text CitrCnt 212 144 Citr:
menu Text AmbeCnt 212 192 Ambe:
menu Text TourCnt 212 216 Tour:
menu Text AmetCnt 212 240 Amet:
menu Text EmerCnt 212 168 Emer:
menu Text NormStnCnt 304 48 Norm:
menu Text DullStnCnt 304 72 Dull:
menu Text ShadStnCnt 304 96 Shad:
menu Text CoppStnCnt 304 120 Copp:
menu Text BronStnCnt 304 144 Bron:
menu Text GoldStnCnt 304 168 Gold:
menu Text AgapStnCnt 304 192 Agap:
menu Text VeriStnCnt 304 216 Veri:
menu Text ValoStnCnt 304 240 Valo:
menu Font Style
menu Text IronCntVal 70 48 %IronCnt
menu Text DullCntVal 70 72 %DullCnt
menu Text ShadCntVal 70 96 %ShadCnt
menu Text CoppCntVal 70 120 %CoppCnt
menu Text BronCntVal 70 144 %BronCnt
menu Text GoldCntVal 70 168 %GoldCnt
menu Text AgapCntVal 70 192 %AgapCnt
menu Text VeriCntVal 70 216 %VeriCnt
menu Text ValoCntVal 70 240 %ValoCnt
menu Text EcruCntVal 160 48 %EcruCnt
menu Text FireCntVal 160 72 %FireCnt
menu Text TurqCntVal 160 96 %TurqCnt
menu Text BlueCntVal 160 120 %BlueCnt
menu Text PerfCntVal 160 144 %PerfCnt
menu Text DarkCntVal 160 168 %DarkCnt
menu Text BlacCntVal 160 192 %BlacCnt
menu Text CrysCntVal 160 216 %CrysCnt
menu Text SandCntVal 160 240 %SandCnt
menu Text DiamCntVal 254 48 %DiamCnt
menu Text RubyCntVal 254 72 %RubyCnt
menu Text StarCntVal 254 96 %StarCnt
menu Text SappCntVal 254 120 %SappCnt
menu Text CitrCntVal 254 144 %CitrCnt
menu Text AmbeCntVal 254 192 %AmbeCnt
menu Text TourCntVal 254 216 %TourCnt
menu Text AmetCntVal 254 240 %AmetCnt
menu Text EmerCntVal 254 168 %EmerCnt
menu Text NormStnCntVal 343 48 %NormStnCnt
menu Text DullStnCntVal 343 72 %DullStnCnt
menu Text ShadStnCntVal 343 96 %ShadStnCnt
menu Text CoppStnCntVal 343 120 %CoppStnCnt
menu Text BronStnCntVal 343 144 %BronStnCnt
menu Text GoldStnCntVal 343 168 %GoldStnCnt
menu Text AgapStnCntVal 343 192 %AgapStnCnt
menu Text VeriStnCntVal 343 216 %VeriStnCnt
menu Text ValoStnCntVal 343 240 %ValoStnCnt
menu Font Size 10
menu Font Style bi
menu Font Align Left
menu Text Ingots 24 260 Ingots
menu Text Stone 304 260 Stone
menu Shape EUOShape2 20 256 57 4 3 7 1 Black 7 Maroon
menu Shape EUOShape3 300 256 57 4 3 7 1 Black 7 Maroon
menu Font Size 8
menu Font Style
menu Font Align Center
menu Text runtime 192 32 %runtime
menu Font Style b
menu Text timerunning 104 32 Time Running:
menu Font Style
menu Font Color WindowText
menu Font BGColor BtnFace
menu Button M_TrackingStart 105 265 60 25 Start
menu Button M_TrackingReset 225 265 60 25 Reset
;menu Show 0 450
return
And last, you should add this anywhere in the script:
;####################
;SUB frneotimer
;####################
sub frneotimer
set %currenttime #scnt
set %time %currenttime - %starttime
set %hh %time / 3600
set %rest1 %time % 3600
set %minutes %rest1 / 60
if %minutes < 10
{
set %mm 0 , %minutes
}
else
{
set %mm %minutes
}
set %seconds %rest1 % 60
if %seconds < 10
{
set %ss 0 , %seconds
}
else
{
set %ss %seconds
}
set %runtime %hh , h , : , %mm , m , : , %ss , s
menu set runtime %runtime
return
That's it, hope I didn't forget to post any of the code.
The end result should be something like this:

The timer will be updated every time you recall home to drop off the resources...
Hope this is what you meant, and if so, hope you like it...

If you give it a try, send some feedback!

PS: XII, if you don't like this, just tell me and I'll remove this post!

Cheers...