![]() |
|
|
|
#1
|
||||
|
Quote:
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
__________________
| |||
|
Last edited by mgellan; 05-26-2010 at 12:34 PM..
|
|
|||
|
#2
|
|||
|
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
|
||||
|
Quote:
Regards, Mg
__________________
| |||
|
|
||||
|
#4
|
|||
|
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
|
|||
|
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
|
||||
|
Quote:
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
__________________
| |||
|
|
||||
|
#7
|
|||
|
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
|
|||
|
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..
|
|
||
![]() |
|
|