Joriku
Working in the mines, need something?
Hi,
Getting some Issue that prevents me from entering the game.
Ideas?
Getting some Issue that prevents me from entering the game.
Lua:
local jailLocation = Position(3100, 2957, 15) -- First jail-room location, offset counts from this location
local jailOffset = 10 -- SQMs between each jail-room
local jailStorage = 300000 -- Storage for jail time in days
local jail = TalkAction("/jail")
function jail.onSay(player,words,param)
if not player:getGroup():getAccess() then
return true
end
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
local split = param:splitTrimmed(",")
if not split[2] or not tonumber(split[2]) then
player:sendCancelMessage("Jail room not set.")
return false
end
if not split[2] or not tonumber(split[3]) then
player:sendCancelMessage("Jail time not set.")
return false
end
local target = Player(split[1])
if not target then
player:sendCancelMessage("A player with that name is not online.")
return false
end
target:setStorageValue(jailStorage,(60*60*24)*tonumber(split[3]))
target:removeExperience(target:getExperience()*0.15)
target:teleportTo(jailLocation+Position(jailOffset*(tonumber(split[2]-1)),0,0))
return false
end
jail:separator(" ")
jail:register()
local RemoveJail = CreatureEvent("RemoveJail")
function RemoveJail.onLogin(player)
if player:getStorageValue(jailStorage) <= os.time() then
player:teleportTo(player:teleportTo(player:getTown():getTemplePosition()))
end
return true
end
RemoveJail:register()
Ideas?