EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Mobs arent casting spells.... (https://www.eqemulator.org/forums/showthread.php?t=33622)

Astal 05-23-2011 05:33 PM

Mobs arent casting spells....
 
I have it set up for the mobs to heal my boss every 60 seconds for 20k hp. The script is firing but the spell isnt casting. I have a feeling it has to do with $mob->SetTarget(); the ID is correct, but is that the correct code i would be looking for to pick an NPC to cast a spell on?


Code:

#Monolith of Lohesh

sub EVENT_SPAWN {
        quest::settimer("HealLohesh", 60);
}

sub EVENT_TIMER {

if ( ($timer eq "HealLohesh" ) && (defined($entity_list->GetNPCByNPCTypeID(999424)) ) ) {

        quest::say("Take our life oh dark one!!");
        $mob->SetTarget(999424);
        plugin::CastOnTarget(21479); #heal
        quest::settimer("HealLohesh", 60);
        }


       
}


I also tried it like this, same result

Code:

#Monolith of Lohesh

sub EVENT_SPAWN {
        quest::settimer("HealLohesh", 60);
}

sub EVENT_TIMER {

if ( ($timer eq "HealLohesh" ) && (defined($entity_list->GetNPCByNPCTypeID(999424)) ) ) {

        quest::say("Take our life oh dark one!!");
        #$mob->SetTarget(999424);
        $mob->CastSpell(21479, 999424, 10, -1, -1);
        #plugin::CastOnTarget(21479); #heal
        quest::settimer("HealLohesh", 60);
        }


       
}

sub EVENT_SAY {       

                if($text=~/Hail/i) {
                $client->Message(315, "Script working.");
                }
               
}


Shamanistik08 05-23-2011 05:36 PM

Totally new to perl, but there is no quotes normally here?

plugin::CastOnTarget('21479');

Just a guess..

Astal 05-23-2011 05:57 PM

Quote:

Originally Posted by Shamanistik08 (Post 200327)
Totally new to perl, but there is no quotes normally here?

plugin::CastOnTarget('21479');

Just a guess..

nope, it works fine on all my other scripts

Shamanistik08 05-23-2011 07:40 PM

you should also add a stop timer, or remove the 2nd set timer. but it has nothing to do with the cast spell.

Astal 05-23-2011 07:53 PM

Quote:

Originally Posted by Shamanistik08 (Post 200331)
you should also add a stop timer, or remove the 2nd set timer. but it has nothing to do with the cast spell.

i tried doing that for a different one but the timer didnt trigget again unless I had a start timer in each timer.


Ill have to go back and test all my other timers haha


All times are GMT -4. The time now is 01:15 AM.

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