View Full Version : AA Exp on or off
JimB_1958
09-08-2016, 05:18 PM
Is there a function similar to $Client->GetAAExp() to simply check the percentage that AA xp is set to?
I want to calculate and award something besides XP to players but only if they are max level and have turned AA xp off.
ghanja
09-08-2016, 08:46 PM
GetEXP()
However, I don't believe the percentage of experience to AA's is being parsed (is a method) in either Perl or LUA. That's not to say it can't be though, however, I'll leave that to those more comfortable with C++
Until then, try this Perl method of finding out the percentage of experience going towards AA's (that is assuming 'e_percent_to_aa' is what I think it is). The schema in the wiki hasn't been updated I don't think since the deblobbing.
## /plugins/PercentageToAA.pl
sub PercentageToAA {
my $toonid = $_[0];
my $dbh = plugin::LoadMysql();
my $sth = $dbh->prepare("SELECT `e_percent_to_aa` FROM `character_data` WHERE id = ".$toonid." LIMIT 1");
$sth->execute();
@data = $sth->fetchrow_array();
$sth->finish();
$dbh->disconnect();
return $data[0];
}
return 1;
Usage:
my $percent = plugins::PercentageToAA($charid);
Untested (still away from home).
Kingly_Krab
09-08-2016, 10:01 PM
Once this (https://github.com/EQEmu/Server/pull/553) is merged, you'll be able to check their AA experience percentage using $client->GetAAPercent().
Addendum: Merged as of ~5 minutes ago.
ghanja
09-08-2016, 10:25 PM
Once this (https://github.com/EQEmu/Server/pull/553) is merged, you'll be able to check their AA experience percentage using $client->GetAAPercent().
Addendum: Merged as of ~5 minutes ago.
And there you go, I was secretly banking on Kingly adding it (why? because he's on top of adding all those cool niche exports for us customization guys)
JimB_1958
09-12-2016, 10:50 AM
Thanks a bunch! Worked exactly as I was hoping.
N0ctrnl
09-12-2016, 11:48 AM
Maybe he'll add the ability for zone_controller to read quest global values next :D
Kingly_Krab
09-14-2016, 04:33 PM
Ask and you shall receive: https://github.com/EQEmu/Server/pull/557
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.