Quest question.
Okay I searched the forums i probably just missed it if so I apologize for this post. Is there a way too add AA exp through a quest? I've tried the few ideas that I had none of them seem to work.
|
It's my understanding that there is only one way to earn/give exp:
Code:
quest::exp(0); |
I was afraid of that, was hoping since you can add it via GM command we could pass it to the client through quest. Well thank you for your time.
|
Is there a way to turn on AA exp gain before 51?
|
Quote:
However, you can have quests reward AA points (or even specific AA abilities), so you could have, for example, an NPC that gives AA points in exchange for plat that would work at any level. |
You can use GetEXP/GetAAEXP and SetEXP.
Code:
my $currentaaexp = $client->GetAAEXP(); Code:
$client->SetEXP($client->GetEXP(),($client->GetAAEXP()+1000)); |
I appreciate the replies, however It doesn't seem to work. I'm calling it on the event death of a mob, not awarding any AA exp though.
|
No, it wouldn't, there is quite a bit more code than one line to do what I think you're after, and it's hackery/exploitable at best.
Quote:
|
It's not a very elegant way to do it and it is certainly untested (not even sure the NPC hasn't already cleared the hate list before the EVENT_DEATH call or not -- would need to look at the source) but, it may give you an idea:
Code:
sub EVENT_DEATH { |
Thank you ghanja I appreciate it all. I will test it tomorrow and see how it goes. Again thank you for taking the time.
|
That doesn't work so I have a different question, is there a way to track a kill count on any mob that would award exp to player, then say after a set amount of kills award an AA point? Then reset the counter and start again? Basically give the illusion of AA exping?
|
I just noticed but you have at least one typo in that quest.
GetAAEXP should be GetAAExp If you want to use AA Exp before level 51... changing this line.. might work.. might not :p https://github.com/EQEmu/Server/blob...e/exp.cpp#L404 I might test this right now.. as it would allow me to use AAs without raising my level cap passed 50~ :) This works. The code above had a typo Code:
$client->SetEXP($client->GetEXP(),($client->GetAAExp()+5000)); It works.. the AA Exp bar moves nicely http://i.imgur.com/uyJBoTk.png |
Was a night for typos for me last night I guess <grin> TY for finding that, I admit, I started with SetEXP first and copy/pasted it and added an "AA" in between Set and EXP. Case sensitivity FTW.
Was the source line change turn out to be necessary? |
For me it works however the exp bar does not update, the actual exp isn't reflected unless I zone and I never actually receive an aa point it just fills the exp bar.
|
You need to remove that level check I posted.. it needs to SendAAStats();or whatever to characters at any level, then it will work just fine
|
Okay I removed the level check, compiled, no errors everything loads just fine, however still no AAexp updates being sent.
|
Okay it's working now. Now I just need to get it to run on the mobs death and actually pass it to the player.
|
Quote:
|
I got it working now. Works perfectly, thanks everyone for the assist I appreciate it. Ghanja your code worked as it is, I had a declaration out of place is all.
|
Okay trying to get this to only fire off if the client is level 20 or above, however it works just fine without the if($ulevel >19)
Code:
sub EVENT_DEATH { |
Code:
sub EVENT_DEATH { |
Awesome, works perfectly, thank you
|
You da man, ghanja.
|
Quote:
|
There is a sub event that already does that btw... you are just creating extra work for yourself :)
EVENT_KILLED_MERIT triggers for each client that was given CREDIT for the kill. Example.. anyone in the raid / group, however, if you want it so that players can just run up and "tag" something while someone else is killing it.. that they get credit. Meaning a non-grouped player could run around hitting mobs 1 time that other players are fighting and get credit with the way you have it written. Changing to this would eliminate that. Code:
sub EVENT_KILLED_MERIT { |
Oooh, nice. I don't remember that event.
|
Quote:
I'll have to revisit the idea. That code I provided was a copy/paste from something done a year back, so, probably doesnt exist now. If not, well, then yes, that would be the best method to say the least. So there you go, no shortage of options. :) |
Nothing should be buggy about the EVENT_KILLED_MERIT option
The only caveat is that you have to keep in mind is that each client does trigger the sub EVENT on its own as Natedog said. |
EVENT_KILLED_MERIT works perfectly, thanks for the info on it.
|
All times are GMT -4. The time now is 12:33 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.