Ir para conteúdo

Featured Replies

Postado

Bom dia pessoal da TK, infelizmente o forum já não é o mesmo aparentemente. Mas mesmo assim vou fazer esse pedido na esperança que um bom membro possa me dar suporte.

De um tempo para cá um servidor que estou montando (NTO-NARUTIBIA) deu um bug, na qual ele possui o Heart System + NiwDeath System.

O NiwDeath System é um sistema que após o jogador morrer por player ou monstro o corpo dele dropa a skin de acordo com sua vocation.

Heart System é um sistema que um player matar outro player é dropado um morgaroth heart (No meu caso) com o nome do jogador, level dele e quem o matou e o level de quem o matou. (deixarei prints explicando melhor)

 

O problema que estou tendo é o seguinte. Ao morrer para jogadores em x1, o jogador que no caso ganhou o x1 só recebe o coraçao. E o corpo não é dropado ou seja no chão só fica sangue. Na distro não aparece erros ou algo do tipo. Já tentei tirar o Heart system para ver se era ele o motivo do erro (Talvez um conflito) mas nada disso as vezes dropa as vezes não.
Se alguem puder dar uma mão para fazer os 2 system funcionarem perfeitamente juntos serei grato. Sei que mexer com script não é facil pois estou aprendendo linguagens de programação e é de deixar louco mesmo :facepalm: Obrigado, aguardo respostas. SS abaixo.

 

Spoiler

MORTE POR PLAYER - ERRO58d7e06785649_2monster.thumb.png.310021a1530ba3921f02a44b0b724a69.png

Spoiler

MORTE POR MONSTRO - NORMAL58d7dffc15050_1monster.thumb.png.d5ff2b9cfb3b354a4ac511265d00e2b4.png

 

  • Respostas 12
  • Visualizações 1.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • tava analisando isso hoje, mas nao vi com calma, vou ver aqui e deixo a resposta para você amanha. Caso eu ache a solução posto aqui no tópico. Obrigado pelo suporte.

  • @Juantibiano entendo, é realmente um pena caso tenhamos editado muita coisa na distro.  Que bom que conseguiu resolver, eu particularmente nunca passei por erros assim.   Era estranho, 

Posted Images

Postado
  • Autor
4 horas atrás, KotZletY disse:

@Juantibiano poste ambos os scripts.

Spoiler

NIWDEATH

local table = {
[1] = 2813, --- [1] Vocation 2882 == ID Do Corpse
[2] = 2813,
[3] = 2813,
[4] = 2813,
[5] = 2813,
[6] = 2813,
[7] = 2813,
[8] = 2813,
[9] = 2813,
[10] = 2813,
[11] = 2813,
[12] = 2813,
[13] = 2813,
[14] = 2813,
[15] = 2813,
[16] = 2813,
[17] = 2807, ---Sasuke Uchiha ----
[18] = 2807,
[19] = 2807,
[20] = 2807,
[21] = 2807,
[22] = 2807,
[23] = 2807,
[24] = 2807,
[25] = 2807,
[26] = 2807,
[257] = 2807,
[27] = 2890, --- Rock Lee ---
[28] = 2890,
[29] = 2890,
[30] = 2890,
[31] = 2890,
[32] = 2890,
[33] = 2890,
[34] = 2890,
[35] = 2890,
[36] = 2890,
[37] = 2890,
[38] = 2890,
[39] = 2890, --- Shikamaru ---
[40] = 2890,
[41] = 2890,
[42] = 2890,
[43] = 2890,
[44] = 2890,
[45] = 2890,
[46] = 2899, --- Neji ---
[47] = 2899,
[48] = 2899,
[49] = 2899,
[50] = 2899,
[51] = 2899,
[52] = 2899,
[53] = 2899,
[54] = 2899,
[55] = 2829, ---Tenten ---
[56] = 2829,
[57] = 2829,
[58] = 2829,
[59] = 2829,
[60] = 2829,
[61] = 2829,
[62] = 2829,
[63] = 2829,
[64] = 2816, --- Hinata ---
[65] = 2816,
[66] = 2816,
[67] = 2816,
[68] = 2816,
[69] = 2816,
[70] = 2816,
[71] = 2816,
[72] = 2816,
[73] = 2816,
[74] = 2816,
[75] = 2816,
[76] = 2852, --- KaKaShi HaTaKi ---
[77] = 2852,
[78] = 2852,
[79] = 2852,
[80] = 2852,
[81] = 2852,
[82] = 2852,
[83] = 2852,
[84] = 2932, --- KiLLeR Bee ---
[85] = 2932,
[86] = 2932,
[87] = 2932,
[88] = 2932,
[89] = 2932,
[90] = 2932,
[91] = 2932,
[92] = 2932,
[93] = 2932,
[94] = 2932,
[95] = 2932,
[96] = 2917, --- SaKuRa HaRuNo ---
[97] = 2917,
[98] = 2917,
[99] = 2917,
[100] = 2917,
[102] = 2917,
[103] = 2917,
[104] = 2917,
[105] = 2917,
[106] = 2917,
[107] = 2917,
[108] = 2917,
[109] = 2917,
[110] = 2917,
[101] = 2917,
[111] = 2887, --- GaaRa Do DeSerTo ---
[112] = 2887,
[113] = 2887,
[114] = 2887,
[115] = 2887,
[116] = 2887,
[117] = 2887,
[118] = 2887,
[119] = 2887,
[120] = 2887,
[121] = 2887,
[122] = 2887,
[123] = 2891, --- Kiba InoZuKa ---
[124] = 2891,
[125] = 2891,
[126] = 2891,
[127] = 2891,
[128] = 2891,
[129] = 2891,
[130] = 2891,
[131] = 2891,
[132] = 2898, --- ItaChI UchiHa ---
[133] = 2898,
[134] = 2898,
[135] = 2898,
[136] = 2898,
[137] = 2898,
[138] = 2898,
[139] = 2898,
[140] = 2898,
[141] = 2898,
[142] = 2888, --- ToBi UchiHa ---
[143] = 2888,
[144] = 2888,
[145] = 2888,
[146] = 2888,
[147] = 2888,
[148] = 2888,
[149] = 2888,
[150] = 2888,
[151] = 2888,
[152] = 2888,
[153] = 2888,
[154] = 2912, --- MiNaTo
[155] = 2912,
[156] = 2912,
[157] = 2912,
[158] = 2912,
[159] = 2912,
[160] = 2912,
[161] = 2912,
[162] = 2912,
[163] = 2912,
[164] = 3281, --- Madara Uchiha ---
[165] = 3281,
[166] = 3281,
[167] = 3281,
[168] = 3281,
[169] = 3281,
[170] = 3281,
[171] = 3281,
[172] = 3281,
[173] = 3281,
[174] = 3281,
[175] = 2922, --- TsuNaDe ---
[176] = 2922,
[177] = 2922,
[178] = 2922,
[179] = 2922,
[180] = 2922,
[181] = 2922,
[182] = 2922,
[183] = 2922,
[184] = 2922,
[185] = 2922,
[186] = 2907, --- HaShiRaMa 
[187] = 2907,
[188] = 2907,
[189] = 2907,
[190] = 2907,
[191] = 2907,
[192] = 2907,
[193] = 2937, --- NiDaiMe ---
[194] = 2937,
[195] = 2937,
[196] = 2937,
[197] = 2937,
[198] = 2937,
[199] = 2937,
[200] = 2940, --- NaGaTo ---
[201] = 2940,
[202] = 2940,
[203] = 2940,
[204] = 2940,
[205] = 2940,
[206] = 2940,
[207] = 2940,
[208] = 2940,
[209] = 2940,
[210] = 2940,
[211] = 2841, --- Yamato ---
[212] = 2841,
[213] = 2841,
[214] = 2841,
[215] = 2841,
[216] = 2841,
[217] = 2932, --- RaiKaGe 
[218] = 2932,
[219] = 2932,
[220] = 2932,
[221] = 2932,
[222] = 2932,
[223] = 2889, --- KiSaMe ---
[224] = 2889,
[225] = 2889,
[226] = 2889,
[227] = 2889,
[228] = 2889,
[229] = 2889,
[230] = 2889,
[231] = 2894, --- TeMaRi ---
[232] = 2894,
[233] = 2894,
[234] = 2894,
[235] = 2894,
[236] = 2894,
[237] = 2894,
[238] = 2894,
[238] = 2894,
    

 

}

local function transform(pos, id, voc)
local item = getTileItemById(pos, id)
if item and item.uid > 1 then
doTransformItem(item.uid, table[voc])
doDecayItem(item.uid or 0)
end
end

function onDeath(cid, corpse)
if not isPlayer(cid) or not table[getPlayerVocation(cid)] then return true end
addEvent(transform, 15, getThingPos(cid), corpse.itemid, getPlayerVocation(cid))
return true
end

 

Spoiler

HEART SYSTEM

function onDeath(cid, corpse, deathList)

function getHeartFromNivel(cid)

local t = {

[{100,800}] = 5943,

[{2001,3000}] = 2353,

[{3001,4000}] = 1685,

[{4001,5000}] = 11361,

[{5001,6000}] = 10552,

[{6001,math.huge}] = 10577

}

for var, ret in pairs(t) do

if getPlayerLevel(cid) >= var[1] and getPlayerLevel(cid) <= var[2] then

k  = ret

end

end

return k

end

if isPlayer(cid) and getPlayerLevel(cid) >= 100 and isPlayer(deathList[1]) then

local item = getHeartFromNivel(cid)

doItemSetAttribute(doPlayerAddItem(deathList[1],item, 1), "description", "This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by "..getPlayerName(deathList[1])..".")

if getPlayerLevel(cid) >= 100 then

end

doSendMagicEffect(getPlayerPosition(deathList[1]), 12)

end

return true

end
 

Ambos registrados no login.lua

Postado

@Juantibiano troque seu heart por esse:

local t = {
	[{100,800}] = 5943,
	[{2001,3000}] = 2353,
	[{3001,4000}] = 1685,
	[{4001,5000}] = 11361,
	[{5001,6000}] = 10552,
	[{6001,math.huge}] = 10577
}

local function getHeartFromNivel(uid)
	local k = false
	for var, ret in pairs(t) do
		if getPlayerLevel(uid) >= var[1] and getPlayerLevel(uid) <= var[2] then
			k  = ret
		end
	end
	return k
end

function onDeath(cid, corpse, deathList)
	if isPlayer(deathList[1]) and getPlayerLevel(cid) >= 100 then
		local item = getHeartFromNivel(cid)
		if item then
			doItemSetAttribute(doPlayerAddItem(deathList[1],item, 1), "description", "This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by "..getPlayerName(deathList[1])..".")
			doSendMagicEffect(getPlayerPosition(deathList[1]), 12)
		end
	end
	return true
end

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

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.8k

Informação Importante

Confirmação de Termo