Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Submissions

Quests::Submissions This is where you submit your quests for review

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 07-24-2013, 08:04 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

No chance to go deep and check, but you are missing two semicolons.
Reply With Quote
  #3  
Old 07-24-2013, 08:05 PM
br0nc0n
Fire Beetle
 
Join Date: Jul 2013
Location: Florida
Posts: 2
Default

Ok, I fixed this and tested on my server.

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
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

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


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3