Quote:
Originally Posted by PeTe Ninja
lol you could make it so much easiser to create drops that it will be like 1 line or less of codes ( and not a long line )
|
he is using Coemu so no he can't
and i think anyother source wont be that easy neither coz he wanna do some special drops for certain maps or certain events ,so here is how i dd it , may be u have another easiest way (if so i would appreciate f u let me know about it) but that is my way anyhow
1-Find
Code:
if(Calculation.PercentSuccess(27)) //Drop an item
you will c after it
Code:
int Quality = Nano.Rand.Next(3, 6);
int Soc1 = 0;
int Soc2 = 0;
int Bless = 0;
int Plus = 0;
2-Add after them this line
Code:
int ItemID = 0; int Quality = 0;
u will find 2 errors saying that the ItemId and Quality can't be declared at the next positions , if this happens then remove the word
int from both of them (not from the line i put up there but from the lines will have errors)
3-now r8 after that line add this
Code:
if (SpecialDrop())//For Quests
{
ItemID = SpecialDrop(1);
}
and the check quality lines after that put them between else { statements } like this
Code:
else
{
Quality = Nano.Rand.Next(3, 6);
if (Calculation.PercentSuccess(2))
Plus = 1;
if (Calculation.PercentSuccess(2))
Quality = 7;
if (Calculation.PercentSuccess(1))
Quality = 8;
if (Calculation.PercentSuccess(.578))
Quality = 9;
ItemID = Calculation.Item(Level, Quality);
}
4-add this 2 functions at the bottom of same class
A-this one to check if it is a special drops , u can add here all maps,mobs and events u want
Code:
public bool SpecialDrop()
{
if (Map == 2021 || Map == 2022 || Map == 2023 || Map == 2024) return true;
else return false;
}
B-here u determine what item should drop u can also add what u want at some maps or events as u wish , i made the Type as 0=Drop Money and 1=Drop an item
Code:
public int SpecialDrop(byte Type)
{
int ItemId = 0;
if (Type == 0)//Money
{
if (Map == 2021) ItemId = Nano.Rand.Next(1000, 10000);
else if (Map == 2022) ItemId = Nano.Rand.Next(2000, 50000);
}
else //Item
{
switch (Map)
{
case 2021://DisCity Stage1
{
byte Chances = (byte)Nano.Rand.Next(100);
if (Chances < 10) ItemId = 723085;//SoulStone
else if (Chances < 40) ItemId = 1002050;
else if (Chances < 70) ItemId = 1002040;
else ItemId = 1050002;
break;
}
case 2022://DisCity Stage2
{
byte Chances = (byte)Nano.Rand.Next(100);
if (Chances < 33) ItemId = 1002050;
else if (Chances < 66) ItemId = 1002040;
else ItemId = 1050002;
break;
}
case 2023://DisCity Stage3
{
byte Chances = (byte)Nano.Rand.Next(250);
if (Chances < 3) ItemId = 725016;//NightDevil
break;
}
}
}
return ItemId;
}