Script (other/basins.lua):
Actions.xml:
Copyright © 2009 by Gzeep
Code:
function onUse(cid, item, frompos, item2, topos)
local basins = {
limit = 600
}
if os.time(t) > getPlayerStorageValue(cid, 30025) then
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 100, 200, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
if(doTargetCombatMana(0, cid, 70, 130, CONST_ME_NONE) == LUA_ERROR) then
return FALSE
end
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 30025, (os.time(t) + basins.limit))
else
doPlayerSendCancel(cid, 'You may drink from basins only once per 10 minutes!')
end
return TRUE
end
Actions.xml:
Code:
<!-- Basins -->
<action fromid="1154" toid="1157" script="other/basins.lua"/>
<action fromid="1194" toid="1195" script="other/basins.lua"/>
Copyright © 2009 by Gzeep