Ir para conteúdo

Featured Replies

Postado

Olá TK, gostaria de pedir a ajuda para esse sistema que tem no meu servidor ( Chunin e Jounin )

 como eu passei meu servidor para 0.4 , esse script tem funcionado pela metade e não da erros na distro..

  o correto era ao entrar na arena spawnava o mostro ( ate ai tudo bem ) porem quando o primeiro morre os demais não nascem em seguida e ao matar todos ter teleportado.

 

segue os abaixo o scripts

Scripts:

 

( Chunin )

creaturescript(boss.lua)

Citar

function onKill(cid, target)

local creaturepos = {x=970, y=888, z=7}
local endpos = {x=966, y=888, z=8}
local from,to = {x=962, y=885, z=7},{x=974, y=892, z=7}

local boss = {
[1] = "Kiba",
[2] = "Neji",
[3] = "Temari",
[4] = "Shikamaru",
[5] = "Sasuke",
[6] = "Gaara"
}

if isInRange(getCreaturePosition(cid), from, to) then

if((isMonster(target) and not isSummon(target)) and string.lower(getCreatureName(target)) == string.lower(boss[1])) then
doCreateMonster(boss[2], creaturepos)

elseif((isMonster(target) and not isSummon(target)) and string.lower(getCreatureName(target)) == string.lower(boss[2])) then
doCreateMonster(boss[3], creaturepos)

elseif((isMonster(target) and not isSummon(target)) and string.lower(getCreatureName(target)) == string.lower(boss[3])) then
doCreateMonster(boss[4], creaturepos)

elseif((isMonster(target) and not isSummon(target)) and string.lower(getCreatureName(target)) == string.lower(boss[4])) then
doCreateMonster(boss[5], creaturepos)

elseif((isMonster(target) and not isSummon(target)) and string.lower(getCreatureName(target)) == string.lower(boss[5])) then
doCreateMonster(boss[6], creaturepos)

elseif((isMonster(target) and not isSummon(target)) and string.lower(getCreatureName(target)) == string.lower(boss[6])) then
doTeleportThing(cid, endpos)
end
return true
end
return true
end

Boss1.lua ( para cada mostro diferente e criado um arquivo lua ex:boss2 ...

Citar

function onDeath(cid, corpse, killer)
local pos = {x=970, y=888, z=7}
local boss = "Kiba"

if getCreatureName(cid) == boss and isMonster(cid) then
doCreateMonster("chuninboss2", pos)
end
return TRUE
end

 

( Jounin )

 

creaturescript(boss.lua)

Citar

function onKill(cid, target)

local creaturepos = {x=981, y=903, z=7} -- posiçao onde o monstro vai ser renascido
local endpos = {x=986, y=902, z=8} -- posiçao onde vai levar o player ao bau
local from,to = {x=979, y=901, z=7},{x=991, y=905, z=7}

local boss = {
[1] = "Uchiha Fugaku",
[2] = "Chouza Akimichi",
[3] = "Anko",
[4] = "Zabuza",
[5] = "Kakashi"
}

if isInRange(getCreaturePosition(cid), from, to) then

if((isMonster(target) and not isSummon(target)) and string.lower(getCreatureName(target)) == string.lower(boss[1])) then
doCreateMonster(boss[2], creaturepos)

elseif((isMonster(target) and not isSummon(target)) and string.lower(getCreatureName(target)) == string.lower(boss[2])) then
doCreateMonster(boss[3], creaturepos)

elseif((isMonster(target) and not isSummon(target)) and string.lower(getCreatureName(target)) == string.lower(boss[3])) then
doCreateMonster(boss[4], creaturepos)

elseif((isMonster(target) and not isSummon(target)) and string.lower(getCreatureName(target)) == string.lower(boss[4])) then
doCreateMonster(boss[5], creaturepos)

elseif((isMonster(target) and not isSummon(target)) and string.lower(getCreatureName(target)) == string.lower(boss[5])) then
doTeleportThing(cid, endpos)
end
return true
end
return true
end

 

Boss1.lua

Citar

function onDeath(cid, corpse, killer)
local pos = {x=981, y=903, z=7}
local boss = "Uchiha Fugaku"

if getCreatureName(cid) == boss and isMonster(cid) then
doCreateMonster("jouninboss2", pos)
end
return TRUE
end

 

 

 

 

Movements / Chunin

Citar

function onStepIn(cid, item, position, fromPosition)

local from,to = {x=962, y=885, z=7},{x=974, y=892, z=7}
local pos1 = {x=963, y=888, z=7}
local pos2 = {x=970, y=888, z=7}

if getPlayerStorageValue(cid, 89745) < 1 then
doPlayerSendTextMessage(cid, 27,"Apenas Genins podem fazer o exame chunin!")
doTeleportThing(cid, fromPosition)
return TRUE
end

if getPlayerStorageValue(cid, 89745) > 1 then
doPlayerSendTextMessage(cid, 27,"Voce ja fez o exame chunin!")
doTeleportThing(cid, fromPosition)
return TRUE
end

for x = from.x, to.x do
for y = from.y,to.y do
local m = getTopCreature({x=x, y=y, z=from.z}).uid
if m~= 0 and isPlayer(m) then
doTeleportThing(cid, fromPosition)
return doPlayerSendCancel(cid, "Alguem esta fazendo o exame Chunin.")
end
end
end

for _, uid in pairs (getCreatureSummons(cid)) do
doRemoveCreature(uid)
end
doTeleportThing(cid, pos1)
doCreateMonster("Kiba", pos2)
doPlayerSendTextMessage(cid, 27,"Boa sorte no exame chunin!")
return TRUE
end
 

 

Movements / Jounin

Citar

function onStepIn(cid, item, position, fromPosition)

local from,to = {x=979, y=901, z=7},{x=991, y=905, z=7}
local pos1 = {x=988, y=903, z=7} -- player pos
local pos2 = {x=981, y=903, z=7} -- monster pos

if getPlayerStorageValue(cid, 89745) < 2 then
doPlayerSendTextMessage(cid, 27,"Apenas Chunins podem fazer o exame jounin!")
doTeleportThing(cid, fromPosition)
return TRUE
end

if getPlayerStorageValue(cid, 89745) > 2 then
doPlayerSendTextMessage(cid, 27,"Voce ja fez o exame jounin!")
doTeleportThing(cid, fromPosition)
return TRUE
end

for x = from.x, to.x do
for y = from.y,to.y do
local m = getTopCreature({x=x, y=y, z=from.z}).uid
if m~= 0 and isPlayer(m) then
doTeleportThing(cid, fromPosition)
return doPlayerSendCancel(cid, "Alguem esta fazendo o exame Jounin.")
end
end
end

for _, uid in pairs (getCreatureSummons(cid)) do
doRemoveCreature(uid)
end
doTeleportThing(cid, pos1)
doCreateMonster("Uchiha Fugaku", pos2)
doPlayerSendTextMessage(cid, 27,"Boa sorte no exame jounin!")
return TRUE
end
 

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 520k

Informação Importante

Confirmação de Termo