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

Script of Potions :)

lyks

New Member
Joined
Dec 25, 2008
Messages
3
Reaction score
0
well, i need script of potions, but the potions using for another class.
Ex: The druid has been promoted by Epic Elder Druid, but he dont use the great mana potion. I changed the script to Elder druid, but follow error. :/ Only Druid and Sorc can use this potion on level 80.

Sorry My English :p
 
Code:
local MIN = 1000
local MAX = 1000
local EMPTY_POTION = 7636

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 10))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayer(itemEx.uid) == FALSE then
		return FALSE
	end

	if(not(isEpicDruid(itemEx.uid) or getPlayerLevel(itemEx.uid) < 50) then
		doCreatureSay(itemEx.uid, "Only epic druids of level 50 or above may drink this fluid.", TALKTYPE_ORANGE_1)
		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)
	doTransformItem(item.uid, EMPTY_POTION)
	return TRUE
end


reP??
 
Back
Top