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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 11-15-2014, 12:46 PM
zerjz3
Banned
 
Join Date: Aug 2010
Location: Sanctuary
Posts: 269
Default

This is my first attempt at trying to cancel the daytime buff if the player zones and it is nighttime. Seems to have broken the entire script. Continuing to try and solve this...

Code:
sub EVENT_CONNECT {
	quest::setlanguage(0, 100);
	quest::setskill(40, 200);
	if ($zonetime > 599 && $zonetime < 1900) {
        $client->Message(12, "The sun's rays beam down.");
        quest::selfcast(992);
    } else {
        $client->Message(13, "It's very dark outside.");
		if($client->FindBuff(992));
		$client->BuffFadeBySpellID(992);
    }
}

sub EVENT_DISCOVER_ITEM {
	quest::gmsay("$name has discovered the item " . quest::varlink($itemid) . ".", 335, 1, 0, 0);
}
 
sub EVENT_COMBINE_SUCCESS {
	if (!defined $qglobals{$recipe_name}) {
		quest::gmsay("$name has discovered the recipe for '$recipe_name'.", 335, 1, 0, 0);
		quest::setglobal($recipe_name, 1, 7, "F");
	}
}

sub EVENT_ENTERZONE {
	if (!defined $qglobals{$zonesn}) {
		quest::gmsay("$name has discovered the zone $zoneln.", 335, 1, 0, 0);
		quest::setglobal($zonesn, 1, 7, "F");
	}
	quest::settimer("Zoned", 5);
}

sub EVENT_TIMER {
	if ($timer eq "Zoned") {
		quest::stoptimer("Zoned");
		if ($zonesn=~/Nexus/i && !defined $qglobals{"NexusBind"}) {
			quest::selfcast(35);
			quest::setglobal("NexusBind", 1, 5, "F");
		}
		if ($zonetime > 599 && $zonetime < 1900) {
			$client->Message(12, "The sun's rays beam down");
			quest::selfcast(992);
		} else {
			$client->Message(13, "It's very dark outside.");
					if($client->FindBuff(992));
		$client->BuffFadeBySpellID(992);
		}
	}
}

Attempt 2

Code:
sub EVENT_CONNECT {
	quest::setlanguage(0, 100);
	quest::setskill(40, 200);
	if ($zonetime > 599 && $zonetime < 1900) {
        $client->Message(12, "The sun's rays beam down.");
        quest::selfcast(992);
    } elsif ($zonetime < 599 && $zonetime > 1900) {
        $client->Message(13, "It's very dark outside.");
		if($client->FindBuff(992));
		$client->BuffFadeBySpellID(992);
    }
}

Attempt 3... if someone could gently nudge me in the right direction (or crudely beat me over the head with it) that would be awesome..

Code:
sub EVENT_TIMER {
	if ($timer eq "Zoned") {
		quest::stoptimer("Zoned");
		if ($zonesn=~/Nexus/i && !defined $qglobals{"NexusBind"}) {
			quest::selfcast(35);
			quest::setglobal("NexusBind", 1, 5, "F");
		}
		if ($zonetime > 599 && $zonetime < 1900) { #between 6am and 7pm
			$client->Message(12, "The sun's rays beam down");
			quest::selfcast(992);
			}
	 if ($zonetime < 599 && $zonetime > 1900) { #between 7pm and 6am
			$client->Message(13, "It's very dark outside.");
		}
	}
}

I should note that in this last attempt I am simply trying to change the night time message to trigger in a different fashion so I can then insert the buff removal code once I see that it's checking a specific time and not just going by an else statement
Reply With Quote
 


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 03:18 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