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

Spell Cocaine Drunk Effects

capgros

New Member
Joined
Apr 14, 2009
Messages
10
Reaction score
0
Hi, this is a creation of the bored time XD

I do a action for a flour and they gives mana and you are hasted, similar the cocaine XDD

Here the script :

This save in data/actions/scripts with name fato.lua :

Code:
local MIN = 2500
local MAX = 3000

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 11000)
setConditionFormula(condition, 1.2, -89, 1.2, -89)

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

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayer(itemEx.uid) == FALSE then
		return FALSE
	end

	if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
		return TRUE
	end

	if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
		return FALSE
	end

	doAddCondition(cid, exhaust)
	doAddCondition(cid, condition)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_RED)
	doCreatureSay(itemEx.uid, "OZI FATO...", TALKTYPE_ORANGE_1)
	doRemoveItem(item.uid,1)
	return TRUE

end

And later go to data/actions and in actions.xml add :

Code:
	<action itemid="2692" script="liquids/fato.lua"/>

You can change the item id for other, but the more similar to cocaine in tibia is the flour XD


Enjoy and add rep++

PD : it's my first script and post ;)
 
you should make it improve your hitchance and atkspeed then. And lose stamina every second or so. cause regular coke effects only last about 30mins - 2hours for most people.
 
Back
Top