View Full Version : Item quests
Shadow-Wolf
09-20-2009, 02:08 PM
Ok I've got a few questions here. Does it currently work? I've set the charmfile to CHRMTest which is a pl in quests\items and it doesn't seem to scale the charms stats at all. The second question I have is how often does the item get updated? Is it every time the item is equiped? linked?
trevius
09-20-2009, 09:22 PM
Make sure that if you are making a new scaling item, you also have to set the charmfileid field to something other than 0. I don't really know what the id number means, but without it, it won't scale.
Once you have it set properly, you will need to restart the server for the item changes to take effect. Then, once your item scaling is updated via the script, within about the next minute the stat updates will start showing automatically.
I made this wiki page a while back that might help:
http://www.eqemulator.net/wiki/wikka.php?wakka=CharmFile
Shadow-Wolf
09-21-2009, 05:49 PM
That's strange about the charmfileid though because when I had it set to something besides 0, it set the stats to zero and ignored the quest for the item. When I set it to 0 it again ignored the scaling but did show stats. That's why I was thinking this system wasn't fully implemented cause either way it didn't scale.
Are there any specific flags in the items sql that I need to change besides charmfile and charmfileid?
realityincarnate
09-21-2009, 06:30 PM
My guess would be that you have an error of some sort in your quest file. When an item has a charmfileid != 0, the server sends scaled data to the client, but if the scaling hasn't been properly set it will basically just multiply everything by zero and give an item with no stats.
Shadow-Wolf
09-22-2009, 03:46 AM
Hmm, well there weren't any syntax errors to my knowledge, the only code I had besides the sub was $questitem->SetScale(1); and would change the input of that command to test it but it never scaled. I have however gotten it to work but it seems to update too slowly for my tastes. My current item quest looks like this:
sub EVENT_SCALE_CALC
{
my $skill = $client->GetSkill(66);
$questitem->SetScale($skill/100);
}
The item in question is a charm that raises its stats based on how good the players alcohol tolerance skill is. I know 100 isn't the max for the skill, I did this on purpose cause I wanted it to go even further for those who max it out. I was hoping to base the item on how drunk the player was but there doesn't seem to be any perl objects that could return that information and I don't think it would work well with the how long the scale checks take.
realityincarnate
09-22-2009, 09:21 AM
The stat scaling should be updating every minute, but if you want to speed that up, it's an easy change in the source. You'd look for
charm_update_timer(60000),
(currently at line 169 of zone/client.cpp) and change the 60000 to the timing you would like (in milliseconds).
The player's drunkenness is only handled client side at the moment, so you won't be able to do anything with that until it's added to the server functionality.
Shadow-Wolf
09-22-2009, 11:07 AM
Cool, that should be all I need. Thank you for your help.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.