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 04-23-2009, 07:33 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default Default.pl for Pet Items?

I am curious if anyone has a decent default.pl for handling an issue with pets. The problem is that I get far too many reports of players accidentally handing in items to their own pet (or someone else's pet) when trying to do quest turn ins. I figure that it is time to try to stomp out that issue for good.

What I am thinking is to have a default.pl that would affect all pets (and all other NPCs without a quest script) so that they no longer accept No Drop items or items with the Quest flag on them, unless they were given to them by a GM.

There are 2 main issues with trying to set this up:

First, any NPC with a sub_EVENT_ITEM will not equip items that are handed to them. I think we can get around this by just doing a quest::addloot($item1) and so on once we verify that it should be able to accept that item.

The second issue will take more work to resolve, but shouldn't be too bad. Basically, I don't see any way for quests to check if an item is no drop, or if it has a certain setting on it. I think we could go about handling this in 1 of 2 possible ways. The easiest way would be to just create a bool in the source code that does a check on the item to see if it is no drop "IsNoDrop()" and maybe another bool that checks if it is a quest item "IsQuestItem()". Then, we could just run those checks and if it fails them, it just returns the item to the player.

The other possibility that might be better in the long run and could be considerably more useful would be to make a function that could get any stat from the database for any item. Or maybe just limit it to certain stats that all use integers (because mixing strings and ints might be tough). But, then you could just do something like "Quest::GetItemStat(NoDrop)" and it would return 0 or 255 or whatever that stat is set to.

The command that can get stats would actually be pretty cool. I was thinking about a custom quest a while back that could definitely use it. Basically, it would be a quest that the player could turn in any 4 items with around the same HP value and in return, they would get an item with slightly better stats. Or, maybe they get a certain amount of credit based on HPs of an item they turn in that they can then spend on from a list of items.

Got a little off-topic there, but the pet issue is my main focus. If anyone has had any success with this, I would be interested to hear. I would almost consider setting pets to not accept no drop items directly in the source code, but I don't know if anyone would have a problem with that. And, it really shouldn't be too hard to get this script going and working flawlessly. Once it is all done, I will share it here for anyone who wants it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 04-23-2009, 11:54 PM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

Change the source so if the pet can't wear or wield an item or it's nodrop, it gets returned.

Trev, shorter really is better.
Reply With Quote
  #3  
Old 04-24-2009, 04:08 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I can mostly agree with you there, but I think I recall some custom server setting up a summonable pet from a clicky that they could then run quests from and I don't recall if they had to do a no drop turn in or something. Wouldn't want to break something someone else is using already. But yeah, if most people think this change would be best, it probably is just better to change it in the source. I can't really think of any reason why they should accept no drop items. The only thing is that not all quest items are no drop. So, it would be nice if there was a way to be able to just set all of our quest items to use the quest item flag. Then, we could do that extra check when giving an item to a pet and stop all possible quest turn in issues like this. I suppose that we could also put that into the source, because I doubt there are many (if any) items flagged as quest items that people would want to give to a pet for any reason.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 04-24-2009, 05:43 AM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

Yes/No box FTW.

Don't overthink it. KISS is the rule.
Reply With Quote
  #5  
Old 04-24-2009, 10:13 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

I'm sure those checks are used in the code somewhere, couldn't we just export them to Perl objects?
Reply With Quote
  #6  
Old 04-25-2009, 01:12 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

There may be one for NoDrop. It probably wouldn't be hard to get it into Perl. I will look into it a bit more. Though, MNWatchdog might be right that setting it in the source and then just making a rule for it might be the best/easiest way to go. I will have to look through the source some more and see if I can find anything else that might be useful for this. It is something I have wanted to set for a long time now and just never really took the time to look into it until now.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #7  
Old 04-28-2009, 12:47 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

Since you are thinking about adding new rule values; how about one for class based experience penalties & spells_new?
Reply With Quote
  #8  
Old 04-28-2009, 05:02 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by Dibalamin View Post
Since you are thinking about adding new rule values; how about one for class based experience penalties & spells_new?
Those really have nothing to do with this thread :P I do agree that the spells_new rule would be good, because I haven't use the old way in a long time. Really, if someone could get a good spell editor that works with the table (similar to the ailia/bleh editor), there wouldn't be any real reason to keep the old way of loading spells. I wouldn't mind adding a rule for that though.

I just added a new rule on my server last night to test out before putting it on the SVN. It is for setting a start zone for SoF clients that can be different than the startzone (from the variables table) for Titanium clients.

Either way, this is derailing this thread. Please try to stay on topic (it is a forum rule) :P
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
Old 04-29-2009, 07:22 AM
KingMort
Banned
 
Join Date: Sep 2006
Posts: 841
Default

Could you perhaps set it up so that if NPC <1000 (which are most pets) it double prompts you ?

You have given $item to your pet are you sure this is what you wanted to do? If not target your pet and say "Pet Return Last Item" ..

Some type of check put in there to make SURE that only the owner can see that text (easy part) and make it so that only the owner can reverse the trade...

It is certainly not something that would make it onto PEQ since it's not something from Live.. However for custom servers this could be kindof a cool Idea..

We already have the code to do it too with the BOTS..

Just a thought

King
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 08:32 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