oshrigames
Active Member
hello
i'm using TFS 1.2 (protocol 10.98).
i tried to create new potions for my server along with alchemy system (which is finished).
but i failed to understand if it even can be done without edit the source.
just like the simple 3 potion in real tibia, Berserk Potion, Bullseye Potion and Mastermind Potion.
i thought there are quite a lot new potions that can be added to the game.
like health over time with skill buff while have speed debuff. (+15 hp per sec, +10 axe/club/sword -40 speed for 1 min)
like spesific skill buff with (+distance +ml -max health -hp regen for 1 min)
example for test speed potion.
(from what i understand speed in code is divided by two so this potion should have give 50 speed for 1 min)
ive put this in action/custom folder
ive put this in action.xml
sadly it didn't work, the potion do send the CONST_ME_POFF. i get no error and the potion (21426) disappeared after being used.
but i can't figure out where i went worng
so i'd like to request either clearance so i know where i went worng or one example so i can adopte it
so i can do more potions on my own and share with the community once i finished
any help will be greatly appreciated.
for those who helped if you need map ,hunting ground feel free to ask me anything map related you might need. (im decent mapper)
i'm using TFS 1.2 (protocol 10.98).
i tried to create new potions for my server along with alchemy system (which is finished).
but i failed to understand if it even can be done without edit the source.
just like the simple 3 potion in real tibia, Berserk Potion, Bullseye Potion and Mastermind Potion.
i thought there are quite a lot new potions that can be added to the game.
like health over time with skill buff while have speed debuff. (+15 hp per sec, +10 axe/club/sword -40 speed for 1 min)
like spesific skill buff with (+distance +ml -max health -hp regen for 1 min)
example for test speed potion.
(from what i understand speed in code is divided by two so this potion should have give 50 speed for 1 min)
ive put this in action/custom folder
Lua:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 60000) -- 1 minute
condition:setParameter(CONDITION_PARAM_SPEED, 100)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(doAddCondition(cid, condition)) then
doSendMagicEffect(fromPosition, CONST_ME_POFF)
doRemoveItem(item.uid)
end
return true
end
ive put this in action.xml
Lua:
<action itemid="21426" script="custom/test_potion.lua"/>
sadly it didn't work, the potion do send the CONST_ME_POFF. i get no error and the potion (21426) disappeared after being used.
but i can't figure out where i went worng
so i'd like to request either clearance so i know where i went worng or one example so i can adopte it
so i can do more potions on my own and share with the community once i finished
any help will be greatly appreciated.
for those who helped if you need map ,hunting ground feel free to ask me anything map related you might need. (im decent mapper)
Last edited: