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

Lua Charge Spell problems

lordjanemba

New Member
Joined
Aug 3, 2007
Messages
13
Reaction score
0
Hello.
So i was trying to make a "charge" spell for knights, to basically teleport you to your target at the cost of mana...

since i admit i dont know how to handle it as a spell with doCombat things, i figured i could make a workaround about it as a talkaction.

Lua:
local Target = getCreatureTarget(cid)
local TargetPos = getCreaturePosition(Target)

function onSay(cid, words, param)
	if (getPlayerVocation(cid) == 4) then
		doPlayerAddMana(cid, -50)
			doTeleportThing(cid, Targetpos)
		doSendMagicEffect(getCreaturePosition(cid), 10)
	end
end

However it does actually nothing... why is it? or if you could provide me for a solution as a spell i would be grateful.
 
Back
Top