[EasyUO] XP Tracker (BETA)

If you make a Client-side script you can publish it here for other players to use
Post Reply
User avatar
Devlin
Legendary Scribe
Posts: 652
Joined: Thu Mar 18, 2010 12:50 pm

[EasyUO] XP Tracker (BETA)

Post by Devlin »

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.

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
Resident Wiki Editor/Village Idiot

EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Separate Journal for Guild or Public Chat (Old)
---------------------------------------------
Combat Focus Guide (Godmode Formula)
mattwaldram
Elder Scribe
Posts: 104
Joined: Tue May 05, 2015 10:54 am

Re: [EasyUO] XP Tracker (BETA)

Post by mattwaldram »

Happy to test this - I've been looking for something like it for a while, now.

Question for you: Is it possible to have it display how many points until the next level? This is the thing I'm most focussed on when levelling, but I've never been able to find a macro that does this.

I have another macro that I found somewhere on the EasyUO forums - and that one also causes semi-frequent crashes.
-- In-game: Oslington Weasel
mattwaldram
Elder Scribe
Posts: 104
Joined: Tue May 05, 2015 10:54 am

Re: [EasyUO] XP Tracker (BETA)

Post by mattwaldram »

Initial thoughts:

I really like what you've done, and if it's possible to include the "number of points to next level" then this would be a really, really useful macro.

I did two complete sweeps of Fel Deceit, and it crashed my computer 3 times on each sweep, 6 in total. That's obviously more than I can stomach, so you'd need to find a way to prevent that if people were to be able to use this.

One thing I did notice: when running the macro, I'm unable to hover my mouse pointer over the weapon in my hand and get the in-game weapon stats appear. It doesn't bring up any details when I hover-over. As soon as I closed the macro, I could do this again.

Both of these facts - the crashing, and the no-info-when-mouse-hovers - are also true in the other macro I have. The crashing thing is why I don't use that macro.
-- In-game: Oslington Weasel
User avatar
Devlin
Legendary Scribe
Posts: 652
Joined: Thu Mar 18, 2010 12:50 pm

Re: [EasyUO] XP Tracker (BETA)

Post by Devlin »

Hey Matt,

Thanks for trying it out! I'm curious, what other scripts were you running when you experienced the crashes? I probably crashed 6 times in total testing this over a few weeks, so I'm guessing you were running some other scripts that may have clashed (looters or auto attackers). Also, are your UOEX and EUO clients up to date?

I do currently have a "xp points til next level" in the works, but it currently adds a LOT of time to the loop (total loop time was closer to 2-3 seconds instead of under half a second). Until I can get this loop time down, I've taken out that feature.

One downside to running constant scans (aside from occasional crashes, or in your case, really frequent ones) was being unable to hover your mouse over the item to see the stats. The only work around I saw for that was 1.) pausing the script 2.) highlighting another item then quickly trying your weapon (sometimes took 2-3 tries.)
Resident Wiki Editor/Village Idiot

EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Separate Journal for Guild or Public Chat (Old)
---------------------------------------------
Combat Focus Guide (Godmode Formula)
mattwaldram
Elder Scribe
Posts: 104
Joined: Tue May 05, 2015 10:54 am

Re: [EasyUO] XP Tracker (BETA)

Post by mattwaldram »

I basically use two EasyUO macros that are running pretty much non-stop. Blazin HealR (of course) and one called Gambit by a clever coder named Devlin. The version of that I'm using is 1.01 Beta.... so if you have a newer version of that, I'm happy to receive it :)
-- In-game: Oslington Weasel
User avatar
Devlin
Legendary Scribe
Posts: 652
Joined: Thu Mar 18, 2010 12:50 pm

Re: [EasyUO] XP Tracker (BETA)

Post by Devlin »

I killed Gambit a few years ago and put everything into my Rearmer script. Rearmer is on 7.10 or something and is pretty much a finished project. I may add some other stuff eventually (discord/curse weapon are on my list right now), but that version is pretty much final/as stable as can be. You still get all your chivalry spells, but you also get your primary/secondary abilities reactivating automatically, as well as momentum strike and counter attack, along with some special functions that make leveling weapons super easy. There's also a handy menu involved, so no more editing code to change hotkeys etc.

Gonna take a look at the script later today probably. I may just kill the "Level" feature, as that uses its own scan. If there's only one scan, it should be more stable. Only other solution would be to increase the time between scans, but that would make the "Last Kill" feature less reliable (it'd probably record the last 2-3 kills, or whatever dies within the last 3 seconds or so).
Resident Wiki Editor/Village Idiot

EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Separate Journal for Guild or Public Chat (Old)
---------------------------------------------
Combat Focus Guide (Godmode Formula)
Post Reply