Quote:
Originally Posted by Durge
Sorry folks, I'm back again :p, this time with an instancing problem. I have recently tried to use the plugin for it, but have had no luck with it.
I was not sure how to make it send you to the already made instance if one existed, therefore I just tried adding in the 'else' statement.
Code:
sub EVENT_SAY
{
if($text=~/hail/i);
{
$client->Message(315, "Hello $name, would you be interested in creating a new [zone]?");
}
if($text=~/Zone/i || $text=~/Enter Zone/i);
{
my $TYPE = $uguild_id;
my $space = "_";
my $InstanceName = "Inst";
my $ZoneSN = $zonesn;
if($uguild_id)
{
if (defined($qglobals{"$TYPE$space$InstanceName$space$ZoneSN"}))
{
plugin::SendToInstance("guild", sebilis, 1, $Cx, $Cy, $Cz, "Inst", 648000);
$client->Message(15, "I will now relocate you to the instance: [$zoneln].");
}
else
{
plugin::SendToInstance("guild", sebilis, 1, $Cx, $Cy, $Cz, "Inst", 648000);
}
}
}
}
|
The plugin is designed to do all of the heavy lifting.
You have several errors in that script above. The plugin knows that you have created the instance with the one line alone, you need to enable qglobals on the NPC and make sure you have the plugins repo checked out:
Code:
sub EVENT_SAY
{
if($text=~/hail/i){
$client->Message(315, "Hello $name, would you be interested in creating a new [zone]?");
}
if($text=~/zone/i){
plugin::SendToInstance("guild", sebilis, 1, 0, 235, 40, "Inst", 648000);
}
}
Let me know if you have questions