Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-21-2018, 02:11 PM
irongut_av's Avatar
irongut_av
Fire Beetle
 
Join Date: Sep 2018
Posts: 9
Default Any in-game method to determine if a zone is flagged as a "hot zone"?

Is there a quest script or method call in Lua/Perl than can retrieve zone information (such as if the zone is a hot-zone)?

Thanks.
Reply With Quote
  #2  
Old 09-22-2018, 02:08 PM
superpally1
Fire Beetle
 
Join Date: Jul 2018
Location: Tennessee
Posts: 16
Default

I dont think this is posted in the right area. But this should do what you want.


Code:
# Must have status of 150+ to use add/remove commands.
# Usage: /say add hotzone zonesn
# Usage: /say remove hotzone zonesn
# Example: /say add hotzone nro        This will add nro to the hotzone list.
# Example: /say remove hotzone nro     This will remove nro from the hotzone list.

sub EVENT_SAY {
    @args = split(' ', $text);
 	
    if($text=~/hail/i) {
	    $client->Message(15, quest::saylink("Current hotzones", 1));
	}
	if($text=~/Current hotzones/i) {
		$client->Message(15,"Current hotzones are : ");
		my $connect = plugin::LoadMysql();
		my $found_zone = 0;
                my $sql_query = "SELECT short_name FROM zone WHERE hotzone=1";
		my $sql_handler = $connect->prepare($sql_query);
		$sql_handler->execute();
		    while (@zone_row = $sql_handler->fetchrow_array()) {
			$found_zone++;
    		    $say_links = quest::saylink("$zone_row[0]", 1);
		    $client->Message(15,"$say_links.");
		}
		$connect->disconnect();
	}
	if($status > 150) {    #Change this to the status you want.
	    if($text=~/add hotzone/i) {
                my $connect = plugin::LoadMysql();
                $query = "UPDATE zone SET hotzone = 1 WHERE short_name = '$args[2]'";
	        $client->Message(14,"$args[2], added to hotzone list.");
                $query_handle = $connect->prepare($query);
                $query_handle->execute();
                $connect->disconnect;				
	    }
	    if($text=~/remove hotzone/i) {
                my $connect = plugin::LoadMysql();
                $query = "UPDATE zone SET hotzone = 0 WHERE short_name = '$args[2]'";
	        $client->Message(13,"$args[2], removed from hotzone list.");
                $query_handle = $connect->prepare($query);
                $query_handle->execute();
                $connect->disconnect;				
	    }
       }
}
Reply With Quote
  #3  
Old 09-22-2018, 02:32 PM
superpally1
Fire Beetle
 
Join Date: Jul 2018
Location: Tennessee
Posts: 16
Default

oops double post
Reply With Quote
  #4  
Old 09-23-2018, 08:32 PM
irongut_av's Avatar
irongut_av
Fire Beetle
 
Join Date: Sep 2018
Posts: 9
Default

Thanks, just what I was looking for!
Reply With Quote
Reply

Thread Tools
Display Modes

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 11:56 PM.


 

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 - 2018, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3