Log in

View Full Version : How to make a zone flag


Apoc.Index
05-15-2012, 01:45 PM
Not exactly sure how to do this, I was going over some of the PoTime quests to understand it better but I just cant figure it out.

Anyone able to give me a crash course on how to add a flag to a zone and write the script.

Here is the run down,
You need 3 heads, all from various targets, you return to the quest giver in zone (a) hand in the heads, he then flags you to access zone (b).

I am not an expert at scripting, I tried to muddle through the PoT ones but they elude me lol.

Thanks!

sorvani
05-15-2012, 10:23 PM
First you mark a zone as being "flagged" by setting the Flag column to 1 in the zone table. You could also put an item name in there, see Sebilis for an example of that.

Then in your quest script, you set the zone flag.

Here is an example from Tublik Narwethar in kodtaz that grants access to Qvic.

sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 60174 => 1)){
if (plugin::check_hasitem($client, 60252)) {
quest::say("You have done great things for us, but your journey is not yet over."); #need live text
$client->Message(4, "Finished! - You've recovered the Sliver of the High Temple! Congratulations!");
$client->Message(4, "You feel the magic protecting Qvic has softened.");
quest::summonitem(60176);
quest::setglobal("god_qvic_access",1,5,"F");
quest::set_zone_flag(295);
}

See the quest::set_zone_flag(295); that's it. 295 is the zoneidnumber for Qvic in the zone table, and Qvic has the flag_needed column set to 1.