[EasyUO] XP Tracker (BETA)
Posted: Wed Aug 22, 2018 8:40 pm
This is something I threw together to track XP on levelable weapons, amongst a few other things:
- Displays the level/current XP of the weapon you select
- Shows the XP of your last kill
- Shows the XP gained since the script was started
- Has a "stopwatch" feature that begins recording when you click a button (to see, say, how much XP you get in one run from a dungeon)
- The current loop time in ms (mostly for testing purposes, should be around 400 ms)
This is currently in beta, essentially. I'm hoping a few people wouldn't mind testing this and seeing if there's any bugs/things that need to be fixed, or anything else that they think should be added. Current issues I've noticed:
- I've had a couple of crashes. Not sure if it's the scans from this, my auto-attack script, or my looter. If you do crash, please let me know what else you were running/what happened before you crashed (changing weapons, running an organizer, etc.)
- This won't track for weapons under 10,000 XP (the EXP string needs to be 5 or 6 characters in length to work, until I get bored enough write something).
Stuff I may add:
- A display of how much XP until your next level (I've tried this, but it adds way too much time to the loop, so it's cut out for now.)
- A durability monitor (again, I have this, but this increases the loop time far too much).
Setup is fairly easy. Start the script. Click "Setup" and highlight the weapon you want to track the XP of. When you restart the script, the previously saved weapon will still be tracked. To target a new weapon, click "Setup" and target the new weapon. Clicking "Reset" will reset all the counters (Last Kill, XP Since Start, etc.) Clicking "Track" will start the stopwatch feature; use this to see how much XP you get from a single run in a dungeon/area.
- Displays the level/current XP of the weapon you select
- Shows the XP of your last kill
- Shows the XP gained since the script was started
- Has a "stopwatch" feature that begins recording when you click a button (to see, say, how much XP you get in one run from a dungeon)
- The current loop time in ms (mostly for testing purposes, should be around 400 ms)
This is currently in beta, essentially. I'm hoping a few people wouldn't mind testing this and seeing if there's any bugs/things that need to be fixed, or anything else that they think should be added. Current issues I've noticed:
- I've had a couple of crashes. Not sure if it's the scans from this, my auto-attack script, or my looter. If you do crash, please let me know what else you were running/what happened before you crashed (changing weapons, running an organizer, etc.)
- This won't track for weapons under 10,000 XP (the EXP string needs to be 5 or 6 characters in length to work, until I get bored enough write something).
Stuff I may add:
- A display of how much XP until your next level (I've tried this, but it adds way too much time to the loop, so it's cut out for now.)
- A durability monitor (again, I have this, but this increases the loop time far too much).
Setup is fairly easy. Start the script. Click "Setup" and highlight the weapon you want to track the XP of. When you restart the script, the previously saved weapon will still be tracked. To target a new weapon, click "Setup" and target the new weapon. Clicking "Reset" will reset all the counters (Last Kill, XP Since Start, etc.) Clicking "Track" will start the stopwatch feature; use this to see how much XP you get from a single run in a dungeon/area.
Code: Select all
; Script: XP Tracker
; Author: Devlin
; Current Version: 1.0 Beta
; Purpose: Tracks XP on levelable weapons
; Instructions: To track a weapon, click on "Setup" and click on the weapon you wish to track.
; When you restart the script, the last tracked weapon will be saved.
;
loop2:
set %KEXP 0
set %wepid *wepid
set %XPSinceStart On
gosub Menu
gosub Test
loop:
set %Time1 #scnt2
;menu set ID ID: %wepid
if #menubutton = Setup
{
gosub setup
}
if #menubutton = Reset
{
set #menubutton 0
event sysmessage All tracking numbers have been reset.
goto loop2:
}
event property %wepID
str pos #property Experience:
set %start #strres + 11
str mid #property %start 7
set %EXP #strres
set %PointsLvl
menu set EXP XP: %EXP
gosub XPStart
gosub LastKill
gosub Track
;gosub NextLVL
event property %wepID
str pos #property Level
set %start #strres + 7
str mid #property %start 2
set %LVL #strres
menu set LVL Level: %LVL
set %Time2 #scnt2
set %Time3 ( ( %Time2 - %Time1 ) ) * 100
menu set Time Loop Time: %Time3 ms
goto loop:
sub Setup
event sysmessage Please click on the weapon you wish to track
set #targCurs 1
while #targcurs = 1
wait 1
set %wepid #LTARGETID
set *wepid #LTARGETID
set *XPSave 1
set #menubutton 0
set %KEXP3 0
menu set Lastkill Last Kill: #KEXP3
return
sub XPStart
if %XPSinceStart = On
{
set %TotalXP1 #strres
set %XPSinceStart Off
}
set %TotalXP2 #strres
set %TotalXPTracked abs ( %TotalXP2 - %TotalXP1 )
menu set TotalXP XP Since Start: %TotalXPTracked
return
sub LastKill
;if %EXP > %KEXP2
;{
set %KEXP2 #strres
set %KEXP3 ( %KEXP2 - %KEXP )
;}
if %KEXP <> #strres
{
set %KEXP #strres
menu set LastKill Last Kill: %KEXP3
}
if %KEXP3 = %EXP
{
set %KEXP3 0
menu set LastKill Last Kill: %KEXP3
}
return
sub Track
if %TrackStatus = On
{
set %Track2 #strres
}
if #menubutton = Track
{
set %TrackStatus On
set #menubutton 0
set %Track1 #strres
event sysmessage XP gained since hitting "Track" will be recorded/displayed under "XP Tracker".
}
set %TrackedXP abs ( %Track1 - %Track2 )
menu set XPTrack Tracked XP: %TrackedXP
return
;sub NextLVL
;set %a 0
;for %1 0 %LVL
;{
; set %b ( %i * 100 ) * 2
; set %a %a + %b
;}
;set %a %a + ( %i * 100 ) - 100
;set %NextLVL %b - %EXP
;menu set NextLVL Til Next Level: %NextLVL
;return
return
sub Menu
menu show 20 750
menu Window transparent 70
menu window size 200 130
menu text LVL 20 0
menu text EXP 20 20
menu text LastKill 20 40
menu text TotalXP 20 60
menu text XPTrack 20 80
menu Button Track 150 0 55 25 Track
menu Button Reset 150 25 55 25 Reset
menu Button Setup 150 50 55 25 Setup
menu text Time 20 100
menu text NextLVL 20 120
menu text ID 20 140
return
sub Test
event property %wepID
str pos #property Experience:
set %start #strres + 11
str mid #property %start 7
set %ST #strres
str right %ST 1
set %ST2 #strres
if %ST2 = $
{
set %STLength 6
}
else
{
set %STLength 7
}
return