• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Refill Script

Wipflash

Old School
Joined
Jul 27, 2010
Messages
1,101
Reaction score
87
Location
Sweden
Hi . i'am realesing a refill script with cool down :>

Code:
local storage = 1024
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if os.time() - getCreatureStorage(cid, storage) >= 30 * 60 then
		doCreatureSetStorage(cid, storage, os.time())
		doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
		doCreatureAddMana(cid, getCreatureMaxMana(cid))
		doSendMagicEffect(getThingPos(cid), CONST_ME_HOLYAREA)
		doCreatureSay(cid, 'You health and mana have been restored.', TALKTYPE_ORANGE_1)
	else
		doCreatureSay(cid, 'You cannot use this again yet.', TALKTYPE_ORANGE_1, false, cid)
	end
	return true
end

All credits goes to Cykotitan!
 
Back
Top