View Single Post
  #1  
Old 09-01-2022, 01:55 PM
Jahosphat
Sarnak
 
Join Date: Apr 2009
Location: LA
Posts: 97
Default 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");
			}
		}
}
Reply With Quote