All pastes #902839 Raw Edit

Untitled

public lua v1 · immutable
·published 2008-02-13 20:06 UTC
rendered paste body
local function sleep( Source, Args)if #Args ~= 1 then return -1,Source.Channel, MESSAGE_NORMAL;  end -- returning -1 prints the usage stringif (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	endif (RPG.Enable == false) then	return "RPG Mod is not currently running please try again later", Source.Channel, MESSAGE_NORMAL	endif (RPG.Enable == true) thenlocal profilename = "scripts/plugins/RPGPlugin/profiles/"..Source.Nick..".lua"local templayer = table.load(profilename)if args[1] == 1 thentemplayer.sleep = 1table.save(  templayer, profilename )local tempstring = templayer.name.." has gone to sleep and is now unable to battle."return tempstring , Source.Channel, MESSAGE_NORMALendelseif args[1] == 0 thentemplayer.sleep = 1table.save(  templayer, profilename )local tempstring = templayer.name.." has awoken and is ready for battle."return tempstring , Source.Channel, MESSAGE_NORMALendelsereturn -1,Source.Channel, MESSAGE_NORMAL;endendend