Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 03-05-2016, 01:17 AM
Mortow's Avatar
Mortow
Hill Giant
 
Join Date: Apr 2013
Posts: 215
Default Giving AA Exp instead of Regular Exp if AA is turned on?

This is a tradeskill exp perl script that was shared from Sanctuary (I believe)


Code:
$client->SetEXP($client->GetEXP() + $client->CalcEXP(18), 0);
What I would like to figure out is, how do you award AA experience instead of regular experience if a player has AA experience turned on. As it is now, a player can have 100% experience going to AAs and it still gives regular experience. I am not sure how to give it a qualifier to check for AA experience being turned on. Any help would be appreciated.

Thanks,
Mortow
Reply With Quote
  #2  
Old 03-10-2016, 03:49 AM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

Did anyone address this?
There's a method Client::SetEXP(THIS, set_exp, set_aaxp, resexp=false)
inside zone/perl_client.cpp, meaning if you tweak your code to
Code:
$client->SetEXP(0, $client->GetAAEXP() + 12345);
It will give AA exp.

The problem is that SetEXP is likely not what you're after, since you want it to be given based on the percent of AA exp the player is set on their AA window, and distribute a pool of EXP to normal/AA accordingly, right?

To do that you likely want to tap into Client::AddEXP(THIS, add_exp, conlevel= 0xFF, resexp= false)
Code:
$client->AddExp(1234); //give raw 1234 exp.
$client->AddExp(1234, 2); //Give EXP based on con level system, which tldr is green = 2, lightblue = 18, blue = 4, white = 20, yellow = 15, red = 13
This call will respect the AA exp value percentage (since it calls Client::AddExp and it will determine EXP distribution based on extended player profile property perAA), the same way normal EXP is rewarded from kills.

If you use the conlevel system, you'll want to peek at the rule values Character::<CON>Modifier, replacing <CON> with the color e.g. Red, inside your rule_values for your EXP mods for difficulty of kills. These default to it seems:

Lightblue = 40
Blue = 90
White = 100
yellow = 125
red = 150

If you wanted to give EXP scaled based on the player's level, you can use your
Code:
$client->CalcExp(18)
system to get the pool size and change 1234 to a more dynamic level-based value.
__________________

~Shin Noir
DungeonEQ.com

Last edited by Shin Noir; 03-10-2016 at 04:05 AM..
Reply With Quote
  #3  
Old 03-10-2016, 10:12 PM
Mortow's Avatar
Mortow
Hill Giant
 
Join Date: Apr 2013
Posts: 215
Default

Thank you very much, Shin. You are correct in that I want to award experience based off level. And thank you for explaining the "(1". I was wondering what that referenced. I think I want the experience awarded to be a very small amount such as green exp. I applaud Zerjz for implementing this on his server. I always thought tradeskills should give at least a little experience.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:55 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3