Pabox Cavieres
Dovux Online owner
Bug, the players not attacks monster and players... With tfs 0.3.6 pl1
wtf??Can you also edit this so this effect happens 0,1%
like i block now some hits and then the effect appears not as a spell
and if lucky the teleport effect comes it teleports to same place but damage become 0 and hit someone back with melee 2x the max hit of melee and push him 1-3 sqm away?
[COLOR="Blue"]<[/COLOR]?xml version="1.0" encoding="UTF-8"?>
<mod name="Kawarimi" version="1.0" author="Cybermaster" contact="otland.net" enabled="yes">
<event type="login" name="Kawarimi" event="script"><![CDATA[
function onLogin(cid)
registerCreatureEvent(cid, "kawarimi")
return true
end]]></event>
<event type="attack" name="kawarimi" event="script"><![CDATA[
function onAttack(cid, target)
if (isPlayer(target)) and getPlayerStorageValue(target, 14680) == 1 then
doSendMagicEffect(getCreaturePosition(cid), 54)
doCreatureAddHealth(cid, -getPlayerLevel(target))
pos = getPlayerPosition(target)
doSendMagicEffect(pos, 67)
doSendAnimatedText(pos, "Kawarimi!", math.random(1,255))
local safe = {
{x=math.random(pos.x+2,pos.x+2), y=math.random(pos.y+2,pos.y+2), z=pos.z},
{x=math.random(pos.x-2,pos.x-2), y=math.random(pos.y-2,pos.y-2), z=pos.z},
{x=math.random(pos.x+2,pos.x+2), y=math.random(pos.y-2,pos.y-2), z=pos.z},
{x=math.random(pos.x-2,pos.x-2), y=math.random(pos.y+2,pos.y+2), z=pos.z}
}
for i = 1, #safe do
rand = math.random(1, #safe)
if(queryTileAddThing(target, safe[rand]) == RETURNVALUE_NOERROR) then
doTeleportThing(target, safe[rand], true)
end
end
doSendDistanceShoot(pos, getPlayerPosition(target), 35)
setPlayerStorageValue(target, 14680, 0)
doSendMagicEffect(getCreaturePosition(target), 10)
return true
end
end]]></event>
<instant name="Kawarimi no Jutsu" words="kawarimi" lvl="30" mana="200" needlearn="0" event="script"><![CDATA[
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 14680) ~= 1 then
setPlayerStorageValue(cid, 14680, 1)
doPlayerSendCancel(cid,"Kawarimi no Jutsu casted.")
return true
else
doPlayerSendCancel(cid,"You have already casted Kawarimi no Jutsu on you.")
return false
end
end]]></instant>
</mod>