• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Action Marijuana script

Rugged Mage

Lua Scripter
Joined
Mar 8, 2010
Messages
1,182
Solutions
2
Reaction score
74
I was bored so, I decided to make a script that people can use on there servers for players that like smoking weed :p
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 if item.itemid == 2803 then -- you can change this to the id you want to use.
	doPlayerRemoveItem(cid, 2803,1) -- same here.
		doCreatureAddHealth(cid, 200)
			doSendMagicEffect(getPlayerPosition(cid), 31) -- sends the effect to the person.
				doCreatureSay(cid, "-Cough-", 3) -- makes the player say something.
					doPlayerSendTextMessage(cid, 22, "You have been affected from smoking weed!")
						doChangeSpeed(cid, -100) -- changes the speed until they logout.
					end
				return true
			end
I know this script is pretty useless, but I thought I might as well post it incase people are looking for something like this.

if you want this script to remove skills just add this.
Lua:
doPlayerAddSkillTry(cid, skillid, 1)
Lua:
Skillid can be:
							SKILL_FIST (0) = Fist Fighting
							SKILL_CLUB (1) = Club Fighting
							SKILL_SWORD (2) = Sword Fighting
							SKILL_AXE (3) = Axe Fighting
							SKILL_DISTANCE (4) = Distance Fighting
							SKILL_SHIELD (5) = Shielding
							SKILL_FISHING (6) = Fishing
 
Last edited:
Hahah, nice one

Saw such one b4, but was bugged

This can be used in Evo OTs for sure
 
Oh I just came up with an idea, instead of losing health it could add health, but it could decrease skills since, you lose brain cells from smoking marijuana. If people want it like that instead of how it is now, Tell me
 
Last edited:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
  if item.itemid == 2803 then -- you can change this to the id you want to use.
	doPlayerRemoveItem(cid, 2803,1) -- same here.
	doCreatureAddHealth(cid, -200)
	doSendMagicEffect(getPlayerPosition(cid), 31) -- sends the effect to the person.
	doCreatureSay(cid, "-Cough-", 3) -- makes the player say something.
	doPlayerSendTextMessage(cid, 22, "You have been affected from smoking weed!")
	doChangeSpeed(cid, -100) -- changes the speed until they logout.
  end
  return True
end

Im not sure, but I think this tabbing looks better XD
 
eventually kill us? there has never been one recorded death from weed in the history of mankind, and weve been smoking it for thousands of years.

and no, it doesn't kill your brain cells, thats a commonly believed myth.
the reason most people believe this is because its what the US government told us, but the study done to come to this conclusion was kept in wraps for years.
there were many additional studies done, and they all said that it was false, the government never acknowledged any of these

about a decade later they released the procedures they followed when doing the original "study"
the experiment was conducted on monkeys. these monkeys were administered excessive amounts of weed through a gas mask, estimated to be around 63 joints in 5 minutes, with no oxygen in between. its no secret that lack of oxygen kills brain cellls. after around 90 days the monkeys died.

in reality, some recent studies have shown that the opposite is true, it has been proven to cause regeneration of brain cells, which was previously thought to be impossible. (Source1, Source2)

but its not entirely true, as there is one type of brain cell that marijuana has been known to kill, brain cancer cells, while not affecting normal ones.
if you want to know more, read this article on WebMD: Active Component in Marijuana Targets Aggressive Brain Cancer Cells, Study Says

sorry, didnt mean to blow up your thread, it just really pisses me off when people are ignorant about weed :p
 
Last edited:
Awesome, that means there is more of a reason to smoke weed now :D. ok I'll change that from - health to +health :D and I'll add skills not remove skills
 
Awesome script!
As Im still learning the lua,how do I make this so marijuana is only useable with a water pipe,is it possible to get an area smoke effect like 9 squares when they smoke,make it set food level to 0 ( munchies ya know) and have a timer limit on it( a few minutes?)
Again, awesome script!
 
hey dude, it doesnt work, could you describe how to install it?

its debuging my client for some reason ; d
 
kinda funny
2.jpg
3.jpg
wanhuan1-2.jpg
huantest.jpg
 
Found this script useful for me. But there was a bug - it didn't remove item, if you use it from floor. Fixed
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 if item.itemid == 7499 then
	doRemoveItem(cid, item.uid,1)
	doCreatureAddHealth(cid, 5)
	doSendMagicEffect(getPlayerPosition(cid), 31)
	doCreatureSay(cid, "-Cough-", 3)
	doPlayerSendTextMessage(cid, 22, "You get stoned!")
	doChangeSpeed(cid, -200)
	end
return true
end
 
Back
Top