scope INIT initializer initial
globals
private constant integer TECH1ID='Repm' //Backpack(NightElf)
private constant integer TECH2ID='Rosp' //Spiked Barricade
private constant integer TECH3ID='Rufb' //Freezing Breath
private constant integer TECH4ID='Rucr' //Creature Carapace
private constant integer TECH5ID='Rupc' //Disease Cloud
private constant integer TECH6ID='Ruwb' //Web
private constant integer POTIONSHOPID='h00P'
private constant integer WORKSHOPID='h00G'
private constant integer TECH_MAGICSENTRYID='Rhse'
private constant integer TECHTREE='n000'
private constant string DEATH="Decay Flesh"
endglobals
function initial takes nothing returns nothing
local real x=-2940
local real y=-760
local texttag t=CreateTextTag()
//Hostile Player
call SetPlayerTechResearched(Player(11),TECH2ID,3)
call SetPlayerTechResearched(Player(11),TECH3ID,1)
call SetPlayerTechResearched(Player(11),TECH4ID,3)
call SetPlayerTechResearched(Player(11),TECH5ID,1)
call SetPlayerTechResearched(Player(11),TECH6ID,1)
call SetPlayerState(Player(11),PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerHandicapXP(Player(11),400.00)
call SetPlayerColor(Player(11),PLAYER_COLOR_RED)
//Neutral Player
call SetPlayerState(Player(10),PLAYER_STATE_RESOURCE_GOLD,1000)
call SetPlayerState(Player(10),PLAYER_STATE_RESOURCE_LUMBER,1000)
call SetPlayerTechResearched(Player(10),TECH1ID,1)
call SetPlayerTechMaxAllowed(Player(10),1,TECHTREE)
call SetUnitFacing(gg_unit_h005_0111,180)
//GameInterface
call SetTextTagText(t,"|c00ff00ffTown Portal!",0)
call SetTextTagPos(t,-7607,7344,0)
call SetTextTagColor(t,255,255,255,0)
//Camera
call CameraSetupApply(gg_cam_Explorer,true, true)
call SetCameraQuickPosition(x+250,y)
//Loop for multiplayer settings
set whichPlayer=0
loop
exitwhen whichPlayer>7
//Players Configuration
call SetPlayerHandicapXP(Player(whichPlayer),80.00)
call SetPlayerTechResearched(Player(whichPlayer),TECH1ID,1)
call SetPlayerTechResearched(Player(whichPlayer),TECH_MAGICSENTRYID,1)
call SetPlayerTechMaxAllowed(Player(whichPlayer),1,POTIONSHOPID)
call SetPlayerTechMaxAllowed(Player(whichPlayer),1,WORKSHOPID)
call SetPlayerState(Player(whichPlayer),PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerAlliance(Player(10),Player(whichPlayer),ALLIANCE_SHARED_ADVANCED_CONTROL,true)
//Peon creation
call CreateUnit(Player(10),PEONID,x+whichPlayer*40,y,0)
set Peon[whichPlayer]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,GetPlayerColor(Player(whichPlayer)))
call SetUnitAnimation(bj_lastCreatedUnit,DEATH)
call GroupAddUnit(Peon_grp,bj_lastCreatedUnit)
//Game Interface
set whichPlayer=whichPlayer+1
endloop
call ModifyGateBJ(bj_GATEOPERATION_OPEN,gg_dest_ATg3_0014)
call ModifyGateBJ(bj_GATEOPERATION_OPEN,gg_dest_ATg1_0015)
endfunction
endscope