|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Support::Windows Servers Support forum for Windows EQEMu users. |
09-07-2013, 07:27 AM
|
Hill Giant
|
|
Join Date: Aug 2010
Location: Arizona
Posts: 164
|
|
Refund AA quest
I am making an npc to change a characters class and race. I want to be able to refund a character AA. Is there a way to do this. I don't see it on the list of quest.
|
09-07-2013, 12:22 PM
|
Hill Giant
|
|
Join Date: Sep 2008
Location: So. California
Posts: 219
|
|
|
09-07-2013, 01:55 PM
|
Hill Giant
|
|
Join Date: Aug 2010
Location: Arizona
Posts: 164
|
|
Thanks friend. That appears to be for leadership AA. I didn't specify but I mean regular AA. Basically I have some guilds based on alignments. So if an SK joins a Good guild I want him to have option to switch to new class and start over. It is enough of an impact to start over so I don't want them to also lose AA. So thought was refund the AA then when 50+ again they could spend as they decide. There is a GM ability to do this but I don't see a quest version. Thanks for your effort in replying friend.
|
09-07-2013, 02:09 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
You can't exactly do that I don't believe, you could try $client->RefundAA() and then $client->Kick(). I believe the Refund doesn't happen until you're kicked, thus the need to kick them.
|
09-07-2013, 03:02 PM
|
Hill Giant
|
|
Join Date: Sep 2008
Location: So. California
Posts: 219
|
|
Its all in the thread I linked, might want to read from the beginning next time:
Code:
sub EVENT_SAY {
my $client = plugin::val('$client');
my $spent = $client->GetSpentAA();
if ($text=~/hail/i){
quest::say("Where is Mr. Head?? You have $spent AA spent");
$client->ResetAA();
$client->AddAAPoints($spent);
}
}
BTW, you dont need to kick the client, just zone them out. So you cold have a "fake" zone that just watches for clients, then immediately sends them back to where they came from, instead of kicking the client and forcing them to relog back in...
ps, you may want to make sure you dont have a limit on max unspent aa....
|
|
|
|
09-07-2013, 03:25 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
This is simplier and makes more sense, it's bad you didn't even read the thread you posted. I tested $client->RefundAA(), it doesn't do anything until you're booted, but it doesn't boot you, thus the $client->Kick()
Quote:
Originally Posted by realityincarnate
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.
|
Also, there's no need to define $client in a sub EVENT_SAY, only in a plugin, nor is there a necessity to define any variables.
Code:
sub EVENT_SAY
{
if($text=~/Hail/i)
{
plugin::Whisper("Would you like to " . quest::saylink("reset", 1) . " your AA points?");
}
if($text=~/Reset/i)
{
plugin::Whisper("Off you go!");
$client->RefundAA();
$client->Kick();
}
}
|
|
|
|
09-07-2013, 03:49 PM
|
Hill Giant
|
|
Join Date: Sep 2008
Location: So. California
Posts: 219
|
|
-1 reading comprehension..
Where in my code am I calling RefundAA?
If you would rather have a client get kicked, more power to you, seems silly to me when what I linked works if you just add a movepc to it as was suggested... not sure why you are being so hostile....
I will cease trying to assist in the future, "friends"
|
09-07-2013, 03:55 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
Booting the client is the same as zoning them out, although more efficient, less work for the coder. I know you didn't call it, thus why I did, mine is more efficient. I wasn't attempting to be hostile, my apologies.
|
09-07-2013, 05:04 PM
|
Hill Giant
|
|
Join Date: Sep 2008
Location: So. California
Posts: 219
|
|
Quote:
Originally Posted by Kingly_Krab
Booting the client is the same as zoning them out, although more efficient, less work for the coder.
|
Its not the same, unless you consider possible corruption of the client textures ect, as ok, forcing said user to shut eq all the way down. More efficient you say? I cant believe you truly think that. But you are right about it being less work for the coder!!!
Ps.. RefundAA != ResetAA
|
09-07-2013, 05:08 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
It kicks to character select, thus not doing that, although you wouldn't know, as you didn't test it.
P.S. I tested ResetAA, it breaks your character, haha. And yeah, I know they're not the same...
|
09-07-2013, 05:32 PM
|
Hill Giant
|
|
Join Date: Sep 2008
Location: So. California
Posts: 219
|
|
Ok, you win...You are definitely more efficient....You must be proud, you are good at this.. I marvel at your post editing skills too...
I guess I'll go play with my "broken" character, and leave all this "smart" stuff to you...
|
09-07-2013, 05:39 PM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
This is why we can't have nice things.
|
09-07-2013, 06:10 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
09-07-2013, 06:13 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
Quote:
Originally Posted by Uleat
|
That's great.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 11:29 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|