• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved MR changes

killing

Member
Joined
Feb 23, 2012
Messages
815
Reaction score
11
Location
BIH
Hello

I have this MR Script I call it Lighting Mr,i want to add Voction Knight and Elite Knight.but when knight is using this mr i want to Knight doPlayerAddMana(cid, 500*) i want it to still be the same,But when knight is using it i want to PlayerAddMana 500.

LUA:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000) -- time in seconds x1000
 
function onUse(cid, item, frompos, item2, topos)
 
local vocations = {1,2,5,6}
 
        if(hasCondition(cid, CONDITION_EXHAUST)) then
                doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
                doPlayerSendCancel(cid, "You are exhausted")
                return true
        end
 
        if isInArray(vocations, getPlayerVocation(cid)) then
                doSendMagicEffect(topos,1)
                doCreatureSay(cid,"Light me!MR", TALKTYPE_ORANGE_1)
                doPlayerAddMana(cid, 15000)
                doAddCondition(cid, exhaust)
        else
                doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
                doPlayerSendCancel(cid, "This rune is only for sorcerers and druids.")
        end
        return true
end


This may be easy for you.
 
Last edited:
check this

LUA:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000) -- time in seconds x1000
 
function onUse(cid, item, frompos, item2, topos)
 
local vocations = {1,2,5,6}

        if(hasCondition(cid, CONDITION_EXHAUST)) then
                doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
                doPlayerSendCancel(cid, "You are exhausted")
                return true
        end
        if isKnight(cid) then
		 doSendMagicEffect(topos,1)
                doCreatureSay(cid,"Light me!MR", TALKTYPE_ORANGE_1)
                doPlayerAddMana(cid, 500)
				 doAddCondition(cid, exhaust)
				 end
        if isInArray(vocations, getPlayerVocation(cid)) then
                doSendMagicEffect(topos,1)
                doCreatureSay(cid,"Light me!MR", TALKTYPE_ORANGE_1)
                doPlayerAddMana(cid, 15000)
                doAddCondition(cid, exhaust)
        else
                doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
                doPlayerSendCancel(cid, "This rune is only for sorcerers, knight and druids.")
        end
        return true
end
 
Here you are

LUA:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000) -- time in seconds x1000
 
function onUse(cid, item, frompos, item2, topos)
        if(hasCondition(cid, CONDITION_EXHAUST)) then
                doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
			doPlayerSendCancel(cid, "You are exhausted")
		return true
	end
        if isKnight(cid) then
			doSendMagicEffect(topos,1)
                doCreatureSay(cid,"Light me!MR", TALKTYPE_ORANGE_1)
					doPlayerAddMana(cid, 500)
				 doAddCondition(cid, exhaust)
			 end
					if isPaladin(cid) then
						doSendMagicEffect(topos,1)
                doCreatureSay(cid,"Light me!MR", TALKTYPE_ORANGE_1)
			doPlayerAddMana(cid, 6300)
		 doAddCondition(cid, exhaust)
	 end
        if isSorcerer(cid) or isDruid(cid) then
			doSendMagicEffect(topos,1)
                doCreatureSay(cid,"Light me!MR", TALKTYPE_ORANGE_1)
					doPlayerAddMana(cid, 15000)
                doAddCondition(cid, exhaust)
			end
        return true
     end
 
Here you are

LUA:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000) -- time in seconds x1000
 
function onUse(cid, item, frompos, item2, topos)
        if(hasCondition(cid, CONDITION_EXHAUST)) then
                doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
			doPlayerSendCancel(cid, "You are exhausted")
		return true
	end
        if isKnight(cid) then
			doSendMagicEffect(topos,1)
                doCreatureSay(cid,"Light me!MR", TALKTYPE_ORANGE_1)
					doPlayerAddMana(cid, 500)
				 doAddCondition(cid, exhaust)
			 end
					if isPaladin(cid) then
						doSendMagicEffect(topos,1)
                doCreatureSay(cid,"Light me!MR", TALKTYPE_ORANGE_1)
			doPlayerAddMana(cid, 6300)
		 doAddCondition(cid, exhaust)
	 end
        if isSorcerer(cid) or isDruid(cid) then
			doSendMagicEffect(topos,1)
                doCreatureSay(cid,"Light me!MR", TALKTYPE_ORANGE_1)
					doPlayerAddMana(cid, 15000)
                doAddCondition(cid, exhaust)
			end
        return true
     end

Use an config in stead of making the script that long.

And a tip, learn script some because this is just basic shit. Will save you alot of time
 
Lol i dont care, he needed a solution not for a short script.
Thanks pro guy :D

Well, he will look and learn from the support script. (I hope so)

So you can at least try to help him learning right way. (If you know how to do ofc..)
 
Back
Top