LucasFerraz
Systems Analyst
All we know Berserk Potion, Bullseye Potion and Mastermind Potion.
In tibia rl you can't use one of then if you have buff of another.
How can I make it works?
bullseye_potion
berserk_potion
mastermind_potion
In tibia rl you can't use one of then if you have buff of another.
How can I make it works?
LUA:
<action itemid="7439" event="script" value="liquids/berserk_potion.lua"/>
<action itemid="7440" event="script" value="liquids/mastermind_potion.lua"/>
<action itemid="7443" event="script" value="liquids/bullseye_potion.lua"/>
bullseye_potion
LUA:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 30 * 60 * 1000) -- 10 minutes
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, 5)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -10)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(doAddCondition(cid, condition)) then
doSendMagicEffect(fromPosition, CONST_ME_MAGIC_RED)
doRemoveItem(item.uid)
end
return true
end
berserk_potion
LUA:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 60 * 1000) -- 10 minutes
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEE, 5)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -10)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(doAddCondition(cid, condition)) then
doSendMagicEffect(fromPosition, CONST_ME_MAGIC_RED)
doRemoveItem(item.uid)
end
return true
end
LUA:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 60 * 1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 3)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -10)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(not isSorcerer(cid) and not isDruid(cid)) then
doCreatureSay(cid, "Only sorcerers and druids may drink this fluid.", TALKTYPE_ORANGE_1, cid)
return true
end
if(doAddCondition(cid, condition)) then
doSendMagicEffect(fromPosition, CONST_ME_MAGIC_RED)
doRemoveItem(item.uid)
doCreatureSay(cid, "You feel smarter.", TALKTYPE_ORANGE_1, cid)
end
return true
end
Last edited: