Ir para conteúdo
  • Cadastre-se

(Resolvido)[PEDIDO] [MOD] Evento Metin Stone


Ir para solução Resolvido por Vodkart,

Posts Recomendados

Boa noite, achei esse evento em um site gringo, mas ele está dando alguns erros, alguém poderia me ajudar ?

eu tentei mexer nele, mas como sou iniciante nessa área, não sei bem se estraguei mais ou melhorei ?

Meu servidor é o Alissow Server, version 0.4.1  8.60

Desde já agradeço <3

 

Esses são os erros que aparecem na distro

[25/02/2020 05:33:24] > Loading [MOD] Evento Metin Stone.xml...
[25/02/2020 05:33:24] [Error - CreatureScript Interface] 
[25/02/2020 05:33:24] buffer
[25/02/2020 05:33:24] Description: 
[25/02/2020 05:33:24] [string "names = {'earth stone', 'icy stone', 'fire stone', 'wind stone'..."]:9: unexpected symbol near '='

[25/02/2020 05:33:24] [Error - TalkAction Interface] 
[25/02/2020 05:33:24] buffer
[25/02/2020 05:33:24] Description: 
[25/02/2020 05:33:24] [string "names = {'earth stone', 'icy stone', 'fire stone', 'wind stone'..."]:9: unexpected symbol near '='

[25/02/2020 05:33:24] [Error - GlobalEvent Interface] 
[25/02/2020 05:33:24] buffer
[25/02/2020 05:33:24] Description: 
[25/02/2020 05:33:24] [string "names = {'earth stone', 'icy stone', 'fire stone', 'wind stone'..."]:9: unexpected symbol near '='

[25/02/2020 05:33:24] [Error - GlobalEvent Interface] 
[25/02/2020 05:33:24] buffer
[25/02/2020 05:33:24] Description: 
[25/02/2020 05:33:24] [string "loadBuffer"]:3: attempt to get length of global 'stones_name' (a nil value)
[25/02/2020 05:33:24] [Warning - Event::loadScript] Cannot load script (domodlib("Stones_config")
[25/02/2020 05:33:24] local daysOpen = {}
[25/02/2020 05:33:24] local monst = stones_name[math.random(1, #stones_name)]
[25/02/2020 05:33:24] local poss = pos[math.random(1, #pos)]

[25/02/2020 05:33:24]             for k, v in pairs(days) do
[25/02/2020 05:33:24]                 table.insert(daysOpen, k)
[25/02/2020 05:33:24]             end

[25/02/2020 05:33:24]             function onThink(interval)
[25/02/2020 05:33:24]                 if isInArray(daysOpen, os.date('%A')) then
[25/02/2020 05:33:24]                     if isInArray(days[os.date('%A')], os.date('%X', os.time())) then
[25/02/2020 05:33:24]                         print(monst, poss)
[25/02/2020 05:33:24]                         if not(monst) then return TRUE end
[25/02/2020 05:33:24]                         doCreateMonster(monst.name,poss.pos)
[25/02/2020 05:33:24]                         doBroadcastMessage('[Event Stones]\n '.. monst.name ..' have been spawn. Find and defeat it!', 22)
[25/02/2020 05:33:24]                     end
[25/02/2020 05:33:24]                 end
[25/02/2020 05:33:24]                 return true
[25/02/2020 05:33:24]             end
[25/02/2020 05:33:24]         )

 

Script MOD

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Stones_Event Items" enabled="yes">
<config name="Stones_config"><![CDATA[

    names = {'earth stone', 'icy stone', 'fire stone', 'wind stone'}
   
    stones_name = {
            [1] = {name="Earth Stone"},
            [2] = {name="Icy Stone"},
            [3] = {name="Fire Stone"},
            [4] = {name="Wind Stone"}
          },
    pos = {
            [1] = {{x=95, y=57, z=7}},
            [2] = {{x=103, y=57, z=7}},
            [3] = {{x=90, y=58, z=7}},
            [4] = {{x=80, y=58, z=7}}
           },
    days = {['Tuesday'] = {'05:29:00'}, 
            ['Sunday'] = {'03:46:20'} 
    },
   
    stones = {
    ["earth stone"] = {
              [90] = {m = {'carniphila','earth elemental','bog raider'}, n = {6, 7}},
              [80] = {m = {'bog raider','earth elemental'}, n = {6, 7}},
              [70] = {m = {'giant spider','bog raider'}, n = {6, 7}},
              [60] = {m = {'hydra','lich','giant spider','bog raider'}, n = {6, 7}},
              [50] = {m = {'hydra','bog raider','serpent spawn'}, n = {6, 7}},
              [40] = {m = {'hydra','defiler','serpent spawn'}, n = {6, 7}},
              [30] = {m = {'medusa','hydra','serpent spawn','defiler'}, n = {6, 7}},
              [20] = {m = {'medusa','lost soul','hydra','serpent spawn'}, n = {6, 7}},
              [10] = {m = {'juggernaut','son of verminor','medusa'}, n = {5, 6}},
              [1] = {m = {'medusa','juggernaut'}, n = {5,7}}

    },

    ["icy stone"] = {
              [90] = {m = {'ice golem','frost dragon'}, n = {6, 7}},
              [80] = {m = {'frost dragon','frost dragon hatchling'}, n = {6, 7}},
              [70] = {m = {'frost dragon','crystal spider'}, n = {6, 7}},
              [60] = {m = {'frost dragon','crystal spider'}, n = {7, 7}},
              [50] = {m = {'frost dragon','crystal spider'}, n = {7, 7}},
              [40] = {m = {'frost dragon'}, n = {7, 7}},
              [30] = {m = {'frost dragon'}, n = {7, 8}},
              [20] = {m = {'frost dragon'}, n = {7, 8}},
              [10] = {m = {'yeti','frost dragon'}, n = {5, 7}},
              [1] = {m = {'yeti'}, n = {2,3}}

    },

    ["fire stone"] = {
   
    [90] = {m = {'fire elemental','dragon','dragon lord','    dragon lord hatchling'}, n = {6, 7}},
              [80] = {m = {'dragon lord hatchling','dragon lord'}, n = {6, 7}},
              [70] = {m = {'dragon lord','diabolic imp'}, n = {6, 7}},
              [60] = {m = {'dragon lord','diabolic imp'}, n = {6, 7}},
              [50] = {m = {'dragon lord','demodras','diabolic imp'}, n = {6, 7}},
              [40] = {m = {'dragon lord','diabolic imp','hellfire fighter'}, n = {5, 7}},
              [30] = {m = {'diabolic imp','hellfire fighter','demon'}, n = {6, 7}},
              [20] = {m = {'hellfire fighter','demon'}, n = {5, 6}},
              [10] = {m = {'demon','hellhound'}, n = {5, 5}},
              [1] = {m = {'demon'}, n = {5,5}}
    },
   
    ["wind stone"] = {
                    [90] = {m = {'gargoyle','stone golem','black knight'}, n = {6, 7}},
                    [80] = {m = {'black knight','behemoth'}, n = {5, 7}},
                    [70] = {m = {'black knight','behemoth'}, n = {6, 7}},
                    [60] = {m = {'behemoth','destroyer'}, n = {6, 7}},
                    [50] = {m = {'behemoth','destroyer','betrayed wraith'}, n = {6, 7}},
                    [40] = {m = {'behemoth','destroyer','betrayed wraith'}, n = {6, 7}},
                    [30] = {m = {'dark torturer','betrayed wraith'}, n = {3, 5}},
                    [20] = {m = {'dark torturer','grim reaper'}, n = {5, 6}},
                    [10] = {m = {'blightwalker','undead dragon','grim reaper'}, n = {5, 6}},
                    [1] = {m = {'undead dragon'}, n = {5,5}}
    }

                }
               
                function getPercent(number, all)
    return (number / all) * 100
end

function choose(arg)
    return arg[math.random(#arg)]
end
]]></config>


<event type="combat" name="Kamulec" event="script"><![CDATA[
domodlib("Stones_config")
function onCombat(cid, target)

if isMonster(target) then
    registerCreatureEvent(target, 'Kamulec')
end

local t = getPercent(getCreatureHealth(target), getCreatureMaxHealth(target))
if isMonster(target) and isInArray(names, getCreatureName(target):lower()) then
    if t > 90 then doCreatureSetStorage(target, 1000, 91) end
    for k, v in pairs(stones[getCreatureName(target):lower()]) do
        if k >= t and getCreatureStorage(target, 1000) > k then
            local pos = getThingPos(target)
            for i = 1, math.random(v.n[1], v.n[2]) do
                local s = {x=pos.x,y=pos.y,z=pos.z}
                s.x = pos.x + math.random(-2,2)
                s.y = pos.y + math.random(-2,2)

                doCreateMonster(choose(v.m), pos, false, false, false)
            end
            return doCreatureSetStorage(target, 1000, k)
        end
    end
end
return TRUE
end  
]]></event>

<talkaction log="yes" words="!metin" access="4" event="script">
<![CDATA[
         domodlib("Stones_config")
function onSay()
    local monst = stones_name[math.random(1, #stones_name)]
    local poss = pos[math.random(1, #pos)]
    print(monst, poss)
    if not(monst) then return TRUE end
    doCreateMonster(monst.name,poss.pos)
    doBroadcastMessage('[Event Stones]\n '.. monst.name ..' have been spawn. Find and defeat it!', 22)
    return TRUE
end 
]]>
</talkaction>
<globalevent name="metinStoneStart" interval="1000" event="script"><![CDATA[
domodlib("Stones_config")
local daysOpen = {}
local monst = stones_name[math.random(1, #stones_name)]
local poss = pos[math.random(1, #pos)]

            for k, v in pairs(days) do
                table.insert(daysOpen, k)
            end

            function onThink(interval)
                if isInArray(daysOpen, os.date('%A')) then
                    if isInArray(days[os.date('%A')], os.date('%X', os.time())) then
                        print(monst, poss)
                        if not(monst) then return TRUE end
                        doCreateMonster(monst.name,poss.pos)
                        doBroadcastMessage('[Event Stones]\n '.. monst.name ..' have been spawn. Find and defeat it!', 22)
                    end
                end
                return true
            end
        ]]></globalevent>
<event type="login" name="metinStoneLogin" event="buffer"><![CDATA[
registerCreatureEvent(cid, 'Kamulec')
]]></event>

</mod>

 

Editado por subhe (veja o histórico de edições)

n35408.gif

Link para o post
Compartilhar em outros sites
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Stones_Event Items" enabled="yes">
<config name="Stones_config"><![CDATA[
names = {'earth stone', 'icy stone', 'fire stone', 'wind stone'}

stones_name = {
	[1] = {name="Earth Stone"},
	[2] = {name="Icy Stone"},
	[3] = {name="Fire Stone"},
	[4] = {name="Wind Stone"}
}

pos = {
	[1] = {{x=95, y=57, z=7}},
	[2] = {{x=103, y=57, z=7}},
	[3] = {{x=90, y=58, z=7}},
	[4] = {{x=80, y=58, z=7}}
}

	days = {['Tuesday'] = {'05:29:00'}, 
	['Sunday'] = {'03:46:20'} 
}

stones = {
	["earth stone"] = {
		[90] = {m = {'carniphila','earth elemental','bog raider'}, n = {6, 7}},
		[80] = {m = {'bog raider','earth elemental'}, n = {6, 7}},
		[70] = {m = {'giant spider','bog raider'}, n = {6, 7}},
		[60] = {m = {'hydra','lich','giant spider','bog raider'}, n = {6, 7}},
		[50] = {m = {'hydra','bog raider','serpent spawn'}, n = {6, 7}},
		[40] = {m = {'hydra','defiler','serpent spawn'}, n = {6, 7}},
		[30] = {m = {'medusa','hydra','serpent spawn','defiler'}, n = {6, 7}},
		[20] = {m = {'medusa','lost soul','hydra','serpent spawn'}, n = {6, 7}},
		[10] = {m = {'juggernaut','son of verminor','medusa'}, n = {5, 6}},
		[1] = {m = {'medusa','juggernaut'}, n = {5,7}}
		
	},
	["icy stone"] = {
		[90] = {m = {'ice golem','frost dragon'}, n = {6, 7}},
		[80] = {m = {'frost dragon','frost dragon hatchling'}, n = {6, 7}},
		[70] = {m = {'frost dragon','crystal spider'}, n = {6, 7}},
		[60] = {m = {'frost dragon','crystal spider'}, n = {7, 7}},
		[50] = {m = {'frost dragon','crystal spider'}, n = {7, 7}},
		[40] = {m = {'frost dragon'}, n = {7, 7}},
		[30] = {m = {'frost dragon'}, n = {7, 8}},
		[20] = {m = {'frost dragon'}, n = {7, 8}},
		[10] = {m = {'yeti','frost dragon'}, n = {5, 7}},
		[1] = {m = {'yeti'}, n = {2,3}}
		
	},
	["fire stone"] = {
		[90] = {m = {'fire elemental','dragon','dragon lord',' dragon lord hatchling'}, n = {6, 7}},
		[80] = {m = {'dragon lord hatchling','dragon lord'}, n = {6, 7}},
		[70] = {m = {'dragon lord','diabolic imp'}, n = {6, 7}},
		[60] = {m = {'dragon lord','diabolic imp'}, n = {6, 7}},
		[50] = {m = {'dragon lord','demodras','diabolic imp'}, n = {6, 7}},
		[40] = {m = {'dragon lord','diabolic imp','hellfire fighter'}, n = {5, 7}},
		[30] = {m = {'diabolic imp','hellfire fighter','demon'}, n = {6, 7}},
		[20] = {m = {'hellfire fighter','demon'}, n = {5, 6}},
		[10] = {m = {'demon','hellhound'}, n = {5, 5}},
		[1] = {m = {'demon'}, n = {5,5}}
	},
	["wind stone"] = {
		[90] = {m = {'gargoyle','stone golem','black knight'}, n = {6, 7}},
		[80] = {m = {'black knight','behemoth'}, n = {5, 7}},
		[70] = {m = {'black knight','behemoth'}, n = {6, 7}},
		[60] = {m = {'behemoth','destroyer'}, n = {6, 7}},
		[50] = {m = {'behemoth','destroyer','betrayed wraith'}, n = {6, 7}},
		[40] = {m = {'behemoth','destroyer','betrayed wraith'}, n = {6, 7}},
		[30] = {m = {'dark torturer','betrayed wraith'}, n = {3, 5}},
		[20] = {m = {'dark torturer','grim reaper'}, n = {5, 6}},
		[10] = {m = {'blightwalker','undead dragon','grim reaper'}, n = {5, 6}},
		[1] = {m = {'undead dragon'}, n = {5,5}}
	}
	
}

function getPercent(number, all)
	return (number / all) * 100
end

function choose(arg)
	return arg[math.random(#arg)]
end
]]></config>


<event type="combat" name="Kamulec" event="script"><![CDATA[
domodlib("Stones_config")
function onCombat(cid, target)

if isMonster(target) then
    registerCreatureEvent(target, 'Kamulec')
end

local t = getPercent(getCreatureHealth(target), getCreatureMaxHealth(target))
if isMonster(target) and isInArray(names, getCreatureName(target):lower()) then
    if t > 90 then doCreatureSetStorage(target, 1000, 91) end
    for k, v in pairs(stones[getCreatureName(target):lower()]) do
        if k >= t and getCreatureStorage(target, 1000) > k then
            local pos = getThingPos(target)
            for i = 1, math.random(v.n[1], v.n[2]) do
                local s = {x=pos.x,y=pos.y,z=pos.z}
                s.x = pos.x + math.random(-2,2)
                s.y = pos.y + math.random(-2,2)

                doCreateMonster(choose(v.m), pos, false, false, false)
            end
            return doCreatureSetStorage(target, 1000, k)
        end
    end
end
return TRUE
end  
]]></event>

<talkaction log="yes" words="!metin" access="4" event="script">
<![CDATA[
         domodlib("Stones_config")
function onSay()
    local monst = stones_name[math.random(1, #stones_name)]
    local poss = pos[math.random(1, #pos)]
    print(monst, poss)
    if not(monst) then return TRUE end
    doCreateMonster(monst.name,poss.pos)
    doBroadcastMessage('[Event Stones]\n '.. monst.name ..' have been spawn. Find and defeat it!', 22)
    return TRUE
end 
]]>
</talkaction>
<globalevent name="metinStoneStart" interval="1000" event="script"><![CDATA[
domodlib("Stones_config")
local daysOpen = {}
local monst = stones_name[math.random(1, #stones_name)]
local poss = pos[math.random(1, #pos)]

            for k, v in pairs(days) do
                table.insert(daysOpen, k)
            end

            function onThink(interval)
                if isInArray(daysOpen, os.date('%A')) then
                    if isInArray(days[os.date('%A')], os.date('%X', os.time())) then
                        print(monst, poss)
                        if not(monst) then return TRUE end
                        doCreateMonster(monst.name,poss.pos)
                        doBroadcastMessage('[Event Stones]\n '.. monst.name ..' have been spawn. Find and defeat it!', 22)
                    end
                end
                return true
            end
        ]]></globalevent>
<event type="login" name="metinStoneLogin" event="buffer"><![CDATA[
registerCreatureEvent(cid, 'Kamulec')
]]></event>

</mod>

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
1 hora atrás, Vodkart disse:

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Stones_Event Items" enabled="yes">
<config name="Stones_config"><![CDATA[
names = {'earth stone', 'icy stone', 'fire stone', 'wind stone'}

stones_name = {
	[1] = {name="Earth Stone"},
	[2] = {name="Icy Stone"},
	[3] = {name="Fire Stone"},
	[4] = {name="Wind Stone"}
}

pos = {
	[1] = {{x=95, y=57, z=7}},
	[2] = {{x=103, y=57, z=7}},
	[3] = {{x=90, y=58, z=7}},
	[4] = {{x=80, y=58, z=7}}
}

	days = {['Tuesday'] = {'05:29:00'}, 
	['Sunday'] = {'03:46:20'} 
}

stones = {
	["earth stone"] = {
		[90] = {m = {'carniphila','earth elemental','bog raider'}, n = {6, 7}},
		[80] = {m = {'bog raider','earth elemental'}, n = {6, 7}},
		[70] = {m = {'giant spider','bog raider'}, n = {6, 7}},
		[60] = {m = {'hydra','lich','giant spider','bog raider'}, n = {6, 7}},
		[50] = {m = {'hydra','bog raider','serpent spawn'}, n = {6, 7}},
		[40] = {m = {'hydra','defiler','serpent spawn'}, n = {6, 7}},
		[30] = {m = {'medusa','hydra','serpent spawn','defiler'}, n = {6, 7}},
		[20] = {m = {'medusa','lost soul','hydra','serpent spawn'}, n = {6, 7}},
		[10] = {m = {'juggernaut','son of verminor','medusa'}, n = {5, 6}},
		[1] = {m = {'medusa','juggernaut'}, n = {5,7}}
		
	},
	["icy stone"] = {
		[90] = {m = {'ice golem','frost dragon'}, n = {6, 7}},
		[80] = {m = {'frost dragon','frost dragon hatchling'}, n = {6, 7}},
		[70] = {m = {'frost dragon','crystal spider'}, n = {6, 7}},
		[60] = {m = {'frost dragon','crystal spider'}, n = {7, 7}},
		[50] = {m = {'frost dragon','crystal spider'}, n = {7, 7}},
		[40] = {m = {'frost dragon'}, n = {7, 7}},
		[30] = {m = {'frost dragon'}, n = {7, 8}},
		[20] = {m = {'frost dragon'}, n = {7, 8}},
		[10] = {m = {'yeti','frost dragon'}, n = {5, 7}},
		[1] = {m = {'yeti'}, n = {2,3}}
		
	},
	["fire stone"] = {
		[90] = {m = {'fire elemental','dragon','dragon lord',' dragon lord hatchling'}, n = {6, 7}},
		[80] = {m = {'dragon lord hatchling','dragon lord'}, n = {6, 7}},
		[70] = {m = {'dragon lord','diabolic imp'}, n = {6, 7}},
		[60] = {m = {'dragon lord','diabolic imp'}, n = {6, 7}},
		[50] = {m = {'dragon lord','demodras','diabolic imp'}, n = {6, 7}},
		[40] = {m = {'dragon lord','diabolic imp','hellfire fighter'}, n = {5, 7}},
		[30] = {m = {'diabolic imp','hellfire fighter','demon'}, n = {6, 7}},
		[20] = {m = {'hellfire fighter','demon'}, n = {5, 6}},
		[10] = {m = {'demon','hellhound'}, n = {5, 5}},
		[1] = {m = {'demon'}, n = {5,5}}
	},
	["wind stone"] = {
		[90] = {m = {'gargoyle','stone golem','black knight'}, n = {6, 7}},
		[80] = {m = {'black knight','behemoth'}, n = {5, 7}},
		[70] = {m = {'black knight','behemoth'}, n = {6, 7}},
		[60] = {m = {'behemoth','destroyer'}, n = {6, 7}},
		[50] = {m = {'behemoth','destroyer','betrayed wraith'}, n = {6, 7}},
		[40] = {m = {'behemoth','destroyer','betrayed wraith'}, n = {6, 7}},
		[30] = {m = {'dark torturer','betrayed wraith'}, n = {3, 5}},
		[20] = {m = {'dark torturer','grim reaper'}, n = {5, 6}},
		[10] = {m = {'blightwalker','undead dragon','grim reaper'}, n = {5, 6}},
		[1] = {m = {'undead dragon'}, n = {5,5}}
	}
	
}

function getPercent(number, all)
	return (number / all) * 100
end

function choose(arg)
	return arg[math.random(#arg)]
end
]]></config>


<event type="combat" name="Kamulec" event="script"><![CDATA[
domodlib("Stones_config")
function onCombat(cid, target)

if isMonster(target) then
    registerCreatureEvent(target, 'Kamulec')
end

local t = getPercent(getCreatureHealth(target), getCreatureMaxHealth(target))
if isMonster(target) and isInArray(names, getCreatureName(target):lower()) then
    if t > 90 then doCreatureSetStorage(target, 1000, 91) end
    for k, v in pairs(stones[getCreatureName(target):lower()]) do
        if k >= t and getCreatureStorage(target, 1000) > k then
            local pos = getThingPos(target)
            for i = 1, math.random(v.n[1], v.n[2]) do
                local s = {x=pos.x,y=pos.y,z=pos.z}
                s.x = pos.x + math.random(-2,2)
                s.y = pos.y + math.random(-2,2)

                doCreateMonster(choose(v.m), pos, false, false, false)
            end
            return doCreatureSetStorage(target, 1000, k)
        end
    end
end
return TRUE
end  
]]></event>

<talkaction log="yes" words="!metin" access="4" event="script">
<![CDATA[
         domodlib("Stones_config")
function onSay()
    local monst = stones_name[math.random(1, #stones_name)]
    local poss = pos[math.random(1, #pos)]
    print(monst, poss)
    if not(monst) then return TRUE end
    doCreateMonster(monst.name,poss.pos)
    doBroadcastMessage('[Event Stones]\n '.. monst.name ..' have been spawn. Find and defeat it!', 22)
    return TRUE
end 
]]>
</talkaction>
<globalevent name="metinStoneStart" interval="1000" event="script"><![CDATA[
domodlib("Stones_config")
local daysOpen = {}
local monst = stones_name[math.random(1, #stones_name)]
local poss = pos[math.random(1, #pos)]

            for k, v in pairs(days) do
                table.insert(daysOpen, k)
            end

            function onThink(interval)
                if isInArray(daysOpen, os.date('%A')) then
                    if isInArray(days[os.date('%A')], os.date('%X', os.time())) then
                        print(monst, poss)
                        if not(monst) then return TRUE end
                        doCreateMonster(monst.name,poss.pos)
                        doBroadcastMessage('[Event Stones]\n '.. monst.name ..' have been spawn. Find and defeat it!', 22)
                    end
                end
                return true
            end
        ]]></globalevent>
<event type="login" name="metinStoneLogin" event="buffer"><![CDATA[
registerCreatureEvent(cid, 'Kamulec')
]]></event>

</mod>

 

 

Aparece esse erro e o servidor não abre, fica só aparecendo esses erros

[27/02/2020 19:08:00] OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: database disk image is malformed (SELECT "name" FROM "sqlite_master" WHERE "type" = 'table' AND "name" = 'server_config';)
[27/02/2020 19:08:00] > Updating database to version: 1...
[27/02/2020 19:08:00] OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: database disk image is malformed (CREATE TABLE IF NOT EXISTS "server_config" ("config" VARCHAR(35) NOT NULL DEFAULT '', "value" INTEGER NOT NULL);)
[27/02/2020 19:08:00] OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: database disk image is malformed (INSERT INTO "server_config" VALUES ('db_version', 1);)
[27/02/2020 19:08:00] > SQLite migration from 0.2 support not available, please use latest database!
[27/02/2020 19:08:00] > Database has been updated to version: 1.

 

n35408.gif

Link para o post
Compartilhar em outros sites
5 horas atrás, Vodkart disse:

@subhe isso não é do MODS, deve ter algum bug no seu distro, mal compilado, etc...

 

é kkk eu vi aqui

 

então.. ele não executa o evento agora e não da erro nenhum na distro, porem quando eu summono as stones com o GOD..

Aparece esse erro

[Warning - Monster::Monster] Unknown event name - metinStoneCombat

 

e se eu for iniciar por talkaction " !metin " aparece o seguinte erro...

[28/02/2020 04:23:47] [Error - TalkAction Interface] 
[28/02/2020 04:23:47] buffer:onSay
[28/02/2020 04:23:47] Description: 
[28/02/2020 04:23:47] attempt to index a nil value
[28/02/2020 04:23:47] stack traceback:
[28/02/2020 04:23:47] 	[C]: in function 'doCreateMonster'
[28/02/2020 04:23:47] 	[string "loadBuffer"]:7: in function <[string "loadBuffer"]:2>

 

 

Editado por subhe (veja o histórico de edições)

n35408.gif

Link para o post
Compartilhar em outros sites
31 minutos atrás, Vodkart disse:

@subhe pode me passar o link do evento todo? alem desse mods? monstros, etc...

 

@Vodkart  o MOD eu peguei desse link AQUI

pq eu queria definir em quais lugares cada stone iria aparecer

 

agora os monstros eu peguei desse link AQUI

n35408.gif

Link para o post
Compartilhar em outros sites

deleta essa parte de todos os monstros:

    <script>
        <event name="metinStoneCombat"/>
    </script>

 

outra coisa, no tópico la do cara só tinha 3 monstros, não tinha o Wind Stone, você criou ele?

 

names = {'earth stone', 'icy stone', 'fire stone', 'wind stone'}

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites

@Vodkart Deletei as partes que vc pediu, agora não está aparecendo o erro ao summonar os monstros.

só aparece esse erro, quando eu tento iniciar o evento por talkaction

[01/03/2020 15:11:52] [Error - TalkAction Interface] 
[01/03/2020 15:11:52] buffer:onSay
[01/03/2020 15:11:52] Description: 
[01/03/2020 15:11:52] attempt to index a nil value
[01/03/2020 15:11:52] stack traceback:
[01/03/2020 15:11:52] 	[C]: in function 'doCreateMonster'
[01/03/2020 15:11:52] 	[string "loadBuffer"]:7: in function <[string "loadBuffer"]:2>

 

Sim eu criei o monstro Wind Stone

n35408.gif

Link para o post
Compartilhar em outros sites
  • Solução

@subhe 

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Stones_Event Items" enabled="yes">
<config name="Stones_config"><![CDATA[

names = {'earth stone', 'icy stone', 'fire stone', 'wind stone'}

stones_name = {
	[1] = {name="Earth Stone"},
	[2] = {name="Icy Stone"},
	[3] = {name="Fire Stone"},
	[4] = {name="Wind Stone"}
}

pos = {
	{x=95, y=57, z=7},
	{x=103, y=57, z=7},
	{x=90, y=58, z=7},
	{x=80, y=58, z=7}
}

	days = {['Tuesday'] = {'05:29:00'}, 
	['Sunday'] = {'03:46:20'} 
}

stones = {
	["earth stone"] = {
		[90] = {m = {'carniphila','earth elemental','bog raider'}, n = {6, 7}},
		[80] = {m = {'bog raider','earth elemental'}, n = {6, 7}},
		[70] = {m = {'giant spider','bog raider'}, n = {6, 7}},
		[60] = {m = {'hydra','lich','giant spider','bog raider'}, n = {6, 7}},
		[50] = {m = {'hydra','bog raider','serpent spawn'}, n = {6, 7}},
		[40] = {m = {'hydra','defiler','serpent spawn'}, n = {6, 7}},
		[30] = {m = {'medusa','hydra','serpent spawn','defiler'}, n = {6, 7}},
		[20] = {m = {'medusa','lost soul','hydra','serpent spawn'}, n = {6, 7}},
		[10] = {m = {'juggernaut','son of verminor','medusa'}, n = {5, 6}},
		[1] = {m = {'medusa','juggernaut'}, n = {5,7}}
		
	},
	["icy stone"] = {
		[90] = {m = {'ice golem','frost dragon'}, n = {6, 7}},
		[80] = {m = {'frost dragon','frost dragon hatchling'}, n = {6, 7}},
		[70] = {m = {'frost dragon','crystal spider'}, n = {6, 7}},
		[60] = {m = {'frost dragon','crystal spider'}, n = {7, 7}},
		[50] = {m = {'frost dragon','crystal spider'}, n = {7, 7}},
		[40] = {m = {'frost dragon'}, n = {7, 7}},
		[30] = {m = {'frost dragon'}, n = {7, 8}},
		[20] = {m = {'frost dragon'}, n = {7, 8}},
		[10] = {m = {'yeti','frost dragon'}, n = {5, 7}},
		[1] = {m = {'yeti'}, n = {2,3}}
		
	},
	["fire stone"] = {
		[90] = {m = {'fire elemental','dragon','dragon lord',' dragon lord hatchling'}, n = {6, 7}},
		[80] = {m = {'dragon lord hatchling','dragon lord'}, n = {6, 7}},
		[70] = {m = {'dragon lord','diabolic imp'}, n = {6, 7}},
		[60] = {m = {'dragon lord','diabolic imp'}, n = {6, 7}},
		[50] = {m = {'dragon lord','demodras','diabolic imp'}, n = {6, 7}},
		[40] = {m = {'dragon lord','diabolic imp','hellfire fighter'}, n = {5, 7}},
		[30] = {m = {'diabolic imp','hellfire fighter','demon'}, n = {6, 7}},
		[20] = {m = {'hellfire fighter','demon'}, n = {5, 6}},
		[10] = {m = {'demon','hellhound'}, n = {5, 5}},
		[1] = {m = {'demon'}, n = {5,5}}
	},
	["wind stone"] = {
		[90] = {m = {'gargoyle','stone golem','black knight'}, n = {6, 7}},
		[80] = {m = {'black knight','behemoth'}, n = {5, 7}},
		[70] = {m = {'black knight','behemoth'}, n = {6, 7}},
		[60] = {m = {'behemoth','destroyer'}, n = {6, 7}},
		[50] = {m = {'behemoth','destroyer','betrayed wraith'}, n = {6, 7}},
		[40] = {m = {'behemoth','destroyer','betrayed wraith'}, n = {6, 7}},
		[30] = {m = {'dark torturer','betrayed wraith'}, n = {3, 5}},
		[20] = {m = {'dark torturer','grim reaper'}, n = {5, 6}},
		[10] = {m = {'blightwalker','undead dragon','grim reaper'}, n = {5, 6}},
		[1] = {m = {'undead dragon'}, n = {5,5}}
	}
	
}

function getPercent(number, all)
	return (number / all) * 100
end

function choose(arg)
	return arg[math.random(#arg)]
end
]]></config>


<event type="combat" name="Kamulec" event="script"><![CDATA[
domodlib("Stones_config")
function onCombat(cid, target)

if isMonster(target) then
    registerCreatureEvent(target, 'Kamulec')
end

local t = getPercent(getCreatureHealth(target), getCreatureMaxHealth(target))
if isMonster(target) and isInArray(names, getCreatureName(target):lower()) then
    if t > 90 then doCreatureSetStorage(target, 1000, 91) end
    for k, v in pairs(stones[getCreatureName(target):lower()]) do
        if k >= t and getCreatureStorage(target, 1000) > k then
            local pos = getThingPos(target)
            for i = 1, math.random(v.n[1], v.n[2]) do
                local s = {x=pos.x,y=pos.y,z=pos.z}
                s.x = pos.x + math.random(-2,2)
                s.y = pos.y + math.random(-2,2)

                doCreateMonster(choose(v.m), pos, false, false, false)
            end
            return doCreatureSetStorage(target, 1000, k)
        end
    end
end
return TRUE
end  
]]></event>
<talkaction log="yes" words="!metin" access="4" event="script">
<![CDATA[
domodlib("Stones_config")
function onSay(cid,words,param,channel)
    local monst = stones_name[math.random(1, #stones_name)]
    local poss = pos[math.random(1, #pos)]
    doCreateMonster(monst.name,poss)
    doBroadcastMessage('[Event Stones]\n '.. monst.name ..' have been spawn. Find and defeat it!', 22)
    return true
end 
]]>
</talkaction>
<globalevent name="metinStoneStart" interval="1000" event="script"><![CDATA[
domodlib("Stones_config")
local daysOpen = {}
local monst = stones_name[math.random(1, #stones_name)]
local poss = pos[math.random(1, #pos)]

            for k, v in pairs(days) do
                table.insert(daysOpen, k)
            end

            function onThink(interval)
                if isInArray(daysOpen, os.date('%A')) then
                    if isInArray(days[os.date('%A')], os.date('%X', os.time())) then
                        doCreateMonster(monst.name,poss)
                        doBroadcastMessage('[Event Stones]\n '.. monst.name ..' have been spawn. Find and defeat it!', 22)
                    end
                end
                return true
            end
        ]]></globalevent>
<event type="login" name="metinStoneLogin" event="buffer"><![CDATA[
registerCreatureEvent(cid, 'Kamulec')
]]></event>

</mod>

 

Editado por Vodkart (veja o histórico de edições)

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites

@Vodkart Agora não da erro nenhum, o comando !metin está funcionando, obrigado <3 

teria como deixar ele automático ? ele só ta iniciando por meio de talkaction, mesmo eu botando o dia e hora pro evento acontecer, ele não acontece, só se eu usar o comando

 

e se não for muito incomodo, daria pra por pra cada stone aparecer em um determinado tempo.. pra não aparecer todas ao mesmo tempo

Tipo, definir o horário de cada uma ou elas aparecer com algum intervalo de tempo (ex: 20 min)  ou até, só aparecer outra, dps que a primeira morrer

sla kkkk, o que for mais fácil de fazer <3 

 

ja ganhou REP+ <3 

 

 

OBS: As stones não estão summonando os monstros, quando chega em x porcentagem de HP

 

 

@Vodkart ediiit: Precisa mais não, mexi aqui e consegui fazer funcionar

muito obrigado pela ajuda mano, se me ajudou muito <3 

Editado por subhe (veja o histórico de edições)

n35408.gif

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo