Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 03-03-2008, 05:44 AM
Knightly
Accomplished Programmer
 
Join Date: Nov 2006
Location: Honolulu, HI
Posts: 91
Default

Quote:
I'm confused? What does this do actually? default.pl already works, both by zone, and server wide. (It goes in the root directory of quests, not templates. Never made sense to me, but it works)
D'oh! Teach me to not look before I leap. At any rate, the same rules apply, the default.pl (if it exists) will cause pets to take items as well. So, ignore the code above, but still feel free to answer the question I posed.
Reply With Quote
  #2  
Old 03-03-2008, 11:26 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

This would be a great idea, I know there was a default.pl didn't know it worked - and I can't find one now, does anybody see one in their directory?
if so, can they post ?
Reply With Quote
  #3  
Old 03-13-2008, 12:23 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

This will do it Though, it does not work for bots. I'll have to go through the bot code and see if I can use another object to identify if the NPC is a bot or not.

Code:
sub EVENT_ITEM {
my $owner = $npc->GetOwnerID();
if ($owner > 0) {
}

else {
plugin::return_items(\%itemcount);
}
 }
Oh, and if interested in using my debugging code I used to make sure everything was kosher, here it is. Nothing fancy of course.

Code:
sub EVENT_SAY {
my $owner = $npc->GetOwnerID();
if($text=~/pet/i && $owner == 0){
quest::say("I don't belong to anybody!");
}
elsif($text=~/pet/i){
quest::say("I belong to player, $owner.");
}
 }
Of course, default.pl won't work for NPCs who already have a script associated with them, so I guess one of these days somebody is going to need to tack plugin::return_items(\%itemcount); at the end of every script. *sigh*

Last edited by cavedude; 03-13-2008 at 08:33 AM..
Reply With Quote
  #4  
Old 03-15-2008, 11:28 PM
Knightly
Accomplished Programmer
 
Join Date: Nov 2006
Location: Honolulu, HI
Posts: 91
Default

Great script CD. I don't use the bots on my server, so I'm afraid I'll be no help there...but on the plugin::return_items issue, I started writing a crawler script that would update these. Still needs quite a bit of testing, but I've been swamped at work lately so it may be some time before I can finish it up.
Reply With Quote
Reply

Thread Tools
Display Modes

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 09:28 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3