globals
//globals from RegionLib:
constant boolean LIBRARY_RegionLib=true
//endglobals from RegionLib
//JASSHelper struct globals:
endglobals
//library RegionLib:
function GetRandomPointInRect takes rect r returns location
local real minX= GetRectMinX(r)
local real minY= GetRectMinY(r)
local real maxX= GetRectMaxX(r)
local real maxY= GetRectMaxY(r)
local real x= minX + GetRandomReal(0, maxX - minX)
local real y= minY + GetRandomReal(0, maxY - minY)
return Location(x, y)
endfunction
function GetRandomPointInCircle takes location center,real radius returns location
local real angle= GetRandomReal(0, 2 * bj_PI)
local real distance= GetRandomReal(0, radius)
local real x= GetLocationX(center) + distance * Cos(angle)
local real y= GetLocationY(center) + distance * Sin(angle)
return Location(x, y)
endfunction
//library RegionLib ends
//===========================================================================
//
// Just another Warcraft III map
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Map Author: Unknown
//
//===========================================================================
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
function InitGlobals takes nothing returns nothing
endfunction
//***************************************************************************
//*
//* Custom Script Code
//*
//***************************************************************************
//***************************************************************************
//* Untitled Script 001
//***************************************************************************
//*
//* Unit Creation
//*
//***************************************************************************
//===========================================================================
function CreateUnitsForPlayer0 takes nothing returns nothing
local player p= Player(0)
local unit u
local integer unitID
local trigger t
local real life
set u=BlzCreateUnitWithSkin(p, 'hfoo', - 378.1, 119.2, 287.708, 'hfoo')
endfunction
//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
endfunction
//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
call CreateUnitsForPlayer0()
endfunction
//===========================================================================
function CreateAllUnits takes nothing returns nothing
call CreatePlayerBuildings()
call CreateUnitsForPlayer0() // INLINED!!
endfunction
//***************************************************************************
//*
//* Custom Script Code
//*
//***************************************************************************
function bj takes string msg returns nothing
call BJDebugMsg(msg)
endfunction
//***************************************************************************
//*
//* Players
//*
//***************************************************************************
function InitCustomPlayerSlots takes nothing returns nothing
// Player 0
call SetPlayerStartLocation(Player(0), 0)
call SetPlayerColor(Player(0), ConvertPlayerColor(0))
call SetPlayerRacePreference(Player(0), RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(0), true)
call SetPlayerController(Player(0), MAP_CONTROL_USER)
endfunction
function InitCustomTeams takes nothing returns nothing
// Force: TRIGSTR_002
call SetPlayerTeam(Player(0), 0)
endfunction
//***************************************************************************
//*
//* Main Initialization
//*
//***************************************************************************
//===========================================================================
function main takes nothing returns nothing
call SetCameraBounds(- 3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), - 3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), - 3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), - 3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
call NewSoundEnvironment("Default")
call SetAmbientDaySound("LordaeronSummerDay")
call SetAmbientNightSound("LordaeronSummerNight")
call SetMapMusic("Music", true, 0)
call CreateAllUnits()
call InitBlizzard()
call InitGlobals()
endfunction
//***************************************************************************
//*
//* Map Configuration
//*
//***************************************************************************
function config takes nothing returns nothing
call SetMapName("Just another Warcraft III map")
call SetMapDescription("Nondescript")
call SetPlayers(1)
call SetTeams(1)
call SetGamePlacement(MAP_PLACEMENT_USE_MAP_SETTINGS)
call DefineStartLocation(0, - 384.0, 128.0)
// Player setup
call InitCustomPlayerSlots()
call SetPlayerSlotAvailable(Player(0), MAP_CONTROL_USER)
call InitGenericPlayerSlots()
endfunction
//Struct method generated initializers/callers: