EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Remove AA script? (https://www.eqemulator.org/forums/showthread.php?t=36292)

liquest 01-20-2013 07:53 AM

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.

Zamthos 01-20-2013 08:23 AM

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!

lerxst2112 01-20-2013 09:16 AM

$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.

Zamthos 01-20-2013 09:40 AM

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.

NatedogEZ 01-20-2013 10:02 AM

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.");
                }
      }

}


c0ncrete 01-20-2013 10:03 AM

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.

Zamthos 01-20-2013 10:36 AM

Thanks Natedog! That was much simpler that I thought, I just had a block on my mind, thanks so much!

liquest 01-20-2013 10:36 AM

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

NatedogEZ 01-20-2013 11:06 AM

No problem, enjoy!
I was about to write a quest like this for someone else actually.

Caryatis 01-20-2013 11:12 AM

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

c0ncrete 01-20-2013 12:27 PM

Quote:

Originally Posted by Caryatis (Post 216647)
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

Zamthos 01-20-2013 01:45 PM

He was talking about the quest::createbot I mentioned.

c0ncrete 01-20-2013 01:50 PM

which is exactly why i specified "this thread".

wolfwalkereci 01-20-2013 02:00 PM

Quote:

Originally Posted by Zamthos (Post 216637)
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.

c0ncrete 01-20-2013 02:05 PM

haha! mea culpa.

that'll show me to open my mouth before getting completely accustomed to the display mode i changed to. :p


All times are GMT -4. The time now is 03:07 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.