Ir para conteúdo

Featured Replies

Postado

Olá tibiaking,

 

Estou construindo um projeto e preciso muito do Metin Stone Event, automático e também que possa ser ativado por comando para o TFS 0.4 (8.6)

 

Explicação do evento: São pedras (baseadas nos elementos : ICE, FIRE, EARTH e WIND) que aparece em uma determinada área (X Y Z), porem nem todas de uma vez. Assim que sumonada ela começa a sumonar uma horda de servos (Exemplo: Uma EARTH Stone, onde sua horda é : Hydra, Slime, Defiler, Medusa e etc) ,porem tem 10 tipos de hordas que pode ser sumonada, quando a horda e sumonada ela fica imune a danos ate todos seus servos estejam mortos.

 

[Exemplo2 de hordas : {'slime','bonelord','earth elemental'}
                                         {'bonelord','elder bonelord','earth elemental'}

                                                     ETC. Até 10 hordas]

 

Imagens :

 

Resultado de imagem para metin event event otland

Resultado de imagem para metin event event otland

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

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

  • 7 months later...
  • Respostas 7
  • Visualizações 1k
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • Autor
  Em 08/04/2019 em 17:30, floW disse:

@tetheuscunha Top!

Vai postar esse evento?

 

To é procurando alguém pra me ajudar a fazer, esse nível de script ai e muito além do meu conhecimento.

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

Postado

@tetheuscunha 

 

Salve achei esse aparentemente é o melhor mod do evento

 

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Metin Stone Event" version="1.1" author="Oskar" contact="http://tibia.net.pl/members/oskar.html" enabled="yes">
<config name="metinStone_conf"><![CDATA[
metinStoneStart = {
				pos_od = {x=1865,y=1123,z=13}, --lewy gorny rog
				pos_do = {x=1878,y=1131,z=13}, --prawy dolny rog
				time = 240, --pierwsze i kazde nastepne losowanie od momentu startu serwera, w minutach
				chance = 50 --szansa na wylosowanie kamulca
				}
metinArea = createCombatArea{
							{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0},
							{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
							{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0},
							{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
							{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
							{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
							{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1},
							{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
							{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
							{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
							{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0},
							{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
							{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}
							}
metinConfig = {
                ['fire stone'] = {
							[90] = {m = {'fire elemental','fire devil'}, n = {15, 20}},
							[80] = {m = {'fire elemental','fire devil','massive fire elemental'}, n = {16, 21}},
							[70] = {m = {'dragon','fire elemental'}, n = {17, 22}},
							[60] = {m = {'dragon','massive fire elemental','fire elemental'}, n = {18, 23}},
							[50] = {m = {'dragon','dragon lord','massive fire elemental'}, n = {19, 24}},
							[40] = {m = {'dragon lord','massive fire elemental','diabolic imp'}, n = {20, 25}},
							[30] = {m = {'diabolic imp','hellfire fighter','infernalist'}, n = {21, 26}},
							[20] = {m = {'diabolic imp','hellfire fighter','demon','infernalist'}, n = {22, 27}},
							[10] = {m = {'demon','hellfire fighter','infernalist','hellhound'}, n = {23, 28}},
							[5] = {m = {'demon','arch devil','hellhound'}, n = {24, 29}}},
                ['earth stone'] = {
							[90] = {m = {'slime','bonelord','earth elemental'}, n = {15, 20}},
							[80] = {m = {'bonelord','elder bonelord','earth elemental'}, n = {16, 21}},
							[70] = {m = {'massive earth elemental','bog raider','earth elemental'}, n = {17, 22}},
							[60] = {m = {'bog raider','medusa','wyvern'}, n = {18, 23}},
							[50] = {m = {'medusa','defiler','slime'}, n = {19, 24}},
							[40] = {m = {'medusa','serpent spawn','slime'}, n = {20, 25}},
							[30] = {m = {'serpent spawn','wyvern','defiler'}, n = {21, 26}},
							[20] = {m = {'defiler','medusa','slime'}, n = {22, 27}},
							[10] = {m = {'defiler','plaguesmith','phantasm'}, n = {23, 28}},
							[5] = {m = {'plaguesmith','defiler','abomination creature'}, n = {24, 29}}},
                ['ice stone'] = {
							[90] = {m = {'ice golem','crystal spider'}, n = {15, 20}},
							[80] = {m = {'ice golem','crystal spider','ice witch'}, n = {16, 21}},
							[70] = {m = {'crystal spider','ice witch','mammoth'}, n = {17, 22}},
							[60] = {m = {'crystal spider','frost dragon'}, n = {18, 23}},
							[50] = {m = {'crystal spider','frost dragon','ice witch'}, n = {19, 24}},
							[40] = {m = {'frost dragon','warlock'}, n = {20, 25}},
							[30] = {m = {'crystal spider','frost dragon','warlock'}, n = {21, 26}},
							[20] = {m = {'crystal spider','frost dragon','warlock','ice witch'}, n = {22, 27}},
							[10] = {m = {'frost dragon','warlock'}, n = {23, 28}},
							[5] = {m = {'frost dragon','warlock'}, n = {24, 29}}},
                }
metinCombat = {['fire stone'] = {COMBAT_FIREDAMAGE, CONST_ME_FIREAREA}, 
				['earth stone'] = {COMBAT_EARTHDAMAGE, CONST_ME_SMALLPLANTS}, 
				['ice stone'] = {COMBAT_ICEDAMAGE, CONST_ME_ICEATTACK}}
				
function getPercent(number, all)
    return (number / all) * 100
end

function choose(arg)
    return arg[math.random(#arg)]
end
 
function isWalkable(pos, creature, proj, pz)
if getTileThingByPos({x=pos.x,y=pos.y,z=pos.z,stackpos=0}).itemid == 0 then return false end
if getTopCreature(pos).uid > 0 and creature then return false end
if getTileInfo(pos).protection and pz then return false, true end
local n = not proj and 3 or 2
for i = 0, 255 do
	pos.stackpos = i
	local tile = getTileThingByPos(pos)
	if tile.itemid ~= 0 and not isCreature(tile.uid) then
		if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
			return false
		end
	end
end
return true
end

function checkPositions(fromPos, toPos, nb)
local pos = {x=math.random(fromPos.x,toPos.x), y=math.random(fromPos.y,toPos.y), z=math.random(fromPos.z,toPos.z)}
if isWalkable(pos, true, true, true) then
	return pos
end
return (nb < 50 and checkPositions(fromPos, toPos, nb+1) or false)
end

function setMetinStone(metinStoneStart, metinConfig)
local pos = checkPositions(metinStoneStart.pos_od, metinStoneStart.pos_do, 0)
if pos and math.random(100) <= metinStoneStart.chance then
	local stones = {}
	for k, _ in pairs(metinConfig) do
		table.insert(stones, k)
	end
	local stone = choose(stones)
	doBroadcastMessage(stone .. ' is summoned!')
	local mon = doCreateMonster(stone, pos, false)
	registerCreatureEvent(mon, 'metinStoneCombat')
end
return addEvent(setMetinStone, metinStoneStart.time * 60 * 1000, metinStoneStart, metinConfig)
end
]]></config>

<event type="combat" name="metinStoneCombat" event="script"><![CDATA[
domodlib('metinStone_conf')
function onCombat(cid, target)
if isMonster(target) then
	registerCreatureEvent(target, 'metinStoneCombat')
end
local t, vw = getPercent(getCreatureHealth(target), getCreatureMaxHealth(target)), metinConfig[getCreatureName(target):lower()]
if isMonster(target) and vw then
    if t > 90 then doCreatureSetStorage(target, 1000, 91) end
    for k, v in pairs(vw) 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(-3,3)
                s.y = pos.y + math.random(-3,3)
                doCreateMonster(choose(v.m), s, false)
            end
			doCombatAreaHealth(target, metinCombat[getCreatureName(target):lower()][1], pos, metinArea, -298, -917, metinCombat[getCreatureName(target):lower()][2])
            return doCreatureSetStorage(target, 1000, k)
        end
    end
end
return true
end
]]></event>

<globalevent name="metinStoneStart" type="start" event="script"><![CDATA[
domodlib("metinStone_conf")
function onStartup()
	return addEvent(setMetinStone, metinStoneStart.time * 60 * 1000, metinStoneStart, metinConfig)
end
]]></globalevent>

<event type="login" name="metinStoneLogin" event="buffer"><![CDATA[
	registerCreatureEvent(cid, 'metinStoneCombat')
]]></event>
</mod>

 

Créditos(Otland)

Oskar1121

Compre seus Scripts Agora totalmente seguro e de forma rápida, aceitamos também encomendas.

discord.gg/phJZeHa2k4

 

Projeto ATS (Naruto)

Informações Abaixo

Facebook

Youtube
Discord

 

Tutoriais / Conteúdos

Clique Aqui

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 519.6k

Informação Importante

Confirmação de Termo