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 |
so it would be $client->setaapoints(AA+5) if you wanted to add 5 AAs? or would it just be (5)?
|
If it's a regular get/set, you'd probably have to do:
Code:
$client->SetAAPoints($client->GetAAPoints() + 5); |
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 |
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. |
Quote:
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 :cool: |
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. |
Magnificent :cool:
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! =) |
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) Code:
$client->AddAARaidPoints(number) |
All times are GMT -4. The time now is 11:18 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.