|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
01-20-2013, 07:53 AM
|
"Special" Member
|
|
Join Date: Jul 2007
Posts: 373
|
|
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
|
01-20-2013, 08:23 AM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
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!
|
01-20-2013, 09:16 AM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,743
|
|
$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.
|
01-20-2013, 09:40 AM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
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.
|
01-20-2013, 10:02 AM
|
|
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
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.");
}
}
}
|
01-20-2013, 10:03 AM
|
|
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
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;
|
01-20-2013, 10:36 AM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
Thanks Natedog! That was much simpler that I thought, I just had a block on my mind, thanks so much!
|
01-20-2013, 10:36 AM
|
"Special" Member
|
|
Join Date: Jul 2007
Posts: 373
|
|
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
|
01-20-2013, 11:06 AM
|
|
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
No problem, enjoy!
I was about to write a quest like this for someone else actually.
|
01-20-2013, 11:12 AM
|
Dragon
|
|
Join Date: May 2009
Location: Milky Way
Posts: 541
|
|
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
|
01-20-2013, 12:27 PM
|
|
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
Quote:
Originally Posted by Caryatis
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;
|
01-20-2013, 01:45 PM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
He was talking about the quest::createbot I mentioned.
|
01-20-2013, 01:50 PM
|
|
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
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;
|
01-20-2013, 02:00 PM
|
Discordant
|
|
Join Date: Dec 2005
Posts: 435
|
|
Quote:
Originally Posted by Zamthos
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.
|
01-20-2013, 02:05 PM
|
|
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
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;
|
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 01:15 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|