Reaper7
dunno wat 2 rite here
- Joined
- Feb 18, 2011
- Messages
- 133
- Reaction score
- 1
Hiho!
today I want to show you my new script, which is quite cool, at least for me ; d
firstly you need to add this sprite to your tfs:
im not the author of this sprite!
script:
and then we need to add this to the action.lua:
basically what the script does is when you click on the marihuana it makes player send a text message "Just chill out man!" and it adds 150 hp. Warning! if the player isn't at least level 100 then he will lose 150 hp!
Regards
today I want to show you my new script, which is quite cool, at least for me ; d
firstly you need to add this sprite to your tfs:
im not the author of this sprite!
script:
PHP:
--[[
Script by Elff/Reaper7
-]]
function onUse(cid, item, fromPosition, itemEx, toPosition)
local condition = createConditionObject(CONDITION_PARALYZE)
local number = math.random(1,2)
if number==1 then
if item.itemid == 6666 and getPlayerLevel(cid) >= 100 then
--[[
note: id of the item must be changed!
]]
doPlayerSendTextMessage(cid,21,"Just chill out man!")
doCreatureAddHealth(cid,150)
doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_GREEN)
doRemoveItem(item.uid, 1)
return 1
else
doPlayerSendCancel(cid,"<Coughs> I think that drugs, aren't good for me...")
doCreatureAddHealth(cid,-150)
doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_GREEN)
doRemoveItem(item.uid, 1)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, -1, 40, -1, 40)
setCombatCondition(combat, condition)
end
return 1
end
and then we need to add this to the action.lua:
Code:
<action actionid="2142" event="script" value="marihuana.lua"/>
basically what the script does is when you click on the marihuana it makes player send a text message "Just chill out man!" and it adds 150 hp. Warning! if the player isn't at least level 100 then he will lose 150 hp!
Regards
Last edited: