Client Methods

void AddExpeditionLockout(string expedition_name, string event_name, uint32 seconds, string uuid = "")

Assigns the specified lockout to the client. If the client already has the lockout it's replaced with this one. If a uuid isn't supplied one is generated
1
# Add 10 minute lockouts
2
$client->AddExpeditionLockout("Anguish, the Fallen Palace", "Ture", 600);
3
$client->AddExpeditionLockout("Anguish, the Fallen Palace", "Keldovan the Harrier", 600);
Copied!

void AddExpeditionLockoutDuration(string expedition_name, string event_name, int seconds, string uuid = "")

Adds seconds to the specified client lockout duration. If seconds is negative then the duration of the lockout is reduced (limited to 0).
If the client does not have the lockout and seconds is positive, a new lockout is created with the specified uuid. If a uuid isn't supplied one is generated.
1
# Decrease Ture lockout by 5 minutes
2
$client->AddExpeditionLockoutDuration("Anguish, the Fallen Palace", "Ture", -300);
3
# Increase keldovan lockout by 5 minutes
4
$client->AddExpeditionLockoutDuration("Anguish, the Fallen Palace", "Keldovan the Harrier", 300);
Copied!

Expedition* CreateExpedition(string zone_short_name, int zone_version, int duration, string expedition_name, int min_players, int max_players, bool disable_messages = false)

This initiates an expedition creation request by the client. All members in the client's current group or raid (if in one) are validated for the expedition request. On success an expedition object is returned and all members of the client's group/raid are added to the expedition. Returns nullptr if the request is rejected
This method takes both the instance zone details and expedition details
Passing true for the optional disable_messages parameter disables all expedition rejection messages sent to the leader (member lockout conflicts, etc)
Note: Expedition creation follows behavior introduced with the live September 16, 2020 patch. The expedition may be created even if the group or raid exceeds the expedition's max player requirement, but only members up to the max are added to it. Players are added based on priority of raid group number followed by ungrouped players. The raid leader is added first. Players inside groups or raid groups may not be added in displayed order.
1
my $dz = $client->CreateExpedition("anguish", 0, 3600, "Anguish, the Fallen Palace", 6, 54);
2
if ($dz) {
3
quest::debug(sprintf("expedition [%d] created", $dz->GetID()));
4
} else {
5
quest::debug(sprintf("expedition request failed"));
6
}
Copied!

Expedition* GetExpedition()

Return client's current expedition if client is in one, otherwise returns nullptr
1
my $dz = $client->GetExpedition();
2
if ($dz) {
3
quest::debug(sprintf("client in expedition [%d]", $dz->GetID()));
4
} else {
5
quest::debug(sprintf("client is not in an expedition"));
6
}
Copied!

HASHREF GetExpeditionLockouts(string expedition_name = "")

Returns a hash reference keyed on expedition name containing an event hash reference with client's current lockouts. If expedition_name is supplied then just an event hash reference is returned for that expedition. The value of event hash references is the lockout's remaining duration. Returns empty value if client doesn't have any lockouts
1
my $lockouts = $client->GetExpeditionLockouts();
2
foreach my $expedition_name (keys %{ $lockouts }) {
3
my $events = $lockouts->{$expedition_name};
4
foreach my $event_name (keys %{ $events }) {
5
my $remaining = $events->{$event_name};
6
quest::debug("expedition: [$expedition_name] event: [$event_name] seconds remaining: [$remaining]");
7
}
8
}
Copied!
1
# filtered on expedition name
2
my $lockouts = $client->GetExpeditionLockouts("Anguish, the Fallen Palace");
3
foreach my $event_name (keys %{ $lockouts }) {
4
my $remaining = $lockouts->{$event_name};
5
quest::debug("anguish event: [$event_name] seconds remaining: [$remaining]");
6
}
Copied!

string GetLockoutExpeditionUUID(string expedition_name, string event_name)

Returns uuid string of the expedition the lockout was received in. Returns an empty string if client doesn't have the lockout
1
my $uuid = $client->GetLockoutExpeditionUUID("Anguish, the Fallen Palace", "Ture");
2
quest::debug("client received lockout in expedition uuid: [$uuid]");
Copied!

bool HasExpeditionLockout(string expedition_name, string event_name)

Returns true of the client has the lockout, false otherwise
1
my $has_lockout = $client->HasExpeditionLockout("Anguish, the Fallen Palace", "Ture");
2
quest::debug("client has lockout: [$has_lockout]");
Copied!

void MovePCDynamicZone(int zone_id, int zone_version = -1, bool msg_if_invalid = true)

void MovePCDynamicZone(string zone_short_name, int zone_version = -1, bool msg_if_invalid = true)

Attempts to move the client to the specified zone if the client is part of a system (expedition or otherwise) with an associated dynamic zone instance in the target zone.
If a valid zone_version (0 or higher) is supplied then the move will only be allowed if a player's dz to zone_id is also for that zone_version.
If the client is not associated with a dz for the specified zone, the client is not moved. If msg_if_invalid is true (default) the client is sent a message that the way is blocked.
If the client is associated with multiple dz systems to the same zone, the client's DynamicZoneSwitchListWnd interface window is invoked to allow the client to choose which dynamic zone to enter.
On success, the player is moved to the dynamic zone's zone in coordinates (set on creation or afterwards) If no zone in coordinates are set, the player is moved to the zone's default safe coords.
MovePCInstance should be used if finer control of zone in location is required, but care must be taken to validate the client is part of an instance for the target zone
1
$client->MovePCDynamicZone(317); # by zone id
2
$client->MovePCDynamicZone("anguish"); # by zone short name
Copied!

void RemoveAllExpeditionLockouts(string expedition_name = "")

Removes all expedition lockouts from the character, optionally filtered on an expedition name
1
# removes all lockouts
2
$client->RemoveAllExpeditionLockouts();
3
# removes all anguish lockouts
4
$client->RemoveAllExpeditionLockouts("Anguish, the Fallen Palace");
Copied!

void RemoveExpeditionLockout(string expedition_name, string event_name)

Removes the specified lockout from the character. No-op if the character doesn't have the lockout
1
$client->RemoveExpeditionLockout("Anguish, the Fallen Palace", "Ture");
Copied!
Last modified 8mo ago