Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 08-05-2011, 10:18 AM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default Anyone see an error in this script?

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?

Code:
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
Reply With Quote
  #2  
Old 08-05-2011, 12:53 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

when you get a crash, do you not get any clues in the logs or crash dumps?
__________________
The Realm
Reply With Quote
  #3  
Old 08-05-2011, 03:18 PM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default

I look in the log files and nothing shows. Does perl write errors somewhere besides /eqemu/logs/ ?

I now crash when trying to use SolRo stone and PoTactics stone. The rest work just fine oddly enough.

Also does perl use any kind of cache system? I was getting out of date pointers that I "fixed" by renumbering my character ID but then tried reinstalling perl without renumbering the char ID and that also fixed the problems I was having. So am thinking maybe it has something to do with reading bad data.

EDIT:
Just cleared all logs and started the server and tried to zone in to SolRo

This was in eqemu_quest_zone_****.log (at the end of all 5 zones) at the bottom

[08.05. - 12:26:00] Terminating on signal SIGHUP(1)

Am guessing this is what is causing it as I have never seen this.

Any ideas?
Reply With Quote
  #4  
Old 08-05-2011, 03:58 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

in logs with names like eqemu_quest_zone_0272.log you would get perl msgs like
[08.02. - 11:17:56] Useless use of private variable in void context at plugins/formation_tools.pl line 364.
__________________
The Realm
Reply With Quote
  #5  
Old 08-05-2011, 04:00 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

i see the edit now... not sure what that SIGHUP(1) is. Any clues around that log line?
__________________
The Realm
Reply With Quote
  #6  
Old 08-05-2011, 04:25 PM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default

This is what is in all 5:

Code:
---------------------------------------------
[08.05. - 12:23:12] Starting Log: logs/eqemu_quest_zone_4844.log
[08.05. - 12:23:12] Tying perl output to eqemu logs
[08.05. - 12:23:12] Creating EQEmuIO=HASH(0x2af116c)
[08.05. - 12:23:12] Creating EQEmuIO=HASH(0x2ae1df4)
[08.05. - 12:23:12] Loading perlemb plugins.
[08.05. - 12:23:12] Useless use of private variable in void context at plugins/formation_tools.pl line 364.
[08.05. - 12:23:12] Subroutine Cwd::fastcwd redefined at C:/Perl/lib/Cwd.pm line 812.
[08.05. - 12:23:12] Subroutine Cwd::getcwd redefined at C:/Perl/lib/Cwd.pm line 812.
[08.05. - 12:23:12] Subroutine Cwd::abs_path redefined at C:/Perl/lib/Cwd.pm line 812.
[08.05. - 12:23:12] Subroutine CalcDestFromHeading redefined at plugins/path_tools.pl line 222.
[08.05. - 12:23:12] Loading perl commands...
[08.05. - 12:26:00] Terminating on signal SIGHUP(1)
Reply With Quote
  #7  
Old 08-05-2011, 04:26 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

You on Linux? I mention this cuz if you set up Visual Studio right it will catch the zone crashes and put you right on the line that it crashed on for further debugging.
__________________
The Realm
Reply With Quote
  #8  
Old 08-05-2011, 10:18 PM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default

No I'm on WIndows. Used VC++

I'll look into that

Thanks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:58 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3