• 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 Save player

Status
Not open for further replies.

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,768
Solutions
5
Reaction score
769
I made this script, Big thank to Znote for helping me a lot in this script!

Its an action, when you use it will save your player, and it got exh. for 10sec! it counts time and got effects :)

It may be useful for some servers :)

All credits to Amiroslo and Znote.

Lua:
function onUse(cid, item, fromPos, itemEx, toPos)
	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
end

XML:
	<action itemid="2345" script="saveplayer.lua" />

Tested on 0.4
Rep++ if I helped you :D!
 
Status
Not open for further replies.
Back
Top