Ir para conteúdo

Featured Replies

Postado
  • Autor

Consegui era o creaturescripts que eu estava utilizando, não entendi o porque funciona para alguns scripts e para esse não, porem troquei e funcionou.

segue o exemplo que estou utilizando agora:

local bosses = {
	['three-headed black dragon'] =  {position = Position(32355, 31647, 1), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Fury},
	--['wrath of the emperor'] = {position = Position(33094, 31087, 15), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Wrath},
	--['scorn of the emperor'] = {position = Position(33095, 31110, 15), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Scorn},
	--['spite of the emperor'] = {position = Position(33048, 31111, 15), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Spite},
}

function onKill(creature, target)
	local targetMonster = target:getMonster()
	if not targetMonster then
		return true
	end

	local bossConfig = bosses[targetMonster:getName():lower()]
	if not bossConfig then
		return true
	end

	Game.setStorageValue(bossConfig.storage, 0)
	local tile = Tile(bossConfig.position)
	if tile then
		local thing = tile:getItemById(1423)
		if thing then
			thing:transform(1421)
		end
	end
	return true
end

 

  • Respostas 6
  • Visualizações 533
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado
2 horas atrás, Treyff disse:

Consegui era o creaturescripts que eu estava utilizando, não entendi o porque funciona para alguns scripts e para esse não, porem troquei e funcionou.

segue o exemplo que estou utilizando agora:


local bosses = {
	['three-headed black dragon'] =  {position = Position(32355, 31647, 1), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Fury},
	--['wrath of the emperor'] = {position = Position(33094, 31087, 15), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Wrath},
	--['scorn of the emperor'] = {position = Position(33095, 31110, 15), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Scorn},
	--['spite of the emperor'] = {position = Position(33048, 31111, 15), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Spite},
}

function onKill(creature, target)
	local targetMonster = target:getMonster()
	if not targetMonster then
		return true
	end

	local bossConfig = bosses[targetMonster:getName():lower()]
	if not bossConfig then
		return true
	end

	Game.setStorageValue(bossConfig.storage, 0)
	local tile = Tile(bossConfig.position)
	if tile then
		local thing = tile:getItemById(1423)
		if thing then
			thing:transform(1421)
		end
	end
	return true
end

 

só esqueceu de dar o rep em quem ajudou

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo