EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Problem with global quest npc (https://www.eqemulator.org/forums/showthread.php?t=34328)

Baruuk 10-13-2011 10:37 AM

Problem with global quest npc
 
Ok I'm missing something obvious here...

I created an NPC named Translocator Merina (actually copied one and renamed it with a new ID) to be a translocator for me. This same NPC will be located in multiple zones. I put a perl translocator script in the directory C:\EQEMU\quests\templates called Translocator_Merina.pl. I suspected this would be the correct location since the Priest_of_Discord.pl was in that same folder. I've spawned her in Qeynos2 and can see her fine. However, when I hail her, nothing happens - the quest doesn't work. I'm using a version of Bodi's modified translocator script shown below. Do I have this in the wrong place?

Thanks in advance.

sub EVENT_SAY{

my $qeynos = quest::saylink ("Qeynos",1);
my $east_freeport = quest::saylink ("East Freeport", 1);
my $west_freeport = quest::saylink ("West Freeport", 1);
my $halas = quest::saylink ("Halas", 1);
my $erudin = quest::saylink ("Erudin", 1);
my $surefall = quest::saylink ("Surefall Glade", 1);
my $rivervale = quest::saylink ("Rivervale", 1);
my $akanon = quest::saylink ("Akanon", 1);
my $felwithe = quest::saylink ("Felwithe", 1);
my $kaladim = quest::saylink ("Kaladim", 1);
my $kelethin = quest::saylink ("Kelethin", 1);
my $oggok = quest::saylink ("Oggok", 1);
my $grobb = quest::saylink ("Grobb", 1);
my $neriak = quest::saylink ("Neriak", 1);
my $nektulos = quest::saylink ("Nektulos Forest", 1);
my $guildlobby = quest::saylink ("Guild Lobby", 1);
my $lavastorm = quest::saylink ("Lavastorm Mountains", 1);
my $abysmal = quest::saylink ("Abysmal Sea (tradeskills)", 1);
my $lobby = quest::saylink ("Guild lobby", 1);

if ($text =~/Hail/i)
{
quest::say ("Well hello there $name. Would you like to go to [$qeynos], [$east_freeport], [$west_freeport], [$halas], [$erudin],[$surefall], [$rivervale], [$akanon], [$felwithe],[$kaladim],[$kelethin],[$oggok], [$grobb], [$neriak], [$lavastorm], [$nektulos], [$guildlobby] or [$abysmal]? ");
}
if ($text =~/kaladim/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(68,100,2700,0);
}
if ($text =~/kelethin/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(54,8,-47,0);
}
if ($text =~/abysmal/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(279, -199, 0, 114);
}

if ($text =~/lobby/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(344, 0, 0, 0);
}

if ($text =~/guildlobby/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(344,0,0,0);
}

if ($text =~/akanon/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(56,800,-1600,-99);
}


if ($text =~/nektulos/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(25,-700,1800,22);
}
if ($text =~/grobb/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(46,-600,-2500,0);
}

if ($text =~/oggok/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(47,1100,1100,25);
}

if ($text =~/felwithe/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(54,-2100,-2300,20);
}
if ($text =~/east freeport/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(10,-364,-536,-52.22);
}
if ($text =~/west freeport/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(9,245,142,-24.25);
}
if ($text =~/qeynos/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(2,-74,428,3.8);
}

if ($text =~/neriak/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(40,5.42,94.14,26.70);
}

if ($text =~/halas/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(30,682.74,3139.01,-60.16);
}
if ($text =~/rivervale/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(33, -2300, 500, 0);
}
if ($text =~/surefall/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(4, 0, 4700, 0);
}
if ($text =~/lavastorm/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(27, -666.5, 358.6, -95.7);
}

if ($text =~/erudin/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(38, 341, 2353, -32);
}
}

trevius 10-13-2011 10:59 AM

The script looks OK to me from a quick glance, and the file name and location should be OK as long as that is the name of the NPC you created exactly as you have it in the database. You can try renaming the script to the NPCID instead of the NPC name and see if that works. If so, you know the name you had set is wrong.

Also, make sure you did a #reloadquest in the zone. If the NPC is a newly created NPC that you just made, you probably need to restart the zone or try it in another zone, because scripts will not run until one is spawned from the database I think.

bodi 10-13-2011 11:51 AM

Maybe youre putting it into C:/eqemu/templates
Try putting the .pl into c:/eqemu/quests/templates

I use hotkey for #spawn Translocator 3 60 11
hotkey for #npcspawn create
hotkey for #repop

That way they're all the same exact name etc

ChaosSlayerZ 10-13-2011 11:58 AM

if ($text =~/qeynos/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(2,-74,428,3.);
}

note the 3. part

joligario 10-13-2011 03:47 PM

That's just the smilies. It is 3.8 with a )

bodi 10-13-2011 11:35 PM

haha, when i first posted the code , it wasn't in code tags, so i bet it turned one of the semicolon-close parentheses into smily sunglasses guy and it was copied b4 I changed it =)


All times are GMT -4. The time now is 11:28 AM.

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