Eu tava editando o script do shredder team pra poder sumonar mais pokes ficou assim
elseif spell == "Shredder Team" then
local team = {
["Scyther"] = "ScytherTeam",
["Shiny Scyther"] = "Shiny ScytherTeam",
["Scizor"] = "ScizorTeam",
["Darkrai"] = "DarkraiTeam",
}
local function RemoveTeam(cid)
if isCreature(cid) then
doSendMagicEffect(getThingPosWithDebug(cid), 211)
doRemoveCreature(cid)
end
end
if getPlayerStorageValue(cid, 637500) >= 1 then
return true
end
local master = getCreatureMaster(cid)
local item = getPlayerSlotItem(master, 8)
local life, maxLife = getCreatureHealth(cid), getCreatureMaxHealth(cid)
local name = getItemAttribute(item.uid, "poke")
local pos = getThingPosWithDebug(cid)
local time = 21
local pokelife = (getCreatureHealth(cid) / getCreatureMaxHealth(cid))
doItemSetAttribute(item.uid, "hp", pokelife)
local random = math.random(5, 10)
doDisapear(cid)
doTeleportThing(cid, {x=4, y=3, z=10}, false)
addEvent(doTeleportThing, random, cid, pos, false)
addEvent(doAppear, random, cid)
if team[name] then
local num = isInArray({"Shiny Scyther", "Scizor"}, getSubName(cid, target)) and 4 or 3
for b = 2, num do
doSummonMonster(master, team[name])
end
local num2 = getSubName(cid, target) == "Darkrai" and 5 or 4
for b = 2, num2 do
doSummonMonster(master, team[name])
end
pk1 = getCreatureSummons(master)[1]
pk2 = getCreatureSummons(master)[2]
pk3 = getCreatureSummons(master)[3]
if isInArray({"Shiny Scyther", "Scizor"}, getSubName(cid, target)) then
pk4 = getCreatureSummons(master)[4]
end
if getSubName(cid, target) == "Darkrai" then
pk5 = getCreatureSummons(master)[5]
end
for a = 1, num do
local pk = {[1] = pk1, [2] = pk2, [3] = pk3, [4] = pk4, [5] = pk5}
doTeleportThing(pk[a], getClosestFreeTile(pk[a], pos), false)
adjustStatus(pk[a], item.uid, true, true, true)
doSendMagicEffect(getThingPosWithDebug(pk[a]), 211)
end
setPlayerStorageValue(pk2, 637500, 1)
setPlayerStorageValue(pk3, 637500, 1)
if isInArray({"Shiny Scyther", "Scizor"}, getSubName(cid, target)) then
setPlayerStorageValue(pk4, 637500, 1)
end
if getSubName(cid, target) == "Darkrai" then
setPlayerStorageValue(pk5, 637500, 1)
end
setPlayerStorageValue(master, 637501, 1)
addEvent(setPlayerStorageValue, time * 1000, master, 637501, -2)
addEvent(RemoveTeam, time * 1000, pk2)
addEvent(RemoveTeam, time * 1000, pk3)
if isInArray({"Shiny Scyther", "Scizor"}, getSubName(cid, target)) then
addEvent(RemoveTeam, time * 1000, pk4)
end
if getSubName(cid, target) == "Darkrai" then
addEvent(RemoveTeam, time * 1000, pk5)
end
end
o problema é que ele não chama 5 só de darkrai mas sim dos outros também, e ao desapareçer apenas 3 somen e ficam 3 alis, mas as magias eles tão copiando td certinho, alguem sabe o problema?