Thread: Porters
View Single Post
  #20  
Old 04-17-2015, 06:44 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Here's my work around. This requires my plugin to be useful.

NPC Script:
Code:
@zones = ("butcher", "feerrott", "northkarana", "lavastorm", "misty", "sro", "steamfont", "commons", "toxxulia");
sub EVENT_SAY {
    if ($text=~/Hail/i) {
        plugin::Whisper("Hail! Where would you like to go?");
        plugin::Whisper(quest::saylink($_, 1, plugin::Zone("LN", $_))) for @zones;
    } elsif ($text!~/Hail/i && $text ~~ @zones) {
        plugin::Whisper("Give me just a moment to prepare.");
        $npc->SetEntityVariable("Client", $client->GetID());
        quest::settimer($text, 5);
    }
}

sub EVENT_TIMER {
    if($timer ~~ @zones) {
        quest::stoptimer($timer);
        $npc->SignalNPC(plugin::Zone("ID", $timer));
    }
}

sub EVENT_SIGNAL {
    if (plugin::Zone("SN", $signal) ~~ @zones) {
        $entity_list->GetClientByID($npc->GetEntityVariable("Client"))->Message(315, $npc->GetCleanName() . " whispers, 'Off to " . plugin::Zone("LN", $signal) . " you go!'");
        $entity_list->GetClientByID($npc->GetEntityVariable("Client"))->SignalClient($entity_list->GetClientByID($npc->GetEntityVariable("Client")), $signal);
    }
}
Player.pl (required):
Code:
sub EVENT_SIGNAL {
    if ($signal > 0 && $signal < 1000) {
        quest::zone(plugin::Zone("SN", $signal));
    }
}

Last edited by Kingly_Krab; 08-31-2021 at 09:33 PM..
Reply With Quote