View Single Post
  #1  
Old 07-24-2013, 08:01 AM
br0nc0n
Fire Beetle
 
Join Date: Jul 2013
Location: Florida
Posts: 2
Default Artisan Charm perl code

First time doing anything custom with EqEmu with peq database.
Not even sure if this is the right board.

Assuming the formula is correct, does the syntax in this perl script look correct for a charm?

Code:
sub EVENT_SCALE_CALC {
  my $baking = $client->GetSkill(60);
  my $tailoring = $client->GetSkill(61);
  my $blacksmithing = $client->GetSkill(63);
  my $jewelcrafting = $client->GetSkill(68);
  my $brewing = $client->GetSkill(65);
  my $pottery = $client->GetSkill(69);
  my $fletching = $client->GetSkill(64);
  
  my $tradeskills = ($baking + $tailoring + $blacksmithing + $jewelcrafting + $brewing + $pottery + $fletching)
  my $scale =  $tradeskills - 700

  if($scale < 0) {
    $scale = 0;
  }
  
  if($scale > 1400) {
    $scale = 1400;
  }

  $questitem->SetScale($scale/1400);
}
Reply With Quote