share/hedgewars/Data/Missions/Training/portal.lua
author mikade <redgrinner@gmail.com>
Thu, 11 Dec 2014 20:38:03 +0900
changeset 10655 1c85a442bd56
parent 8043 da083f8d95e6
child 11245 41799450378a
permissions -rw-r--r--
Wuzzy's changes to stats for some of the training missions.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8043
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7904
diff changeset
     1
HedgewarsScriptLoad("/Scripts/Locale.lua")
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7904
diff changeset
     2
HedgewarsScriptLoad("/Scripts/Utils.lua")
7904
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
     3
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
     4
local MineArray = {}
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
     5
local player 
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
     6
local adviceGiven = false
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
     7
local adviceGiven2 = false
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
     8
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
     9
function onGameInit()
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    10
	Seed = 0 -- The base number for the random number generator
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    11
	GameFlags = gfInfAttack +gfBorder +gfDisableWind +gfSolidLand 
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    12
	TurnTime = 1500000 -- The time the player has to move each round (in ms)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    13
	CaseFreq = 0 -- The frequency of crate drops
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    14
	MinesNum = 0 -- The number of mines being placed
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    15
	Explosives = 0 -- The number of explosives being placed
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    16
	Delay = 10 -- The delay between each round
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    17
	Map = "portal" -- The map to be played
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    18
	Theme = "Hell" -- The theme to be used
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    19
	Goals = "use the portal to move fast and far, use it to kill, use it with caution !"  --the goal ...
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    20
	
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    21
	
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    22
----AddTeam(teamname, color, grave, fort, voicepack, flag)--
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    23
	AddTeam("Subject", 14483406, "Simple", "Island", "Default", "cm_star")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    24
	player = AddHog("player", 0, 10, "Terminator_Glasses")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    25
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    26
	AddTeam("Hell Army", 1170801, "Simple", "Island", "Default", "cm_galaxy")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    27
	enemy1 = AddHog("Lucifer", 1, 200, "thinkingcap")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    28
	enemy2 = AddHog("voldemort", 1, 150, "WizardHat")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    29
	enemy3 = AddHog("zombi", 1, 100, "zombi")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    30
	enemy4 = AddHog("Predator", 1, 14, "predator")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    31
	enemy5 = AddHog("oneye", 1, 50, "cyclops")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    32
	enemy6 = AddHog("razac", 1, 50, "plaguemask")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    33
	enemy7 = AddHog("C-2", 1, 50, "cyborg1")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    34
	enemy8 = AddHog("Rider", 1, 50, "scif_SparkssHelmet")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    35
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    36
	AddTeam("badmad", 1170801, "Simple", "Island", "Default", "cm_jupiter")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    37
	enemy9 = AddHog("C-1", 1, 50, "cyborg2")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    38
	enemy10 = AddHog("hiden", 1, 40, "daftpunkguymanuel")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    39
	enemy11 = AddHog("ronald", 1, 70, "clown")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    40
	enemy12 = AddHog("phosphatoglucidique", 1, 50, "chef")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    41
	enemy13 = AddHog("Lestat", 1, 30, "draculakz")
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    42
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    43
	SetGearPosition(player, 350, 1820)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    44
    SetGearPosition(enemy1, 2037, 1313)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    45
	SetGearPosition(enemy2, 1369, 1605)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    46
	SetGearPosition(enemy3, 1750, 1937)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    47
	SetGearPosition(enemy4, 3125, 89)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    48
	SetGearPosition(enemy5, 743, 900)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    49
	SetGearPosition(enemy6, 130, 360)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    50
	SetGearPosition(enemy7, 1333, 640)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    51
	SetGearPosition(enemy8, 1355, 200)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    52
	SetGearPosition(enemy9, 2680, 225)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    53
	SetGearPosition(enemy10, 2970, 800)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    54
	SetGearPosition(enemy11, 4050, 1964)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    55
	SetGearPosition(enemy12, 2666, 950)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    56
	SetGearPosition(enemy13, 3306, 1205)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    57
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    58
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    59
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    60
end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    61
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    62
function onAmmoStoreInit()
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    63
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    64
	SetAmmo(amFirePunch, 0,0,0,1)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    65
	SetAmmo(amParachute, 0, 0, 0, 2)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    66
	SetAmmo(amGirder, 0, 0, 0, 3)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    67
	SetAmmo(amTeleport, 0, 0, 0, 1)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    68
	SetAmmo(amLaserSight,0,0,0,1)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    69
	SetAmmo(amHellishBomb,0,0,0,1)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    70
	SetAmmo(amGrenade,0,0,0,1)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    71
	SetAmmo(amRope,0,0,0,1)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    72
	SetAmmo(amDEagle,0,0,0,1)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    73
	SetAmmo(amExtraTime,0,0,0,2)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    74
	SetAmmo(amSkip,9,0,0,0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    75
	SetAmmo(amBlowTorch, 0, 0, 0, 1)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    76
	SetAmmo(amPickHammer, 0, 0, 0, 1)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    77
	SetAmmo(amSnowball, 0, 0, 0, 1)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    78
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    79
end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    80
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    81
function onGameStart()
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    82
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    83
	SetWind(100)-- SetWind(windSpeed) Sets the current wind in the range of -100 to 100. Use together with gfDisableWind for full control.
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    84
                -- -100to0 is to the left, and 0to100 is to the right  (of course more its far from 0, more the speed is high
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    85
				--  -100.............................0..................................+100
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    86
				-- <<<<<<<<--<<--<<<<<<<<<<<<<--<<<<<|||-->>>>>>>>-->>>>>>>>>>>>>>>-->>>>>>          =  wind direction
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    87
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    88
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    89
	MineArray[0] = AddGear(840, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    90
	MineArray[1] = AddGear(900, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    91
	MineArray[2] = AddGear(1000, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    92
	MineArray[3] = AddGear(1100, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    93
	MineArray[4] = AddGear(1140, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    94
	MineArray[5] = AddGear(1170, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    95
	MineArray[6] = AddGear(1200, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    96
	MineArray[7] = AddGear(1200, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    97
	MineArray[8] = AddGear(1230, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    98
	MineArray[9] = AddGear(1280, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
    99
	MineArray[10] = AddGear(1302, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   100
	MineArray[11] = AddGear(1350, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   101
	MineArray[12] = AddGear(1383, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   102
	MineArray[13] = AddGear(1400, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   103
	MineArray[14] = AddGear(1423, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   104
	MineArray[15] = AddGear(1470, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   105
	MineArray[16] = AddGear(1480, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   106
	MineArray[17] = AddGear(1311, 1847, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   107
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   108
	MineArray[18] = AddGear(840, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   109
	MineArray[19] = AddGear(900, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   110
	MineArray[20] = AddGear(1000, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   111
	MineArray[21] = AddGear(1100, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   112
	MineArray[22] = AddGear(1140, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   113
	MineArray[23] = AddGear(1170, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   114
	MineArray[24] = AddGear(1200, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   115
	MineArray[25] = AddGear(1230, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   116
	MineArray[26] = AddGear(1280, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   117
	MineArray[27] = AddGear(1302, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   118
	MineArray[28] = AddGear(1350, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   119
	MineArray[29] = AddGear(1383, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   120
	MineArray[30] = AddGear(1400, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   121
	MineArray[31] = AddGear(1423, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   122
	MineArray[32] = AddGear(1470, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   123
	MineArray[33] = AddGear(1480, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   124
	MineArray[34] = AddGear(1311, 1785, gtMine, 0, 0, 0, 0)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   125
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   126
	MineArray[35] = AddGear(4029, 89, gtMine, 0, 0, 0, 120)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   127
	--MineArray[36] = AddGear(3376, 1947, gtMine, 0, 0, 0, 10)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   128
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   129
		for i = 0,#MineArray do
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   130
			SetTimer(MineArray[i],050)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   131
			SetState(MineArray[i],544)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   132
		end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   133
				--needed this MineArray cause timer didn't work, its was always 3sec, i wanna instant mines
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   134
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   135
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   136
				--UTILITY CRATE--
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   137
	parachute = SpawnUtilityCrate(1670, 1165, amParachute)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   138
	girder = SpawnUtilityCrate(2101, 1297, amGirder)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   139
	SpawnUtilityCrate(3965, 625, amBlowTorch)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   140
	SpawnUtilityCrate(2249, 93, amBlowTorch)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   141
	SpawnUtilityCrate(2181, 829, amBlowTorch)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   142
	SpawnUtilityCrate(1820, 567, amBlowTorch)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   143
	SpawnUtilityCrate(1375, 900, amTeleport)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   144
	SpawnUtilityCrate(130, 600, amPickHammer)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   145
	SpawnUtilityCrate(1660,1820, amLaserSight)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   146
	SpawnUtilityCrate(4070,1840, amLaserSight)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   147
	
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   148
	
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   149
				--AMMO CRATE--
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   150
	portalgun = SpawnAmmoCrate(505, 1943, amPortalGun, 1000)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   151
	extratime = SpawnAmmoCrate(4020, 785, amExtraTime, 2)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   152
	SpawnAmmoCrate(425, 613, amSnowball)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   153
	SpawnAmmoCrate(861, 633, amHellishBomb)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   154
	SpawnAmmoCrate(2510, 623, amSnowball)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   155
	SpawnAmmoCrate(2900, 1600, amGrenade)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   156
	SpawnAmmoCrate(2680, 320, amGrenade)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   157
	SpawnAmmoCrate(2650, 80, amDEagle)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   158
	SpawnAmmoCrate(3000, 100, amDEagle)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   159
	SpawnAmmoCrate(2900, 1400, amRope)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   160
	SpawnAmmoCrate(4025, 1117, amFirePunch)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   161
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   162
	
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   163
				--HEALTH CRATE--
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   164
	SpawnHealthCrate(2000, 780)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   165
	
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   166
				--GIRDER--
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   167
	PlaceGirder(3363, 1323, 4)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   168
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   169
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   170
	ShowMission (loc("Portal mission"), loc("training"), "", -amPortalGun, 5000)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   171
	HogSay(player, "I should get myself a portal gun, maybe this crate has one", SAY_THINK)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   172
	
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   173
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   174
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   175
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   176
end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   177
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   178
function onGameTick()
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   179
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   180
    if (player ~= nil)  then
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   181
		if (gearIsInBox(player, 1650, 1907, 200, 60) and (adviceGiven == false)) then
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   182
			adviceGiven = true
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   183
				HogSay(player, loc("Hmmm, I'll have to find some way of moving him off this anti-portal surface..."), SAY_THINK)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   184
		elseif (gearIsInBox(player, 2960, 790, 200, 60) and (adviceGiven2 == false)) then
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   185
			adviceGiven2 = true
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   186
				HogSay(player, loc("The anti-portal zone is all over the floor, and I have nothing to kill him...Droping something could hurt him enough to kill him..."), SAY_THINK)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   187
 end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   188
 end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   189
	
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   190
	end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   191
	
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   192
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   193
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   194
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   195
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   196
function onNewturn()
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   197
end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   198
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   199
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   200
function onGearAdd(gear)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   201
end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   202
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   203
function onGearDelete(gear)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   204
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   205
	if gear == portalgun then
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   206
		--AddAmmo(player, amPortalGun, 10000)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   207
		HogSay(player, "GREAT ! Let's kill all this enemies, using portals", SAY_THINK)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   208
	end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   209
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   210
	if gear == girder then 
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   211
		HogSay(player, "Will be useful if I need a new plateform or if I want to rise....", SAY_THINK)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   212
	end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   213
	
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   214
	if gear == parachute then
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   215
		HogSay(player, loc("You can't fire a portal on the blue surface"), SAY_THINK)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   216
	end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   217
--if you wanted to check for collection only
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   218
--you could probably say
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   219
--if (gear == myParachuteGear) and (band(GetGearMessage(gear), gmDestroy) ~= 0) then
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   220
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   221
	if gear == extratime then
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   222
		HogSay(player, loc(" What !! For all of this struggle i just win some ... TIME o0"), SAY_SHOUT)
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   223
	end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   224
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   225
	
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   226
	if gear == player then
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   227
        player = nil
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   228
    end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   229
end
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   230
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   231
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   232
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   233
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   234
4f338a9ea76d portal challenge
sphrix
parents:
diff changeset
   235