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

Spell Manarune

lol i deleted manarune and still got debugged :S
Code:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= 3 then
doSendMagicEffect(topos,1)
doCreatureSay(cid,"Donated Manarune!!",19)
doPlayerAddMana(cid, 50000)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
return TRUE
end
 
Last edited:
lol i deleted manarune and still got debugged :S
Code:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= 3 then
doSendMagicEffect(topos,1)
doCreatureSay(cid,"Donated Manarune!!",19)
doPlayerAddMana(cid, 50000)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
return TRUE
end
 
Last edited:
lol i deleted manarune and still got debugged :S
Code:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= 3 then
doSendMagicEffect(topos,1)
doCreatureSay(cid,"Donated Manarune!!",19)
doPlayerAddMana(cid, 50000)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
return TRUE
end
 
Last edited:
Oki im finish with my new manarune..
(i duno if any 1 have done it before but i will post it if any 1 have done it than im sorry)

Well save as
manaheal.lua in spells/scripts/custom
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) ---- what the color of the effect. you can do like RED/BLUE
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
doPlayerAddMana(cid, XXXX) ---- how much it heal .
return doCombat(cid, combat, var)
end

Well done . now in spells.xml
Code:
	<rune name="Manarune" id="2280" charges="1" mana="1" maglv="0" exhaustion="1500" blocktype="solid" allowfaruse="1" script="custom/manaheal.lua"/>

Well done i hope you enjoy this little manarune .. i accept any coment (please coment)


Lolaye

PS. im newbie in scripting .. so i will do more runes , more spells soon i hope you all like them
my server is high exp it got exp stage starts at 10k and ends at 5k so the players are high lvls and it needed a good manarune.... btw i have create it by myself and i dont think another server got this rune in the server as manarune..


first of all use
Lua:
 tags

[code=lua]
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) ---- what the color of the effect. you can do like RED/BLUE
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
doPlayerAddMana(cid, XXXX) ---- how much it heal .
return doCombat(cid, combat, var)
end


suxs that mana rune takes 2 sec to make .... and they are in roxor and armonia and all other "custom" maps -.-
 
omg .. there is ppl that like this .. why do you have to care.. dumbass
 
@Lolaye, I am proud of you. More and more people from iraq are advancing in the scripting language. Keep on going.
 
Voteban on WLJ, his always coming with his negative comments destroying other peoples morals.

For retards on OTland who didn't understand what I mean here's a short and detailed explanation. 'Ban WLJ for a better OTland.'
 
Voteban on WLJ, his always coming with his negative comments destroying other peoples morals.

For retards on OTland who didn't understand what I mean here's a short and detailed explanation. 'Ban WLJ for a better OTland.'

what? voteban ? you have 0 iq?, You cant vote a ban bec i like to help other but lolaye is not a normal person, he is a geek. Tookt 2 years to copy code from roxor server.

I prefer colan's

haha me to!
 
Oki im finish with my new manarune..
(i duno if any 1 have done it before but i will post it if any 1 have done it than im sorry)

Well save as
manaheal.lua in spells/scripts/custom
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) ---- what the color of the effect. you can do like RED/BLUE
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
doPlayerAddMana(cid, XXXX) ---- how much it heal .
return doCombat(cid, combat, var)
end

Well done . now in spells.xml
Code:
	<rune name="Manarune" id="2280" charges="1" mana="1" maglv="0" exhaustion="1500" blocktype="solid" allowfaruse="1" script="custom/manaheal.lua"/>

Well done i hope you enjoy this little manarune .. i accept any coment (please coment)


Lolaye

PS. im newbie in scripting .. so i will do more runes , more spells soon i hope you all like them
my server is high exp it got exp stage starts at 10k and ends at 5k so the players are high lvls and it needed a good manarune.... btw i have create it by myself and i dont think another server got this rune in the server as manarune..

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) ---- what the color of the effect. you can do like RED/BLUE
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

--effect code--
	effects = {
		CONST_ME_MAGIC_BLUE,
		CONST_ME_MAGIC_GREEN,
		CONST_ME_MORTAREA,
		CONST_ME_ENERGYHIT,
		CONST_ME_PURPLEENERGY,
		CONST_ME_CRAPS,
		CONST_ME_GIFT_WRAPS,
		CONST_ME_FIREWORK_YELLOW,
		CONST_ME_FIREWORK_RED,
		CONST_ME_YELLOW_RINGS,
		CONST_ANI_ENERGYBALL,
		CONST_ME_HOLYDAMAGE,
		CONST_ME_YELLOWENERGY,
		CONST_ME_PURPLEENERGY,
		CONST_ME_SLEEP,
		CONST_ANI_FIRE,
		CONST_ANI_ICE,
	},
}


	function onCastSpell(cid, var)
	doSendMagicEffect(pos, config.effects[math.random(1, #config.effects)])
	doPlayerAddMana(cid,math.random(500,800))
	return doCombat(cid, combat, var)
		end
		return TRUE
		end

But good for a first script..
 
Last edited:
Back
Top