Tony32
Veteran OT User
- Joined
- Jun 6, 2008
- Messages
- 1,268
- Reaction score
- 353
Hello guys!
I'm trying to make a functional water-pipe, but the drunkness doesnt really work.
This is the current code:
But when I use it, I get the drunk icon for like one second then it dissapears.. Anyone know how to make it stay? And maybe an exhaust so I cant use it again while drunk.
will rep++ for help!
Thanks!
I'm trying to make a functional water-pipe, but the drunkness doesnt really work.
This is the current code:
Code:
local drunk = createConditionObject(CONDITION_DRUNK)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(fromPosition.x ~= CONTAINER_POSITION) then
doAddCondition(cid, drunk)
doSendMagicEffect(fromPosition,2)
doCreatureSay(cid, "Aaaaaaaahhhh", TALKTYPE_ORANGE_1)
else
doSendMagicEffect(fromPosition, CONST_ME_HITBYFIRE)
doCreatureSay(cid, "Ouch! Rather place it on the ground next time.", TALKTYPE_ORANGE_1)
doCreatureAddHealth(cid, -10)
end
return true
end
But when I use it, I get the drunk icon for like one second then it dissapears.. Anyone know how to make it stay? And maybe an exhaust so I cant use it again while drunk.
will rep++ for help!
Thanks!