|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
03-13-2010, 01:39 PM
|
Hill Giant
|
|
Join Date: Sep 2008
Posts: 204
|
|
default.pl
We put a default.pl in the root quest directory to handle item turn in events. but strangle it seems like it does effect player's pets too, not just npcs.
putting default.pl to a specific zone folder or templates folder wont work at all.
the code is simple:
Code:
sub EVENT_ITEM {
quest::emote(" looks at you strangely.");
plugin::return_items(\%itemcount);
}
what do we miss? any help would be appreciated.
__________________
|
03-13-2010, 03:17 PM
|
Hill Giant
|
|
Join Date: Jul 2009
Location: Southern United States
Posts: 107
|
|
Quote:
We put a default.pl in the root quest directory to handle item turn in events. but strangle it seems like it does effect player's pets too, not just npcs.
|
I find it strange that you find it strange. Pets are NPCs. Default.pl belongs in the plugins folder and only there AFAIK.
|
03-13-2010, 06:46 PM
|
Hill Giant
|
|
Join Date: Sep 2008
Posts: 204
|
|
fyi, default.pl doesn't belong to the plugins folder. it belongs to and works in the root quest directory.
besides I can do sub EVENT_ITEM per individual npcs, any help would be appreciated for a global solution.
__________________
|
03-13-2010, 09:16 PM
|
Hill Giant
|
|
Join Date: Jul 2009
Location: Southern United States
Posts: 107
|
|
oh yea, you're totally right about the placement of default.pl. I had moved it into the plugin folder on this end, to disable it (but keep it) and totally forgot where it originally went.
Could you not filter the pets out by their IDs (and by range if you wanted) if you don't want them reacting with the default behavior?
Pseudo:
Enter default behavior sub
reject pets
do your thing...
That's the only way I can think of doing it since pets are indeed npcs.
|
03-13-2010, 10:36 PM
|
|
Demi-God
|
|
Join Date: Mar 2009
Location: Umm
Posts: 1,492
|
|
well if someone could actually write such filtering code- would be much appreciated.
However, would nice, of our dev could include few more option in code:
-default.pl - affects npcs and pets
-default-npc.pl - affects only mobs
-default-pet.pl - affects only pets
|
03-13-2010, 11:48 PM
|
Hill Giant
|
|
Join Date: Jul 2009
Location: Southern United States
Posts: 107
|
|
I'm no script jockie, so keep that in mind BUT:
I did read through the wiki again real quick and came up with a working filter method for rejecting (or selecting, your choice) pets based on npc id.
Code:
sub EVENT_SAY
{
my $mob = plugin::var('$mob');
my $npcid = $mob->GetNPCTypeID();
if($npcid < 1000)
{
quest::say("I am a pet!");
}
plugin::defaultSay();
}
With this, only pets (based on peq db distro) will respond.
|
|
|
|
03-14-2010, 12:38 AM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
If you want to have all NPCs automatically return no drop items, you could update to rev1144 or later so you can use the rule NPC:ReturnNonQuestNoDropItems that I added. It basically causes all NPCs that don't have an EVENT_ITEM to return all No Drop items handed to them. It also includes pets, but it still allows tradeable items to be handed to all NPCs and pets, so giving pets weapons still works fine. I added this to prevent players from turning in quest items to their pets or to non-quest NPCs by mistake. Seems to help a lot so far lol.
I do agree that it would be nice to have more default type script options. If you want to exclude pets from default.pl for now, the only way I know of is to make a script for every pet and put it in your templates folder. You just name them something like cleric_hammer_67_.pl or BLpet47.pl and so on. Just all of the ones in your pets table should do it. It is a bit of an annoying way to deal with it, but should work ok I think.
|
|
|
|
03-14-2010, 01:54 AM
|
|
Demi-God
|
|
Join Date: Mar 2009
Location: Umm
Posts: 1,492
|
|
ah this awesome Trev. I am pretty sure we are running revision past that one. We will check on it. Thank you for help!
|
03-14-2010, 06:12 AM
|
Hill Giant
|
|
Join Date: Sep 2008
Posts: 204
|
|
Thank you
__________________
|
06-23-2010, 03:58 PM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,490
|
|
Anyone been able to get zonewide default.pl to work lately? Seems broken. The same file works fine as a worldwide default.pl. Trying to use an EVENT_ITEM sub.
|
06-26-2010, 11:46 AM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,490
|
|
Ok, did a little research and testing on this and I see what is going on. When the zone is initialized, the default npc quest file is chosen because npc and zone have not yet been passed:
Code:
string filename= "quests/", packagename = GetPkgPrefix(npcid);
//each package name is of the form qstxxxx where xxxx = npcid (since numbers alone are not valid package names)
questMode curmode = questDefault;
FILE *tmpf;
//LogFile->write(EQEMuLog::Debug, "LoadScript(%d, %s):\n", npcid, zone);
if(!npcid || !zone)
{
//LogFile->write(EQEMuLog::Debug, " default 1");
filename += DEFAULT_QUEST_PREFIX;
filename += ".pl";
curmode = questDefault;
}
So the system will always load quests/default.pl as the default. I can't see a way to pass the zone to attempt quests/zone/default.pl before finally settling on quests/default.pl
|
09-21-2010, 10:57 PM
|
|
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,071
|
|
Quote:
Originally Posted by joligario
Ok, did a little research and testing on this and I see what is going on. When the zone is initialized, the default npc quest file is chosen because npc and zone have not yet been passed:
Code:
string filename= "quests/", packagename = GetPkgPrefix(npcid);
//each package name is of the form qstxxxx where xxxx = npcid (since numbers alone are not valid package names)
questMode curmode = questDefault;
FILE *tmpf;
//LogFile->write(EQEMuLog::Debug, "LoadScript(%d, %s):\n", npcid, zone);
if(!npcid || !zone)
{
//LogFile->write(EQEMuLog::Debug, " default 1");
filename += DEFAULT_QUEST_PREFIX;
filename += ".pl";
curmode = questDefault;
}
So the system will always load quests/default.pl as the default. I can't see a way to pass the zone to attempt quests/zone/default.pl before finally settling on quests/default.pl
|
So Joligario, did you get zone default.pl to load right again?
|
|
|
|
09-22-2010, 06:43 AM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,490
|
|
Actually, no. I haven't had a chance to work on that much. I will look at this again soon.
|
09-22-2010, 09:01 AM
|
|
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,071
|
|
Quote:
Originally Posted by joligario
Actually, no. I haven't had a chance to work on that much. I will look at this again soon.
|
Awesome, that would make zone specific events much easier to execute rather than 40 different scripts for similar functions.
|
10-16-2010, 07:52 PM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,490
|
|
Trevius worked this issue and it should be fixed as of r1705.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 09:59 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|