This script was made by me.
Use water (id 7494) on id 7673 and it will grow.
After 20 seconds it will add 5 marijuana.
Use the cigarette (id 7499) to smoke it.
The cigarette script was made by ruggedmage:
http://otland.net/f81/marijuana-script-152194/
[video=youtube;cuX9MgF16HE]http://www.youtube.com/watch?v=cuX9MgF16HE&[/video]
actions/scripts/smoke/water.lua:
actions/scripts/smoke/smoke.lua:
actions.xml:
Rep++ please if you like it / using it!![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Please, don't post your own version here. Respect!
No hatin' please ;s
I don't script much. I am most into programming.
Use water (id 7494) on id 7673 and it will grow.
After 20 seconds it will add 5 marijuana.
Use the cigarette (id 7499) to smoke it.
The cigarette script was made by ruggedmage:
http://otland.net/f81/marijuana-script-152194/
[video=youtube;cuX9MgF16HE]http://www.youtube.com/watch?v=cuX9MgF16HE&[/video]
actions/scripts/smoke/water.lua:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition) -- Rasmus75
if isInArray(7673, itemEx.itemid) then
doPlayerRemoveItem(cid, 7673, 1)
doPlayerAddItem(cid, 7678, 1)
addEvent(doPlayerRemoveItem, 5000, cid, 7678, 1) --5000 ms = 5 seconds
addEvent(doPlayerAddItem, 5000, cid, 7680, 1)
addEvent(doPlayerRemoveItem, 15000, cid, 7680, 1) --15000 ms = 15 seconds
addEvent(doPlayerAddItem, 15000, cid, 5953, 5)
return true
end
return true
end
actions/scripts/smoke/smoke.lua:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerItemCount(cid, 5953) >= 1 then
doPlayerRemoveItem(cid, 5953, 1)
doCreatureAddHealth(cid, -200)
doSendMagicEffect(getPlayerPosition(cid), 31)
doCreatureSay(cid, "-Cough-", 3)
doPlayerSendTextMessage(cid, 22, "You have been affected from smoking marijuana!")
doChangeSpeed(cid, -400)
else
doPlayerSendTextMessage(cid, 22, "You have nothing to smoke.")
end
return true
end
actions.xml:
XML:
<!-- Smoke -->
<action itemid="7494" event="script" value="smoke/water.lua"/>
<action itemid="7499" event="script" value="smoke/smoke.lua"/>
Rep++ please if you like it / using it!
Please, don't post your own version here. Respect!
No hatin' please ;s
I don't script much. I am most into programming.
Last edited: