|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Custom Custom Quests here |
|
|
|
03-18-2015, 09:16 PM
|
Fire Beetle
|
|
Join Date: Mar 2015
Posts: 21
|
|
Completely lost, can i get some input?
OK i'm completely lost on this one. I'm trying to run this quest. the first two event hand ins work perfect, however the third one does nothing. no response, no return item, nothing.
Code:
sub EVENT_ITEM {
if($itemcount{11602} == 1 && $itemcount{59943} == 1 && $itemcount{188016} == 1 && $itemcount{188015} == 1){
quest::say("Here is your kobold skull infused with the power of the white dragon scales.");
quest::summonitem("188013");
}
if($itemcount{11622} == 1 && $itemcount{59943} == 1 && $itemcount{188016} == 1 && $itemcount{188015} == 1){
quest::say("Here is your kobold skull infused with the power of the red dragon scales.");
quest::summonitem("188012");
}
if($itemcount{188031} == 1){
quest::whisper("This is not good. We must investigate this matter imediatly. Take this note to my spy. He is currently on a mission off the Great Divide, attempting to infiltrate the laboratory of a great alchamist.");
quest::summonitem("188032");
}
plugin::return_items(\%itemcount);
}
Like I said the first one is perfect, the second is perfect. the third you give item and he just looks at you. Running it in cmd gave an OK message. Anyone see any problems?
|
|
|
|
03-18-2015, 09:20 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
Try this:
Code:
sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount, 11602 => 1, 59943 => 1, 188016 => 1, 188015 => 1)) {
plugin::Whisper("Here is your kobold skull infused with the power of the white dragon scales.");
quest::summonitem(188013);
} elsif(plugin::check_handin(\%itemcount, 11622 => 1, 59943 => 1, 188016 => 1, 188015 => 1)){
plugin::Whisper("Here is your kobold skull infused with the power of the red dragon scales.");
quest::summonitem(188012);
} elsif(plugin::check_handin(\%itemcount, 188031 => 1)) {
plugin::Whisper("This is not good. We must investigate this matter immediately. Take this note to my spy. He is currently on a mission off the Great Divide, attempting to infiltrate the laboratory of a great alchemist.");
quest::summonitem(188032);
}
plugin::return_items(\%itemcount);
}
|
03-18-2015, 09:24 PM
|
Fire Beetle
|
|
Join Date: Mar 2015
Posts: 21
|
|
that works thank you. I still dont really understand why the first did not work. but thank you!
|
03-18-2015, 09:29 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
Well, $itemcount is a hash reference used to see if a client has that item, which is not useful in EVENT_ITEM where you're checking for hand in, rather than just checking if a client has an item or not, meaning you should use plugin::check_handin, not $itemcount. You can use $itemcount in other subroutines like this:
Code:
sub EVENT_SAY {
if ($text=~/Hail/i && $itemcount{59943} >= 1) {
plugin::Whisper("You have the skull!");
} elsif ($text=~/Hail/i && $itemcount{59943} == 0) {
plugin::Whisper("You don't have the skull!");
}
}
|
03-18-2015, 10:18 PM
|
Fire Beetle
|
|
Join Date: Mar 2015
Posts: 21
|
|
Ah, okay thank you very much
|
03-18-2015, 10:25 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
You're welcome. If I may ask, what server do you operate?
|
03-18-2015, 10:54 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
http://wiki.eqemulator.org/p?Ultimat...rence&frm=Main
I don't see a 'quest::whisper' operator there..though, I haven't checked the api itself.
Anything after the 'croak' would probably be ignored.
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
03-18-2015, 10:57 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
Yeah, he meant plugin::Whisper, apparently he had gotten confused by reading something.
|
03-21-2015, 09:59 PM
|
Fire Beetle
|
|
Join Date: Mar 2015
Posts: 21
|
|
ah yeah, sorry i'm still trying to teach myself this stuff. It all goes well then I hit a hiccup.
Right now i'm running Ancient Memories, though it is currently down as there is a lot of editing going in that I just could not do with people logged in(sorry but it happens during alpha).
|
03-21-2015, 10:03 PM
|
Fire Beetle
|
|
Join Date: Mar 2015
Posts: 21
|
|
I do have another question though, not sure if I need to post a new thread or not, however ill post it here first. I'm using an auto skill trainer on level, the one floating around on the forums. I would like this code
Code:
# scribe all spells for current level
quest::scribespells( $ulevel, $ulevel - 1 );
To not scribe certain spells but cannot figure out how to do it. Mainly I do not want it to scribe the Mage epic spell. The only ideas I have had are to create a unscribe event for the spell id, though it would be risky if someone did epic, died and re-dinged and lost it, but even that i'm unsure of how to do. Is there an except clause I could put in that would skip over that spell ID?
Thank you in advance!
|
03-21-2015, 10:18 PM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
Code:
quest::scribespells ($ulevel, $ulevel - 1, "xxxx");
Where xxxx is the spell you wish for it to omit/block.
If I remember correctly.
|
03-21-2015, 10:22 PM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
Oh sorry, you said spells as in plural
Code:
my @blockedspells = (xxxx,xxxx,xxxx,xxxx);
quest::scribespells ($ulevel, $ulevel - 1, $blockedspells);
|
03-21-2015, 10:30 PM
|
Fire Beetle
|
|
Join Date: Mar 2015
Posts: 21
|
|
thank you very much!
|
03-21-2015, 10:42 PM
|
Fire Beetle
|
|
Join Date: Mar 2015
Posts: 21
|
|
cant get either of these to work, Mage epic spell id for Summon orb is 1944. it still scribes when put into both of these configurations? does this not got off the ID in the database or am I still missing something?
With
Code:
my @blockedspells = (1944);
quest::scribespells ($ulevel, $ulevel - 1, $blockedspells);
in the 1944 is in red, still scribes all spells.
with the other formate the
Code:
quest::scribespells ($ulevel, $ulevel - 1, "1944");
the 1944 is grayed out and still scribes all spells.
|
03-21-2015, 11:00 PM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
Code:
uint16 QuestManager::scribespells(uint8 max_level, uint8 min_level) {
Oh, hmmm.. could have sworn blocking spells was a parameter, evidently not. There is a means to unscribe a spell if you know its book slot, though I see no way to find what slot a spell id is in.
|
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 08:02 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|