• 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 Perfect Kage Mane no Jutsu (Shadow Imitation Technique) updated,now possess monsters!

eso es algo mas avanzado, tal vez con la funcion getdistancebetween se haga
 
I added it on my login.lua, look:

Code:
function onLogin(cid)

 registerCreatureEvent(cid, "PlayerKill")
    if (InitArenaScript ~= 0) then
    InitArenaScript = 1
    -- make arena rooms free
        for i = 42300, 42309 do
            setGlobalStorageValue(i, 0)
            setGlobalStorageValue(i+100, 0)
        end
    end
    -- if he did not make full arena 1 he must start from zero
    if getPlayerStorageValue(cid, 42309) < 1 then
        for i = 42300, 42309 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    -- if he did not make full arena 2 he must start from zero
    if getPlayerStorageValue(cid, 42319) < 1 then
        for i = 42310, 42319 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    -- if he did not make full arena 3 he must start from zero
    if getPlayerStorageValue(cid, 42329) < 1 then
        for i = 42320, 42329 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    if getPlayerStorageValue(cid, 42355) == -1 then
        setPlayerStorageValue(cid, 42355, 0) -- did not arena level
    end
    setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
    setPlayerStorageValue(cid, 42352, 0) -- is not in arena  

	doPlayerPopupFYI(cid, message)
	registerCreatureEvent(cid, "PlayerDeath")
	--registerCreatureEvent(cid, "MEDALS") This is Nahruto's Metal System for killing someone, Dont add this unless you use it.--
	registerCreatureEvent(cid, "KilledMonstersCounter")
	registerCreatureEvent(cid, "playeradvance")
return TRUE

end
registerCreatureEvent(cid, "kawarimi")

setPlayerStorageValue(cid, 14755, -1)

what's wrong?? tell me :D srry for noob :p xDD
 
I added it on my login.lua, look:

Code:
function onLogin(cid)

 registerCreatureEvent(cid, "PlayerKill")
    if (InitArenaScript ~= 0) then
    InitArenaScript = 1
    -- make arena rooms free
        for i = 42300, 42309 do
            setGlobalStorageValue(i, 0)
            setGlobalStorageValue(i+100, 0)
        end
    end
    -- if he did not make full arena 1 he must start from zero
    if getPlayerStorageValue(cid, 42309) < 1 then
        for i = 42300, 42309 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    -- if he did not make full arena 2 he must start from zero
    if getPlayerStorageValue(cid, 42319) < 1 then
        for i = 42310, 42319 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    -- if he did not make full arena 3 he must start from zero
    if getPlayerStorageValue(cid, 42329) < 1 then
        for i = 42320, 42329 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    if getPlayerStorageValue(cid, 42355) == -1 then
        setPlayerStorageValue(cid, 42355, 0) -- did not arena level
    end
    setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
    setPlayerStorageValue(cid, 42352, 0) -- is not in arena  

    doPlayerPopupFYI(cid, message)
    registerCreatureEvent(cid, "PlayerDeath")
    --registerCreatureEvent(cid, "MEDALS") This is Nahruto's Metal System for killing someone, Dont add this unless you use it.--
    registerCreatureEvent(cid, "KilledMonstersCounter")
    registerCreatureEvent(cid, "playeradvance")
return TRUE

end
registerCreatureEvent(cid, "kawarimi")

setPlayerStorageValue(cid, 14755, -1)
what's wrong?? tell me :D srry for noob :p xDD

xcoose me, but this isnt the kawarimi no jutsu thread <.<
and i dont see anything wrong there <.<
 
If this should work in a serious OT, you should make so either:
  • The victim can't be killed. (Spell will be used to paralyze him/make him walk into a trap when effect wear off rather than killing him while effect is on).
  • Or, make so any damage taken upon victim, also goes to the one who casts the spell. (Like Naruto, if you punch the victim, you will also get the same strength of punch at yourself unless you dispel it).
 
with a simple onStatsChange that can be done
I just show my ideas to OTland, but I can make upgrades if requested ^^
 
Well, I don't know what you're talking about jutsu or something but the
scripting looks sweet, therefor I'll say nice work! :D
 
found problem, when u possess someone if they have you on follow they will fight against the possess
 
[*] Or, make so any damage taken upon victim, also goes to the one who casts the spell. (Like Naruto, if you punch the victim, you will also get the same strength of punch at yourself unless you dispel it).[/list]
no that only happens with mind transfer jutsu. the jutsu ino uses.
-----

you should make it so u lose mana at a steadily increasing rate. the possession ends when u run outta mana or when u release
OR
u loose mana at a constant rate. but that rate depends on the level of the player your possessing

that would make this spell perfect
 
well it isn't that perfect
i'll fix it later
 
errors keep coming up:S

[12/06/2010 20:03:44] [Error - Spell Interface]
[12/06/2010 20:03:44] data/spells/scripts/custom/kagemane.lua:eek:nCastSpell
[12/06/2010 20:03:44] Description:
[12/06/2010 20:03:44] (luaAddEvent) Callback parameter should be a function.

[12/06/2010 20:03:46] [Error - Spell Interface]
[12/06/2010 20:03:46] data/spells/scripts/custom/kagemane.lua:eek:nCastSpell
[12/06/2010 20:03:46] Description:
[12/06/2010 20:03:46] (luaAddEvent) Callback parameter should be a function.
 
you failed @ installing script
i will add a mod updated vr later
 
this is what happends when i use the spell the target cant move untill he logs out and there is no sd going to him or going back and no possesed text like the movie
 
Wow, realy nice script man !!
but small have bugs ;x

[15/06/2010 17:49:50] data/spells/scripts/naruto/kage mane no jutso.lua:11: attempt to index local 'ntpos' (a boolean value)

Dont have exausthed... Oo'
And the player dont say the spell name...

Cya !! (using the spell.lua)

-------
@edit
You forgot the 'return TRUE' back of the last end :x


local function move(cid, target, playerpos, targetpos, times)
if playerdir ~= getCreatureLookDirection(cid) then
doCreatureSetLookDirection(target, getCreatureLookDirection(cid))
end

if playerpos ~= getCreaturePosition(cid) then
if playerpos.z == getCreaturePosition(cid).z then
local ntpos = getCreaturePosition(cid)
local x,y,z = ntpos.x-playerpos.x,ntpos.y-playerpos.y,ntpos.z-playerpos.z
ntpos = getCreaturePosition(target)
ntpos.x, ntpos.y, ntpos.z = ntpos.x+x,ntpos.y+y,ntpos.z+z
if queryTileAddThing(target, ntpos) == RETURNVALUE_NOERROR and getCreaturePosition(cid).z == getCreaturePosition(target).z then
doMoveCreature(target, getCreatureLookDirection(cid))
end
end
end
local playerpos, targetpos = getCreaturePosition(cid), getCreaturePosition(target)
local times = times+1
if times < 100 then
addEvent(move, 1, cid, target, playerpos, targetpos, times)
else
doCreatureSetNoMove(target, 0)
doSendDistanceShoot(targetpos, playerpos, 31)
doSendAnimatedText(targetpos, "Lost Effect!", math.random(1,255))
doPlayerSendCancel(cid, "You have lost control of "..getCreatureName(target)..".")
if (isPlayer(target)) then
doPlayerSendCancel(cid, "You've been freed from "..getPlayerName(cid).."'s Shadow Imitation Technique.")
setPlayerStorageValue(target, 14755, -1)
end
end
end

function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
if (isPlayer(target)) or (isMonster(target)) then
if getPlayerStorageValue(cid, 14755) == -1 then
doCreatureSetNoMove(target, 1)
doPlayerSendCancel(cid, "You have possessed "..getCreatureName(target)..".")
if (isPlayer(target)) then
doPlayerSendCancel(target, "You have been possessed by "..getPlayerName(cid)..".")
setPlayerStorageValue(target, 14755, 1)
end
doSendAnimatedText(getCreaturePosition(target), "POSSESSED!", math.random(1,255))
local playerpos,playerdir,targetpos = getCreaturePosition(cid), getPlayerLookDir(cid), getCreaturePosition(target)
doSendDistanceShoot(playerpos, targetpos, 31)
doSendMagicEffect(getCreaturePosition(target), CONST_ME_SMALLCLOUDS)
local times = 1
addEvent(move, 1000, cid, target, playerpos, targetpos, times)
else
doPlayerSendCancel(cid, "Your Shadow Imitation Technique isn't worn out yet.")
end
end
return TRUE
end
 
Last edited:
I cant use it ): when I say kagemane atacking a player or monster nothing happen and the char doesnt say kagemane :/ how can use the mod? I dont know x.x
 
yes, it's not really that perfect
however this is the last in my scripts fix list, i won't fix it for now
 
Back
Top