Backy
Vivere militare est
Hello i present my first script.
I think is a good item to SMS shop.
Ok, made file ...data/actions/scripts/stamina-refuel.lua
And paste
*Find a item what you want to use ! Its can be santa doll or something.
To actions.xml paste :
Please report bugs.
CREDITS TO JDB
IDEA BY ME : o
Thanks.
I think is a good item to SMS shop.
Ok, made file ...data/actions/scripts/stamina-refuel.lua
And paste
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
*Find a item what you want to use ! Its can be santa doll or something.
To actions.xml paste :
Code:
<action itemid="[COLOR="Red"]ITEMID-PUT ID HERE[/COLOR]" script="stamina-refuel.lua"/>
Please report bugs.
CREDITS TO JDB
IDEA BY ME : o
Thanks.
Last edited: