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 :
And later go to data/actions and in actions.xml add :
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
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