[Question]About Mob_drop_item.txt

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Avatar utilizator
Nazox
Nivel 1

Nivel 1
Mesaje: 106
Membru din: 28 Iul 2015, 00:45
Server: metin2.es
Regat: Chunjo
Aprecieri: 170  
Mulţumiri: 22  
Discord: Copiază ID
Medalii

*Problemă/Întrebare: mob_drop_item.txt
Tipologie server: PvM Hard
*Resursă folosită: none
*ServerFiles utilizat: myself
*Syserr:none
Poză:none
*Detalii suplimentare:
Hello people, the first, i hope all goes well, i write this post, because I wanted to know if someone could answer me a few questions about the mob_drop_item.txt.

The question is that I was wondering if there is any way to make a random object drop from +0 to +9 in the mob_drop, without having to add the same id repeatedly, that is, for example this is the normal mob_drop:

Group Nazox
{
Type drop
Mob 171
1 11290 1 20
2 11295 1 10
3 11299 1 10
}

and my idea:
Group Nazox
{
Type drop
Mob 171
1 11290~99 1 20
}
or something else xD!, I also wanted to know if there is any way to balance the drop, since if for example I place a 50% drop, when killing many mobs that item falls many times, but if on the contrary I place a normal number like 2 it hardly falls, as shown Could I do so that it does not fall too much so fast or so little, that is to say in equilibrium? I know this would be via source, but any ideas?
Ultima oară modificat 13 Dec 2020, 00:32 de către Nazox, modificat 1 dată în total.
Avatar utilizator
Petrinel
Nivel 4

Nivel 4
Mesaje: 539
Membru din: 31 Mar 2018, 00:58
Server: Fara
Regat: Jinno
Aprecieri: 319  
Mulţumiri: 101  
Discord: Copiază ID
Medalii

[EN]You have 24 hours to edit your topic according to the posting model, otherwise it will go in the archive.
probleme/model-postare-intrebare-sau-pr ... 67107.html
Imagine
Afișează semnătura
Avatar utilizator
Kidro
Membru Club

Membru Club
Mesaje: 2487
Membru din: 29 Aug 2019, 16:49
Aprecieri: 331  
Mulţumiri: 5190  
Discord: Copiază ID
Medalii

You can do this so easy with a quest.
Pentru acest mesaj, Kidro for the post:
Nazox
Avatar utilizator
Nazox
Nivel 1

Nivel 1
Mesaje: 106
Membru din: 28 Iul 2015, 00:45
Server: metin2.es
Regat: Chunjo
Aprecieri: 170  
Mulţumiri: 22  
Discord: Copiază ID
Medalii

Kidro scrie: ↑17 Dec 2020, 13:31 You can do this so easy with a quest.
You can give me a little idea? And thanks for your answer, but if I have to do that with every mob ...

[ Postat de pe Android ] Imagine
Avatar utilizator
Kidro
Membru Club

Membru Club
Mesaje: 2487
Membru din: 29 Aug 2019, 16:49
Aprecieri: 331  
Mulţumiri: 5190  
Discord: Copiază ID
Medalii

That's an little exemple.

quest cufar_farm begin
state start begin
function antibug()
pc.setqf("anti_bug", get_time()+5)
end
when 20505.kill begin
if pc.getqf("anti_bug") <= get_time() then
npc.kill()
local s=number(1,15)
if s == 1 then
game.drop_item_with_ownership(49960,1)
cufar_farm.antibug()
elseif s == 2 then
game.drop_item_with_ownership(49920,1)
cufar_farm.antibug()
elseif s == 3 then
game.drop_item_with_ownership(49930,1)
cufar_farm.antibug()
elseif s == 4 then
game.drop_item_with_ownership(49940,1)
cufar_farm.antibug()
elseif s == 5 then
game.drop_item_with_ownership(49950,1)
cufar_farm.antibug()
elseif s == 6 then
game.drop_item_with_ownership(96230,1)
cufar_farm.antibug()
elseif s == 7 then
game.drop_item_with_ownership(96220,1)
cufar_farm.antibug()
elseif s == 8 then
game.drop_item_with_ownership(96200,1)
cufar_farm.antibug()
elseif s == 9 then
game.drop_item_with_ownership(96210,1)
cufar_farm.antibug()
elseif s == 10 then
game.drop_item_with_ownership(96240,1)
cufar_farm.antibug()
elseif s == 11 then
chat("Imi pare rau dar, nu ai primit nimic.")
cufar_farm.antibug()
elseif s == 12 then
chat("Imi pare rau dar, nu ai primit nimic.")
cufar_farm.antibug()
elseif s == 13 then
chat("Imi pare rau dar, nu ai primit nimic.")
cufar_farm.antibug()
elseif s == 14 then
chat("Imi pare rau dar, nu ai primit nimic.")
cufar_farm.antibug()
elseif s == 15 then
chat("Imi pare rau dar, nu ai primit nimic.")
cufar_farm.antibug()
end
end
end
end
end
Pentru acest mesaj, Kidro for the post:
Nazox
Avatar utilizator
Nazox
Nivel 1

Nivel 1
Mesaje: 106
Membru din: 28 Iul 2015, 00:45
Server: metin2.es
Regat: Chunjo
Aprecieri: 170  
Mulţumiri: 22  
Discord: Copiază ID
Medalii

Kidro scrie: ↑18 Dec 2020, 00:03 That's an little exemple.

quest cufar_farm begin
state start begin
function antibug()
pc.setqf("anti_bug", get_time()+5)
end
when 20505.kill begin
if pc.getqf("anti_bug") <= get_time() then
npc.kill()
local s=number(1,15)
if s == 1 then
game.drop_item_with_ownership(49960,1)
cufar_farm.antibug()
elseif s == 2 then
game.drop_item_with_ownership(49920,1)
cufar_farm.antibug()
elseif s == 3 then
game.drop_item_with_ownership(49930,1)
cufar_farm.antibug()
elseif s == 4 then
game.drop_item_with_ownership(49940,1)
cufar_farm.antibug()
elseif s == 5 then
game.drop_item_with_ownership(49950,1)
cufar_farm.antibug()
elseif s == 6 then
game.drop_item_with_ownership(96230,1)
cufar_farm.antibug()
elseif s == 7 then
game.drop_item_with_ownership(96220,1)
cufar_farm.antibug()
elseif s == 8 then
game.drop_item_with_ownership(96200,1)
cufar_farm.antibug()
elseif s == 9 then
game.drop_item_with_ownership(96210,1)
cufar_farm.antibug()
elseif s == 10 then
game.drop_item_with_ownership(96240,1)
cufar_farm.antibug()
elseif s == 11 then
chat("Imi pare rau dar, nu ai primit nimic.")
cufar_farm.antibug()
elseif s == 12 then
chat("Imi pare rau dar, nu ai primit nimic.")
cufar_farm.antibug()
elseif s == 13 then
chat("Imi pare rau dar, nu ai primit nimic.")
cufar_farm.antibug()
elseif s == 14 then
chat("Imi pare rau dar, nu ai primit nimic.")
cufar_farm.antibug()
elseif s == 15 then
chat("Imi pare rau dar, nu ai primit nimic.")
cufar_farm.antibug()
end
end
end
end
end
Perfect, it throws everything at random, but the bad thing about this method is that it does not appear in the render target, and it always drops at 100% but thanks.
Avatar utilizator
amvenitsavadcv
Nivel 3

Nivel 3
Mesaje: 413
Membru din: 28 Iul 2018, 11:25
Server: da
Aprecieri: 44  
Mulţumiri: 156  
Medalii

You can make the rate of the drop like this:
quest cufar_farm begin
state start begin
function antibug()
pc.setqf("anti_bug", get_time()+5)
end
when 20505.kill begin
if pc.getqf("anti_bug") <= get_time() then
npc.kill()
local s=number(1,15)
if s == 1 then
local s1 = number(1,100)
if s1>70 then
game.drop_item_with_ownership(49960,1)
cufar_farm.antibug()
end
And now you have a 30% percent of the drop.

And yeah, this will not apear in render drop.
But you can make the drop from source.
Look at the drop from random stone and adapt for what do you want.
Pentru acest mesaj, amvenitsavadcv for the post:
Nazox
Avatar utilizator
Nazox
Nivel 1

Nivel 1
Mesaje: 106
Membru din: 28 Iul 2015, 00:45
Server: metin2.es
Regat: Chunjo
Aprecieri: 170  
Mulţumiri: 22  
Discord: Copiază ID
Medalii

amvenitsavadcv scrie: ↑22 Dec 2020, 14:51 You can make the rate of the drop like this:
quest cufar_farm begin
state start begin
function antibug()
pc.setqf("anti_bug", get_time()+5)
end
when 20505.kill begin
if pc.getqf("anti_bug") <= get_time() then
npc.kill()
local s=number(1,15)
if s == 1 then
local s1 = number(1,100)
if s1>70 then


game.drop_item_with_ownership(49960,1)
cufar_farm.antibug()
end
And now you have a 30% percent of the drop.

And yeah, this will not apear in render drop.
But you can make the drop from source.
Look at the drop from random stone and adapt for what do you want.
Can I do any drop using source ?, I had heard something like this but I would not know what file it is in, could you give me an idea to start looking ?, Thanks for all your help.

[ Postat de pe Android ] Imagine
Avatar utilizator
amvenitsavadcv
Nivel 3

Nivel 3
Mesaje: 413
Membru din: 28 Iul 2018, 11:25
Server: da
Aprecieri: 44  
Mulţumiri: 156  
Medalii

In char.cpp
Function void CHARACTER::SetProto(const CMob * pkMob)
Here you can set the drop, you can call the function who set the drop.
And one example with the drops is this:
	if (IsStone())
	{
		DetermineDropMetinStone();
	}
Here you set to drop only for stone.
And the function is :
void CHARACTER::DetermineDropMetinStone()
{
	
	const int METIN_STONE_NUM = 14;
	
	static DWORD c_adwMetin[METIN_STONE_NUM] =
	{
		28030, // 60
		28031,
		28032,
		28033,
		28034,
		28035,
		28036,
		28037,
		28038,
		28039,
		28040,
		28041,
		28042,
		28043,
	};

	DWORD stone_num = GetRaceNum();
	int idx = std::lower_bound(aStoneDrop, aStoneDrop + STONE_INFO_MAX_NUM, stone_num) - aStoneDrop;
	if (idx >= STONE_INFO_MAX_NUM || aStoneDrop[idx].dwMobVnum != stone_num)
	{
		m_dwDropMetinStone = 0;
	}
	else
	{
		const SStoneDropInfo& info = aStoneDrop[idx];
		m_bDropMetinStonePct = info.iDropPct;
		{
			m_dwDropMetinStone = c_adwMetin[number(0, METIN_STONE_NUM - 1)];
			int iGradePct = number(1, 100);

			for (int iStoneLevel = 0; iStoneLevel < STONE_LEVEL_MAX_NUM; iStoneLevel++)
			{
				int iLevelGradePortion = info.iLevelPct[iStoneLevel];

				if (iGradePct <= iLevelGradePortion)
				{
					break;
				}
				else
				{
					iGradePct -= iLevelGradePortion;
					m_dwDropMetinStone += 100; // 돌 +a -> +(a+1)이 될때마다 100씩 증가
				}
			}
		}
	}
}
You need to put the function in char.h
And you cand edit the drop rate from constants.cpp
Here:
const SStoneDropInfo aStoneDrop[STONE_INFO_MAX_NUM] =
Pentru acest mesaj, amvenitsavadcv for the post:
Nazox
Avatar utilizator
Nazox
Nivel 1

Nivel 1
Mesaje: 106
Membru din: 28 Iul 2015, 00:45
Server: metin2.es
Regat: Chunjo
Aprecieri: 170  
Mulţumiri: 22  
Discord: Copiază ID
Medalii

amvenitsavadcv scrie: ↑23 Dec 2020, 15:26 In char.cpp
Function void CHARACTER::SetProto(const CMob * pkMob)
Here you can set the drop, you can call the function who set the drop.
And one example with the drops is this:
	if (IsStone())
	{
		DetermineDropMetinStone();
	}
Here you set to drop only for stone.
And the function is :
void CHARACTER::DetermineDropMetinStone()
{
	
	const int METIN_STONE_NUM = 14;
	
	static DWORD c_adwMetin[METIN_STONE_NUM] =
	{
		28030, // 60
		28031,
		28032,
		28033,
		28034,
		28035,
		28036,
		28037,
		28038,
		28039,
		28040,
		28041,
		28042,
		28043,
	};

	DWORD stone_num = GetRaceNum();
	int idx = std::lower_bound(aStoneDrop, aStoneDrop + STONE_INFO_MAX_NUM, stone_num) - aStoneDrop;
	if (idx >= STONE_INFO_MAX_NUM || aStoneDrop[idx].dwMobVnum != stone_num)
	{
		m_dwDropMetinStone = 0;
	}
	else
	{
		const SStoneDropInfo& info = aStoneDrop[idx];
		m_bDropMetinStonePct = info.iDropPct;
		{
			m_dwDropMetinStone = c_adwMetin[number(0, METIN_STONE_NUM - 1)];
			int iGradePct = number(1, 100);

			for (int iStoneLevel = 0; iStoneLevel < STONE_LEVEL_MAX_NUM; iStoneLevel++)
			{
				int iLevelGradePortion = info.iLevelPct[iStoneLevel];

				if (iGradePct <= iLevelGradePortion)
				{
					break;
				}
				else
				{
					iGradePct -= iLevelGradePortion;
					m_dwDropMetinStone += 100; // 돌 +a -> +(a+1)이 될때마다 100씩 증가
				}
			}
		}
	}
}
You need to put the function in char.h
And you cand edit the drop rate from constants.cpp
Here:
const SStoneDropInfo aStoneDrop[STONE_INFO_MAX_NUM] =
Thanks, but now i have this error if i edit mob_drop:
1228 21:39:15791 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15793 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15794 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15796 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15798 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15799 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15842 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15851 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15874 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15877 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15915 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15918 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15923 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15926 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15929 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15957 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15961 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15981 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15992 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:15996 :: Invalid AppendItem height 39 stepSize 37
1228 21:39:16000 :: Invalid AppendItem height 39 stepSize 37
I search on mob_drop_item 15793,94 etc but i don't have anything else, and i detect the problem is in this mob:
Group µÎ¸ñ´Á´ë -from here down does not work
{
Type drop
Mob 902
1 123 1 3 --Espada Larga
2 3093 1 3 --Hacha Gigante
3 5043 1 3 --Campana Fuente
4 5033 1 3 --Campana Jade
5 3103 1 3 --Esp. 12 Espiritus
6 73 1 3 --
7 15183 1 3 --Botas Nimbu
8 11233 1 3 --Arm. Placas de Leon
9 11433 1 3 --Traje Hormiga Roja
10 11633 1 3 --Arm. Placas Fantasma
11 11833 1 3 --Ropaje Amoroso
12 17183 1 3 --Pend. Amatista
13 17204 1 1 --Pend. Lagrima Cielo
14 17143 1 3 --Pend. de Oro Blanco
15 16143 1 3 --Collar de Oro Blanco
16 50009 1 0.9 --Llave de Plata
17 50008 1 0.9 --Llave de Oro
18 30083 1 0.7 --Medicina desconocida +
19 30009 1 1 --Medicina desconocida
}
Group µÎ¸ñ´Á´ë
{
Type drop
Mob xxx
....etc etc etc i have tabs
i try to compare my old mob_drop but i have the same, only change % :/
Închis
Răspunsuri
7
Vizualizări
441
Răspunsuri
8
Vizualizări
1190
Răspunsuri
1
Vizualizări
185

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 6 vizitatori