Go Back   EQEmulator Home > EQEmulator Forums > Development > Development: Custom Code

Development: Custom Code This is for code thatdoes not emulate live and wont be added to the official code.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2012, 10:31 AM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default Potime quest Check please?

can anyone look at this and tell me why it would work one day and then the next day, it does everything except move the PC to the locs...didnt change a thing

i think it may have to do with instanced version and default versions of potimeb...suggestions?

Code:
sub EVENT_SAY {


if ($text =~/Hail/i)
 { quest::say("How could YOU defeat ME, $name? I have no choice but to send you to the next battle! Perhaps, you will taste death soon! Which way would you like to die? [Fire], [Water], [Undead], [Air] or [Earth]?"); }

if ($text =~/Fire/i)
 {
quest::shout ("$name , go forth and DIE!!");
quest::movepc(-60,565,494); 
 }
if ($text =~/Water/i)
 {
quest::shout ("$name , go forth and DIE!! ");
quest::emote ("waves his boney finger in a circle...");
quest::movepc(-60,852,494);
}
if ($text =~/Undead/i)
 {
quest::shout ("$name , go forth and DIE!! ");
quest::emote ("waves his boney finger in a circle...");
quest::movepc(-33,1107,494);
}
if ($text =~/Air/i)
 {
quest::shout ("$name , go forth and DIE!! ");
quest::emote ("waves his boney finger in a circle...");
quest::movepc(-54,1344,494);
}
if ($text =~/Earth/i)
 {
quest::shout ("$name , go forth and DIE!! ");
quest::emote ("waves his boney finger in a circle...");
quest::movepc(-53,1630,494);
}
}

sub EVENT_SPAWN
{
	quest::settimer("depop",3600); 
}

sub EVENT_TIMER
{
	if ($timer eq "depop")
	{
		quest::depop();
	}
}
Reply With Quote
  #2  
Old 05-02-2012, 09:46 AM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default

any idea why the quest::movepc is not functioning? the npc does everything..even shouts "go forth and Die" but then you just sit there listening to *crickets*..it worked 2 days ago and now nothing
Reply With Quote
  #3  
Old 05-02-2012, 10:19 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

You are using the wrong command or the wrong arguments.
Quote:
quest::movepc(zoneid,x,y,z,[heading]) - Moves the user that triggered the Event to the provided zone and loc. Heading is optional.
quest::gmmove(x,y,z) - Moves the user that triggered the Event to the provided loc.
quest::MovePCInstance(zoneid, instanceid, x, y, z) - Moves a player to an instance
Is your NPC already in PoTimeB? If so use quest::gmmove.
If they are not, then you can not just move the plaver to an instance with quest::movepc as it does not take an argument for instance id. That is what questMovePCInstance is for. I added the instance logic and put it in the fire response as an example for you. Otherwise I changed the rest to be gmmove.

Code:
my $InstID = 0;

sub EVENT_SAY {
  $InstID = quest::GetInstanceID("potimeb",0);
  if ($text =~/Hail/i) {
    quest::say("How could YOU defeat ME, $name? I have no choice but to send you to the next battle! Perhaps, you will taste death soon! Which way would you like to die? [Fire], [Water], [Undead], [Air] or [Earth]?");
  }
  elsif ($text =~/Fire/i) {
    quest::shout ("$name , go forth and DIE!!");
    quest::emote ("waves his boney finger in a circle...");
    quest::MovePCInstance(223,$InstID,-60,565,494); 
  }
  elsif ($text =~/Water/i) {
    quest::shout ("$name , go forth and DIE!! ");
    quest::emote ("waves his boney finger in a circle...");
    quest::gmmove(-60,852,494);
  }
  elsif ($text =~/Undead/i) {
    quest::shout ("$name , go forth and DIE!! ");
    quest::emote ("waves his boney finger in a circle...");
    quest::gmmove(-33,1107,494);
  }
  elsif ($text =~/Air/i) {
    quest::shout ("$name , go forth and DIE!! ");
    quest::emote ("waves his boney finger in a circle...");
    quest::gmmove(-54,1344,494);
  }
  elsif ($text =~/Earth/i) {
    quest::shout ("$name , go forth and DIE!! ");
    quest::emote ("waves his boney finger in a circle...");
    quest::gmmove(-53,1630,494);
  }
}

sub EVENT_SPAWN {
  quest::settimer("depop",3600); 
}

sub EVENT_TIMER {
  if ($timer eq "depop") {
    quest::depop();
  }
}
Reply With Quote
  #4  
Old 05-02-2012, 10:24 AM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default

thank you for the response!

the npc pops after you kill the p1 bosses so that the player can be ported to the next appropriate location, (fire, water, undead, etc)

i cant wait to try your suggestion out..thanks !
Reply With Quote
  #5  
Old 05-02-2012, 11:15 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

yeah, I would use gmmove then.
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 06:41 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3