PDA

View Full Version : npc->CastSpell(); Not working for me?


fault
01-23-2015, 07:09 PM
Nothing in event item is working, EVENT_SAY works fine, giving 10gold does nothing except eat gold.

ideas?


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.