nightsta69
10-10-2009, 02:19 PM
if($zoneid == 189) {
if(!defined($qglobals{$name."tutb"})) {
my $instanceID = quest::CreateInstance("tutorialb", 1, 64800);
quest::AssignToInstance($instanceID);
quest::setglobal($name."tutb",$instanceID,7);
quest::setglobal($name."zone",$instanceID,7);
quest::MovePCInstance(189, $instanceID, -696.0, 271.2, 16.4);
}
else
if (defined($qglobals{$name."tutb"}) && !defined($qglobals{$name."zone"})) {
my $instanceID = $qglobals{$name."tutb"};
quest::AssignToInstance($instanceID);
quest::setglobal($name."zone",$instanceID,7);
quest::MovePCInstance(189, $instanceID, -696.0, 271.2, 16.4);
}
}
if($zoneid != 189 && defined($qglobals{$name."zone"})) {
quest::delglobal($name."zone");
}
basically i'm wantin to check globals, and see if they are defined. if not then create instance, set globals, and move pc to instance, if one is, but other isn't then get $instanceID from one, assign to instance, set global, and move pc. and of course, if not the correct zone, and global is defined, then delete it. my problem is I can't get it to create an instance, or define globals, i've been mulling it over for hours now, and idk whats wrong with it. could someone take a look at this and tell me whats wrong? I know its probably something stupid. thanks
if(!defined($qglobals{$name."tutb"})) {
my $instanceID = quest::CreateInstance("tutorialb", 1, 64800);
quest::AssignToInstance($instanceID);
quest::setglobal($name."tutb",$instanceID,7);
quest::setglobal($name."zone",$instanceID,7);
quest::MovePCInstance(189, $instanceID, -696.0, 271.2, 16.4);
}
else
if (defined($qglobals{$name."tutb"}) && !defined($qglobals{$name."zone"})) {
my $instanceID = $qglobals{$name."tutb"};
quest::AssignToInstance($instanceID);
quest::setglobal($name."zone",$instanceID,7);
quest::MovePCInstance(189, $instanceID, -696.0, 271.2, 16.4);
}
}
if($zoneid != 189 && defined($qglobals{$name."zone"})) {
quest::delglobal($name."zone");
}
basically i'm wantin to check globals, and see if they are defined. if not then create instance, set globals, and move pc to instance, if one is, but other isn't then get $instanceID from one, assign to instance, set global, and move pc. and of course, if not the correct zone, and global is defined, then delete it. my problem is I can't get it to create an instance, or define globals, i've been mulling it over for hours now, and idk whats wrong with it. could someone take a look at this and tell me whats wrong? I know its probably something stupid. thanks