EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Need some quick hjelp (https://www.eqemulator.org/forums/showthread.php?t=29543)

eqemuross 09-13-2009 05:34 PM

Need some quick hjelp
 
I basically set a flag for seb, and I want this teleporter NPC to check if they have the flag using quest::has_zone_flag(89); before moving the character there.

If they don't have the flag, I'd want him to say something back to them.

Appreciate any help, thanks.

eqemuross 09-13-2009 05:55 PM

Would this work? I have to run out, but Ill test it when I get back....

Code:

if ($text =~/ready/i)
 {
if quest::has_zone_flag(89);
quest::say ("Good luck...");
quest::emote ("opens a portal...");
quest::movepc(89, 235, 0, 41);
else quest::say ("Please make the trade with Smedy first.");
 }

}


Lillu 09-13-2009 06:41 PM

This works (ignore the saylink part if you use older rev):
Code:

sub EVENT_SAY {
my $veeshan = quest::saylink("Temple of Veeshan");
my $NPCName = $npc->GetCleanName();

if ($text =~/Hail/i && !quest::has_zone_flag(124)){
        $client->Message(315, "$NPCName whispers to you, 'Hello $name. You have to kill Emperor Sshraeshza to gain access to the Temple of Veeshan.'");
        }
if ($text =~/Hail/i && quest::has_zone_flag(124)) {
                $client->Message(315, "$NPCName whispers to you, 'Good day to you, $name. If you would like to go to the $veeshan, please say so.'");
        $client->Message(6, "$NPCName nods at you.");
        }                       
if ($text =~/Veeshan/i && quest::has_zone_flag(124)) {
        quest::say ("Enjoy your adventure!");
        $client->Message(6, "$NPCName casts a spell to translocate you to another place.");
        quest::doanim(42);
        quest::movepc(124, -500,-2100,-36);
        }
}


eqemuross 09-13-2009 07:10 PM

Wow... thank you Lillu!


All times are GMT -4. The time now is 08:29 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.