The first thing is help with a script. I essentially am working on a script that will create a 'time' system inside Grimrock. The premise is pretty simple when the hero's move one tile it increments time forward x minutes (script has it move forward 1 but the integer could be set to anything). What I need help with is some of the coding to get the month and weekday down and how to call the various elements to display in game when called. This is just a fun thing I though about doing and wanted to see if possible to do. Here's the code as I have it so far; I've not really been able to test it either and I'm sure there's tons of errors, but that's why I'm here.
Code: Select all
function clocktime
-- minutes = m
-- 24 Hour = h
-- 12 Hour = t
-- Days = d
-- Weekday = w
-- Month = n
-- Monthday = x
-- counter = i
weekday = {{"Monday", 1},{"Tuesday", 2},{"Wednesday", 3},{"Thursday", 4},{"Friday", 5},{"Saturday", 6},{"Sunday", 7}}
month = {{"January", 1},{"february", 2},{"March", 3},{"April", 4},{"May", 5},{"June", 6},{"July", 7},{"August", 8},{"September", 9},{"October", 10},{"November", 11},{"December", 12}}
endmonth = {{"January", 31},{"february", 28},{"March", 31},{"April", 30},{"May", 31},{"June", 30},{"July", 31},{"August", 31},{"September", 30},{"October", 31},{"November", 30},{"December", 31}}
"w, n d t:m"
for i = 1, do
m = m + i
if m > 60 then
m - 60
h + 1
andif h > 24 then
h - 24
d + 1
else
return nil
end
end
if h > 12 then
t = h - 12
else
t = h
end
n = month
if d > endmonth then
n + 1
andif n > 12
n - 12
else
return nil
end
end
Google Drive link 620 MB:
https://drive.google.com/file/d/0ByvKIU ... sp=sharing

