EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   npc->CastSpell(); Not working for me? (https://www.eqemulator.org/forums/showthread.php?t=39266)

fault 01-23-2015 07:09 PM

npc->CastSpell(); Not working for me?
 
Nothing in event item is working, EVENT_SAY works fine, giving 10gold does nothing except eat gold.

ideas?

Code:

sub EVENT_SAY{
        if($text=~/Hail/i){
                quest::say("Hello $name, give me 10 gold and I will bless you with great life.")
        }
}

sub EVENT_ITEM{
  my $cash = $copper + $silver * 10 + $gold * 100 + $platinum * 1000;

  if (($cash >= 1000) ) { #Check for 10 gold
            quest::emote("Starts to cas....");
        $npc->CastSpell(3025,$userid);
  }
  else {
    if ($cash) {
      quest::say("Sorry stranger, but that is not enough to barter with.");
      quest::givecash($copper, $silver, $gold, $platinum);
    }


joligario 01-23-2015 07:32 PM

Look in your SAY sub for the error.

fault 01-23-2015 08:05 PM

semicolon, added and still nothing

cant believe i missed that though!

dagulus2 01-23-2015 10:01 PM

You do know your missing two } at the end?

Which worked when I tested it.

fault 01-24-2015 03:41 PM

thats strange, Shouldnt the console or #questerrors display these errors? no logs or queries anywhere do.


All times are GMT -4. The time now is 08:20 PM.

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