Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-07-2013, 07:27 AM
GurkhaPanzers
Hill Giant
 
Join Date: Aug 2010
Location: Arizona
Posts: 164
Default 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.
Reply With Quote
  #2  
Old 09-07-2013, 12:22 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

Not sure if this still works, but found this:

https://eqemulator.org/forums/showthread.php?p=174841
Reply With Quote
  #3  
Old 09-07-2013, 01:55 PM
GurkhaPanzers
Hill Giant
 
Join Date: Aug 2010
Location: Arizona
Posts: 164
Default

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.
Reply With Quote
  #4  
Old 09-07-2013, 02:09 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

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.
Reply With Quote
  #5  
Old 09-07-2013, 03:02 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

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....
Reply With Quote
  #6  
Old 09-07-2013, 03:25 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

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 View Post
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();
	}
}
Reply With Quote
  #7  
Old 09-07-2013, 03:49 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

-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"
Reply With Quote
  #8  
Old 09-07-2013, 03:55 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

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.
Reply With Quote
  #9  
Old 09-07-2013, 05:04 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

Quote:
Originally Posted by Kingly_Krab View Post
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
Reply With Quote
  #10  
Old 09-07-2013, 05:08 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

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...
Reply With Quote
  #11  
Old 09-07-2013, 05:32 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

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...
Reply With Quote
  #12  
Old 09-07-2013, 05:39 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

This is why we can't have nice things.
Reply With Quote
  #13  
Old 09-07-2013, 06:10 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Just ask this man...
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #14  
Old 09-07-2013, 06:13 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Quote:
Originally Posted by Uleat View Post
Just ask this man...
That's great.
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 05:56 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3