View Single Post
  #6  
Old 07-28-2008, 11:29 PM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Default

Thanks Trevius,

My event is a SAY, not an ATTACK. The player hails the king to trigger the guards. The guards do not attack if the player is turning in the Grail. They also do not attack if the player has ally status--only when he is less than ally and has no grail to turn in. Would it then be something like?
Quote:

sub EVENT_SAY
{
if($text=~/hail/i)
{
if(plugin::check_hasitem($client, 13732))
{
quest::say("What is this? You bring good tidings indeed, $name! Give me the Grail, and together we shall defeat the Enemy. As for you, $name . . . be assured that you shall not fail to be rewarded for showing such kindness to our Kingdom. Your stature and your bank will be increased, and you will be made a full citizen of the Kingdom. But come now; we must act quickly. Give me the Grail.");
}
elsif($faction >= 2)
{
my $guard_one = $entity_list->GetMobByNpcTypeID(999139);
my $guard_two = $entity_list->GetMobByNpcTypeID(999140);

if ($guard_one) {
my $hate_guard_one = $guard_one->CastToNPC();
$hate_guard_one->AddToHateList($client, 1); }

if ($guard_two) {
my $hate_guard_two = $guard_two->CastToNPC();
$hate_guard_two->AddToHateList($client, 1);

quest::say("Why should I suffer the likes of you? You shall pay for your presumptuousness.");
quest::shout("GUARDS!");
}
else
{
quest::say("Do you not see I have enough [trouble] already? Why should I welcome you, $name? For your welcome here is doubtful");
}
}
Reply With Quote