Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #16  
Old 02-10-2012, 12:09 AM
helman
Sarnak
 
Join Date: Apr 2010
Location: Texas, Sweetwater
Posts: 69
Default

Ok. I've been bizy. but I'm now able to work on this more. So I got My handin npc working but I'm having a bit of a hard time getting the Charm File to work. I Have some questions to help me figure this out.

First, How do I name my .pl? Charm77640.pl or just 77640.pl.

Second, Whats a Good reference for building my Charm file. Here This Code here
Code:
sub EVENT_SCALE_CALC 
{
	if (defined($qglobals{titanium_relic})) {
		$questitem->SetScale($qglobals{titanium_relic}/10);
	}
	else {
		$questitem->SetScale(0);
	}
}
Or this from my LDDAugText
Code:
 my $charge = 5;
   if (defined $qglobals{GUKpower}) {
      if ($qglobals{GUKpower} <= 5) {
         $charge += $qglobals{GUKpower} * 20;
      }
      elsif ($qglobals{GUKpower} >= 7) {
         $charge += 200;
      }
      else {
         $charge += 150;
      }
   }
If the one from my LDDAugText What dose $charge do and how do I use it to build my Charm file.(I have to ask cause its not in the Quest Cheat Sheet.)

Ok Thanks.
__________________
Reply With Quote
  #17  
Old 02-10-2012, 01:19 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Items have a field named charmfile. What you put in there determines which perl file it uses for scaling.

If you look at the whole LDDAugText.pl file you'll see down at the bottom that $charge is used to set the scale. It is a local variable declared in that script.
Reply With Quote
  #18  
Old 02-10-2012, 03:04 AM
helman
Sarnak
 
Join Date: Apr 2010
Location: Texas, Sweetwater
Posts: 69
Default

I got My Blade of Vesagran set to Scale but I'm having a hard time setting the Charmfile script. I wandering if I should use Charm of the Brotherhoods charmfile scripts $matchcount for this. Reason is that no matter how many Rift Shards I give to the handin npc the items stats done go up. But it has no stats atm. So that means that its set right just not using the right type of charm file script or I didn't type the script right. My charmfile script.
Code:
sub EVENT_SCALE_CALC {
{
	if (defined($qglobals{epic_scale})) {
		$questitem->SetScale($qglobals{epic_scale}/10);
	}
	else {
		$questitem->SetScale(0.5);
	}
}
On another note after I hand in so meany rift shards my npc starts handing back the shards.
__________________
Reply With Quote
  #19  
Old 02-10-2012, 04:28 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

If you don't set the charmfile on an item it won't scale because the script is never called.

What is the trouble you're having setting the charmfile field on the item? If you use eqitems you can just type it in the box, or you can use a sql query to set it.

When you talk about using a local variable defined in another script it makes me think you really don't understand how perl works. Those variables are defined in that script to be used there, they are not global and can't be used elsewhere.

Without seeing your npc script I won't even try to guess at whatever that problem might be.
Reply With Quote
  #20  
Old 02-10-2012, 06:26 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Make sure the NPC you are handing items to is enabled for qglobals in the npc_types table. There is a field for them and it needs to be 1, not 0.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #21  
Old 02-10-2012, 11:26 PM
helman
Sarnak
 
Join Date: Apr 2010
Location: Texas, Sweetwater
Posts: 69
Default

Look at the first page you'll see my full npc script But I figured out what it is. In order for my npc to take the item you need to give in 4 at a time not just one or two. A small part of my script.
Code:
if(plugin::check_handin(\%itemcount, 132509 => 4))
If I change 4 to 1 I can give them to him 1 at a time but when set to 4 it has to be 4 at a time. So I think I know how to fix that. Now I have my item set to work on a CharmFile. I know The items set right cause when I log in the item has no stats. But it has stats in the DB. So the problem is probably my charm file script. Which can be seen in my last post. And Yes your right, I don't understand how Perl works. But I'm not going to let that stop me from trying to get this done.
__________________
Reply With Quote
  #22  
Old 02-10-2012, 11:49 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

WARNING: untested and I just got in from an after work meetup that involved a few beers..

Your logic is heavily flawed. If i have never turned in a single item, thus no quest global yet, i automatically get the item at half power. Additionally once I start turning in items it will go up in 10% increments from 0%. Also, there is no limit to how high the item will scale past 100%. Someone could easily exploit this to make the item much much more powerful.

Finally, you have more { than } so the script is in error and will never compile.
Code:
sub EVENT_SCALE_CALC {
	if (defined($qglobals{epic_scale})) {
		my $scale = $qglobals{epic_scale} / 10;
		if ($scale > 1) {
			$scale = 1;
		$questitem->SetScale($qglobals{$scale});
	} else {
		#I honestly don't know enough baout this section of code to 
		#know it this is required or not to zero out the item.
		$questitem->SetScale(0);
	}
}
Reply With Quote
  #23  
Old 02-11-2012, 12:57 AM
helman
Sarnak
 
Join Date: Apr 2010
Location: Texas, Sweetwater
Posts: 69
Default

If you never pointed out the { and } I would have never noticed it. Which may be why it didn't work for me. I need to pay more attention to stuff like that. -tested it and I Got it to work with out using the code you just gave me. But I'll keep it as a back up to see which one works better to my liking. But thank you tho. If you didn't mention the } I never would have go it to work.-

Thank you.

Edit1 Just now i have to figure out what its using as its modifier. After give 10 I have like half stats.

Edit2 I got it working. Thanks guys.
__________________
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 12:06 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