• 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 Jutsu Shadow Clones

Joined
Apr 17, 2008
Messages
1,922
Solutions
1
Reaction score
188
Location
Venezuela
Hello, i've edited this script that Nahruto made (i think was Nahruto). -> http://otland.net/f132/request-shadow-clones-jutsu-42794/#post434001

What's new with this script?

  • Clon have the same helth, maxHealth, mana, maxMana than you.
  • Clon have the same speed than you

Here is...
Lua:
local removeTime = 60 --time to remove the clones
local HAVE_CLONE = 65535 --storage to know if you have clones or not
local arr = {
    {
        {1},
        {2}
    },
 
    {
        {1, 0, 1},
        {0, 2, 0}
    },
     
    {
        {1, 0, 1},
        {0, 2, 0},
        {1, 0, 1}
    },
     
    {
        {1, 0, 1},
        {1, 2, 1},
        {1, 0, 1}
    },
     
    {
        {1, 1, 1},
        {1, 2, 1},
        {1, 1, 1}
    },
     
    {
        {1, 1, 0, 1, 1},
        {1, 0, 1, 0, 1},
        {0, 1, 2, 1, 0},
        {1, 0, 1, 0, 1},
        {1, 1, 0, 1, 1}
    }
}

local function removeCreatures(cid, creature)
	setPlayerStorageValue(cid, HAVE_CLONE, 0)
	if isCreature(creature) == TRUE then
		doRemoveCreature(creature)
	end
end

function onTargetTile(cid, pos)
local creature = doSummonCreature("Clon", pos)
	doConvinceCreature(cid, creature)
	setCreatureMaxHealth(creature, getCreatureMaxHealth(cid))
	doCreatureAddHealth(creature, getCreatureMaxHealth(cid))
	setCreatureMaxMana(creature, getCreatureMaxMana(cid))
	doCreatureAddMana(creature, getCreatureMaxMana(cid))
	doChangeSpeed(creature, getCreatureBaseSpeed(cid))
	doSetCreatureOutfit(creature, getCreatureOutfit(cid), -1)
	addEvent(removeCreatures, removeTime * 1000, cid, creature)
	return TRUE
end

local combat = {}
for i = 1, 6 do
	combat[i] = createCombatObject()
	setCombatParam(combat[i], COMBAT_PARAM_EFFECT, CONST_ME_POFF)
	setCombatArea(combat[i], createCombatArea(arr[i]))
	_G["onTargetTile" .. i] = onTargetTile
	setCombatCallback(combat[i], CALLBACK_PARAM_TARGETTILE, "onTargetTile" .. i)
end
 
function onCastSpell(cid, var)
local level = getPlayerLevel(cid)
	if getPlayerStorageValue(cid, HAVE_CLONE) < 1 then
		if level < 30 then
			doCombat(cid, combat[1], var)
		elseif level < 60 then
			doCombat(cid, combat[2], var)
		elseif level < 80 then
			doCombat(cid, combat[3], var)
		elseif level < 95 then
			doCombat(cid, combat[4], var)
		elseif level < 120 then
			doCombat(cid, combat[5], var)
		else
			doCombat(cid, combat[6], var)
		end
		setPlayerStorageValue(cid, HAVE_CLONE, 1)
	else
		doPlayerSendCancel(cid, "You already have clones.")
	end
end
 
Last edited:
Wondering about the accuracy compared to Naruto

In Naruto, the shadow clones do the exact same damage as the people performing the jutsu, but much less stamina (5%?). This means they deal out much damage, but the real Naruto is always the strongest. They should also have the same name as Naruto, and come all at once.

OT: The script looks very good. I'll try it out.
Rep+

(Edit: Grats on 3 bars :p)
 
Screenshot plz, i dont know anything about naruto so i wna see how it is b4 testing it
Its one of the best spell scripts ive seen in a long time, TY rep+
 
Last edited:
@Renusek: without source edit and new function you need to make base monster for every single player able to use this spell.
And then make sth like
Code:
local creature = doSummonCreature(getPlayerName(cid), pos)
So its better to leave it as it is
 
errors


[01/08/2009 05:14:35] Lua Script Error: [Spell Interface]
[01/08/2009 05:14:35] data/spells/scripts/clone.lua:eek:nCastSpell

[01/08/2009 05:14:35] luaDoCreateMonster(). Monster with name '268436458' not found
[01/08/2009 05:14:35] [Warning - Npc::loadFromXml] Cannot load npc file (data/npc/268436458.xml).
[01/08/2009 05:14:35] Info: failed to load external entity "data/npc/268436458.xml"



[01/08/2009 05:14:35] Lua Script Error: [Spell Interface]
[01/08/2009 05:14:35] data/spells/scripts/clone.lua:eek:nCastSpell

[01/08/2009 05:14:35] luaDoCreateNpc(). Npc name(268436458) not found

[01/08/2009 05:14:35] Lua Script Error: [Spell Interface]
[01/08/2009 05:14:35] data/spells/scripts/clone.lua:eek:nCastSpell

[01/08/2009 05:14:35] luaDoConvinceCreature(). Creature not found

[01/08/2009 05:14:35] Lua Script Error: [Spell Interface]
[01/08/2009 05:14:35] data/spells/scripts/clone.lua:eek:nCastSpell

[01/08/2009 05:14:35] luaDoCreatureAddHealth(). Creature not found

[01/08/2009 05:14:35] Lua Script Error: [Spell Interface]
[01/08/2009 05:14:35] data/spells/scripts/clone.lua:eek:nCastSpell

[01/08/2009 05:14:35] luaDoCreatureChangeOutfit(). Creature not found
 
@up

you have to create a monster named "Clone"
 
man when i use it, the clones start attacking me :S
any idea in how to fix that?
another problem, now its telling me "you already have clones" and i reseted the server so i dont have obiously :S
 
Last edited:
@up: You have to set the monster flag convinceable to 1
 
k ty, but how do i fix the spell so it doesnt says you already have clones
 
I dont know ask darkkhaos
 
Code:
local HAVE_CLONE = 65535 --storage to know if you have clones or not

Can i just change the storage?

nvm i changed the storage and it worked :D
 
Back
Top