EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::General Discussion (https://www.eqemulator.org/forums/forumdisplay.php?f=586)
-   -   Charm Stats? (https://www.eqemulator.org/forums/showthread.php?t=39504)

tearinall 01-08-2016 09:16 PM

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;
                }
        }
}


tearinall 01-08-2016 09:23 PM

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.

Maceblade 01-10-2016 05:45 PM

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

tearinall 01-10-2016 08:37 PM

Quote:

Originally Posted by Maceblade (Post 246441)
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" ?

Maceblade 01-11-2016 09:59 AM

Replying to anyone that will listen lol...

http://www.mediafire.com/convkey/593...k15y66zkzg.jpg

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.

tearinall 01-11-2016 04:20 PM

Quote:

Originally Posted by Maceblade (Post 246458)
Replying to anyone that will listen lol...

http://www.mediafire.com/convkey/593...k15y66zkzg.jpg

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).

Maceblade 01-11-2016 04:41 PM

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.

tearinall 01-11-2016 05:35 PM

Quote:

Originally Posted by Maceblade (Post 246473)
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.

Maceblade 01-11-2016 07:15 PM

oh so basically any number will work in the red box.

NatedogEZ 01-11-2016 08:22 PM

Hit me up on skype Maceblade and I can help ya out if you wish :)


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

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.