• 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 Stamina refuel ! Good item to shop in real RPG ot.

small correction:
cfg.refuel = 42 * 60
that's why it didn't worked well with max stamina check because 2520(max) minutes is 42*60 .
 
All is perfect. But i test it and get an error.... When you use the Stamina Refiller in PZ ZONE, it RemoveItem but dont give stamina.. What's happened there?
 
All is perfect. But i test it and get an error.... When you use the Stamina Refiller in PZ ZONE, it RemoveItem but dont give stamina.. What's happened there?

I don't see any reason why it should happend tested on otserv and it isn't happening.
 
0.4 has the same functionality as 0.3.6, if someone offers to convert it then you should take them up on it.
Some guy gave me this, im guessing it only uses item if under 40 hours stamina?

Code:
local maxStamina = 42 * 60 * 1000
local happyHour = getConfigValue("staminaRatingLimitTop")

function onUse(cid, item, fromPosition, itemEx, toPosition)
local staminaTime = getPlayerStamina(cid) - getConfigValue("staminaRatingLimitTop")

if(getPlayerStamina(cid) >= happyHour) then
doPlayerSendCancel(cid, "You still have ".. staminaTime .." minutes worth of happyHour.")
return true
end

if(not isPremium(cid)) then
doPlayerSendCancel(cid, "You must have a premium account.")
return true
end

if doRemoveItem(item.uid) == TRUE then
doPlayerSetStamina(cid, maxStamina)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.")
end
return true
end
 
Some guy gave me this, im guessing it only uses item if under 40 hours stamina?
That is kind of rude to not mention the name of the person(s) who wrote you the script...
You just created the thread yesterday and can't even be bothered to say that @Xikini and @Cade helped you put this script together...
 
Back
Top