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

Runes

Akkz

New Member
Joined
Apr 22, 2012
Messages
172
Reaction score
0
Could Someone make this runes so you only can use them on yourself and just so Druid/sorcerer can use it?
Code:
local runes = {
	[2284] = {
        min = 1190,
        max = 1200,
	}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isSorcerer and isDruid then
		level, maglv, i = getPlayerLevel(cid), getPlayerMagLevel(cid), runes[item.itemid]
		doPlayerAddMana(itemEx.uid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
		level, maglv, i = nil, nil, nil
		doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
		if math.random(100) == 1 then
		end
	else
		doCreatureSay(cid, "Only sorcerers and druids may use this rune.", TALKTYPE_ORANGE_1, cid)
	end
	return true
end

And the same on this but just for Knights/paladin
Code:
local MIN = 1300
local MAX = 1400
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 1000))
 
 function onUse(cid, item, fromPosition, itemEx, toPosition)
 
if(not isKnight(cid)) then
		doCreatureSay(cid, "Only knights may use this rune.", TALKTYPE_ORANGE_1, cid)
		return true
	end
  if(hasCondition(cid, CONDITION_EXHAUST)) then
     doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
     return true
  end

if cid ~= itemEx.uid then return false end
 
  if isPlayer(itemEx.uid) == false then
    return false
  end
 
 if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
    return FALSE
  end

  doAddCondition(cid, exhaust)
  doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
 
  return TRUE
  end

- - - Updated - - -

BUMP!!!!
 
Back
Top