About
This is a project I have started since the first day I started scripting here in Toribash.
I started it on October 13, 2011. Currently it's in for testing purposes, I have developed a very basic Graphical User Interface and added simple score detection, which is very useful.
I am currently working on this.
CURRENTLY THIS IS ON VERSION 0.0.2 WHICH MEANS, WE ARE TESTING IT, AND WANT TO HEAR IF BUGS ARE SPOTTED ON THE GUI, AND WANT TO HEAR YOUR SUGGESTIONS.
--[[
Lawedash Script
Created by Matthew Striker
Copyright(C) Lawedan Computers, Inc 2011. All Rights Reserved ]]--
Version = "Pre Alpha 0.0.2"
Changelog0 = "* Created the welcome screen"
Changelog1 = "* Modified several aspects of the GUI"
Changelog2 = "* Modified the score system"
Changelog3 = "* The Winner Message is now per frame"
Changelog4 = " "
AcceptedTerms = false
ShowedWelcome = false
WelcomeStep = 0
WelcomeOpacity = 0.0
Username = ""
BotTalk = "^07<^05Lawedash^07> "
Winning = "no game in progress"
IsWinner = true
start_new_game()
function Load()
UserFile = io.open("User.msl", "r")
if(UserFile == nil) then
echo("^02* ^08Looks like this is your first time!")
Tutorial(1)
end
end
function OnDraw2DInit()
if(AcceptedTerms == false) then
set_color(0,0,0,1)
draw_quad(0, 0, 1000, 1000)
set_color(1, 1, 1, 1)
draw_text("Lawedash Center " .. Version, 300, 5, 3)
draw_text("Changelog", 30, 50, 2)
draw_text(Changelog0, 5, 80, 1)
draw_text(Changelog1, 5, 100, 1)
draw_text(Changelog2, 5, 120, 1)
draw_text(Changelog3, 5, 140, 1)
draw_text(Changelog4, 5, 160, 1)
draw_text("Full changelog found at lawedan.org/forums", 5, 180, 1)
draw_quad(0, 45, 350, 5)
draw_quad(350, 45, 5, 160)
draw_quad(0, 205, 355, 5)
draw_quad(0, 45, 5, 160)
draw_text("Created by Matthew Striker", 380, 50, 2)
draw_text("Directed by Jennifer Cooper", 380, 80, 2)
draw_text("Sponsored by Lawedan Computers, Inc", 380, 110, 2)
draw_text("Created for the Lawedash Community", 380, 140, 2)
draw_text("http://www.lawedan.org/forums", 380, 170, 2)
draw_quad(300, 45, 700, 5)
draw_quad(300, 205, 700, 5)
draw_quad(955, 45, 5, 160)
draw_text("Press space to continue", 125, 225, 0)
else
if(IsWinner == true) then
set_color(0, 0, 0, 0.5)
draw_quad(790, 490, 160, 20)
set_color(0, 0, 0, 1)
draw_text(Winning, 800, 490, 1)
end
end
end
function EnterFrame()
if(AcceptedTerms == false) then
AcceptedTerms = true
start_new_game()
local info = get_player_info(0)
Username = info.name
echo("^07Lawedash Center " .. Version .. " started")
echo("^02* ^08Type /lhelp to see a list of commands")
Load()
end
local Uke = get_player_info(1)
local Tori = get_player_info(0)
if(Uke.score > Tori.score) then
Winning = Uke.name .. " is winning"
elseif(Tori.score > Uke.score) then
Winning = Tori.name .. " is winning"
else
Winning = "Draw"
end
end
function OnEnterFreeze()
end
function OnCommand(command)
if(command == "lhelp") then
echo("^02Type /disablewinner^07 to disable the winner/draw message")
echo("^02Type /enablewinner^07 to enable the winner/draw message")
end
if(command == "disablewinner") then
IsWinner = false
end
if(command == "enablewinner") then
IsWinner = true
end
end
add_hook("draw2d", "core", OnDraw2DInit)
add_hook("enter_frame", "core", EnterFrame)
add_hook("enter_freeze", "core", OnEnterFreeze)
add_hook("command", "core", OnCommand)
If you are a good developer, feel free to join our Toribash Community: Lawedash, at the Lawedan Computers, Inc website:
http://www.lawedan.org/forums
Information:
Current Version: 0.0.2
CHANGELOG FOUND IN GAME
Screenshots(hosted by
http://www.lawedan.org/forums)
Last edited by Deskoft; Oct 14, 2011 at 10:43 PM.