Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 03-18-2015, 09:16 PM
Songsinger
Fire Beetle
 
Join Date: Mar 2015
Posts: 21
Default 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?
Reply With Quote
  #2  
Old 03-18-2015, 09:20 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

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);
}
Reply With Quote
  #3  
Old 03-18-2015, 09:24 PM
Songsinger
Fire Beetle
 
Join Date: Mar 2015
Posts: 21
Default

that works thank you. I still dont really understand why the first did not work. but thank you!
Reply With Quote
  #4  
Old 03-18-2015, 09:29 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

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!");
    }
}
Reply With Quote
  #5  
Old 03-18-2015, 10:18 PM
Songsinger
Fire Beetle
 
Join Date: Mar 2015
Posts: 21
Default

Ah, okay thank you very much
Reply With Quote
  #6  
Old 03-18-2015, 10:25 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

You're welcome. If I may ask, what server do you operate?
Reply With Quote
  #7  
Old 03-18-2015, 10:54 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

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
Reply With Quote
  #8  
Old 03-18-2015, 10:57 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Yeah, he meant plugin::Whisper, apparently he had gotten confused by reading something.
Reply With Quote
  #9  
Old 03-21-2015, 09:59 PM
Songsinger
Fire Beetle
 
Join Date: Mar 2015
Posts: 21
Default

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).
Reply With Quote
  #10  
Old 03-21-2015, 10:03 PM
Songsinger
Fire Beetle
 
Join Date: Mar 2015
Posts: 21
Default

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!
Reply With Quote
  #11  
Old 03-21-2015, 10:18 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Code:
quest::scribespells ($ulevel, $ulevel - 1, "xxxx");
Where xxxx is the spell you wish for it to omit/block.

If I remember correctly.
Reply With Quote
  #12  
Old 03-21-2015, 10:22 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Oh sorry, you said spells as in plural

Code:
my @blockedspells = (xxxx,xxxx,xxxx,xxxx);
quest::scribespells ($ulevel, $ulevel - 1, $blockedspells);
Reply With Quote
  #13  
Old 03-21-2015, 10:30 PM
Songsinger
Fire Beetle
 
Join Date: Mar 2015
Posts: 21
Default

thank you very much!
Reply With Quote
  #14  
Old 03-21-2015, 10:42 PM
Songsinger
Fire Beetle
 
Join Date: Mar 2015
Posts: 21
Default

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.
Reply With Quote
  #15  
Old 03-21-2015, 11:00 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

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.
Reply With Quote
Reply


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 08:02 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3