Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2013, 07:53 AM
liquest
"Special" Member
 
Join Date: Jul 2007
Posts: 373
Default Remove AA script?

Is it possible to have a Remove AA Quest:: Global?

Something like
Code:
my $get = $client->GetAAPoints();
($get - 20);
Im trying to setup a AA merchant for Vanity Items if anyone can put any insight how to go about that.
__________________
Also Knows as Tavish

Liquest Auctions, WTB AA's up to the current compatable clients PST with offer.

"A casual stroll through a lunatic asylum shows that faith does not prove anything." ~Fredrick Nietzsche

"Insanity: doing the same thing over and over again and expecting different results.." ~Albert Einstein
Reply With Quote
  #2  
Old 01-20-2013, 08:23 AM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

I would also like more insight, Liquest and I are wondering about this, we know it's doable, just not what's behind it, it seems the wiki is lacking, as KMRA has a quest::createbot that isn't mentioned on the wiki, so I was wondering it there was a quest::removeaapoints or anything similar not mentioned on the wiki, would love to have a fully functional AA Merchant!
Reply With Quote
  #3  
Old 01-20-2013, 09:16 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

$client->GetAAPoints() and $client->SetAAPoints() will probably do what you need. If things aren't listed on the wiki you can always look at the code.
Reply With Quote
  #4  
Old 01-20-2013, 09:40 AM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

All right, I don't think that will allow players to buy items from the merchant and subtract their AAs.

Tried it with $client->SetAAPoints(-200); and it gave me around 4.2M AAs, so that doesn't work, haha.
Reply With Quote
  #5  
Old 01-20-2013, 10:02 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Here is a quick example of a quest to buy items with AA

Code:
sub EVENT_SAY
{

my $total = $client->GetAAPoints();
my $itemone = quest::saylink("Sword of Bad Guy Slaying",1);

  if($text=~/Hail/i)
    {
      plugin::Whisper("Hi there $name do you want to browse my items?");
	  $client->Message(15, "Buy $itemone for 5 AA points");
	  }
  if($text=~/Sword of Bad Guy Slaying/i)
      {
	  if($total >= 5)
		{
			$total = int($total-5);
			$client->SetAAPoints($total);
			plugin::Whisper("You made a wise choice.");
			quest::summonitem(6714,1);
			$client->Message(15, "You now have $total AA points to spend.");
		}
		else 
		{
		plugin::Whisper("You need more AA points for that item.");
		}
      }

}
Reply With Quote
  #6  
Old 01-20-2013, 10:03 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

it does that because you're trying to set an unsigned integer type to a negative value. try this instead:

Code:
$client->SetAAPoints($client->GetAAPoints()-200);
but you likely want to check the current aa point value first to make sure they have enough before you allow them to purchase whatever it is and then set the new value.
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
Reply With Quote
  #7  
Old 01-20-2013, 10:36 AM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

Thanks Natedog! That was much simpler that I thought, I just had a block on my mind, thanks so much!
Reply With Quote
  #8  
Old 01-20-2013, 10:36 AM
liquest
"Special" Member
 
Join Date: Jul 2007
Posts: 373
Default

NatedogEZ You are forever in my debt. Thanks a ton. I see where i messed up in the script =D you rock!
__________________
Also Knows as Tavish

Liquest Auctions, WTB AA's up to the current compatable clients PST with offer.

"A casual stroll through a lunatic asylum shows that faith does not prove anything." ~Fredrick Nietzsche

"Insanity: doing the same thing over and over again and expecting different results.." ~Albert Einstein
Reply With Quote
  #9  
Old 01-20-2013, 11:06 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

No problem, enjoy!
I was about to write a quest like this for someone else actually.
Reply With Quote
  #10  
Old 01-20-2013, 11:12 AM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 541
Default

Quote:
You are forever in my debt
A little backwards.

Anyway, since they dont have a Let Me Google That For You for google code yet, Cool Link
Reply With Quote
  #11  
Old 01-20-2013, 12:27 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

Quote:
Originally Posted by Caryatis View Post
A little backwards. Anyway, since they dont have a Let Me Google That For You for google code yet, Cool Link
snarkfail. this thread is about aa points, not bots. :p

Corrected Link
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
Reply With Quote
  #12  
Old 01-20-2013, 01:45 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

He was talking about the quest::createbot I mentioned.
Reply With Quote
  #13  
Old 01-20-2013, 01:50 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

which is exactly why i specified "this thread".
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
Reply With Quote
  #14  
Old 01-20-2013, 02:00 PM
wolfwalkereci
Discordant
 
Join Date: Dec 2005
Posts: 435
Default

Quote:
Originally Posted by Zamthos View Post
blah blah blah it seems the wiki is lacking, as KMRA has a quest::createbot that isn't mentioned on the wiki, blah blah blah
Seriously KMRA... you people suddenly talk about that shit like its gold.

Btw very few people make updates to the wiki, usually it is someone removing spam off of it. If something is not there you could add it.
Reply With Quote
  #15  
Old 01-20-2013, 02:05 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

haha! mea culpa.

that'll show me to open my mouth before getting completely accustomed to the display mode i changed to. :p
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
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:09 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