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

Could anyone do me a small favor? [Manarune/uh stage] got the scripts

Ekholmen

New Member
Joined
Dec 12, 2010
Messages
52
Reaction score
0
Location
Sweden
Hello!


I do not understand this so im giving you guys a chance!

I want theese stages

[{1,35}] = {150,150},
[{51,100}] = {150,250},
[{101,250}] = {250,400},
[{251,350}] = {400,600},
[{450,550}] = {600,750},
[{551,650}] = {750,1000},
[{650,math.huge}] = {1000,1300}



Into this script


Code:
local exhausted = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhausted, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local min, max
	local lvl, mag = getPlayerLevel(cid), getPlayerMagLevel(cid)
	if isSorcerer(cid) or isDruid(cid) then
		min = lvl * 1.0 + mag * 1.0
		max = lvl * 1.0 + mag * 1.0
	elseif isPaladin(cid) then
		min = lvl * 1.0 + mag * 1.0
		max = lvl * 1.0 + mag * 1.0
	elseif isKnight(cid) then
		min = lvl * 0.5 + mag * 0.5
		max = lvl * 1.0 + mag * 1.0
	end
	
	local rand = math.random(min, max)
	if rand > 400 then
		rand = 400
	end
	
	if rand < 100 then
		rand = 100
	end
	
	if hasCondition(cid, CONDITION_EXHAUST_HEAL) then
		return doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
	end
	
	if not isPlayer(itemEx.uid) then
		return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
	end
	
	if(getCreatureHealth(cid) >= getCreatureMaxHealth(cid)) then
		return doPlayerSendCancel(cid, "Your health is currently full.")
	end
	
	return doChangeTypeItem(item.uid, item.type - 1) and doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE) and doPlayerAddHealth(itemEx.uid, rand) and doAddCondition(cid, exhausted) 
end
 
Back
Top