• 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!

Marijuana ACTION ID

zephirop

New Member
Joined
Sep 8, 2008
Messages
52
Reaction score
1
helloww im gonna release my ot and i need an actiion like a mana potiion but in marijuana look

okey

i have this id its like a marijuana (5953) and i change the name and that things
soo

i need an action or sometihng that when i click it say Oh Seee! in orange text and make heals the player mana and health like 100000 (:

ty :D
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	doCreatureAddHealth(cid, 100000)
	doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(cid, 'Oh Seee!', TALKTYPE_ORANGE_1)
	doRemoveItem(item.uid)
	return true
end
 
cyk~ but i need to heeal mana too ;S

and when you usee it only heals mana and dont say anytihng look i get this error on the exe

data/actions/scripts/marijuana.lua attempt to call global 'doCreatureSay' < a nill value


:S

and i need too when you use it too remove it S:
 
Last edited:
LUA:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
	doCreatureAddHealth(cid, 100000)
        doCreatureAddMana(cid, 100000)
	doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Oh Seee!", TALKTYPE_ORANGE_1)
	doRemoveItem(item.uid)
	return true
end
 
Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
	doplayerAddHealth(cid, 100000)
        doplayerAddMana(cid, 100000)
	doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Oh Seee!", TALKTYPE_ORANGE_1)
	doRemoveItem(item.uid)
	return true
end

ty for copy my code <,<
 
Dunno if this would work (I guess you are using a high rate server)

LUA:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level = getPlayerLevel(cid)
	local mlevel = getPlayerMagLevel(cid)
	local mana_minimum = (level * 1.5) + (mlevel * 5.5) --- can be changed into "local mana_minimum = 1000000"
	local mana_maximum = (level * 1.8) + (mlevel * 5.8) --- can be changed into "local mana_maimum = 1200000"
	local mana_add = math.random(mana_minimum, mana_maximum)
	
	doPlayerAddMana(cid, mana_add)
        doPlayerAddHealth(cid, mana_add)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(cid, 'Oh Seee!', TALKTYPE_ORANGE_1)
		if item.type > 1 then
			doChangeTypeItem(item.uid,item.type-1)
		else
			doRemoveItem(item.uid, 1)
		end
	return TRUE
end

Not my script though, and I don't remember who that made it.
 
mm no one work S:

im using evolutoin 8.1 =/ when tosse scripts says

attemp to call global getconfig info =/ plz help me u.u
 
A question, where do you add this script? :p
it should be added in Action Folder
and add this line in the action.xml:
Code:
 <action itemid="5953" event="script" value="custom/Marijuana.lua" allowfaruse="1"/>
(Change the Value to the path you have)

EDIT:
NVM!! :p
Remove this:
LUA:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

so it should look like this:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level = getPlayerLevel(cid)
	local mlevel = getPlayerMagLevel(cid)
	local mana_minimum = (level * 1.5) + (mlevel * 5.5) --- can be changed into "local mana_minimum = 1000000"
	local mana_maximum = (level * 1.8) + (mlevel * 5.8) --- can be changed into "local mana_maimum = 1200000"
	local mana_add = math.random(mana_minimum, mana_maximum)
 
	doPlayerAddMana(cid, mana_add)
        doPlayerAddHealth(cid, mana_add)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(cid, 'Oh Seee!', TALKTYPE_ORANGE_1)
		if item.type > 1 then
			doChangeTypeItem(item.uid,item.type-1)
		else
			doRemoveItem(item.uid, 1)
		end
	return TRUE
end
 
look i put that in actions
<action itemid="5953" event="script" value="Marijuana.lua" allowfaruse="1"/>

and my data :P

C:\Users\Mota\Desktop\TikoOT-XML v0.63\TikoOT-XML v0.63\data\actions\scripts
 
LUA:
 function onUse(cid, item, frompos, item2, topos)
	doCreatureAddHealth(cid, 100000)
        doCreatureAddMana(cid, 100000)
	doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(item2.uid, "Oh Seee!", TALKTYPE_ORANGE_1)
	doRemoveItem(item.uid)
	return true
end
 
Back
Top