PDA

View Full Version : Transporter


Baelu
06-15-2017, 08:30 PM
Made a simple npc to teleport to bazaar but it doesnt seem to do anything. Got it in quest folder in freeporttemple folder. And under the npc id (tried name too and it wouldnt work either) anyways code is

sub EVENT_SAY {
if($text=~/hail/i) {
plugin::Whisper("Hello, would you like to visit the " . quest::saylink("Bazaar", 1) . "?");
}
elsif($text=~/Bazaar/i) {
plugin::Whisper("Very well.");
quest::zone(Bazaar);
}
}

sub EVENT_SPAWN {
plugin::SetMobColor(quest::ChooseRandom(0..255), quest::ChooseRandom(0..255), quest::ChooseRandom(0..255));
}
}

provocating
06-15-2017, 09:17 PM
Cursory glance, your bracket counts are not matching, check them again.

Kingly_Krab
06-15-2017, 10:42 PM
As provocating stated, you had an extra bracket. You also have a bareword in quest::zone().

sub EVENT_SAY {
if($text=~/hail/i) {
plugin::Whisper("Hello, would you like to visit the " . quest::saylink("Bazaar", 1) . "?");
} elsif($text=~/Bazaar/i) {
plugin::Whisper("Very well.");
quest::zone("bazaar");
}
}

sub EVENT_SPAWN {
plugin::SetMobColor(quest::ChooseRandom(0..255), quest::ChooseRandom(0..255), quest::ChooseRandom(0..255));
}

Baelu
06-16-2017, 09:13 AM
Makes sense, will try it out. Thank you.

Baelu
06-16-2017, 01:41 PM
Flawless, thanks a lot.

Kingly_Krab
06-16-2017, 06:56 PM
You're welcome. Glad you're enjoying my mob armor color plugin. You don't have to make it random every time they spawn by the way.

Baelu
06-17-2017, 08:51 AM
One of my favorite plug ins lol, so simple yet so neat imo