You could set all the zones for one expansion behind the same 'key' then you should be able to do something like:
Code:
$client->KeyRingAdd();
Or, set 'flag_needed' in the zone table to 1, then:
Code:
quest::set_zone_flag(zone_id)
You could couple that with a qglobal just for tracking in your database/to have a mob that checks flags, something like:
Code:
quest::setglobal("Velious_Access",1,5,"F");
Thing is whenever you perform the quest::set_zone_flag(zone_id) on the client you would have to do it for however many zones are in the particular expansion you're locking up.
Provocating's idea seems a better way to do it to me.
Although, if you wanted to lock it behind multiple bosses, use qglobals upon the bosses death then use another NPC to unlock the expansion, i.e.:
This will signal all the clients in the zone at the time, the signal is then received in the player.pl for that zone..
Code:
sub EVENT_DEATH_COMPLETE {
$entity_list->SignalAllClients(1);
}
in player.pl, this will set this qglobal for every player in the zone at the time of the bosses death, so, if you want it to only be a certain # of people, put your boss in an instance or something
Code:
sub EVENT_SIGNAL {
if ($signal == 1) {
quest::setglobal("boss1dead",1,5,"F");
}
}
So you could replicate that for however many bosses you have locking the expansion, lets say 3. Then on the NPC you're using to check boss kills you would do something like:
Code:
sub EVENT_SAY {
if ($text =~/hail/i) {
if (defined $qglobals{"boss1dead"} && $qglobals{"boss2dead"} && $qglobals{"boss3dead"}) {
quest::set_zone_flag(zone_id);
}
}
}
This would check to see if the player has the qglobals from killing the other 3 bosses, if they do, then the NPC can unlock the expansion for them.
P.S.:
Make sure your signals are unique between player.pl's and the global_player.pl, signals will be sent to the global and player.pl for the particular zone so if you had a signal of 1 being received in the global_player.pl it would also fire