EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Time limit on zone (https://www.eqemulator.org/forums/showthread.php?t=27931)

Randymarsh9 04-18-2009 09:00 AM

No, it's not static.

covou 04-18-2009 02:17 PM

Quote:

Originally Posted by Randymarsh9 (Post 167819)
Alright, I don't think my timers are working. In the player.pl I made it like this
Code:

sub EVENT_ENTERZONE{
quest::settimer("zonekick",10);
quest::ze("You have 10 minutes to finish.");
if ($class eq "Warrior"){
 quest::spawn(1207, 0, 0, 0, 0, 0.50);
}
elsif ($class eq "Ranger"){
 quest::spawn(1214, 0, 0, 0, 0, 0.50);
}
}
sub EVENT_TIMER{
if ($timer eq "zonekick"){
 quest::stoptimer("zonekick");
 quest::movepc(202, -107,-190.-156);
 }
}
sub EVENT_DEATH{
quest::depopzone(1);
}

The correct monsters are spawning based on the class, which is good, but the zone-wide emote doesn't show and the timer doesn't seem to work either. I lowered it to 10 seconds just so I could test it. I have this is another quest and the timer doesn't work here either.
Code:

EVENT_SPAWN{
 quest::attack($name);
}
sub EVENT_DEATH{
 quest::summonitem(20488);
 quest::summonitem(20487);
 quest::emote("collapses to the ground.");
 quest::settimer("peaceout",5);
}
sub EVENT_TIMER{
 if ($timer eq "peaceout"){
 quest::stoptimer("peaceout");
 quest::movepc(202, -107,-190.-156);
}
}


The timer in your monster code won't work because an npc will not set, and persist a timer if it is dead.

as for your player code... try this.

Code:

sub EVENT_ENTERZONE
{
quest::settimer("zonekick",10);
quest::ze("You have 10 minutes to finish.");
  if ($class eq "Warrior")
      {
      quest::spawn(1207, 0, 0, 0, 0, 0.50);
      }
  elsif ($class eq "Ranger")
      {
      quest::spawn(1214, 0, 0, 0, 0, 0.50);
      }
}
sub EVENT_TIMER{
if ($timer eq "zonekick"){
 quest::stoptimer("zonekick");
 quest::movepc(202, -107, -190, -156);
 }
}
sub EVENT_DEATH{
quest::stoptimer("zonekick");
quest::depopzone();
}

If it continues not to work. Can you post Error Logs?

BWStripes 04-22-2009 06:46 PM

Just a minor thing error with the quest documentation I discovered I was digging in questmgr.cpp - quest::ze needs to be in the format:
quest::ze(#colourid, "Message");

Then it works, same with quest::we (world emote). 15 is yellow text, FYI, so
quest::we(15, "You hear wispers on the wind, that becon you to the Karanas");

Will print exactly that on all clients connected to world in yellow. It uses the same function as the GM command: #emote <name|world|zone> <#colourid> <message>

cavedude 04-22-2009 08:15 PM

Quote:

Originally Posted by BWStripes (Post 168100)
Just a minor thing error with the quest documentation I discovered I was digging in questmgr.cpp - quest::ze needs to be in the format:
quest::ze(#colourid, "Message");

Then it works, same with quest::we (world emote). 15 is yellow text, FYI, so
quest::we(15, "You hear wispers on the wind, that becon you to the Karanas");

Will print exactly that on all clients connected to world in yellow. It uses the same function as the GM command: #emote <name|world|zone> <#colourid> <message>

I'll add that to the wiki, good catch!


All times are GMT -4. The time now is 03:18 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.