local function sleep( Source, Args) if #Args ~= 1 then return -1,Source.Channel, MESSAGE_NORMAL; end -- returning -1 prints the usage string if (exists("scripts/plugins/RPGPlugin/profiles/"..Source.Nick..".lua") == false) then return "You are not registered, to register type -register name race", Source.Channel, MESSAGE_NORMAL end if (RPG.Enable == false) then return "RPG Mod is not currently running please try again later", Source.Channel, MESSAGE_NORMAL end if (RPG.Enable == true) then local profilename = "scripts/plugins/RPGPlugin/profiles/"..Source.Nick..".lua" local templayer = table.load(profilename) if args[1] == 1 then templayer.sleep = 1 table.save( templayer, profilename ) local tempstring = templayer.name.." has gone to sleep and is now unable to battle." return tempstring , Source.Channel, MESSAGE_NORMAL end elseif args[1] == 0 then templayer.sleep = 1 table.save( templayer, profilename ) local tempstring = templayer.name.." has awoken and is ready for battle." return tempstring , Source.Channel, MESSAGE_NORMAL end else return -1,Source.Channel, MESSAGE_NORMAL; end end end