Log in

View Full Version : Instance set to public but creates 1 instance per player, any ideas?


GurkhaPanzers
09-03-2013, 10:12 PM
sub EVENT_SAY {
my $NPCName = $npc->GetCleanName();
if ($text=~/hail/i) {
my $sl1 = quest::saylink("Mortal!", 1, "Do you have the strength to engage the Vampire lord of the Froglocks?.");
$client->Message(14, "$NPCName says 'Froglock Master Vampire must be stopped!'");
$client->Message(11, "::: $sl1");
} elsif ($text=~/Mortal!/i) {
if ($ulevel >= 70) {
$client->Message(13, "Beware the undead have grown strong");
plugin::SendToInstance("public", "guke", 1, 688, -1026, 59, "gukeVI", 64000); # Creates a instance trough a class in plugin folder
} else {
$client->Message(14, "$NPCName says 'Come back when you have more courage.'");
}
}
}

sub EVENT_ITEM {
plugin::return_items(\%itemcount);
if ($platinum != 0 || $gold !=0 || $silver != 0 || $copper != 0) {
quest::givecash($copper, $silver, $gold, $platinum);
}
}

Mariomario
09-03-2013, 10:40 PM
sub EVENT_SAY
{
my $NPCName = $npc->GetCleanName();

if ($text=~/hail/i)
{
my $sl1 = quest::saylink("Mortal!", 1, "Do you have the strength to engage the Vampire lord of the Froglocks?.");

$client->Message(14, "$NPCName says 'Froglock Master Vampire must be stopped!'");
$client->Message(11, "::: $sl1");
}
elsif ($text=~/Mortal!/i)
{
if ($ulevel >= 70)
{
$client->Message(13, "Beware the undead have grown strong");
plugin::SendToInstance("public", "guke", 1, 688, -1026, 59, "gukeVI", 64000); # Creates a instance trough a class in plugin folder
}
else
{
$client->Message(14, "$NPCName says 'Come back when you have more courage.'");
}
}
}

sub EVENT_ITEM
{
plugin::return_items(\%itemcount);

if ($platinum != 0 || $gold !=0 || $silver != 0 || $copper != 0)
{
quest::givecash($copper, $silver, $gold, $platinum);
}
}

Indented and converted to BBCode for clarity.

Uleat
09-03-2013, 10:54 PM
Can you verify whether the instance name is prefixed with 'pub'?

GurkhaPanzers
09-03-2013, 11:01 PM
Where would I check that?

Uleat
09-03-2013, 11:13 PM
This looks like a place to start..


quest::write("InstanceLogs/$TYPE$space$InstanceName$space$ZoneSN.txt","[$timestamp] : $name has created instance $zoneln");



I'm not familiar enough with all of the #commands to know which might help..if there is one...

Akkadius
09-04-2013, 12:26 AM
Turn qglobals on for the NPC.

If you don't have qglobals on the NPC is not able to perform the lookup necessary to find an instance ID associated with the identifier, therefore it decides to create another instance (separately) and sends the player there.

Hopefully that helps.

GurkhaPanzers
09-06-2013, 01:09 AM
Thanks the qglobal was it. Its amazing how something I done right a hundred times I completely spaced and never checked. Often times the hardest thing to see is the obvious. Thanks again everyone for the help.

Dunge0nMastr
09-06-2013, 09:39 AM
Thanks the qglobal was it. Its amazing how something I done right a hundred times I completely spaced and never checked. Often times the hardest thing to see is the obvious. Thanks again everyone for the help.

I can not count the number of times i have forgotten to turn qglobals on, and spent hours banging my head over a script i knew should work :P

Maze_EQ
09-06-2013, 04:27 PM
It was every script on NL in the old days when we didn't know how to use qglobals...