Updated localization files

pull/1/head
Astoria Floyd 3 years ago
parent 7639c9309c
commit 1e3017b4f6

@ -0,0 +1,6 @@
{
"Lua.diagnostics.globals": [
"messagepart2",
"messagePart2"
]
}

@ -3,17 +3,16 @@ local tools = require("./tools.lua")
function rng.d20()
tools.reseed()
dice = math.random(20)
messagePart1 = ('You rolled a ' .. dice .. ' out of 20')
local dice = math.random(20)
local messagePart1 = ('You rolled a ' .. dice .. ' out of 20')
messagepart2 = ""
if dice==20 then
messagePart2 = ('Nat 20! Crititcal Hit')
messagePart2 = ('Nat 20! Crititcal Hit')
else if dice==1 then
messagePart2 = ('Nat 1! Critical Shit!')
else
messagePart2 = ""
messagePart2 = ('Nat 1! Critical Shit!')
end
end
message = messagePart1 .. '\n' .. messagePart2
local message = messagePart1 .. '\n' .. messagePart2
return message
end

@ -2,21 +2,21 @@ local tools = {}
function tools.reseed()
seed = os.time()
local seed = os.time()
math.randomseed(seed)
end
function tools.printFile(file)
rawFile = io.open(file, r)
message = rawFile:read("*all")
local rawFile = io.open(file, r)
local message = rawFile:read("*all")
rawFile:close()
return message
end
function tools.messageDectection(message, search)
distinctMessage = message.content
key = "!"
keyedSearch = key .. search
local distinctMessage = message.content
local key = "!"
local keyedSearch = key .. search
if string.find(distinctMessage, keyedSearch) == 1 then
return true
else

Loading…
Cancel
Save