EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Custom (https://www.eqemulator.org/forums/forumdisplay.php?f=671)
-   -   Completely lost, can i get some input? (https://www.eqemulator.org/forums/showthread.php?t=39485)

Songsinger 03-18-2015 09:16 PM

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?

Kingly_Krab 03-18-2015 09:20 PM

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);
}


Songsinger 03-18-2015 09:24 PM

that works thank you. I still dont really understand why the first did not work. but thank you!

Kingly_Krab 03-18-2015 09:29 PM

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!");
    }
}


Songsinger 03-18-2015 10:18 PM

Ah, okay thank you very much

Kingly_Krab 03-18-2015 10:25 PM

You're welcome. If I may ask, what server do you operate?

Uleat 03-18-2015 10:54 PM

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.

Kingly_Krab 03-18-2015 10:57 PM

Yeah, he meant plugin::Whisper, apparently he had gotten confused by reading something.

Songsinger 03-21-2015 09:59 PM

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).

Songsinger 03-21-2015 10:03 PM

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!

ghanja 03-21-2015 10:18 PM

Code:

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

If I remember correctly.

ghanja 03-21-2015 10:22 PM

Oh sorry, you said spells as in plural

Code:

my @blockedspells = (xxxx,xxxx,xxxx,xxxx);
quest::scribespells ($ulevel, $ulevel - 1, $blockedspells);


Songsinger 03-21-2015 10:30 PM

:) thank you very much!

Songsinger 03-21-2015 10:42 PM

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.

ghanja 03-21-2015 11:00 PM

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.


All times are GMT -4. The time now is 01:02 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.