Location: PHPKode > projects > PhpBlock > A9.8/modules/dungeon/playeraction.php
<?php
include_once "../../site.class.php";
include_once $PATH_TO_CODE."/script/connect.php";
include_once $PATH_TO_CODE."/script/message/playermessage.class.php";
include_once $PATH_TO_CODE."/script/action/manageaction.class.php";
include_once $PATH_TO_CODE."/script/action/moveaction.class.php";
include_once $PATH_TO_CODE."/script/action/noaction.class.php";
include_once $PATH_TO_CODE."/script/action/stopaction.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/dungeonconstante.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/objectmanager.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/digaction.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/buildtrap.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/buildrallypoint.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/recruit/recruitgrunt.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/recruit/recruitminerork.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/recruit/recruitwarork.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/recruit/recruitskeleton.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/recruit/recruitspectre.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/recruit/recruitdeadworm.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/recruit/recruitsoldier.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/recruit/recruitknight.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/recruit/recruitminer.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/recruit/recruitmonsternest.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/spell/disbandspell.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/spell/lavaspell.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/spell/recruitspell.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/spell/zizanyspell.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/beginunderground.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/beginhuman.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/buildbarrack.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/builddoor.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/buildnecropolis.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/buildroad.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/buildrock.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/buildcity.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/buildstair.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/buildtreasure.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/buildwall.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/conquerblock.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/killobject.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/objectdig.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/objectsearchtrap.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/action/releaseblock.class.php";

include_once $PATH_TO_CODE."/script/disconnect.php";

$locActionList = array();
$locPlayer = ManageAction::getInstance()->getPlayer();
$locPlayerBlockIdList = Block::getAllBlocksId($locPlayer->playerId);
array_push($locActionList, new ConquerBlock());
if($locPlayer->playerId != 1 && count($locPlayerBlockIdList) == 0) {
} else {
	array_push($locActionList, new MoveAction());
	array_push($locActionList, new DigAction());
	array_push($locActionList, new BuildTrapAction());
	for($i = DungeonConstante::$ACTION_BUILD_RALLY_POINT_1; $i <=DungeonConstante::$ACTION_BUILD_RALLY_POINT_10; $i++) {
		array_push($locActionList, new BuildRallyPointAction($i));
	}
	array_push($locActionList, new RecruitMonsterNestAction());
	array_push($locActionList, new BuildDoor());
	array_push($locActionList, new BuildRoad());
	array_push($locActionList, new BuildRock());
	array_push($locActionList, new BuildStair());
	array_push($locActionList, new BuildWall());
	//Auto now: array_push($locActionList, new BuildExploitedGold());
	//Auto now: array_push($locActionList, new BuildUnexploitedGold());
	array_push($locActionList, new KillObject());
	array_push($locActionList, new ObjectSearchTrap());
	array_push($locActionList, new ObjectDig());
	array_push($locActionList, new ReleaseBlock());
	array_push($locActionList, new StopAction());
	array_push($locActionList, new NoAction());
	array_push($locActionList, new DisbandSpellAction());
	array_push($locActionList, new LavaSpellAction());
	array_push($locActionList, new RecruitSpellAction());
	array_push($locActionList, new ZizanySpellAction());
	
	
/*
	if($locPlayer->playerType == DungeonConstante::$PLAYER_TYPE_HUMAN_KNIGHT) {
		array_push($locActionList, new BuildCity());
		array_push($locActionList, new RecruitSoldierAction());
		array_push($locActionList, new RecruitKnightAction());
		array_push($locActionList, new RecruitMinerAction());
	} else if($locPlayer->playerType == DungeonConstante::$PLAYER_TYPE_DUNGEON_MASTER) {
		array_push($locActionList, new BuildTreasure());
		array_push($locActionList, new RecruitGruntAction());
		array_push($locActionList, new RecruitWarOrkAction());
		array_push($locActionList, new RecruitMinerOrkAction());
	} else {
		array_push($locActionList, new BuildNecropolis());
		array_push($locActionList, new RecruitSpectreAction());
		array_push($locActionList, new RecruitDeadWormAction());
		array_push($locActionList, new RecruitSkeletonAction());
	}
*/
}

ManageAction::getInstance()->managePlayerAction($locActionList);
disconnect();
?>
Return current item: PhpBlock