View Single Post
  #2  
Old 07-06-2013, 12:12 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

#mystats Will display the stats correctly for you, as well as there being stat variables you can pull. Code below for a stats NPC.
Code:
sub EVENT_SAY 
{

	my $stats = quest::saylink("stats", 1);

		
    if($text=~/hail/i) 
	{
		plugin::Whisper("Hey there $name, I'm really good at guessing your $stats. Go on, try me!");
    } 
    elsif($text=~/stats/i) 
	{
		my $str = $client->GetSTR();
		my $sta = $client->GetSTA();
		my $agi = $client->GetAGI();
		my $dex = $client->GetDEX();
		my $wis = $client->GetWIS();
		my $intel = $client->GetINT();
		my $cha = $client->GetCHA();
		my $ac = $client->GetAC();
		my $atk = $client->GetATK();
		my $hp = $client->GetHP();
		my $hp2 = $client->GetMaxHP();
		my $mana = $client->GetMana();
		my $mana2 = $client->GetMaxMana();
		my $end = $client->GetEndurance();
		my $end2 = $client->GetMaxEndurance();
		my $aa = $client->GetAAPoints();
		my $aa2 = $client->GetSpentAA();
		plugin::Whisper("Current Health: $hp/$hp2");
		plugin::Whisper("Current Endurance: $end/$end2'");
		plugin::Whisper("Current Mana: $mana/$mana2");
		plugin::Whisper("Total AA Points: $aa Spent AA Points: $aa2");
		plugin::Whisper("Armor Class: $ac Attack: $atk");
		plugin::Whisper("Strength: $str Stamina: $sta Agility: $agi");
		plugin::Whisper("Dexterity: $dex Wisdom: $wis");
		plugin::Whisper("Intelligence: $intel Charisma: $cha");
	}
}

sub EVENT_ITEM 
{
	plugin::Whisper("I do not need this.");
	quest::givecash($copper,$silver,$gold,$platinum);
	plugin::return_items(\%itemcount);
}
Reply With Quote