Good day members !

04/23/2019 12:09 iordach3#1
Hi there. I am using a tofan 3d source version, but i've manage to downgrade it to the 2d version. Now I am trying to stop the forging to upgrade items after level 130. I understand that the are that I need to change it's this one :

case MsgDataArray.DragonBallUpgrade:
{
if (compose.Mode == MsgDataArray.DragonBallUpgrade)
{
Item = client.GetItem(compose[0]);
if (Item != null)
{
pos = ItemPosition(Item.ID);
if (pos == MsgItemInfo.Bottle || pos == MsgItemInfo.Garment || pos == MsgItemInfo.LeftWeaponAccessory || pos == MsgItemInfo.RightWeaponAccessory || pos == MsgItemInfo.SteedArmor) //mohsen.. i'm remove crop
return;


Minors = new MsgItemInfo[compose.Count - 2];
for (int i = 0; i < compose.Count - 2; i++)
{
if (!client.Inventory.TryGetItem(compose.GetItem(i + 1), out Minors[i]))
return;
else
if (Minors[i].UID == Item.UID) return;
}

byte counts_itsm = (byte)Minors.Length;
if (Item.ID % 10 < 9)
{
var itemdetail = Database.ConquerItemInformation.BaseInformations[Item.ID];
byte cost = (byte)(itemdetail.Level / 30);
cost += (byte)((Item.ID % 10) / 2);

if (Minors.Length < cost)
{
byte rand = (byte)Kernel.Random.Next(1, 100);
if (rand < 45)
{
if (Item.ID % 10 < 5)
Item.ID += 5 - Item.ID % 10;
Item.ID++;
Network.GamePackets.MsgItem iu = new Network.GamePackets.MsgItem(true);
iu.UID = Item.UID;
iu.dwParam = 1;
iu.Action = (uint)Network.GamePackets.MsgItem.Mode.DragonBallU pgrade;
client.Send(iu.ToArray());

Item.Mode = Game.Enums.ItemMode.Update;
Database.ConquerItemTable.UpdateItemID(Item, client);
Item.Send(client);
client.LoadItemStats();
client.Equipment.UpdateEntityPacket();
}
else
{
Network.GamePackets.MsgItem iu = new Network.GamePackets.MsgItem(true);
iu.UID = Item.UID;
iu.dwParam = 2;
iu.Action = (uint)Network.GamePackets.MsgItem.Mode.DragonBallU pgrade;
client.Send(iu.ToArray());

Item.Mode = Game.Enums.ItemMode.Update;
Database.ConquerItemTable.UpdateItemID(Item, client);
Item.Send(client);
client.LoadItemStats();
client.Equipment.UpdateEntityPacket();
}

}
else
{
if (Item.ID % 10 < 5)
Item.ID += 5 - Item.ID % 10;
Item.ID++;

Network.GamePackets.MsgItem iu = new Network.GamePackets.MsgItem(true);
iu.UID = Item.UID;
iu.dwParam = 1;
iu.Action = (uint)Network.GamePackets.MsgItem.Mode.DragonBallU pgrade;
client.Send(iu.ToArray());

Item.Mode = Game.Enums.ItemMode.Update;
Database.ConquerItemTable.UpdateItemID(Item, client);
Item.Send(client);
client.LoadItemStats();
client.Equipment.UpdateEntityPacket();
}

foreach (var Ite in Minors)
client.Inventory.Remove(Ite, Enums.ItemUse.Remove);
}

}
}
break;
}

If anyone has an idea what I need to change in this code to stop the item upgrading after level 130. Sorry, but I am new do this type of coding.

Cheer's for all you're help and sorry if I've bored you ! Have a nice day colleagues.
04/23/2019 17:57 Spirited#2
What in God's name is a tofan 3d source... Also, do you mean 3.0 and 2.0 as in the client versions and not dimensions? Conquer is a 2.5D game. Sounds like cancer and complete incompetence from whatever community you downloaded that from. Not to mention that it's based on a leaked private source from a member in our community. When you say you're new to programming... Have you ever write a line of code before? Do you know how to edit C# code and compile it? What are we working with here? Honestly, there's not much we can really do since you downloaded this from another community. We're missing context.
04/23/2019 18:46 Super Aids#3
delete this