Boza
New Member
- Joined
- Feb 16, 2010
- Messages
- 184
- Reaction score
- 0
Credits go to Zonet
Will this work like it's suppose to? Also is there anyway to make it shorter.
Will this work like it's suppose to? Also is there anyway to make it shorter.
Lua:
local food =
{
[9884] = {35, "Ahh!"},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(not food[item.itemid]) then
return FALSE
end
if(getPlayerFood(cid) + food[item.itemid][1]) >= 400 then
doPlayerSendCancel(cid, "Ouch, Too Hot!")
else
doPlayerFeed(cid, food[item.itemid][1] * 4)
doCreatureSay(cid, food[item.itemid][2], TALKTYPE_ORANGE_1)
end
return TRUE
end
Code:
<action actionid="9005" script="coffee.lua" />
Last edited: