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.
However it does actually nothing... why is it? or if you could provide me for a solution as a spell i would be grateful.
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.