Rwynoha
New Member
- Joined
- Jan 20, 2015
- Messages
- 14
- Reaction score
- 0
Hiho Otlanders i've made this script by learning from this thread and added some from my experience
this is the post of guiding scripting
action/script/staminadoll.lua
action.xml
TFS 0.3.6
this is the post of guiding scripting
Code:
http://otland.net/threads/scripting-guide.74030/
action/script/staminadoll.lua
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,enjoy.")
doRemoveItem(item.uid)
end
return true
end
Code:
<action itemid="itemid" event="script" value="staminadoll.lua"/>