author | sheepluva |
Sat, 25 Aug 2012 22:55:47 +0200 | |
changeset 7632 | 81e5e7092023 |
parent 7095 | b20dfa82f453 |
child 7889 | 57b117d441b9 |
permissions | -rw-r--r-- |
7094
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
1 |
loadfile(GetDataPath() .. "Scripts/Locale.lua")() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
2 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
3 |
local hhs = {} |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
4 |
local missionWon = nil |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
5 |
local endTimer = 1000 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
6 |
local hogsKilled = 0 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
7 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
8 |
local HogData = { |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
9 |
{"Bufon", "ShaggyYeti",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
10 |
{"burp", "lambda",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
11 |
{"Blue", "cap_blue",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
12 |
{"bender", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
13 |
{"Castell", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
14 |
{"cekoto", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
15 |
{"CheezeMonkey", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
16 |
{"claymore", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
17 |
{"CIA-144", "cyborg1",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
18 |
{"doomy ", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
19 |
{"Falkenauge", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
20 |
{"FadeOne", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
21 |
{"hayaa", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
22 |
{"Hermes", "laurel",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
23 |
{"HedgeKing", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
24 |
{"Izack1535", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
25 |
{"Kiofspa", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
26 |
{"Komplex", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
27 |
{"koda", "poke_mudkip",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
28 |
{"Lalo", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
29 |
{"Logan", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
30 |
{"lollkiller", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
31 |
{"Luelle", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
32 |
{"mikade", "Skull",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
33 |
{"Mushi", "sm_daisy",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
34 |
{"Naboo", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
35 |
{"nemo", "bb_bub",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
36 |
{"practice", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
37 |
{"Prof. Panic", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
38 |
{"Randy", "zoo_Sheep",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
39 |
{"rhino", "NinjaTriangle",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
40 |
{"Radissthor", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
41 |
{"Sami", "sm_peach",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
42 |
{"soreau", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
43 |
{"sdw195", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
44 |
{"sphrix", "TeamTopHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
45 |
{"sheepluva", "zoo_Sheep",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
46 |
{"Smaxx", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
47 |
{"shadowzero", "NoHat",false}, |
7095 | 48 |
{"Star and Moon", "SparkleSuperFun",false}, |
7094
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
49 |
{"The 24", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
50 |
{"TLD", "NoHat",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
51 |
{"Tiyuri", "sf_ryu",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
52 |
{"unC0Rr", "cyborg1",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
53 |
{"Waldsau", "cyborg1",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
54 |
{"wolfmarc", "knight",false}, |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
55 |
{"Xeli", "android",false} |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
56 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
57 |
} |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
58 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
59 |
function GenericEnd() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
60 |
ParseCommand("teamgone " .. loc("Wannabe Shoppsta")) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
61 |
ParseCommand("teamgone " .. loc("Unsuspecting Louts")) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
62 |
ParseCommand("teamgone " .. loc("Unlucky Sods")) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
63 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
64 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
65 |
function GameOverMan() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
66 |
missionWon = false |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
67 |
ShowMission(loc("ROPE-KNOCKING"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
68 |
PlaySound(sndHellish) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
69 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
70 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
71 |
function GG() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
72 |
missionWon = true |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
73 |
ShowMission(loc("ROPE-KNOCKING"), loc("MISSION SUCCESS"), loc("Congratulations!") .. "|" .. loc("COMPLETION TIME") .. ": " .. (TurnTime - TurnTimeLeft) / 1000, 0, 0) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
74 |
PlaySound(sndHomerun) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
75 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
76 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
77 |
function AssignCharacter(p) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
78 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
79 |
done = false |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
80 |
sanityCheck = 0 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
81 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
82 |
while(done == false) do |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
83 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
84 |
i = 1+ GetRandom(#HogData) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
85 |
if HogData[i][3] == false then |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
86 |
HogData[i][3] = true |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
87 |
done = true |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
88 |
SetHogName(hhs[p], HogData[i][1]) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
89 |
SetHogHat(hhs[p], HogData[i][2]) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
90 |
elseif HogData[i][3] == true then |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
91 |
sanityCheck = sanityCheck +1 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
92 |
if sanityCheck == 100 then |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
93 |
done = true |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
94 |
SetHogName(hhs[p], "Newbie") |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
95 |
SetHogHat(hhs[p], "NoHat") |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
96 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
97 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
98 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
99 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
100 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
101 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
102 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
103 |
function onGameInit() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
104 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
105 |
--Seed = 1 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
106 |
GameFlags = gfBorder + gfSolidLand |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
107 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
108 |
TurnTime = 180 * 1000 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
109 |
Delay = 500 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
110 |
Map = "Ropes" |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
111 |
Theme = "Eyes" |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
112 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
113 |
CaseFreq = 0 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
114 |
MinesNum = 0 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
115 |
Explosives = 0 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
116 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
117 |
AddTeam(loc("Wannabe Shoppsta"), 1175851, "Simple", "Island", "Default", "Hedgewars") |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
118 |
hhs[0] = AddHog(loc("Ace"), 0, 1, "Gasmask") |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
119 |
SetGearPosition(player, 1380, 1500) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
120 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
121 |
AddTeam(loc("Unsuspecting Louts"), 14483456, "Simple", "Island", "Default", "Hedgewars") |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
122 |
for i = 1, 8 do |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
123 |
hhs[i] = AddHog("generic", 0, 1, "NoHat") |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
124 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
125 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
126 |
AddTeam(loc("Unlucky Sods"), 14483456, "Simple", "Island", "Default", "Hedgewars") |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
127 |
for i = 9, 16 do |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
128 |
hhs[i] = AddHog("generic", 0, 1, "NoHat") |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
129 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
130 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
131 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
132 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
133 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
134 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
135 |
function onGameStart() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
136 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
137 |
ShowMission ( |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
138 |
loc("ROPE-KNOCKING"), |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
139 |
loc("a Hedgewars challenge"), |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
140 |
loc("Use the rope to knock your enemies to their doom.") .. "|" .. |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
141 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
142 |
"", -amRope, 4000 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
143 |
) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
144 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
145 |
SetGearPosition(hhs[0], 2419, 1769) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
146 |
SetGearPosition(hhs[1], 3350, 570) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
147 |
SetGearPosition(hhs[2], 3039, 1300) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
148 |
SetGearPosition(hhs[3], 2909, 430) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
149 |
SetGearPosition(hhs[4], 2150, 879) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
150 |
SetGearPosition(hhs[5], 1735, 1136) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
151 |
SetGearPosition(hhs[6], 1563, 553) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
152 |
SetGearPosition(hhs[7], 679, 859) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
153 |
SetGearPosition(hhs[8], 1034, 251) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
154 |
SetGearPosition(hhs[9], 255, 67) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
155 |
SetGearPosition(hhs[10], 2671, 7) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
156 |
SetGearPosition(hhs[11], 2929, 244) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
157 |
SetGearPosition(hhs[12], 1946, 221) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
158 |
SetGearPosition(hhs[13], 3849, 1067) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
159 |
SetGearPosition(hhs[14], 3360, 659) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
160 |
SetGearPosition(hhs[15], 3885, 285) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
161 |
SetGearPosition(hhs[16], 935, 1160) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
162 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
163 |
for i = 1, 16 do |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
164 |
AssignCharacter(i) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
165 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
166 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
167 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
168 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
169 |
function onGameTick() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
170 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
171 |
if (TurnTimeLeft == 1) and (missionWon == nil) then |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
172 |
GameOverMan() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
173 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
174 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
175 |
if missionWon ~= nil then |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
176 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
177 |
endTimer = endTimer - 1 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
178 |
if endTimer == 1 then |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
179 |
GenericEnd() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
180 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
181 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
182 |
if missionWon == true then |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
183 |
AddCaption(loc("GG!"), 0xffba00ff,capgrpGameState) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
184 |
else |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
185 |
AddCaption(loc("Ouch!"), 0xffba00ff,capgrpGameState) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
186 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
187 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
188 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
189 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
190 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
191 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
192 |
function onGearDamage(gear, damage) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
193 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
194 |
if gear ~= hhs[0] then |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
195 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
196 |
AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
197 |
DeleteGear(gear) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
198 |
PlaySound(sndExplosion) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
199 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
200 |
hogsKilled = hogsKilled +1 |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
201 |
if hogsKilled == 15 then |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
202 |
PlaySound(sndRideOfTheValkyries) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
203 |
elseif hogsKilled == 16 then |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
204 |
GG() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
205 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
206 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
207 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
208 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
209 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
210 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
211 |
function onGearDelete(gear) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
212 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
213 |
if (gear == hhs[0]) and (missionWon == nil) then |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
214 |
GameOverMan() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
215 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
216 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
217 |
end |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
218 |
|
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
219 |
function onAmmoStoreInit() |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
220 |
SetAmmo(amRope, 9, 0, 0, 0) |
f5a5578be66b
A few scripts to try out. 2x challenge, 1x GSoC training, 1x user mission.
mikade <redgrinner@gmail.com>
parents:
diff
changeset
|
221 |
end |