Project 1999

Go Back   Project 1999 > Blue Community > Blue Server Chat

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 05-26-2010, 12:26 PM
mgellan mgellan is offline
Fire Giant

mgellan's Avatar

Join Date: Mar 2010
Location: Winnipeg Canada
Posts: 879
Default

Quote:
Originally Posted by Tobius [You must be logged in to view images. Log in or Register.]
So this is unfixeable? Why did EQEMU code it that way, that is dumb, would posting on the General EQEMU forums help? Or would they not change it anyway? Is it worth asking them to make no drops items tradeable? I know that wasnt classic but neither is no MQ'ing...
EQEMU implements quests as PERL scripts, that fire based on events rather than being a database. So, when you hand in an item, it fires a script and if it's not written to spit back the item, it won't. I don't see why the scripts CAN'T be written to store lists of items handed in so MQing can be done, but none of them appear to. Interestingly each script uses "plugin::check_handin" each time something is handed in, which might be modifiable to allow MQing, I haven't dug into the scripting environment enough to understand where that code is and how it can be changed, has anyone else?

As an example here's the script that implements the quest handins for Totemic Armor (not from P1999, from the AXClassic PEQ distro of eqemu.) Interestingly this one is written not to eat incorrect handins.

# Quest for Vrynn in Lakerathe - Shaman Totemic Armor (low 30's armor)
# kiladiveus - completed subevents for this quest NPC. I created the ending statement since i can't find any. Same as exp.
# Kiladiveus - In najena, need to add loot "19041 Terror Spines" into "44013 Tentacle_Terror" in Lootdrop 45905. 50% chance?
# Kiladiveus - In unrest, need to add loot "19038 Ghoul Carrion" into "63008 A carrion Ghoul" in Lootdrop 16772. 50% chance?

sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Greetings. spiritwalker. I am called Vrynn. If you have banded armor, my wife Kyralynn and I can form it into a new shaman armor using this totem and some reagents for the ritual. I make armor from banded [boots]. [gauntlets]. [sleeves]. and [leggings].");
}
if($text=~/boots/i){
quest::say("The boots require banded boots. 1 dufrenite. an orc chief's tongue from Lesser Faydark. and terror spines from a tentacle terror in Najena.");
}
if($text=~/gauntlets/i){
quest::say("The gauntlets require banded gauntlets. 1 crushed dufrenite. a mammoth rib bone. and a griffenne downfeather.");
}
if($text=~/sleeves/i){
quest::say("The sleeves require banded sleeves. 1 ground dufrenite. ghoul carrion from Estate of Unrest. and charger hoof chips.");
}
if($text=~/leggings/i){
quest::say("The leggings require banded leggings. 1 powdered dufrenite. a Permafrost snowball from a goblin wizard. and bone barbs from Estate of Unrest.");
}
}

sub EVENT_ITEM(){
if (plugin::check_handin(\%itemcount, 3064 => 1, 10073 => 1, 19039 => 1, 19041 => 1)) {
quest::ding(); quest::exp(200);
quest::summonitem(4941);
quest::say("I have crafted your boots, use it well.");
}
elsif (plugin::check_handin(\%itemcount, 3062 => 1, 19050 => 1, 19043 => 1, 19046 => 1)) {
quest::ding(); quest::exp(200);
quest::summonitem(4942);
quest::say("I have crafted your gauntlets, use it well.");
}
elsif (plugin::check_handin(\%itemcount, 3060 => 1, 19051 => 1, 19038 => 1, 19045 => 1)) {
quest::ding(); quest::exp(200);
quest::summonitem(4943);
quest::say("I have crafted your sleeves, use it well.");
}
elsif (plugin::check_handin(\%itemcount, 3063 => 1, 19052 => 1, 19034 => 1, 19037 => 1)) {
quest::ding(); quest::exp(200);
quest::summonitem(4944);
quest::say("I have crafted your leggings, use it well.");
}
else {
quest::say("You have given me incomplete or the wrong reagents.");
plugin::return_items(\%itemcount);
}
}

#END of FILE Zone:lakerathe ID:51059 -- Vrynn


Regards,
Mg
__________________

OMNI Officer (Retired from EQ)
Check out my P99 Hunting Guide!
Last edited by mgellan; 05-26-2010 at 12:34 PM..
  #2  
Old 05-26-2010, 12:29 PM
YendorLootmonkey YendorLootmonkey is offline
Planar Protector

YendorLootmonkey's Avatar

Join Date: Mar 2010
Location: Surefall Glade
Posts: 2,202
Default

I like no MQ'ing... you want the quest item, you camp the parts yourself.
__________________
Another witty, informative, and/or retarded post by:

"You know you done fucked up when Yendor gives you raid commentary." - Tiggles
  #3  
Old 05-26-2010, 12:32 PM
mgellan mgellan is offline
Fire Giant

mgellan's Avatar

Join Date: Mar 2010
Location: Winnipeg Canada
Posts: 879
Default

Quote:
Originally Posted by mgellan [You must be logged in to view images. Log in or Register.]
I don't see why the scripts CAN'T be written to store lists of items handed in so MQing can be done, but none of them appear to.
By the way, I'm sure the Devs would be thrilled if someone volunteered to take this on [You must be logged in to view images. Log in or Register.]

Regards,
Mg
__________________

OMNI Officer (Retired from EQ)
Check out my P99 Hunting Guide!
  #4  
Old 05-26-2010, 12:55 PM
Bumamgar Bumamgar is offline
Sarnak


Join Date: Apr 2010
Posts: 284
Default

It would have to be done in the base code, not just the perl.

Basically, npc's would have to have to keep a list of all items handed to them, and then the EVENT_ITEM() call to perl would have to be modified to provide this list to the perl script. Then in the quest script you would have to scan the item list and see if the most recent item turned in to the NPC (the item that triggered EVENT_ITEM) combined with any combination of items in it's list, resulted in a quest reward. If so, then remove those items from the list and do the quest just as it currently does. If not, add the item to the list and exit out.

There would have to be sanity checks in place on the c++ side of things to keep the list small enough to not cause issues, and probably need some sort of timer (5 minutes?) after which items on the list would simply poof.

In other words, it's doable, but requires a fair bit of effort in both the core EMU code and then in re-writing all of the quest scripts. That last bit is extremely non-trivial.

Then again, maybe it could be done without changing the perl EVENT_ITEM() api... I'll have to think on it some more...
__________________
-Bumamgar
Last edited by Bumamgar; 05-26-2010 at 12:57 PM..
  #5  
Old 05-26-2010, 01:10 PM
Packet Packet is offline
Kobold

Packet's Avatar

Join Date: Jan 2010
Posts: 102
Default

As stated above, perl scripts do not work this way. To re-write the handin function for EVERY script would be not only annoying but a project on an atomic scale. I salute anyone who attempts this as I promise, you will be underwater for a long time. You'd need at least 5 people hitting this daily, testing and confirming each and every script to ensure that it works. With 5 people, working on this within a 2 - 6 hour time span might finish in a few months.

The fun thing about perl is that the slightest change can break the entire quest. So this means you need perl-savvy writers doing this mind numbing work day in and day out. There MAY be a method to change how hand ins are handled in the source but I think there are more concerns at hand right now than enabling multi-questing. MQing was a nice touch but I think it is unnecessary. Ofcourse that is my opinion and I don't speak for everyone.

On a side note, if P99 did do this and sifted through quests adding in a magical function that allowed MQing. Imagine the complaints they would get as people screwed up hand-ins, lost items (due to missed quests) and other assorted problems. It would only put more stress and work on the staff when their hands are already full as it is.
Last edited by Packet; 05-26-2010 at 01:13 PM..
  #6  
Old 05-26-2010, 01:53 PM
mgellan mgellan is offline
Fire Giant

mgellan's Avatar

Join Date: Mar 2010
Location: Winnipeg Canada
Posts: 879
Default

Quote:
Originally Posted by Packet [You must be logged in to view images. Log in or Register.]
On a side note, if P99 did do this and sifted through quests adding in a magical function that allowed MQing. Imagine the complaints they would get as people screwed up hand-ins, lost items (due to missed quests) and other assorted problems. It would only put more stress and work on the staff when their hands are already full as it is.
Assuming we would mod the check_handin.pl plugin, I would say only record a handin of the correct items (since those are passed to it) and reject/return incorrect. To me this would be optimal and reduce the stress on staff since they don't have to deal with petitions about "eaten" items? Assuming the script returned the items in the first place, thats a different issue (bad scripting).

The current script is pretty simple:

# plugin::check_handin($item1 => #required_amount,...);
# autoreturns extra unused items on success
sub check_handin {
my $hashref = shift;
my %required = @_;
foreach my $req (keys %required) {
if ((!defined $hashref->{$req}) || ($hashref->{$req} != $required{$req})) {
return(0);
}
}
foreach my $req (keys %required) {
if ($required{$req} < $hashref->{$req}) {
$hashref->{$req} -= $required{$req};
} else {
delete $hashref->{$req};
}
}
return 1;
}

sub return_items {
my $hashref = shift;
foreach my $k (keys(%{$hashref})) {
next if($k == 0);
my $r;
for($r = 0; $r < $hashref->{$k}; $r++) {
quest::summonitem($k);
}
delete $hashref->{$k};
}
}

1;


I'm not a PERL programmer (why didn't they choose Python? Grrr) but perhaps I can take a stab at writing a version that supports MQ... thoughts? Are the devs on side to implement something like this?

Regards,
Mg
__________________

OMNI Officer (Retired from EQ)
Check out my P99 Hunting Guide!
  #7  
Old 05-26-2010, 02:20 PM
Packet Packet is offline
Kobold

Packet's Avatar

Join Date: Jan 2010
Posts: 102
Default

Not every quest uses the handin plugin so they'd still have to sift through every quest and change something or another. Changing that plugin in particular would simplify things though. It's a good idea.
  #8  
Old 05-26-2010, 02:27 PM
YendorLootmonkey YendorLootmonkey is offline
Planar Protector

YendorLootmonkey's Avatar

Join Date: Mar 2010
Location: Surefall Glade
Posts: 2,202
Default

Just re-write the subroutine to accept any four items, and then yield the quest reward. Boom... done! =)

"Sweet, just turned in 4 rat whiskers and got my epic weapon!!!"

(Which I hear is not too different than the rogue epic quest!!! haha just playin)
__________________
Another witty, informative, and/or retarded post by:

"You know you done fucked up when Yendor gives you raid commentary." - Tiggles
Last edited by YendorLootmonkey; 05-26-2010 at 02:29 PM..
Closed Thread


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 06:22 AM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.