left until dragon

Post Reply
snareman
Posts: 2
Joined: Sat Aug 30, 2014 8:53 am

left until dragon

Post by snareman »

Okay, in achaea I am making something where it tracks my progress to level 99. I am taking a variable and trying to change it whenever my xp changes. I use SVO's custom prompt and I'm trying to place it in there.

leftToDragon = 9900 - ((tonumber(gmcp.Char.Status.level:match("^(%d+)")) * 100) + tonumber(gmcp.Char.Status.xp:match("^(%d+)")))

is how I define my variable with the event handler added gmcp.Char.Status.xp

I use the function svo.adddefinition("@l2d","leftToDragon") to put it in my prompt

the output is it just puts leftToDragon in my prompt at the value gmcp.Char.Status.xp was when I activated it and stays there, and the only time it updates correctly is when I deactivate and reactivate the script leftToDragon is contained in.

I also hope to change it to where the number in my prompt is read as a decimal as it is defined in gmcp.Char.Status.xp but without the % symbol.

Any help would be awesome. Thank you in advance, I will provided more information if needed.

snareman
Posts: 2
Joined: Sat Aug 30, 2014 8:53 am

Re: left until dragon

Post by snareman »

Am I lacking something in order to get help with this or..?

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: left until dragon

Post by Belgarath »

This link to Vadi's svo documentation will probably help you with that.

Post Reply