EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Completed (https://www.eqemulator.org/forums/forumdisplay.php?f=633)
-   -   Plat for AA Handin Example (https://www.eqemulator.org/forums/showthread.php?t=43700)

Jahosphat 09-01-2022 01:55 PM

Plat for AA Handin Example
 
This is a quick script to help some noobs like myself.
Basically if you hand a pc plat you get aa. If you hand a different number in you'll get it returned OR if your under 51 youll get a message back too.
100plat = 1aa, 1000 = 10aa, 10000 = 100aa

happy scripting
-Ish (Karana Server)

Code:

sub EVENT_ITEM
{
        if ($ulevel >=51)
        {
                if ($platinum == 100)
                {
                        $client->AddAAPoints(1);
                        quest::whisper ("1 AA Point Exchanged.");
                }
                elsif ($platinum == 1000)
                {
                        $client->AddAAPoints(10);
                        quest::whisper ("10 AA Point Exchanged.");
                }
                elsif ($platinum == 10000)
                {
                        $client->AddAAPoints(100);
                        quest::whisper ("100 AA Point Exchanged.");
                               
                }
                else
                {
                        if($platinum)
                        {
                        quest::whisper ("That is not the required amount! Hand plat in the right units!");
                        $client->AddMoneyToPP(0, 0, 0, $platinum, 1);
                        }
                }
        }
        else
            {
                        if($platinum)
                        {
                        $client->AddMoneyToPP(0, 0, 0, $platinum, 1);
                        quest::whisper ("To Exchange you need to be level 51");
                        }
                }
}



All times are GMT -4. The time now is 04:05 AM.

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