Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 05-31-2009, 12:05 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default Quest AA functions

Inspired by a tangent in another thread, I added two quest functions to the $client object for giving AAs via perl. They are:

$client->GetAAPoints() - returns the number of AA the character currently has
$client->SetAAPoints(value) - sets the character's AA count to 'value' and sends an update to the client
Reply With Quote
  #2  
Old 05-31-2009, 03:11 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

so it would be $client->setaapoints(AA+5) if you wanted to add 5 AAs? or would it just be (5)?
Reply With Quote
  #3  
Old 05-31-2009, 03:12 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

If it's a regular get/set, you'd probably have to do:

Code:
$client->SetAAPoints($client->GetAAPoints() + 5);
- Shendare
Reply With Quote
  #4  
Old 05-31-2009, 03:58 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

if you about to implement this as quest comand consider what else could be usefull while at it so you don't have to return to it later and recode from the scratch =)

1) give AAs
2) refund AAs
3) remove all AAs
Reply With Quote
  #5  
Old 05-31-2009, 04:18 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

The get and set commands are already in (as of revision 604), and Shendare's code is exactly correct, but I can certainly add a command to just increase the AA points by a certain number.

There was already an object to reset AA's ($client->ResetAA(), removes all abilities and points), and I was unsure about putting in a refund command. The #refundAA gm command kicks the client when it's done, and the code has a note about the kick being necessary, so I was hesitant to put that functionality in a quest function. But again, if it's necessary I'll add it as well.
Reply With Quote
  #6  
Old 05-31-2009, 04:33 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Quote:
Originally Posted by realityincarnate View Post
The get and set commands are already in (as of revision 604), and Shendare's code is exactly correct, but I can certainly add a command to just increase the AA points by a certain number.

There was already an object to reset AA's ($client->ResetAA(), removes all abilities and points), and I was unsure about putting in a refund command. The #refundAA gm command kicks the client when it's done, and the code has a note about the kick being necessary, so I was hesitant to put that functionality in a quest function. But again, if it's necessary I'll add it as well.
yes that giving X number of AAs to a player is imperative. tehcnicly its no diffirent from "set aa". But to do set you must analyze what AAs player allready has, what are unspent so you don't run into situation when player has 10 spent AAs and 0 Saved AAs and you set his AA to like 5 - then game needs to soem how figure out that ist not supose to substract from aas allready spent but rather add to the unspent - so GIVE AAs esentily same thing.

As far as kick to reset- yes its a nessesary function - we allready have simular function like to chnage race, class and deity - the char HAS to be reset otherwise it won't work - so there is no evil about it =)
+ reset coudl be a valuable option to Admin when AA coding gets changed and player's AA get screwed up then reseting him and giving him a new pool of AAs becomes a valid option

And btw - ability to retrive total curent number of AAs player has spent and unspent separatly- for whatever reason quest may needed it.

So I am just trying to make sure that we have ALL posible function coded it at once
Reply With Quote
  #7  
Old 05-31-2009, 06:17 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

Ok, ask and you shall receive. Three more new functions:

$client->AddAAPoints(number) - adds 'number' to the character's unspent AA points
$client->GetSpentAA() - returns the number of AA the client has spent
$client->RefundAA() - wipes all purchased AA abilities, refunds the spent points, and boots the client to ensure a relog.
Reply With Quote
  #8  
Old 05-31-2009, 06:33 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Magnificent
this will open up a whole new level for special quest rewards and an alternative handling of AAs, such as allowing players to reset their AA (perhaps for a price) - a thing which has always been missing

This was on my list of most needed features for Emu for a long time =)
Thank you! =)
Reply With Quote
  #9  
Old 07-20-2009, 03:51 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

This system is great! I am using it in one of my quests. One thing that would make it even better is the ability to give Group Leadership AA and Raid Leadership AA's as well. Instead of just regular AA's. I know this can be done with GM commands.

Maybe use:
Code:
$client->AddAAGroupPoints(number) 
$client->GetSpentAAGroup() 
$client->RefundAAGroup()
and:
Code:
$client->AddAARaidPoints(number) 
$client->GetSpentAARaid() 
$client->RefundAARaid()
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 01:33 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3