Criimson
08-05-2011, 10:18 AM
Well as I am fighting in PoP I occasionally run into a script that doesn't take into account bot groups. Not a problem. I tried editing this script but it is still crashing the zone.
Anyone see the error?
sub EVENT_CLICKDOOR {
my $x = $client->GetX();
my $y = $client->GetY();
my $z = $client->GetZ();
my $raid = $entity_list->GetRaidByClient($client);
my $group = $entity_list->GetGroupByClient($client);
if($doorid == 51) { #Agnarr Tower
if($status > 79) { #GM status
$client->MovePC(209, -765, -1735, 1270, 0);
}
elsif(plugin::check_hasitem($client, 9433)) { #Symbol of Torden
$client->MovePC(209, -765, -1735, 1270, 0);
}
else { #Send gargoyles to attack
my @npc_list = $entity_list->GetNPCList();
foreach $npc (@npc_list) {
if($npc->GetNPCTypeID() == 209024) {
$npc->AddToHateList($client, 1);
}
}
}
}
if($doorid == 61) { #SE tower
if($status > 79) { #GM status
$client->MovePC(209, 85, 145, 635, 128);
}
elsif($client->KeyRingCheck(9425) || plugin::check_hasitem($client, 9425)) { #Ring of Torden
if(!$client->KeyRingCheck(9425)) {
$client->KeyRingAdd(9425);
$client->MovePC(209, 85, 145, 635, 128);
}
}
else { #Send gargoyles to attack
my @npc_list = $entity_list->GetNPCList();
foreach $npc (@npc_list) {
if($npc->GetNPCTypeID() == 209110) {
$npc->AddToHateList($client, 1);
}
}
}
}
if($doorid == 63) { #SW tower
if($status > 79) { #GM status
$client->MovePC(209, -830, -865, 1375, 128);
}
elsif($client->KeyRingCheck(9425) || plugin::check_hasitem($client, 9425)) { #Ring of Torden
if(!$client->KeyRingCheck(9425)) {
$client->KeyRingAdd(9425);
$client->MovePC(209, -830, -865, 1375, 128);
}
}
else { #Send gargoyles to attack
my @npc_list = $entity_list->GetNPCList();
foreach $npc (@npc_list) {
if($npc->GetNPCTypeID() == 209111) {
$npc->AddToHateList($client, 1);
}
}
}
}
if($doorid == 65) { #NW tower
if($status > 79) { #GM status
$client->MovePC(209, -350, -2200, 1955, 255);
}
elsif($client->KeyRingCheck(9425) || plugin::check_hasitem($client, 9425)) { #Ring of Torden
if(!$client->KeyRingCheck(9425)) {
$client->KeyRingAdd(9425);
$client->MovePC(209, -350, -2200, 1955, 255);
}
}
else { #Send gargoyles to attack
my @npc_list = $entity_list->GetNPCList();
foreach $npc (@npc_list) {
if($npc->GetNPCTypeID() == 209112) {
$npc->AddToHateList($client, 1);
}
}
}
}
if($doorid == 67) { #NE tower
if($status > 79) { #GM status
$client->MovePC(209, 150, -1220, 1120, 128);
}
elsif($client->KeyRingCheck(9425) || plugin::check_hasitem($client, 9425)) { #Ring of Torden
if(!$client->KeyRingCheck(9425)) {
$client->KeyRingAdd(9425);
$client->MovePC(209, 150, -1220, 1120, 128);
}
}
else { #Send gargoyles to attack
my @npc_list = $entity_list->GetNPCList();
foreach $npc (@npc_list) {
if($npc->GetNPCTypeID() == 209113) {
$npc->AddToHateList($client, 1);
}
}
}
}
}
Thank you
Criimson
Anyone see the error?
sub EVENT_CLICKDOOR {
my $x = $client->GetX();
my $y = $client->GetY();
my $z = $client->GetZ();
my $raid = $entity_list->GetRaidByClient($client);
my $group = $entity_list->GetGroupByClient($client);
if($doorid == 51) { #Agnarr Tower
if($status > 79) { #GM status
$client->MovePC(209, -765, -1735, 1270, 0);
}
elsif(plugin::check_hasitem($client, 9433)) { #Symbol of Torden
$client->MovePC(209, -765, -1735, 1270, 0);
}
else { #Send gargoyles to attack
my @npc_list = $entity_list->GetNPCList();
foreach $npc (@npc_list) {
if($npc->GetNPCTypeID() == 209024) {
$npc->AddToHateList($client, 1);
}
}
}
}
if($doorid == 61) { #SE tower
if($status > 79) { #GM status
$client->MovePC(209, 85, 145, 635, 128);
}
elsif($client->KeyRingCheck(9425) || plugin::check_hasitem($client, 9425)) { #Ring of Torden
if(!$client->KeyRingCheck(9425)) {
$client->KeyRingAdd(9425);
$client->MovePC(209, 85, 145, 635, 128);
}
}
else { #Send gargoyles to attack
my @npc_list = $entity_list->GetNPCList();
foreach $npc (@npc_list) {
if($npc->GetNPCTypeID() == 209110) {
$npc->AddToHateList($client, 1);
}
}
}
}
if($doorid == 63) { #SW tower
if($status > 79) { #GM status
$client->MovePC(209, -830, -865, 1375, 128);
}
elsif($client->KeyRingCheck(9425) || plugin::check_hasitem($client, 9425)) { #Ring of Torden
if(!$client->KeyRingCheck(9425)) {
$client->KeyRingAdd(9425);
$client->MovePC(209, -830, -865, 1375, 128);
}
}
else { #Send gargoyles to attack
my @npc_list = $entity_list->GetNPCList();
foreach $npc (@npc_list) {
if($npc->GetNPCTypeID() == 209111) {
$npc->AddToHateList($client, 1);
}
}
}
}
if($doorid == 65) { #NW tower
if($status > 79) { #GM status
$client->MovePC(209, -350, -2200, 1955, 255);
}
elsif($client->KeyRingCheck(9425) || plugin::check_hasitem($client, 9425)) { #Ring of Torden
if(!$client->KeyRingCheck(9425)) {
$client->KeyRingAdd(9425);
$client->MovePC(209, -350, -2200, 1955, 255);
}
}
else { #Send gargoyles to attack
my @npc_list = $entity_list->GetNPCList();
foreach $npc (@npc_list) {
if($npc->GetNPCTypeID() == 209112) {
$npc->AddToHateList($client, 1);
}
}
}
}
if($doorid == 67) { #NE tower
if($status > 79) { #GM status
$client->MovePC(209, 150, -1220, 1120, 128);
}
elsif($client->KeyRingCheck(9425) || plugin::check_hasitem($client, 9425)) { #Ring of Torden
if(!$client->KeyRingCheck(9425)) {
$client->KeyRingAdd(9425);
$client->MovePC(209, 150, -1220, 1120, 128);
}
}
else { #Send gargoyles to attack
my @npc_list = $entity_list->GetNPCList();
foreach $npc (@npc_list) {
if($npc->GetNPCTypeID() == 209113) {
$npc->AddToHateList($client, 1);
}
}
}
}
}
Thank you
Criimson