Lil Sweetie
New Member
- Joined
- Aug 5, 2009
- Messages
- 15
- Reaction score
- 0
Hello, this is an example of a my scripting skills ^^
It's for marijuana![Stick Out Tongue :p :p](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Code:
function onUse(cid, item, frompos, item2, topos)
doSendMagicEffect(frompos,2)
queststatus = getPlayerStorageValue(cid,99980)
if doPlayerRemoveItem(cid,2800,1) == 1 then
if queststatus == -1 then
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerAddHealth(cid,-100)
setPlayerStorageValue(cid,99980,1)
return 1
end
if queststatus == 1 then
setPlayerStorageValue(cid,99980,2)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerAddHealth(cid,-500)
return 1
end
if queststatus == 2 then
setPlayerStorageValue(cid,99980,3)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerAddHealth(cid,-1000)
return 1
end
if queststatus == 3 then
setPlayerStorageValue(cid,99980,4)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerSay(cid,"-breathes heavy-",2)
doPlayerSay(cid,"I am so high right now...",2)
doPlayerAddHealth(cid,-2000)
return 1
end
if queststatus == 4 then
setPlayerStorageValue(cid,99980,-1)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerSay(cid,"Aaaaaaaaaaaahhhhhhhhhh.......",2)
doPlayerSay(cid,"-passes out-",2)
doPlayerAddHealth(cid,-3000)
doPlayerAddMana(cid,500)
return 1
end
elseif doPlayerRemoveItem(cid,2800,1) == 0 then
doPlayerSendTextMessage(cid,21,"You need marijuana.")
return 0
end
end
Enjoy !! x]
It's for marijuana
Code:
function onUse(cid, item, frompos, item2, topos)
doSendMagicEffect(frompos,2)
queststatus = getPlayerStorageValue(cid,99980)
if doPlayerRemoveItem(cid,2800,1) == 1 then
if queststatus == -1 then
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerAddHealth(cid,-100)
setPlayerStorageValue(cid,99980,1)
return 1
end
if queststatus == 1 then
setPlayerStorageValue(cid,99980,2)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerAddHealth(cid,-500)
return 1
end
if queststatus == 2 then
setPlayerStorageValue(cid,99980,3)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerAddHealth(cid,-1000)
return 1
end
if queststatus == 3 then
setPlayerStorageValue(cid,99980,4)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerSay(cid,"-breathes heavy-",2)
doPlayerSay(cid,"I am so high right now...",2)
doPlayerAddHealth(cid,-2000)
return 1
end
if queststatus == 4 then
setPlayerStorageValue(cid,99980,-1)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerSay(cid,"Aaaaaaaaaaaahhhhhhhhhh.......",2)
doPlayerSay(cid,"-passes out-",2)
doPlayerAddHealth(cid,-3000)
doPlayerAddMana(cid,500)
return 1
end
elseif doPlayerRemoveItem(cid,2800,1) == 0 then
doPlayerSendTextMessage(cid,21,"You need marijuana.")
return 0
end
end
Enjoy !! x]