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 10-07-2004, 04:37 AM
jimbox114
Hill Giant
 
Join Date: Jun 2004
Posts: 231
Default couple of questions about perl

There is a couple of commands I am having trouble with. One of them is the Quest::depop command. How is this actually used? I have tried useing it as quest::depop, quest::depop() and quest:depop(xxx)

XXX is the npc id of the mob I wish to depop. None of these seemed to work. I know the syntax in the quest file is right, cause I changed the quest::depop to a quest::say and it worked fine.

Another I am unsure about how to make a NPC do something when they get to a certain waypoint. I see the subevent for it, but how do you actually define the WP you wish to have the action take place?

And finnally is there a place with a sample quest on how to make a mob despawn after X time. Like say I wanted a mob to spawn for 2 minutes (120 seconds) then depop?
Reply With Quote
  #2  
Old 10-07-2004, 07:37 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

im curious about this as well. i was never able to the depop command to work. anybody who HAS actually seen it work with their quests. please post your experiences )
Reply With Quote
  #3  
Old 10-08-2004, 05:30 AM
jimbox114
Hill Giant
 
Join Date: Jun 2004
Posts: 231
Default

IF quest::depop does not work, does anybody have any idea's how to get rid of a npc after a certain amount of time? Basically we got a mob that spawns after a boss npc is slayed. This npc ports you to part 2 of the zone. We are wanting to leave the zone static, and obviously it wouldn't be good to just leave that npc there forever.

One thing I thought of, what if you set the npc to cast a spell on itself that would kill it? Like say after 5 minutes it would cast ice comet on itself? Think that might work? Of course the npc would have to be lower level and have low hp.
Reply With Quote
  #4  
Old 10-08-2004, 05:50 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

interesting idea. make it Cazic Touch. (aka death touch) and flag the npc as a merchant so his corpse poofs )
Reply With Quote
  #5  
Old 10-08-2004, 06:53 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Er...quest::depop(); works for me.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #6  
Old 10-08-2004, 06:54 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

Please post your code that works so we may see it.

thanks
Reply With Quote
  #7  
Old 10-08-2004, 01:55 PM
Malignus Wingnut
Hill Giant
 
Join Date: Sep 2004
Posts: 233
Default

Yeah...ive never been able to get quest::depop(); to work for me... plz post cisyouc.
Reply With Quote
  #8  
Old 10-08-2004, 02:58 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Im not sure if you wanted the source code or the perl quest, but here is an example of a perl quest I have for a Planar Projection that is triggered by quest::spawn(); on the death of Manaetic Behemoth in Innovation.

The code is set up so after 5 hails he depops or after 1 minute.
Code:
sub EVENT_SAY
{
if($text=~/hail/i)
 {
 if($temple2 == 0){
   if($pplimit == 0){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","1","2","C010000");
   quest::yellow("You have recieved a character flag!");}
   if($pplimit == 1){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","2","2","C010000");
   quest::yellow("You have recieved a character flag!");}
   if($pplimit == 2){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","3","2","C010000");
   quest::yellow("You have recieved a character flag!");}
   if($pplimit == 3){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","4","2","C010000");
   quest::yellow("You have recieved a character flag!");}
   if($pplimit == 4){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","5","2","C010000");
   quest::yellow("You have recieved a character flag!");}
   if($pplimit == 5){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","6","2","C010000");
   quest::yellow("You have recieved a character flag!");
   quest::setglobal("pplimit","0","2","C999999");
   quest::depop();}
 } }
}
sub EVENT_SPAWN
{
quest::settimer(1,60);
}
sub EVENT_TIMER
{
quest::depop();
}
quest::yellow(); is a custom command which acts like quest::me(); only it displays yellow text.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #9  
Old 10-09-2004, 04:36 AM
jimbox114
Hill Giant
 
Join Date: Jun 2004
Posts: 231
Default

That is the exact way I have tried useing quest::depop() but it just won't work. I tried useing it that way on Fronglo's Server, and have tried in on Evolutions and both times it has done nothing. Both Servers have used .5.7dr6, maybe that has something to do with it?

Looks like I might go with plan b, and have the npc suicide after a few minutes.

***EDIT***

The idea of useing cazic touch don't seem to work too well. Here is the script I have been useing to try and despawn the npc. I know the timer is set pretty low that is just for testing purposes. I plan to let it stay spawned alot longer once its working.

Code:
#teleporter
##Spawns on the death of mini-boss npc. Ports players to part two of zone, then should depop after a certain time.

sub EVENT_SPAWN
{
 quest::shout ("Finnally I have been freed from the clutches of this evil bird!");
 quest::settimer(1,15);
}
 
sub EVENT_SAY
{
 if ($text=~ /Hail/i){quest::say("Greetings, I am Druzzil Ro, the Mother of Solusek Ro.  After seeing the horrible things my son had been doing he had me carried away by that vial creature.  So what brings you to this fiery place?  Are you here to fight my son [Solusek Ro]?");}

 if ($text=~ /solusek/i){quest::say("I see, I will help you then.  I can transport you to his secret hideing area. I hate to see any harm come to my only son, however I can see he has become [evil] just like his father.  Anyways let me know when you are [ready].  Once I teleport you there, I can not bring you back.");}

 if ($text=~ /evil/i){quest::say("Yes I knew long ago the type of person his father had become.  I had thought I could raise him better.  However my son's heart was tainted years ago, and there was just nothing I could do.  Let me know if you are ready to venture on");}

 if ($text=~ /ready/i){quest::say("Very well, off you go then.  I wish you luck."); quest::movepc(212,218,1480,-63);}

}

sub EVENT_TIMER
{
quest::say("I must now go, best of luck");
#quest::depop();
quest::castspell(131,982); 
}
With the quest::depop she just said I must go now over and over again. With the castspell you could see her making the spell cast motion, but she was not actually casting it. After about 5 times the zone crashed.
Reply With Quote
  #10  
Old 10-27-2004, 02:22 AM
ajb20
Hill Giant
 
Join Date: Jul 2004
Posts: 106
Default

Just wanted to bump this for anyone still having problems. here is a very simple quest that is tested and depop() works fine.

Code:
sub EVENT_SPAWN
{
	quest::settimer(a386,30);
}

sub EVENT_TIMER
{
	if($timername==a386)
	{
		quest::depop();
		quest::stoptimer(a386);
	}
}

sub EVENT_SAY
{
	if($text=~/hail/i)
	{
		quest::say("Hello GM $name.  I see you are testing me to see if I depop after 30 seconds.  Well good luck.");
	}
}
Be sure to do quest::stoptimer(); or it will crash the zone though because it will restart the timer and try to depop a non-existant mob
Reply With Quote
  #11  
Old 10-27-2004, 04:15 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

another note that might yeild a little more success is that depop can take an optional arg which is a id from npc_types and will depop the first of those that it finds in the zone. This will fix the timer issue as well as might work better overall.
Reply With Quote
  #12  
Old 10-27-2004, 12:25 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Is that a recent change? It was $timer a while back, not $timername.

Edit: That *may* be your problem - perl variables are in embparser.cpp, the variable you need to use is $timer. The variables from parser.cpp are for the old quest system.
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 04:46 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3