aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/game/scripts/party/Until5000.lua
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-03-21 19:16:07 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-03-21 19:16:07 +0000
commit5d69ab51fd28961fd43b7e7646768b5a6dcbcb25 (patch)
tree5323292fcb46269f7dbbafe5a15ee399ad74675e /Lua/game/scripts/party/Until5000.lua
parent220ae11b40e104d09e2c1ac08203c2a631294d99 (diff)
downloadusdx-5d69ab51fd28961fd43b7e7646768b5a6dcbcb25.tar.gz
usdx-5d69ab51fd28961fd43b7e7646768b5a6dcbcb25.tar.xz
usdx-5d69ab51fd28961fd43b7e7646768b5a6dcbcb25.zip
lua stuff moved to experimental folder
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1642 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Lua/game/scripts/party/Until5000.lua46
1 files changed, 46 insertions, 0 deletions
diff --git a/Lua/game/scripts/party/Until5000.lua b/Lua/game/scripts/party/Until5000.lua
new file mode 100644
index 00000000..10d1d070
--- /dev/null
+++ b/Lua/game/scripts/party/Until5000.lua
@@ -0,0 +1,46 @@
+function InitPartyMode()
+ -- PartyModi created by users should use tables
+ Party.Mode.Name = {English = "Until 5000",
+ French = "A 5000",
+ German = "Bis 5000"}
+
+ -- PartyModi delivered with USDX should use translateable Strings
+ Party.Mode.Name = "PLUGIN_UNTIL5000_NAME"
+ Party.Mode.Description = "PLUGIN_UNTIL5000_DESC"
+
+ Party.Mode.Author = "Whiteshark & Hawkear"
+ Party.Mode.Homepage = "http://ultrastardx.sourceforge.net/"
+ Party.Mode.Version = "0.9"
+
+ Party.ShowRateBar = true
+ Party.ShowScore = true
+ Party.ShowNotes = true
+ Party.NoDuet = true -- dont sing duets - this would be unfair
+
+ -- all the other settings are at default or loaded from ini
+
+ return true
+end
+
+function Draw()
+ local i
+ for i=0,Party.Teams-1 do
+ Party.Team[i].Bar = math.floor(Party.Team[i].Score / 50)
+ Party.Team[i].Percentage = Party.Team[i].Bar
+ if Party.Team[i].Score >= 5000 then
+ return false -- end the round
+ end
+ end
+ return true -- continue with the round
+end
+
+function Finish()
+ local i
+ local winners={}
+ for i=0,Party.Teams-1 do
+ if Party.Team[i].Score >= 5000 then
+ table.insert(winners,i)
+ end
+ end
+ return winners
+end