Documentation

missions.inc.php

Table of Contents

Constants

MISSION_ACTIONS  = ['LeaveSector', 'EnterSector', 'WalkSector', 'JoinAlliance', 'LeaveAlliance', 'DisbandAlliance', 'KickPlayer', 'PlayerKicked', 'BuyDrink']
MISSIONS  = [0 => ['Name' => 'Drunk Guy', 'Offerer' => 'Drunk', 'Time Limit' => 0, 'HasX' => ['Type' => \Smr\PlotGroup::Locations, 'X' => 'Bar'], 'Steps' => [['Step' => 'EnterSector', 'PickSector' => ['Type' => \Smr\PlotGroup::Locations, 'X' => \RACE_SALVENE + \LOCATION_GROUP_RACIAL_HQS], 'Detail' => ['SectorID' => '<Sector>'], 'Text' => '*Hiccup* Hey! I need you to...*Hiccup* do me a favor. All the ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' in this bar is awful! Go to the Sal...*Hiccup*...the Salvene HQ, they\'ll know a good bar.', 'Task' => 'Go to the Salvene HQ at [sector=<Sector>]'], ['Step' => 'EnterSector', 'PickSector' => ['Type' => \Smr\PlotGroup::Locations, 'X' => 'Bar'], 'Detail' => ['SectorID' => '<Sector>'], 'Text' => 'Here we are! The Salvene HQ! You ask around a bit and find that the bar in [sector=<Sector>] does the best ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' around!', 'Task' => 'Go to the bar at [sector=<Sector>] and buy a ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' from the bartender. This may take many tries.'], ['Step' => 'BuyDrink', 'Detail' => ['SectorID' => '<Sector>', 'Drink' => \Smr\BarDrink::SALVENE_SWAMP_SODA], 'Text' => 'Here we are! Now let\'s get this ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . '.', 'Task' => 'Go to the bar at [sector=<Sector>] and buy a ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' from the bartender. This may take many tries.'], ['Step' => 'EnterSector', 'Detail' => ['SectorID' => '<Starting Sector>'], 'Text' => 'Finally! A true ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ', let\'s return to that drunk!', 'Task' => 'Return to [sector=<Starting Sector>] to claim your reward.'], ['Step' => 'Claim', 'Rewards' => ['Credits' => 500000, 'Experience' => 1000, 'Text' => '*Hiccup* For your...service *Hiccup* to me, take these *Hiccup* 500,000 credits and 1,000 experience *Hiccup*!'], 'Detail' => ['SectorID' => '<Starting Sector>'], 'Text' => 'You hand the ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' to the drunk!']]]]

Functions

replaceMissionTemplate()  : void
Callback for array_walk_recursive in Player::rebuildMission.
checkMissionRequirements()  : bool

Constants

MISSION_ACTIONS

public mixed MISSION_ACTIONS = ['LeaveSector', 'EnterSector', 'WalkSector', 'JoinAlliance', 'LeaveAlliance', 'DisbandAlliance', 'KickPlayer', 'PlayerKicked', 'BuyDrink']

MISSIONS

public mixed MISSIONS = [0 => ['Name' => 'Drunk Guy', 'Offerer' => 'Drunk', 'Time Limit' => 0, 'HasX' => ['Type' => \Smr\PlotGroup::Locations, 'X' => 'Bar'], 'Steps' => [['Step' => 'EnterSector', 'PickSector' => ['Type' => \Smr\PlotGroup::Locations, 'X' => \RACE_SALVENE + \LOCATION_GROUP_RACIAL_HQS], 'Detail' => ['SectorID' => '<Sector>'], 'Text' => '*Hiccup* Hey! I need you to...*Hiccup* do me a favor. All the ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' in this bar is awful! Go to the Sal...*Hiccup*...the Salvene HQ, they\'ll know a good bar.', 'Task' => 'Go to the Salvene HQ at [sector=<Sector>]'], ['Step' => 'EnterSector', 'PickSector' => ['Type' => \Smr\PlotGroup::Locations, 'X' => 'Bar'], 'Detail' => ['SectorID' => '<Sector>'], 'Text' => 'Here we are! The Salvene HQ! You ask around a bit and find that the bar in [sector=<Sector>] does the best ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' around!', 'Task' => 'Go to the bar at [sector=<Sector>] and buy a ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' from the bartender. This may take many tries.'], ['Step' => 'BuyDrink', 'Detail' => ['SectorID' => '<Sector>', 'Drink' => \Smr\BarDrink::SALVENE_SWAMP_SODA], 'Text' => 'Here we are! Now let\'s get this ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . '.', 'Task' => 'Go to the bar at [sector=<Sector>] and buy a ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' from the bartender. This may take many tries.'], ['Step' => 'EnterSector', 'Detail' => ['SectorID' => '<Starting Sector>'], 'Text' => 'Finally! A true ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ', let\'s return to that drunk!', 'Task' => 'Return to [sector=<Starting Sector>] to claim your reward.'], ['Step' => 'Claim', 'Rewards' => ['Credits' => 500000, 'Experience' => 1000, 'Text' => '*Hiccup* For your...service *Hiccup* to me, take these *Hiccup* 500,000 credits and 1,000 experience *Hiccup*!'], 'Detail' => ['SectorID' => '<Starting Sector>'], 'Text' => 'You hand the ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' to the drunk!']]]]

Functions

replaceMissionTemplate()

Callback for array_walk_recursive in Player::rebuildMission.

replaceMissionTemplate(string|int|PlotGroup &$template, string $key, array<string, int> $replacements) : void

Searches for placeholders in template and replaces them with values derived from the supplied data.

Parameters
$template : string|int|PlotGroup
$key : string
$replacements : array<string, int>

checkMissionRequirements()

checkMissionRequirements(array<string, mixed> $values, array<string, mixed> $requirements) : bool
Parameters
$values : array<string, mixed>
$requirements : array<string, mixed>
Return values
bool

        
On this page

Search results