Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Action] Save Player

Experienced Elementalist
Joined
Jul 29, 2012
Messages
240
Reaction score
25
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.

PS: This is just my second script!
Code:
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

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

Tested on 0.4
Rep++ if I helped you :D!
 
Back
Top