Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #16  
Old 01-08-2016, 09:16 PM
tearinall
Fire Beetle
 
Join Date: Oct 2012
Posts: 9
Default

Mace, it doesn't always "take hold" instantaneously from what I remember.

I get what you're after, which is why I only check the main inventory (worn, and consequently cursor rather than all slots). I also put the item numbers you want to check for in a declared array so that you may add to it in perhaps a more easier to understand method. I also have it check how many elements are in the array as a "total number of armor to check for", so it's easier to scale (as in grow, increase, etc.).

Try this debugging version:

Code:
sub EVENT_SCALE_CALC {
	my @checkarray = (1804..1810);  ## denotes a range between 1804 to 1810 - could also have (1804,1805,1806,etc.) to as many as you want
									## since we check how many are in the array later
	my $worn = 0;
	foreach my $itemtocheck (@checkarray) {
		if (CheckForItem($itemtocheck) {
			$worn++
			quest::say ("".$worn." total worn items at this time.");
		}
	}
	$questitem->SetScale($worn/(scalar @checkarray));
}

sub CheckForItem {
	## Check only main inventory/cursor (we want these pieces to be worn to count right?
	for ($slot1=0; $slot1<=30; $slot1++) {
		$itemid1=$client->GetItemIDAt($slot1);
		if ($itemid1==$_[0]) {
			quest::say ("Found item: ".$_[0]."");
			return 1;
		} else {
			quest::say ("Did not find item: ".$_[0]."");
			return 0;
		}
	}
}
Reply With Quote
  #17  
Old 01-08-2016, 09:23 PM
tearinall
Fire Beetle
 
Join Date: Oct 2012
Posts: 9
Default

Quote:
I have multiple items using the same charm file and IDK if that's allowed.
And its perfectly fine to utilize the same charmfile (i.e. code) for multiple items.
Reply With Quote
  #18  
Old 01-10-2016, 05:45 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

that actually worked beautifully bro, stats scale and everything. Exactly what I wanted thanks man! Now if I could figure out what to do with that other box or what its even for I have a whole new design and set of progression setup lol
Reply With Quote
  #19  
Old 01-10-2016, 08:37 PM
tearinall
Fire Beetle
 
Join Date: Oct 2012
Posts: 9
Default

Quote:
Originally Posted by Maceblade View Post
Now if I could figure out what to do with that other box or what its even for...
Not sure who you were replying to, so maybe the details are lost on that ignorance of mine. Though I'll still ask, what "other box" ?
Reply With Quote
  #20  
Old 01-11-2016, 09:59 AM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

Replying to anyone that will listen lol...



I used the 4032 or whatever is in there bc it seemed to work. It is also the same number used in the tainted heartstone which increases stats based on mastered languages. I thought it was the DBstr number but none of my items even have a "Item gains power with the more pieces of this set you carry " or whatever.
Reply With Quote
  #21  
Old 01-11-2016, 04:20 PM
tearinall
Fire Beetle
 
Join Date: Oct 2012
Posts: 9
Default

Quote:
Originally Posted by Maceblade View Post
Replying to anyone that will listen lol...



I used the 4032 or whatever is in there bc it seemed to work. It is also the same number used in the tainted heartstone which increases stats based on mastered languages. I thought it was the DBstr number but none of my items even have a "Item gains power with the more pieces of this set you carry " or whatever.
Take a look at your `books` table. I think you'll figure it out from there. Though, that is where you'll place "Items increase in power as you gain more set pieces." (or whatever you had in mind to say).
Reply With Quote
  #22  
Old 01-11-2016, 04:41 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

Ah that's neat, I added the set information associated with my charmfile, but I am still unsure what and where the number inside the red box is coming from.
Reply With Quote
  #23  
Old 01-11-2016, 05:35 PM
tearinall
Fire Beetle
 
Join Date: Oct 2012
Posts: 9
Default

Quote:
Originally Posted by Maceblade View Post
Ah that's neat, I added the set information associated with my charmfile, but I am still unsure what and where the number inside the red box is coming from.
If it's not 0 the server will set it as a scaling item.

`charmfile` is the (quest) file used to determine the scaling

Code:
GetAugment(slot) # Returns an item object for the augment found in the slot supplied
GetCharges() # Returns the number of charges on an item
GetID() # Returns the ID of the item
GetName() # Returns the name of the item
IsAttuned() # Returns 1 if the item is attuned (instanced no drop)
IsType(type) # Returns 1 if the item is of the type supplied (valid types are 0=common, 1=container, 2=book)
ItemSay(text, language) # The item says text, language is optional (currently only goes to item's owner)
SetScale(multiplier) # Sets the scale multiplier for scaling items.  1.0 = full stats
Code:
$questitem->GetID();
And so on.
Reply With Quote
  #24  
Old 01-11-2016, 07:15 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

oh so basically any number will work in the red box.
Reply With Quote
  #25  
Old 01-11-2016, 08:22 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Hit me up on skype Maceblade and I can help ya out if you wish
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 11:06 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