View Single Post
  #2  
Old 11-01-2011, 10:34 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

I haven't used the plugin for instances in the stuff i've done on PEQ. Here is an example of how someone gets into Uqua from Yxtta.
Assigning the raid to the instance. Obviously just tweak this for a single person.
Code:
sub EVENT_SAY {
  if ($text=~/hail/i) {
    quest::say("blah blah blah  just tell me you are [ready] and I will blah blah blah");
  }
  if ($text=~/ready/i) {
    $raid = $client->GetRaid();
    if($raid){
      if(!defined $qglobals{uqualockout}) {
        if($InInstanceUqua == 0){
          $Instance = quest::CreateInstance("uqua", 0, 21600);
          quest::AssignRaidToInstance($Instance);   
          quest::say("Instance added.");
          quest::say("Place your hands on one of the altars behind me and the way will be revealed. Be wary for you are about to encounter some of the most vicious trusik known. If for any reason you wish to return, place your hands on the golem within the temple.");           
        } else {
          $client->Message(13, "You are already in an instance!");
        }
      } else {
        $client->Message(13,"You have recently completed this raid.");
      }
    } else {
      $client->Message(13, "You are not in a raid!");
    }
  }
}
Then in the player PL for when they click on the statues to zone in. Agian this could simply be integrated into the NPC you hail.
Code:
sub EVENT_CLICKDOOR {
  if ($doorid == 35 || $doorid == 36) { #uqua zone in
    my $InInstanceUqua = quest::GetInstanceID("uqua",0);
    if(!defined $qglobals{uqualockout}) {
      if($InInstanceUqua > 0){
        quest::MovePCInstance(292,$InInstanceUqua,-17,-7,-24);
      } else {
        $client->Message(13, "You are not a part of an instance!");
      }
    } else {
      $client->Message(13, "You have recently completed this raid, please come back at a later point");
    }
}
Reply With Quote