• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

!save character

Celsish

New Member
Joined
Apr 6, 2009
Messages
74
Reaction score
0
Hello, this script doesn't work, the exhaust don't work. You can just spam !save
Can anyone fix it?


PHP:
 local waittime = 30 --Default (30 seconds)
local storage = 5560
 
function onSay(cid, words, param, channel)
        if exhaustion.get(cid, storage) == FALSE then
                doPlayerSave(cid)
                exhaustion.set(cid, storage, waittime)
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have successfully saved your character.")
        else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait another " .. exhaustion.get(cid, storage) .. " seconds.")
        end    
        return TRUE
end
 
Lua:
--Script by Amiroslo/ and help with timeing from Znote
function onSay(cid, words, param)
	if exhaustion.check(cid, 7645) == false then -- 7645 (Empty storage)
	   exhaustion.set(cid, 7645, 10) -- 7645(same storage as ^, Empty Storage) 10(How many second to wait until u press it again!) 
	if doPlayerSave(cid) then
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
		doCreatureSay(cid,"Player Saved",TALKTYPE_ORANGE_1)
	end
	else
		doPlayerSendTextMessage(cid, 17, "You are exhausted for "..(getCreatureStorage(cid, 7645) - os.time()).."!")
	end
	return TRUE
end

Talkaction script
 
Thanks man! but I did a misstake, the script I posted here worked too. But I tested it with my GM char and then there is no exhaust time xD
 
Back
Top