This is not intended as an uber custom script, it's just for "noobs" who are learning
and this is something simple they can start with to create an instance of any zone.
I am using this on my own server for some customization I am doing and thought I would
share it with people who could use the help getting started with some basic instancing.
Many people have a lot more advanced perl knowledge on this site, than I do, but I am
not interested (yet), in poking around with learning lua, lol. Someday maybe.
In this sample, it sends the player to an instance version of Forgotten Halls, but it
could be used on any zone. Where you see the expression "fhalls", that is just the phrase
I chose to use. It could be anything you want, as long as it is in place where you see
it (in red).
Everything you see in red is what you would need to edit to your own preferences for the
zone you are using. (plus the "say" text, level, etc.) In this example, the player needs
to be level 14 to get the instance from the NPC that you put this script on.
The MovePCInstance "998" is the zone ID number, then the x,y,z coords.
Where you see "14400", that is the timer (in seconds) for the instance to expire.
Just put something like this on an NPC script (whatever_name.pl) and if you're testing
in-game type #reloadquest everytime you edit a quest script.
For anyone who hasn't visited the perl reference wiki yet, tons of help on there.
http://wiki.eqemulator.org/p?Ultimat...rence&frm=Main
Code:
my @players = ();
my $group;
my $instance;
sub EVENT_SAY {
if (($text =~/hail/i) && ($ulevel > 14)) {
quest::say("Greetings $name, Are you interested in exploring the Forgotten [Halls] ?");
}
elsif ($text =~/halls/i && ($ulevel < 14)) {
quest::say("Go away $name I am too busy for you right now.");
}
elsif ($text =~/halls/i && ($ulevel > 14)) {
quest::say("Ok $name just let me know when you are [ready] and I will send you there.");
}
elsif (($text =~/ready/i) && ($ulevel > 14)) {
if (defined($qglobals{"fhallsInsta1"})) {
$fhallsInst1 = $qglobals{"fhallsInsta1"};
quest::setglobal("fhalls", 1, 5, "D1");
quest::AssignToInstance($fhallsInst1);
quest::MovePCInstance(998, $fhallsInst1, -58.63, -880.25, -12.81);
quest::say("Ok $name Away you go to Forgotten Halls.");
}
else {
$fhallsInst1 = quest::CreateInstance("fhalls", 0, 14400);
quest::AssignToInstance($fhallsInst1);
quest::setglobal("fhallsInsta1",$fhallsInst1,365,"D1");
quest::MovePCInstance(998, $fhallsInst1, -58.63, -880.25, -12.81);
quest::say("Ok $name Away you go to Forgotten Halls.");
}
}
}