Ir para conteúdo
  • 0

SCRIPT DE BOSS ALEATORIO


zllcapiroto

Pergunta

Então rapaziada, eu preciso de um script que sumone certos boss, em um tempo determinado, porém, esse script ai é de TFS 0.4 um amigo me enviou, no meu TFS 1.0

APARECE ESSE ERRO NA DISRTO, ALGUEM SABE COMO corrigir?

ERRO: 

[Error - GlobalEvents::think] Failed to execute event: RandomBossSummon

Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/spawn/BossSpawn.lua:onThink
data/globalevents/scripts/spawn/BossSpawn.lua:43: attempt to call global 'getCreatureByName' (a nil value)
stack traceback:
        [C]: in function 'getCreatureByName'
        data/globalevents/scripts/spawn/BossSpawn.lua:43: in function <data/globalevents/scripts/spawn/BossSpawn.lua:41>
[Error - GlobalEvents::think] Failed to execute event: RandomBossSummon

Link para o comentário
Compartilhar em outros sites

4 respostass a esta questão

Posts Recomendados

  • 0
8 horas atrás, zllcapiroto disse:
Versão do Servidor: TFS - 1.0
Tipo de Script: globalevent
Código:
  Ocultar conteúdo


local shit = {
    {boss = "Smaug", pos = {x=1397, y=375, z=2}},
	{boss = "laracna", pos = {x=980, y=866, z=12}},
	{boss = "son of ancalagon", pos = {x=955, y=369, z=8}},
	{boss = "son of ancalagon", pos = {x=1651, y=615, z=12}},
	{boss = "Wormageddon", pos = {x=331, y=390, z=8}},
	{boss = "olog-hai", pos = {x=1664, y=1141, z=8}},
	{boss = "olog-hai", pos = {x=507, y=835, z=10}},
	{boss = "scatha", pos = {x=1394, y=210, z=9}},
	{boss = "valaraukar", pos = {x=554, y=295, z=1}},
	{boss = "valaraukar", pos = {x=332, y=508, z=4}},
    {boss = "ferumbras", pos = {x=1865, y=811, z=0}},
	{boss = "jormungand", pos = {x=616, y=518, z=9}},
	{boss = "adramelech", pos = {x=1659, y=517, z=11}},
	{boss = "ancalagon", pos = {x=1630, y=851, z=14}},
	{boss = "smaug", pos = {x=1397, y=375, z=2}},
    {boss = "eddie", pos = {x=1636, y=458, z=11}},
	{boss = "The Necromancer", pos = {x=557, y=315, z=0}},
	{boss = "baalrog", pos = {x=553, y=761, z=9}},
	{boss = "emelianenko", pos = {x=1206, y=766, z=11}},
	{boss = "khel thuzad", pos = {x=1788, y=453, z=15}},
	{boss = "ungoliant", pos = {x=1790, y=374, z=6}},
	{boss = "saruman", pos = {x=959, y=983, z=1}},
    {boss = "cerberus", pos = {x=1779, y=355, z=12}},
	{boss = "scatha", pos = {x=1104, y=1183, z=0}},
	{boss = "azaka", pos = {x=537, y=196, z=6}},
	{boss = "Melkors Summon", pos = {x=1540, y=94, z=13}},
	{boss = "Avari Leader", pos = {x=978, y=1341, z=8}},
	{boss = "Azazel", pos = {x=374, y=182, z=9}},
	{boss = "The Necromancer", pos = {x=337, y=706, z=1}},
	{boss = "Wormageddon", pos = {x=274, y=832, z=9}},
	{boss = "Melkors Summon", pos = {x=309, y=846, z=9}},
	{boss = "Lord of The Elements", pos = {x=127, y=818, z=13}},
	{boss = "deathstrike", pos = {x=1431, y=484, z=9}},
	{boss = "Obujos", pos = {x=651, y=1153, z=13}},
    {boss = "Jaul", pos = {x=775, y=1162, z=13}},
    {boss = "Gaz'haragoth", pos = {x=319, y=1179, z=5}},
    {boss = "Evancing", pos = {x=777, y=1514, z=12}}
}

function onThink(cid, interval)
    local random = math.random(1, #shit)
    if not getCreatureByName(shit[random].boss) then
        doCreateMonster(shit[random].boss, shit[random].pos)
    end
    return true
end

Então rapaziada, eu preciso de um script que sumone certos boss, em um tempo determinado, porém, esse script ai é de TFS 0.4 um amigo me enviou, no meu TFS 1.0

APARECE ESSE ERRO NA DISRTO, ALGUEM SABE COMO corrigir?

ERRO: 

[Error - GlobalEvents::think] Failed to execute event: RandomBossSummon

Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/spawn/BossSpawn.lua:onThink
data/globalevents/scripts/spawn/BossSpawn.lua:43: attempt to call global 'getCreatureByName' (a nil value)
stack traceback:
        [C]: in function 'getCreatureByName'
        data/globalevents/scripts/spawn/BossSpawn.lua:43: in function <data/globalevents/scripts/spawn/BossSpawn.lua:41>
[Error - GlobalEvents::think] Failed to execute event: RandomBossSummon

local shit = {
    {boss = "Smaug", pos = {x=1397, y=375, z=2}},
	{boss = "laracna", pos = {x=980, y=866, z=12}},
	{boss = "son of ancalagon", pos = {x=955, y=369, z=8}},
	{boss = "son of ancalagon", pos = {x=1651, y=615, z=12}},
	{boss = "Wormageddon", pos = {x=331, y=390, z=8}},
	{boss = "olog-hai", pos = {x=1664, y=1141, z=8}},
	{boss = "olog-hai", pos = {x=507, y=835, z=10}},
	{boss = "scatha", pos = {x=1394, y=210, z=9}},
	{boss = "valaraukar", pos = {x=554, y=295, z=1}},
	{boss = "valaraukar", pos = {x=332, y=508, z=4}},
    {boss = "ferumbras", pos = {x=1865, y=811, z=0}},
	{boss = "jormungand", pos = {x=616, y=518, z=9}},
	{boss = "adramelech", pos = {x=1659, y=517, z=11}},
	{boss = "ancalagon", pos = {x=1630, y=851, z=14}},
	{boss = "smaug", pos = {x=1397, y=375, z=2}},
    {boss = "eddie", pos = {x=1636, y=458, z=11}},
	{boss = "The Necromancer", pos = {x=557, y=315, z=0}},
	{boss = "baalrog", pos = {x=553, y=761, z=9}},
	{boss = "emelianenko", pos = {x=1206, y=766, z=11}},
	{boss = "khel thuzad", pos = {x=1788, y=453, z=15}},
	{boss = "ungoliant", pos = {x=1790, y=374, z=6}},
	{boss = "saruman", pos = {x=959, y=983, z=1}},
    {boss = "cerberus", pos = {x=1779, y=355, z=12}},
	{boss = "scatha", pos = {x=1104, y=1183, z=0}},
	{boss = "azaka", pos = {x=537, y=196, z=6}},
	{boss = "Melkors Summon", pos = {x=1540, y=94, z=13}},
	{boss = "Avari Leader", pos = {x=978, y=1341, z=8}},
	{boss = "Azazel", pos = {x=374, y=182, z=9}},
	{boss = "The Necromancer", pos = {x=337, y=706, z=1}},
	{boss = "Wormageddon", pos = {x=274, y=832, z=9}},
	{boss = "Melkors Summon", pos = {x=309, y=846, z=9}},
	{boss = "Lord of The Elements", pos = {x=127, y=818, z=13}},
	{boss = "deathstrike", pos = {x=1431, y=484, z=9}},
	{boss = "Obujos", pos = {x=651, y=1153, z=13}},
    {boss = "Jaul", pos = {x=775, y=1162, z=13}},
    {boss = "Gaz'haragoth", pos = {x=319, y=1179, z=5}},
    {boss = "Evancing", pos = {x=777, y=1514, z=12}}
}

function onThink(cid, interval)
    local random = math.random(1, #shit)
    doCreateMonster(shit[random].boss, shit[random].pos)
    return true
end

 

Link para o comentário
Compartilhar em outros sites

  • 0

Também não funcionou mano...

[Error - GlobalEvents::think] Failed to execute event: RandomBossSummon

Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/spawn/BossSpawn.lua:onThink
data/globalevents/scripts/spawn/BossSpawn.lua:43: attempt to call global 'doCreateMonster' (a nil value)
stack traceback:
        [C]: in function 'doCreateMonster'
        data/globalevents/scripts/spawn/BossSpawn.lua:43: in function <data/globalevents/scripts/spawn/BossSpawn.lua:41>
[Error - GlobalEvents::think] Failed to execute event: RandomBossSummon

Link para o comentário
Compartilhar em outros sites

  • 0
7 horas atrás, zllcapiroto disse:

Também não funcionou mano...

[Error - GlobalEvents::think] Failed to execute event: RandomBossSummon

Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/spawn/BossSpawn.lua:onThink
data/globalevents/scripts/spawn/BossSpawn.lua:43: attempt to call global 'doCreateMonster' (a nil value)
stack traceback:
        [C]: in function 'doCreateMonster'
        data/globalevents/scripts/spawn/BossSpawn.lua:43: in function <data/globalevents/scripts/spawn/BossSpawn.lua:41>
[Error - GlobalEvents::think] Failed to execute event: RandomBossSummon

Ta faltando essas funçoes no seu sv 

Link para o comentário
Compartilhar em outros sites

  • 0
21 horas atrás, zllcapiroto disse:

Também não funcionou mano...

[Error - GlobalEvents::think] Failed to execute event: RandomBossSummon

Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/spawn/BossSpawn.lua:onThink
data/globalevents/scripts/spawn/BossSpawn.lua:43: attempt to call global 'doCreateMonster' (a nil value)
stack traceback:
        [C]: in function 'doCreateMonster'
        data/globalevents/scripts/spawn/BossSpawn.lua:43: in function <data/globalevents/scripts/spawn/BossSpawn.lua:41>
[Error - GlobalEvents::think] Failed to execute event: RandomBossSummon

muda isso

 doCreateMonster(shit[random].boss, shit[random].pos)

para isso

Game.createMonster(shit[random].boss, shit[random].pos)

 

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...