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

Solved Custom Potion's

SuperNino

New Member
Joined
Oct 6, 2010
Messages
26
Reaction score
1
Location
Sweden
Hello,
I am looking after a mana potion thats works for all voctions.
based on level.

Max Healing:570
i am using: 0.3.6pl1 (Crying Damson) 8.54

Hope some one can help me, i am new and i did use search but dident find a working script.
I Leave Rep+
 
Last edited:
And do you want random values, or set values? eg. 50% it will heal 500, 50% it will heal 1000; or do you want the values random, based on ML/Lvl?
 
Lua:
local MIN = 300
local MAX = 570
local EMPTY_POTION = 7635

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)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
	
	return TRUE
end
 
Back
Top