PDA

View Full Version : default.pl


solid11
02-19-2005, 12:29 PM
I'm using the peq_quests pack which I renamed to quests in the EQEMU folder. I want all mobs that don't have a quest to say the default thing. Do I move the default.pl file into the quests folder, or does the default.pl go into every zone folder? I have it just in the quests folder now but all the other mobs won't say anything when I hail them. BTW the other quests work great.

RangerDown
02-19-2005, 03:11 PM
just the quest folder

solid11
02-21-2005, 11:52 AM
I put the default.pl in the c:\eqemu\quest folder but when I hail any other mob they just turn to me and don't say anything. But the other quests work, any ideas?

Here is the default.pl that is recommended for download on malignus' tutorial


sub EVENT_SAY{
$plugin::debug && quest::say("[debug]in qstdefault::EVENT_SAY");
#plugin::showvars();
plugin::dispatch();
}

sub EVENT_ITEM{
plugin::dispatch();
}

sub EVENT_DEATH{
plugin::dispatch();
}

sub EVENT_ATTACK{
plugin::dispatch();
}

sub EVENT_SPAWN{
plugin::dispatch();
}

sub EVENT_TIMER{
plugin::dispatch();
}

sub EVENT_SLAY{
plugin::dispatch();
}

sub EVENT_WAYPOINT{
plugin::dispatch();
}


Is that right?
Thanks

Richardo
02-22-2005, 02:39 AM
You dont need all this plugin crap bud.. Here is a nice little default quest for you... :) Btw, syntax may be incorrect, I am very tired right now hehe..



sub EVENT_SAY
{
if($text=~/Hail/i)
quest::say("Hello $name");
}

sub EVENT_DEATH{
quest::me("falls to the ground.");
}

sub EVENT_ATTACK{
quest::me("charges at %name ready to attack.");
}
}
}

RangerDown
02-22-2005, 03:18 AM
$name, not %name

lose the extra two } at the end

(Edit: and enclose the quest::say("Hello $name"); line in {} )


other than that, that quest is good to go.

solid11
02-22-2005, 06:35 AM
Taking what you both say, is this right then?

sub EVENT_SAY
{
if($text=~/Hail/i)
{quest::say("Hello $name");}
}

sub EVENT_DEATH{
quest::me("falls to the ground.");
}

sub EVENT_ATTACK{
quest::me("charges at $name ready to attack.");
}

and wouldn't you enclose the other two quest lines also if you do the hello $name one? Thanks for the help all.

RangerDown
02-22-2005, 08:04 AM
No, you wouldn't. If you don't know why, then you really need to brush up on your perl knowledge before you take on the task of writing a bunch of quests.