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

[IDEA] MMORPG like potion ?

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello.
I have big requests for good action scripters :)
I need to make on my OT potions like MMORPG games.

I Explain:
- You cannot use potion when you are in combat (in-fight)(have cross in status bar)
- Potion gives you 50 hp/second, after getting full hp the potion stop heals you.
- Potions cant be stackable (if you use 1 potion, you cant use other one as same type)
- If somebody damage you (you got hit from monster or player) the potion stop heals you.
- If player have 100% hp, cannot use potion.

Can you guys make it ? Its good idea for tibia servers!
 
Last edited:
i guess u would start an addevent when the player uses the potion to heal them 50h/s also set a storage value. then use creatureevent -> onstatschange to stop the healing.
 
I think can also be done in the action script , as if a monster killed you you will get battle sign and with this check you can stop the event in the action script it self.
 
oh really? thatd be nice and make it a lot neater. i know you would be able to check if you reached max health thatd be easy to throw in.
 
So you guys have any idea or part of script how i can make it (or somebody can make it) ?
And If player have 100% hp , cant use potion.
 
You can try this, I do it fast.
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local vial = 2929
function addingMana(itemEx.uid)
doCreatureAddHealth(cid, 50)
addEvent(addingMana, 1000, itemEx.uid)
end
if isPlayer(itemEx.uid) then
	if getCreatureCondition(itemEx.uid, CONDITION_INFIGHT) then
		doPlayerSendCancel(cid, "Cannot use in fight.")
	elseif getCreatureCondition(itemEx.uid, CONDITION_HUNTING) then
		stopEvent(addingMana)
	end
if getCreatureHealth(itemEx.uid) == getCreatureMaxHealth(itemEx.uid) then
	doPlayerSendCancel(cid, "Cannot use having full hp.")
else
	addEvent(addingMana, 100, itemEx.uid)
	doTransformItem(item.uid, vial, 1)
end
end
return true
end

It is an action , one xml you need to put only the itemid of potion.
 
Last edited:
Back
Top