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!
Tested on 0.4
Rep++ if I helped you !
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 !