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

Strong And Great Potion!

Crayon

New Member
Joined
Mar 23, 2009
Messages
29
Reaction score
0
I Need The Strong And Great Potions But In Level And Maglevel Function!

Local Min: 200
Local Max: 300 <<< THAT NOT!

I want Like This:

Local Min: mag + level 0.8 0.9
Local Max: mag + level 0.9 1.0

LIKE THAT

WHAT I NEED?

I HAVE TFS FORGOTTEN 0.3.3
 
/data/actions/scripts/liquids/great_mana.lua
Lua:
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((not(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
		doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1)
		return TRUE
	end

	local MIN = (getPlayerLevel(cid) * 0.8 + getPlayerMagLevel(cid) * 0.9)
	local MAX = (getPlayerLevel(cid) * 0.9 + getPlayerMagLevel(cid) * 1.0)
	
	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

Not a very good formula, I guess? :)
 
nicee!! this work!! :D ty

mmm its possible, one talkaction to recharge the great mana potion?

for example:

!charge [20 crystal coin 100 charges]
!charges [ LOOK HOW MANY U HAVE]
 
Back
Top