[EasyUO] Harvest item counter

If you make a Client-side script you can publish it here for other players to use
Post Reply
User avatar
brhanson2
Elder Scribe
Posts: 145
Joined: Sun Dec 18, 2011 3:26 am

[EasyUO] Harvest item counter

Post by brhanson2 »

If any of you are a statistics geek like me you might like this. Will keep track of your harvesting session quantities (ore and logs).

Nothing to setup, just play!

Enjoy!

**EDIT 7/9/18, fixed small counting error and added grand totals**

Code: Select all

;==================================
; Script Name:  Carzikans Harvest Counter (based on DarkLotus Ore Counter)
; Author: Carzikan
; Version: 1.0
;==================================

set %iron 0
set %dullcopper 0
set %shadow 0
set %copper 0
set %bronze 0
set %gold 0
set %agapite 0
set %verite 0
set %valorite 0
set %blaze 0
set %ice 0
set %toxic 0
set %electrum 0
set %platinum 0
set %wood 0
set %gradea 0
set %pine 0
set %ash 0
set %mohogany 0
set %yew 0
set %oak 0
set %zircote 0
set %ebony 0
set %bamboo 0
set %purpleheart 0
set %redwood 0
set %petrified 0
set %totalore 0
set %totalwood 0

ignoreitem reset
initevents
gosub showeuomenu1
Main:
finditem DWJ_ZLK C_
if #findkind = -1
{
        ignoreitem reset
        wait 1
        goto main
}

if #findcol = 0 && #findtype = DWJ
gosub 0O
goto done
}
if #findcol = 0 && #findtype = ZLK
gosub 0W
goto done
}
if #findcol = 1152 && #findtype = DWJ
gosub 1152O
goto done
}
if #findcol = 1152 && #findtype = ZLK
gosub 1152W
goto done
}
if #findcol = 1153 && #findtype = DWJ
gosub 1153O
goto done
}
if #findcol = 1153 && #findtype = ZLK
gosub 1153W
goto done
}
gosub #findcol
;
:done
wait 5
ignoreitem #findid
wait 5
goto main

                PETRIFIED
sub 1153W
set %newid27 #findid
set %newcnt27 #FINDSTACK
if %oldcnt27 => %newcnt27
{
if %oldid27 <> #findid
{
set %nowcnt27 %newcnt27
set %petrified %petrified + %nowcnt27
gosub totalwood
menu set Petrified %petrified
set %oldcnt27 %newcnt27
set %oldid27 #findid
return
}
return
}
set %nowcnt27 %newcnt27 - %oldcnt27
set %petrified %petrified + %nowcnt27
gosub totalwood
menu set Petrified %petrified
set %oldcnt27 %newcnt27
set %oldid27 #findid
return

                REDWOOD
sub 37
set %newid26 #findid
set %newcnt26 #FINDSTACK
if %oldcnt26 => %newcnt26
{
if %oldid26 <> #findid
{
set %nowcnt26 %newcnt26
set %redwood %redwood + %nowcnt26
gosub totalwood
menu set Redwood %redwood
set %oldcnt26 %newcnt26
set %oldid26 #findid
return
}
return
}
set %nowcnt26 %newcnt26 - %oldcnt26
set %redwood %redwood + %nowcnt26
gosub totalwood
menu set Redwood %redwood
set %oldcnt26 %newcnt26
set %oldid26 #findid
return

                PURPLE HEART
sub 114
set %newid25 #findid
set %newcnt25 #FINDSTACK
if %oldcnt25 => %newcnt25
{
if %oldid25 <> #findid
{
set %nowcnt25 %newcnt25
set %purpleheart %purpleheart + %nowcnt25
gosub totalwood
menu set Purpleheart %purpleheart
set %oldcnt25 %newcnt25
set %oldid25 #findid
return
}
return
}
set %nowcnt25 %newcnt25 - %oldcnt25
set %purpleheart %purpleheart + %nowcnt25
gosub totalwood
menu set Purpleheart %purpleheart
set %oldcnt25 %newcnt25
set %oldid25 #findid
return

                BAMBOO
sub 1152W
set %newid24 #findid
set %newcnt24 #FINDSTACK
if %oldcnt24 => %newcnt24
{
if %oldid24 <> #findid
{
set %nowcnt24 %newcnt24
set %bamboo %bamboo + %nowcnt24
gosub totalwood
menu set Bamboo %bamboo
set %oldcnt24 %newcnt24
set %oldid24 #findid
return
}
return
}
set %nowcnt24 %newcnt24 - %oldcnt24
set %bamboo %bamboo + %nowcnt24
gosub totalwood
menu set Bamboo %bamboo
set %oldcnt24 %newcnt24
set %oldid24 #findid
return

                EBONY
sub 43
set %newid23 #findid
set %newcnt23 #FINDSTACK
if %oldcnt23 => %newcnt23
{
if %oldid23 <> #findid
{
set %nowcnt23 %newcnt23
set %ebony %ebony + %nowcnt23
gosub totalwood
menu set Ebony %ebony
set %oldcnt23 %newcnt23
set %oldid23 #findid
return
}
return
}
set %nowcnt23 %newcnt23 - %oldcnt23
set %ebony %ebony + %nowcnt23
gosub totalwood
menu set Ebony %ebony
set %oldcnt23 %newcnt23
set %oldid23 #findid
return

                ZIRCOTE
sub 1271
set %newid22 #findid
set %newcnt22 #FINDSTACK
if %oldcnt22 => %newcnt22
{
if %oldid22 <> #findid
{
set %nowcnt22 %newcnt22
set %zircote %zircote + %nowcnt22
gosub totalwood
menu set Zircote %zircote
set %oldcnt22 %newcnt22
set %oldid22 #findid
return
}
return
}
set %nowcnt22 %newcnt22 - %oldcnt22
set %zircote %zircote + %nowcnt22
gosub totalwood
menu set Zircote %zircote
set %oldcnt22 %newcnt22
set %oldid22 #findid
return

                OAK
sub 488
set %newid21 #findid
set %newcnt21 #FINDSTACK
if %oldcnt21 => %newcnt21
{
if %oldid21 <> #findid
{
set %nowcnt21 %newcnt21
set %oak %oak + %nowcnt21
gosub totalwood
menu set Oak %oak
set %oldcnt21 %newcnt21
set %oldid21 #findid
return
}
return
}
set %nowcnt21 %newcnt21 - %oldcnt21
set %oak %oak + %nowcnt21
gosub totalwood
menu set Oak %oak
set %oldcnt21 %newcnt21
set %oldid21 #findid
return

                YEW
sub 1281
set %newid20 #findid
set %newcnt20 #FINDSTACK
if %oldcnt20 => %newcnt20
{
if %oldid20 <> #findid
{
set %nowcnt20 %newcnt20
set %yew %yew + %nowcnt20
gosub totalwood
menu set Yew %yew
set %oldcnt20 %newcnt20
set %oldid20 #findid
return
}
return
}
set %nowcnt20 %newcnt20 - %oldcnt20
set %yew %yew + %nowcnt20
gosub totalwood
menu set Yew %yew
set %oldcnt20 %newcnt20
set %oldid20 #findid
return

                MOHOGANY

sub 355
set %newid19 #findid
set %newcnt19 #FINDSTACK
if %oldcnt19 => %newcnt19
{
if %oldid19 <> #findid
{
set %nowcnt19 %newcnt19
set %mohogany %mohogany + %nowcnt19
gosub totalwood
menu set Mohogany %mohogany
set %oldcnt19 %newcnt19
set %oldid19 #findid
return
}
return
}
set %nowcnt19 %newcnt19 - %oldcnt19
set %mohogany %mohogany + %nowcnt19
gosub totalwood
menu set Mohogany %mohogany
set %oldcnt19 %newcnt19
set %oldid19 #findid
return

                ASH
sub 961
set %newid18 #findid
set %newcnt18 #FINDSTACK
if %oldcnt18 => %newcnt18
{
if %oldid18 <> #findid
{
set %nowcnt18 %newcnt18
set %ash %ash + %nowcnt18
gosub totalwood
menu set Ash %ash
set %oldcnt18 %newcnt18
set %oldid18 #findid
return
}
return
}
set %nowcnt18 %newcnt18 - %oldcnt18
set %ash %ash + %nowcnt18
gosub totalwood
menu set Ash %ash
set %oldcnt18 %newcnt18
set %oldid18 #findid
return

                PINE
sub 1262
set %newid17 #findid
set %newcnt17 #FINDSTACK
if %oldcnt17 => %newcnt17
{
if %oldid17 <> #findid
{
set %nowcnt17 %newcnt17
set %pine %pine + %nowcnt17
gosub totalwood
menu set Pine %pine
set %oldcnt17 %newcnt17
set %oldid17 #findid
return
}
return
}
set %nowcnt17 %newcnt17 - %oldcnt17
set %pine %pine + %nowcnt17
gosub totalwood
menu set Pine %pine
set %oldcnt17 %newcnt17
set %oldid17 #findid
return

                GRADE A
sub 2494
set %newid16 #findid
set %newcnt16 #FINDSTACK
if %oldcnt16 => %newcnt16
{
if %oldid16 <> #findid
{
set %nowcnt16 %newcnt16
set %gradea %gradea + %nowcnt16
gosub totalwood
menu set GradeA %gradea
set %oldcnt16 %newcnt16
set %oldid16 #findid
return
}
return
}
set %nowcnt16 %newcnt16 - %oldcnt16
set %gradea %gradea + %nowcnt16
gosub totalwood
menu set GradeA %gradea
set %oldcnt16 %newcnt16
set %oldid16 #findid
return

                WOOD
sub 0W
set %newid15 #findid
set %newcnt15 #FINDSTACK
if %oldcnt15 => %newcnt15
{
if %oldid15 <> #findid
{
set %nowcnt15 %newcnt15
set %wood %wood + %nowcnt15
gosub totalwood
menu set Wood %wood
set %oldcnt15 %newcnt15
set %oldid15 #findid
return
}
return
}
set %nowcnt15 %newcnt15 - %oldcnt15
set %wood %wood + %nowcnt15
gosub totalwood
menu set Wood %wood
set %oldcnt15 %newcnt15
set %oldid15 #findid
return

                PLATINUM
sub 1153O
set %newid14 #findid
set %newcnt14 #FINDSTACK
if %oldcnt14 => %newcnt14
{
if %oldid14 <> #findid
{
set %nowcnt14 %newcnt14
set %platinum %platinum + %nowcnt14
gosub totalore
menu set Platinum %platinum

set %oldcnt14 %newcnt14
set %oldid14 #findid
return
}
return
}
set %nowcnt14 %newcnt14 - %oldcnt14
set %platinum %platinum + %nowcnt14
gosub totalore
menu set Platinum %platinum
set %oldcnt14 %newcnt14
set %oldid14 #findid
return

                ELECTRUM
sub 1278
set %newid13 #findid
set %newcnt13 #FINDSTACK
if %oldcnt13 => %newcnt13
{
if %oldid13 <> #findid
{
set %nowcnt13 %newcnt13
set %electrum %electrum + %nowcnt13
gosub totalore
menu set Electrum %electrum
set %oldcnt13 %newcnt13
set %oldid13 #findid
return
}
return
}
set %nowcnt13 %newcnt13 - %oldcnt13
set %electrum %electrum + %nowcnt13
gosub totalore
menu set Electrum %electrum
set %oldcnt13 %newcnt13
set %oldid13 #findid
return

                TOXIC
sub 1272
set %newid12 #findid
set %newcnt12 #FINDSTACK
if %oldcnt12 => %newcnt12
{
if %oldid12 <> #findid
{
set %nowcnt12 %newcnt12
set %toxic %toxic + %nowcnt12
gosub totalore
menu set Toxic %toxic

set %oldcnt12 %newcnt12
set %oldid12 #findid
return
}
return
}
set %nowcnt12 %newcnt12 - %oldcnt12
set %toxic %toxic + %nowcnt12
gosub totalore
menu set Toxic %toxic
set %oldcnt12 %newcnt12
set %oldid12 #findid
return

                 ICE
sub 1152O
set %newid11 #findid
set %newcnt11 #FINDSTACK
if %oldcnt11 => %newcnt11
{
if %oldid11 <> #findid
{
set %nowcnt11 %newcnt11
set %ice %ice + %nowcnt11
gosub totalore
menu set Ice %ice
set %oldcnt11 %newcnt11
set %oldid11 #findid
return
}
return
}
set %nowcnt11 %newcnt11 - %oldcnt11
set %ice %ice + %nowcnt11
gosub totalore
menu set Ice %ice
set %oldcnt11 %newcnt11
set %oldid11 #findid
return

                BLAZE
sub 1161
set %newid10 #findid
set %newcnt10 #FINDSTACK
if %oldcnt10 => %newcnt10
{
if %oldid10 <> #findid
{
set %nowcnt10 %newcnt10
set %blaze %blaze + %nowcnt10
gosub totalore
menu set Blaze %blaze

set %oldcnt10 %newcnt10
set %oldid10 #findid
return
}
return
}
set %nowcnt10 %newcnt10 - %oldcnt10
set %blaze %blaze + %nowcnt10
gosub totalore
menu set Blaze %blaze
set %oldcnt10 %newcnt10
set %oldid10 #findid
return


                VALORITE
sub 2219
set %newid9 #findid
set %newcnt9 #FINDSTACK
if %oldcnt9 => %newcnt9
{
if %oldid9 <> #findid
{
set %nowcnt9 %newcnt9
set %valorite %valorite + %nowcnt9
gosub totalore
menu set Valorite %valorite

set %oldcnt9 %newcnt9
set %oldid9 #findid
return
}
return
}
set %nowcnt9 %newcnt9 - %oldcnt9
set %valorite %valorite + %nowcnt9
gosub totalore
menu set Valorite %valorite
set %oldcnt9 %newcnt9
set %oldid9 #findid
return

;               VERITE
sub 2207
set %newid8 #findid
set %newcnt8 #FINDSTACK
if %oldcnt8 => %newcnt8
{
if %oldid8 <> #findid
{
set %nowcnt8 %newcnt8
set %verite %verite + %nowcnt8
gosub totalore
menu set Verite %verite
set %oldcnt8 %newcnt8
set %oldid8 #findid
return
}
return
}
set %nowcnt8 %newcnt8 - %oldcnt8
set %verite %verite + %nowcnt8
gosub totalore
menu set Verite %verite
set %oldcnt8 %newcnt8
set %oldid8 #findid
return

;               AGPITE
sub 2425
set %newid7 #findid
set %newcnt7 #FINDSTACK
if %oldcnt7 => %newcnt7
{
if %oldid7 <> #findid
{
set %nowcnt7 %newcnt7
set %agapite %agapite + %nowcnt7
gosub totalore
menu set Agapite %agapite
set %oldcnt7 %newcnt7
set %oldid7 #findid
return
}
return
}
set %nowcnt7 %newcnt7 - %oldcnt7
set %agapite %agapite + %nowcnt7
gosub totalore
menu set Agapite %agapite
set %oldcnt7 %newcnt7
set %oldid7 #findid
return

;               GOLD
sub 2213
set %newid6 #findid
set %newcnt6 #FINDSTACK
if %oldcnt6 => %newcnt6
{
if %oldid6 <> #findid
{
set %nowcnt6 %newcnt6
set %gold %gold + %nowcnt6
gosub totalore
menu set Gold %gold
set %oldcnt6 %newcnt6
set %oldid6 #findid
return
}
return
}
set %nowcnt6 %newcnt6 - %oldcnt6
set %gold %gold + %nowcnt6
gosub totalore
menu set Gold %gold
set %oldcnt6 %newcnt6
set %oldid6 #findid
return

;               BRONZE
sub 2418
set %newid5 #findid
set %newcnt5 #FINDSTACK
if %oldcnt5 => %newcnt5
{
if %oldid5 <> #findid
{
set %nowcnt5 %newcnt5
set %bronze %bronze + %nowcnt5
gosub totalore
menu set Bronze %bronze
set %oldcnt5 %newcnt5
set %oldid5 #findid
return
}
return
}
set %nowcnt5 %newcnt5 - %oldcnt5
set %bronze %bronze + %nowcnt5
gosub totalore
menu set Bronze %bronze
set %oldcnt5 %newcnt5
set %oldid5 #findid
return

;               COPPER
sub 2413
set %newid4 #findid
set %newcnt4 #FINDSTACK
if %oldcnt4 => %newcnt4
{
if %oldid4 <> #findid
{
set %nowcnt4 %newcnt4
set %copper %copper + %nowcnt4
gosub totalore
menu set Copper %copper
set %oldcnt4 %newcnt4
set %oldid4 #findid
return
}
return
}
set %nowcnt4 %newcnt4 - %oldcnt4
set %copper %copper + %nowcnt4
gosub totalore
menu set Copper %copper
set %oldcnt4 %newcnt4
set %oldid4 #findid
return

;               SHADOW
sub 2406
set %newid3 #findid
set %newcnt3 #FINDSTACK
if %oldcnt3 => %newcnt3
{
if %oldid3 <> #findid
{
set %nowcnt3 %newcnt3
set %shadow %shadow + %nowcnt3
gosub totalore
menu set Shadow %shadow
set %oldcnt3 %newcnt3
set %oldid3 #findid
return
}
return
}
set %nowcnt3 %newcnt3 - %oldcnt3
set %shadow %shadow + %nowcnt3
gosub totalore
menu set Shadow %shadow
set %oldcnt3 %newcnt3
set %oldid3 #findid
return
;               DULL COPPER
sub 2419
set %newid2 #findid
set %newcnt2 #FINDSTACK
if %oldcnt2 => %newcnt2
{
if %oldid2 <> #findid
{
set %nowcnt2 %newcnt2
set %dullcopper %dullcopper + %nowcnt2
gosub totalore
menu set DullCopper %dullcopper
set %oldcnt2 %newcnt2
set %oldid2 #findid
return
}
return
}
set %nowcnt2 %newcnt2 - %oldcnt2
set %dullcopper %dullcopper + %nowcnt2
gosub totalore
menu set DullCopper %dullcopper
set %oldcnt2 %newcnt2
set %oldid2 #findid
return

;               IRON
sub 0O ;iron
set %newid1 #findid
set %newcnt1 #FINDSTACK
if %oldcnt1 => %newcnt1
{
if %oldid1 <> #findid
{
set %nowcnt1 %newcnt1
set %iron %iron + %nowcnt1
gosub totalore
menu set Iron %iron
set %oldcnt1 %newcnt1
set %oldid1 #findid
return
}
return
}
set %nowcnt1 %newcnt1 - %oldcnt1
set %iron %iron + %nowcnt1
gosub totalore
menu set Iron %iron
set %oldcnt1 %newcnt1
set %oldid1 #findid
return

;--------- Calculate Total Ore---------
sub totalore

set %totalore %platinum + %electrum + %toxic + %ice + %blaze + %valorite + %verite + %agapite + %gold + %bronze + %copper + %shadow + %dullcopper + %iron
menu set TotalOre %totalore
return

;--------- Calculate Total Wood---------
sub totalwood

set %totalwood %wood + %gradea + %pine + %ash + %mohogany + %yew + %oak + %zircote + %ebony + %bamboo + %purpleheart + %redwood + %petrified
menu set TotalWood %totalwood
return

;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
        menu Clear
        menu Window Color Black
        menu Window Title Harvesting Counter
        menu Window Size 375 286
        menu Font Transparent #true
        menu Font Name MS Sans Serif
        menu Font Size 8
        menu Font Style b
        menu Font Color White
        menu Font BGColor Black
        menu Text Title 8 40 Iron Mined :
        menu Text Title 190 40 Wood Chopped :
        menu Text Title 8 56 Dull copper Mined :
        menu Text Title 190 56 Pine Chopped :
        menu Text Title 8 72 Shadow Mined :
        menu Text TItle 190 72 Ash Chopped :
        menu Text Title 8 88 Copper mined :
        menu Text Title 190 88 Mohogany Chopped :
        menu Text Title 8 104 Bronze Mined :
        menu Text Title 190 104 Yew Chopped :
        menu Text Title 8 120 Gold Mined :
        menu Text Title 190 120 Oak Chopped :
        menu Text Title 8 136 Agpite Mined :
        menu Text Title 190 136 Zircote Chopped :
        menu Text Title 8 152 Verite Mined :
        menu Text Title 190 152 Ebony Chopped :
        menu Text Title 8 168 Valorite Mined :
        menu Text Title 190 168 Bamboo Chopped :
        menu Text Title 8 184 Blaze Mined :
        menu Text Title 190 184 Purple Heart Chopped :
        menu Text Title 8 200 Ice Mined :
        menu Text Title 190 200 Redwood Chopped :
        menu Text Title 8 216 Toxic Mined :
        menu Text Title 190 216 Petrified Chopped :
        menu Text Title 8 232 Electrum Mined :
        menu Text Title 190 232 Grade A Chopped :
        menu Text Title 8 248 Platinum Mined :
        menu Font Size 12
        menu Font Style b
        menu Font Color Red
        menu Text Title 68 8 Carzikan's Harvesting Counter
        menu Font Size 8
        menu Font Color White
        menu Text Iron 152 40 %iron
        menu Text Wood 334 40 %wood
        menu Text DullCopper 152 56 %dullcopper
        menu Text Pine 334 56 %pine
        menu Text Shadow 152 72 %shadow
        menu Text Ash 334 72 %ash
        menu Text Copper 152 88 %copper
        menu Text Mohogany 334 88 %mohogany
        menu Text Bronze 152 104 %bronze
        menu Text Yew 334 104 %yew
        menu Text Gold 152 120 %gold
        menu Text Oak 334 120 %oak
        menu Text Agapite 152 136 %agapite
        menu Text Zircote 334 136 %zircote
        menu Text Verite 152 152 %verite
        menu Text Ebony 334 152 %ebony
        menu Text Valorite 152 168 %valorite
        menu Text Bamboo 334 168 %bamboo
        menu Text Blaze 152 184 %blaze
        menu Text Purpleheart 334 184 %purpleheart
        menu Text Ice 152 200 %ice
        menu Text Redwood 334 200 %redwood
        menu Text Toxic 152 216 %toxic
        menu Text Petrified 334 216 %petrified
        menu Text Electrum 152 232 %electrum
        menu Text GradeA 334 232 %gradea
        menu Text Platinum 152 248 %platinum
        menu Text TotalOre 152 270 %totalore
        menu Text TotalWood 334 270 %totalwood
        menu Show 634 678
return
;--------- EasyUO Menu Designer Code End ---------
Carzikan (formerly known as Tostig on Great Lakes)
Post Reply