Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 11-23-2012, 01:17 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default Event_item_click

what's the difference between EVENT_ITEM_CLICK and EVENT_ITEM_CLICK_CAST? i understand that the former requires SoF+, but i'm not sure why the latter would lock up SoD.

i created a script_8556.pl for use with the bloodmoon pick axe while running some tests, and when i used EVENT_ITEM_CLICK_CAST instead of EVENT_ITEM_CLICK, i was stuck in "you can't use that command while casting" mode.

i hadn't altered anything in the database for the item in question, and it was working with the other event. does something else have to be set for the item's entry that i am unaware of?

this is what i was testing:
Code:
sub EVENT_ITEM_CLICK_CAST
{
    if ($itemid == 35096)
    {
        return if !validLoc();
        quest::doanim(87);
    }
}

my %testArea = (
    189 => [
        {
            x =>  125,
            y =>   48,
            z => -222
        },
        {
            x => -655,
            y => -428,
            z =>    2
        }
    ]
);

sub validLoc
{
    return 0 if !exists($testArea{$zoneid});
    foreach $loc (@{$testArea{$zoneid}}) {
        return 1 if (
            $loc->{'x'} == $client->GetX() &&
            $loc->{'y'} == $client->GetY() &&
            $loc->{'z'} == $client->GetZ()
        );
    }
    0;
}
Reply With Quote
  #2  
Old 11-23-2012, 02:56 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

after looking more closely at the source code, i sorted out that this was happening because i wasn't making a call to CastSpell() within my script, so it never finished the process. now that i've added it, it doesn't lock me up anymore.
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 03:21 AM.


 

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