• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Adding new Animation to Manarune

Evil Mark

Active Member
Joined
Nov 23, 2008
Messages
1,707
Reaction score
32
I Want to Add a new Animation to my mana rune


Mana rune PHP
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
doPlayerAddMana(cid, 1000) 
return doCombat(cid, combat, var)
end
That's my Mana rune PHP

And these are the animations i want to add to it.

PHP:
local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255}
local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255}
local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255}
local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255}

local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255}
local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255}
local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255}

if voca == 1 or voca == 5 then
doSendMagicEffect(pos, sorcerfirsteffect)
doSendMagicEffect(pos, sorcersecondeffect)

doSendDistanceShoot(pos, nha, sorcerflingeffect)
doSendDistanceShoot(pos, sha, sorcerflingeffect)
doSendDistanceShoot(pos, wha, sorcerflingeffect)
doSendDistanceShoot(pos, eha, sorcerflingeffect)
doSendDistanceShoot(pos, nwa, sorcerflingeffect)
doSendDistanceShoot(pos, nea, sorcerflingeffect)
doSendDistanceShoot(pos, sea, sorcerflingeffect)
doSendDistanceShoot(pos, swa, sorcerflingeffect)

doSendMagicEffect(nha, sorcerlandeffect)
doSendMagicEffect(sha, sorcerlandeffect)
doSendMagicEffect(wha, sorcerlandeffect)
doSendMagicEffect(eha, sorcerlandeffect)
doSendMagicEffect(nwa, sorcerlandeffect)
doSendMagicEffect(nea, sorcerlandeffect)
doSendMagicEffect(sea, sorcerlandeffect)
doSendMagicEffect(swa, sorcerlandeffect)

else if voca == 2 or voca == 6 then
doSendMagicEffect(pos, druidfirsteffect)
doSendMagicEffect(pos, druidsecondeffect)

doSendDistanceShoot(pos, nha, druidflingeffect)
doSendDistanceShoot(pos, sha, druidflingeffect)
doSendDistanceShoot(pos, wha, druidflingeffect)
doSendDistanceShoot(pos, eha, druidflingeffect)
doSendDistanceShoot(pos, nwa, druidflingeffect)
doSendDistanceShoot(pos, nea, druidflingeffect)
doSendDistanceShoot(pos, sea, druidflingeffect)
doSendDistanceShoot(pos, swa, druidflingeffect)

doSendMagicEffect(nha, druidlandeffect)
doSendMagicEffect(sha, druidlandeffect)
doSendMagicEffect(wha, druidlandeffect)
doSendMagicEffect(eha, druidlandeffect)
doSendMagicEffect(nwa, druidlandeffect)
doSendMagicEffect(nea, druidlandeffect)
doSendMagicEffect(sea, druidlandeffect)
doSendMagicEffect(swa, druidlandeffect)

else if voca == 3 or voca == 7 then
doSendMagicEffect(pos, paladinfirsteffect)
doSendMagicEffect(pos, paladinsecondeffect)

doSendDistanceShoot(pos, nha, paladinflingeffect)
doSendDistanceShoot(pos, sha, paladinflingeffect)
doSendDistanceShoot(pos, wha, paladinflingeffect)
doSendDistanceShoot(pos, eha, paladinflingeffect)
doSendDistanceShoot(pos, nwa, paladinflingeffect)
doSendDistanceShoot(pos, nea, paladinflingeffect)
doSendDistanceShoot(pos, sea, paladinflingeffect)
doSendDistanceShoot(pos, swa, paladinflingeffect)

doSendMagicEffect(nha, paladinlandeffect)
doSendMagicEffect(sha, paladinlandeffect)
doSendMagicEffect(wha, paladinlandeffect)
doSendMagicEffect(eha, paladinlandeffect)
doSendMagicEffect(nwa, paladinlandeffect)
doSendMagicEffect(nea, paladinlandeffect)
doSendMagicEffect(sea, paladinlandeffect)
doSendMagicEffect(swa, paladinlandeffect)

else if voca == 4 or voca == 8 then
doSendMagicEffect(pos, knightfirsteffect)
doSendMagicEffect(pos, knightsecondeffect)

doSendDistanceShoot(pos, nha, knightflingeffect)
doSendDistanceShoot(pos, sha, knightflingeffect)
doSendDistanceShoot(pos, wha, knightflingeffect)
doSendDistanceShoot(pos, eha, knightflingeffect)
doSendDistanceShoot(pos, nwa, knightflingeffect)
doSendDistanceShoot(pos, nea, knightflingeffect)
doSendDistanceShoot(pos, sea, knightflingeffect)
doSendDistanceShoot(pos, swa, knightflingeffect)

doSendMagicEffect(nha, knightlandeffect)
doSendMagicEffect(sha, knightlandeffect)
doSendMagicEffect(wha, knightlandeffect)
doSendMagicEffect(eha, knightlandeffect)
doSendMagicEffect(nwa, knightlandeffect)
doSendMagicEffect(nea, knightlandeffect)
doSendMagicEffect(sea, knightlandeffect)
doSendMagicEffect(swa, knightlandeffect)
end
end
end
end
end
end


Or i would also Appreciate it if someone Posted The Roxxor Manarune, The one that has rly cool animations when you use it, like Animations Flying out to all sides North West, North East, South West And South East, i allways gotta go for the hard things right? xD

Rep++ To helper + 5 dollars, My wallet is empty :(
 
i know the thread is a couple of years old but someone requested it.
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local t = {
	[isSorcerer] = {CONST_ME_ENERGYAREA, CONST_ME_BLOCKHIT, CONST_ANI_SMALLHOLY, CONST_ME_TELEPORT},
	[isDruid] = {CONST_ME_ICEATTACK, CONST_ME_ICETORNADO, CONST_ANI_ICE, CONST_ME_ICETORNADO},
	[isPaladin] = {CONST_ME_YELLOW_RINGS, CONST_ME_BLOCKHIT, CONST_ANI_SMALLHOLY, CONST_ME_HOLYAREA},
	[isKnight] = {CONST_ME_EXPLOSIONAREA, CONST_ME_FIREAREA, CONST_ANI_FIRE, CONST_ME_FIREWORK_RED}
}

function onCastSpell(cid, var)
	doPlayerAddMana(cid, 1000)
	local p = getThingPos(cid)
	for k, v in pairs(t) do
		if k(cid) then
			doSendMagicEffect(p, v[1])
			doSendMagicEffect(p, v[2])
			for i = 0, 7 do
				local f = getPosByDir({x=p.x, y=p.y, z=p.z}, i, i > 3 and 2 or 3)
				doSendDistanceShoot(p, f, v[3])
				doSendMagicEffect(f, v[4])
			end
			break
		end
	end
	return doCombat(cid, combat, var)
end
 
up this one didnt work i tested no errors just nothing happen it add the mana with CONST_ME_MAGIC_GREEN no more
 
This didn't work for me either. I'm using tfs 0.4. i get addmana, and green magic effect. thats it.
 
Back
Top