Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- After implementing the following trigger and script, check QSC and you should be good to go!
- Trigger
- --------
- PERL REGEX: ^You are level (\d+) ((.*)) and (.*)% of the way to the next level.$
- BIG BOX:
- percenttodragon = levelcalc.dragonpercent()
- cecho("\n<gold>[<white>Zhe<gold>]:<OrangeRed> You are "..percenttodragon.."% of the way to dragon!")
- Script
- ------
- levelcalc = {
- xpto = {
- 0, 5000, 10500, 20550, 35205,
- 50525, 70577, 95043, 122000, 152000,
- 185000, 225000, 267000, 312000, 359000,
- 407000, 456000, 506000, 561000, 621000,
- 691000, 761000, 836000, 916000, 1001000,
- 1091000, 1186000, 1286000, 1391000, 1501000,
- 1616000, 1736000, 1861000, 1986000, 2116000,
- 2251000, 2391000, 2536000, 2686000, 2941000,
- 3096000, 3256000, 3416000, 3581000, 3746000,
- 3916000, 4150000, 4353395, 4794382, 5279468,
- 5813062, 6400016, 7045665, 7755879, 8537115,
- 9396474, 10341769, 11381594, 12525401, 13783589,
- 15167596, 16690004, 18364653, 20206766, 22233091,
- 24462048, 26913901, 29610939, 32576939, 35840356,
- 39430114, 43378848, 47722456, 52500425, 60000000,
- 70000000, 83000000, 100000000, 120000000, 150000000,
- 185000000, 225000000, 270000000, 320000000, 375000000,
- 435000000, 500000000, 570000000, 645000000, 725000000,
- 810000000, 900000000, 995000000, 1095000000, 1200000000,
- 1310000000, 1425000000, 1545000000, 1670000000, 2000000000,
- 2346500000, 2710325000, 3092341200, 3493458200, 3914631000,
- 4356862400, 4821205300, 5308765300, 5820703300, 6358238200,
- 6922649800, 7515281900, 8137545600, 8790922400, 9476968000,
- 10197315800, 10953680900, 11747864200, 12581756600, 13457343600,
- 14376709900, 15342044500, 16355645800, 17419927100, 18537422400,
- 19710792400, 20942830900, 22236471300, 23594793700, 25021032200,
- 26518582600, 28091010500, 29742059700, 31475661300, 33295942900,
- 35207238500, 37214098800, 39321302100, 41533865500, 43857057000,
- 46296408000, 48857726500, 51547110900, 54370964500, 57336010700,
- 60449309200, 63718272600, 67150684100, 70754716100, 74538949700,
- 78512394900, 82684512300, 87065235500, 91664994800, 96494742000,
- 101565976500, 106890772700, 112481808700, 118352396500, 124516513600,
- 130988836500, 137784775500, 144920511400, 152413034000, 160280182700,
- 168540688800, 177214220200, 186321428100, 195883996300, 205924692900,
- 216467424000, 227537292000, 239160653000, 251365182000, 264179938000,
- 277635431000, 291763699000, 306598380000, 322174795000, 338530031000,
- 355703029000, 373734676000, 392667906000, 412547797000, 433421683000,
- 455339262000, 478352721000, 502516853000, 527889191000, 554530146000,
- 582503149000, 611874801000, 642715037000, 675097284000, 709098643000,
- 744800071000, 782286569000, 821647393000, 862976257000, 906371565000,
- },
- getxp = function (level, percent)
- local tonextlevel = (levelcalc.xpto[level+1] - levelcalc.xpto[level])
- return levelcalc.xpto[level] + (tonextlevel*percent/100)
- end, -- func
- percentto = function (level2, percent2, level, percent)
- local level = level or tonumber (string.match (gmcp.Char.Status.level, "(%d+) %(.+%%%)"))
- local percent = percent or tonumber (string.match (gmcp.Char.Status.level, "%d+ %((.+)%%%)"))
- local x = levelcalc.getxp (level, percent) / levelcalc.getxp (level2, (percent2 or 0)) * 100
- x = math.floor (x * 100 + 0.5) / 100
- return x
- end, -- func
- logosianpercent = function (level, percent)
- return levelcalc.percentto (80, 0, level, percent)
- end, -- func
- dragonpercent = function (level, percent)
- return levelcalc.percentto (99, 0, level, percent)
- end, -- func
- dragonlordpercent = function (level, percent)
- return levelcalc.percentto (100, 0, level, percent)
- end, -- func
- }
- function percentToBar(perc)
- local percent = perc
- echo(string.rep(" ", 36 - #getCurrentLine()))
- local width = math.floor((percent * 30) / 100)
- fg("gui_consoles.bashing.console","a_green")
- gui_consoles.bashing.console:echo(string.rep([[|]], width))
- fg("gui_consoles.bashing.console","dim_grey")
- gui_consoles.bashing.console:echo(string.rep("-", 30 - width))
- fg("a_darkgrey") echo("gui_consoles.bashing.console"," " .. percent .. "%")
- resetFormat("gui_consoles.bashing.console")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement