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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-31-2012, 01:36 AM
helman
Sarnak
 
Join Date: Apr 2010
Location: Texas, Sweetwater
Posts: 69
Default Item Scaling help

Ok I'm trying to use sub EVENT_SCALE_CALC But I'm confused as hell even after using

Code:
sub EVENT_SCALE_CALC 
{
	if (defined($qglobals{titanium_relic})) {
		$questitem->SetScale($qglobals{titanium_relic}/10);
	}
	else {
		$questitem->SetScale(0);
	}
}
as a reference. I asked Trevius and he said I all need to do is use an item charmfile script. Then use qglobals to track whatever it is I'm wanting to use for scaling the item. That helps a lot. But I don't know how to use qglobals. Like I'm wanting to to use a custom item I named Rift Shards for scaling up my epics. If someone could Help me out I'd me most happy.

This is what I have.

Code:
sub EVENT_SCALE_CALC {

		if (defined($qglobals{132481})) {
				$questitem->SetScale($qglobals{132481}/1500);
		}
		else {
				$questitem->setscal(0);
		}
		
}
But I think thats wrong I don't even know what I set it to use for the Scaling
__________________
Reply With Quote
  #2  
Old 01-31-2012, 02:02 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Scaling is generally between 0 and 1, or 0% and 100%. The easiest thing to do is put hardcoded numbers in the script and see how it scales. If you put 0.5, what are the stats, what are they at 1.5? That way you can see what you need to do with the formula to make it work the way you want.
Reply With Quote
  #3  
Old 01-31-2012, 02:07 AM
helman
Sarnak
 
Join Date: Apr 2010
Location: Texas, Sweetwater
Posts: 69
Default

Ok How do i set what item ups the stats and all that. (I'm going for something that Trevius has on his server. The more AAs you give to an npc the more the stats go up. But i don't know how to do it and theres not to much in the forums talking about it.)
__________________
Reply With Quote
  #4  
Old 01-31-2012, 02:24 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

Items that scale, will scale all stats by the percentage that the calc returns as far as i know, not just one or two stats.

Look at LLDAugText.pl to see how to use Qglobals. Ignore all the values, because all you need to worry about is making your values go from 0 to 1.
Reply With Quote
  #5  
Old 01-31-2012, 02:27 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

As far as I know, the stats you see in the item editor are what they would be if the scale value was 1, or 100%.

It's a very easy thing to experiment with, and you're not going to permanently break anything if the script is wrong, so play around, you'll figure it out.
Reply With Quote
  #6  
Old 01-31-2012, 02:35 AM
helman
Sarnak
 
Join Date: Apr 2010
Location: Texas, Sweetwater
Posts: 69
Default

I might just forget it. I think I got most of it down but if I have to figure it out with no reference than I might not ever get it to work as I want it to.

I can probably get it to scale but I still don't know how use my item to make it scale up. I want the stats to improve after ever 50 Rift Shards given to an npc.

So how can I get it to do that?
__________________
Reply With Quote
  #7  
Old 01-31-2012, 05:53 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

You also have a spelling error in your script above.
Reply With Quote
  #8  
Old 01-31-2012, 10:23 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

You have been given references. I am not going to write your script for you.

Here is another. look at the Vxed zone to see how each mob increments a qglobal.

And another. Look at damn near any script in PoK to see a turn in example.

Combine it all up and snap. You got your scripts. Hmm, did I just slip tell you you need multiple scripts too?
Reply With Quote
  #9  
Old 01-31-2012, 07:02 PM
helman
Sarnak
 
Join Date: Apr 2010
Location: Texas, Sweetwater
Posts: 69
Default

Going off what you gave me I got the turn in working. But It doesn't do anything yet. Here is my Script. (Please tell me if I'm missing anything. I think I need to add a $qglobals, But I'm not sure how to do it yet.)

Code:
sub EVENT_SAY {

  if($text=~/Hail/i) {
			quest::say("Hello Dear Friend, I am the elder here. I can Improve the stats on your Epic weapons.");
	}


}

sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 132508 => 1)) { #Rift Shards
			quest::say("Thank you, Your weapon should be a bit stronger now.");
    }

   else {
    quest::say("I have no use for this, $name.");
    plugin::return_items(\%itemcount);
  }

}
Now I am looking at some vxed mobs,and I see things like this But I don't know what to do with it.

example 1
Code:
if (defined $qglobals{bic} && $qglobals{bic_sew} == 12 && $qglobals{bic_vxe} == 13 && $qglobals{bic_tip} == 14) {
example 2
Code:
if (defined($qglobals{clockwork}) && ($qglobals{clockwork} == 1)) {
example 3
Code:
sub EVENT_DEATH {
  my $instid = quest::GetInstanceID("vxed",0);
  my $newvalue = $qglobals{$instid.'_vxed_status'};
  $newvalue++;
  quest::setglobal($instid.'_vxed_status',$newvalue,7,"H6");
  if($newvalue >= 50) {
    SPAWN_EKIKOA();
  }
} Although I think I know how this one works.
For my script what do I put in the {} after $qglobals, and what are the numbers for in example 1 and 2. I can probably put it together right if someone can tell me what goes there. Trust me After that I'll be able to do it on my own. (I kinda wish there was a detailed Tutorial on how to do this. Thats why I keep askin for a better example. Some people say its better for me to figure it out on my own, But I learn better when I have a good example to work off.)
__________________
Reply With Quote
  #10  
Old 01-31-2012, 08:17 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

http://www.eqemulator.net/wiki/wikka...=QuestTutorial

The qglobal section is at the bottom.
Reply With Quote
  #11  
Old 01-31-2012, 08:50 PM
helman
Sarnak
 
Join Date: Apr 2010
Location: Texas, Sweetwater
Posts: 69
Default

I've read it and I understand it but I still don't know what 12,13,14 is for. Its like no one can tell me how to use a $qglobal for this. I can easily make a qglobal in peq database editor, But I don't know what I need to set it to. I can give it a Name,and set the zone,npcid,and player. But what do I put as a Value? It doesn't make seance. How dose a qglobals work for this?

right now I'm really frustrated, Y'all make this out to be so easy. If I can't figure out how to do this I might just trash my server. If I can't do something this simple, maybe I don't need to be running a server. (just a thought)
__________________
Reply With Quote
  #12  
Old 01-31-2012, 10:01 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

The value is whatever you want it to be.
Reply With Quote
  #13  
Old 01-31-2012, 11:07 PM
helman
Sarnak
 
Join Date: Apr 2010
Location: Texas, Sweetwater
Posts: 69
Default

it don't matter what I set it to? Huh that would be so nice to know XDD.
__________________
Reply With Quote
  #14  
Old 02-01-2012, 01:08 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

Since you came up with something, I added some info for you.
Code:
sub EVENT_SAY {
  if($text=~/Hail/i) {
    quest::say("Hello Dear Friend, I am the elder here. I can Improve the stats on your Epic weapons.");
  }
}

sub EVENT_ITEM {
  #this if statement means whether they turn in 1 or 4 they only get credit once.
  if(plugin::check_handin(\%itemcount, 132508 => 1)) { #Rift Shards
    #just a note that depending on the "math" a single hand in may or may not affect the item.
    quest::say("Thank you, Your weapon should be a bit stronger now.");
    #define a variable to hold the qglobal value for calculation
    my $newvalue = 0;
    #check if the variable is defined.
    if(defined($qglobals{epic_scale})) {
      #since it exists, get the current value
      $newvalue = $qglobals{epic_scale};
    }
    #increment the value (from 0 to 1 or what ever it was +1)
    $newvalue++;
    #set the new value for the qglobal
    quest::setglobal("epic_scale",$newvalue,5,"F");
  } else {
    quest::say("I have no use for this, $name.");
  }
  #return item can always be the last thing outside any sub routine. this will ensure items are returned.
  plugin::return_items(\%itemcount);
}
Reply With Quote
  #15  
Old 02-01-2012, 03:01 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Quote:
Originally Posted by helman View Post
it don't matter what I set it to? Huh that would be so nice to know XDD.
Yes, it matters what you set it to if you're going to use it in a formula or something, but you can set it to anything that works for you.
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 07:41 PM.


 

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