• 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!

:D Stamina Rune

7i7a

New Member
Joined
Feb 23, 2011
Messages
43
Reaction score
1
Hey Guys!

I Need An Action Or Script For A Rune
When i use it, my stamina refull [/U][/I]{return} back To (42:00) {stamina Rune}
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cfg = {}
	cfg.refuel = 42 * 60 * 1000
	if(getPlayerStamina(cid) >= cfg.refuel) then
		doPlayerSendCancel(cid, "Your stamina is already full.")
	elseif(not isPremium(cid)) then
		doPlayerSendCancel(cid, "You must have a premium account.")
	else
		doPlayerSetStamina(cid, cfg.refuel)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.")
		doRemoveItem(item.uid)
	end
	return true
end

PHP:
<action itemid="ITEMID-PUT ID HERE" script="stamina-refuel.lua"/>

Not my script, all credits goes to Backy

I guess cykotitan made a version aswell here it is.

Code:
local refuel = 42 * 60 * 1000
function onUse(cid, item, fromPosition, itemEx, toPosition) return getPlayerStamina(cid) >= refuel and doPlayerSendCancel(cid, "Your stamina is already full.") or not isPremium(cid) and doPlayerSendCancel(cid, "Hey guy, premium account need.") or doPlayerSetStamina(cid, refuel) and doRemoveItem(item.uid, 1) and doSendAnimatedText(cid, "You got full stamina now!", TEXTCOLOR_LIGHTBLUE) end
 
Back
Top