i've been trying to add a npc that can trade ur item as example lvl 15 super +4 tro armor and hten u can choose the class u want for example warrior it will give a lvl 15 sup +4 warrior armor and takes away ur old +4 item
i wanna do this for all items but i really don't know how i can make it like that
If you look at the ItemTypes, you will see patterns in the IDs, you can then use those patterns to change it.
Also look into the Reborn code, that can probably help you.
Edit:
Have a look at this code, just made it by looking at the armor patterns, haven't tested it since I'm unable to. Note: It uses a different NPC System, so you can't just copy & paste, but you can get sorta how to do it.
Code:
if (NPCID == 99999)//Armor Swaper
{
byte J = Char.Job;
int Change = 0;
if (Control == 0)
{
Say("Would you like to swap your armor for another classes?");
Link("Trojan's.", 1);
Link("Warrior's.", 2);
Link("Taoist's.", 3);
Link("Archer's.", 4);
Face(20);
Finish();
}
if (Control >= 1 && Control <= 4)
{
if (Control == 1)//Make Trojan
{
if (J >= 10 && J <= 15)
{
Say("You're already that class!");
Link("Sorry.", 255);
Face(20);
Finish();
}
if (J >= 20 && J <= 25)
Change = 1000;
if (J >= 40 && J <= 45)
Change = 3000;
if (J >= 100 && J <= 145)
Change = 4000;
}
else if (Control == 2)//Make Warrior
{
if (J >= 20 && J <= 25)
{
Say("You're already that class!");
Link("Sorry.", 255);
Face(20);
Finish();
}
if (J >= 10 && J <= 15)
Change = -1000;
if (J >= 40 && J <= 45)
Change = 2000;
if (J >= 100 && J <= 145)
Change = 3000;
}
else if (Control == 3)//Make Taoist
{
if (J >= 10 && J <= 15)
Change = -4000;
if (J >= 20 && J <= 25)
Change = -3000;
if (J >= 40 && J <= 45)
Change = -1000;
if (J >= 100 && J <= 145)
{
Say("You're already that class!");
Link("Sorry.", 255);
Face(20);
Finish();
}
}
else if (Control == 4)//Make Archer
{
if (J >= 10 && J <= 15)
Change = -2000;
if (J >= 20 && J <= 25)
Change = -1000;
if (J >= 40 && J <= 45)
{
Say("You're already that class!");
Link("Sorry.", 255);
Face(20);
Finish();
}
if (J >= 100 && J <= 145)
Change = 1000;
}
string[] Armor_Sp = Char.Equips[3].Split('-');//Get the Armors full ID split up
string Armor_ID = Armor_Sp[0];//Armor ID
string Armor_Details = Armor_Sp[1] + "-" + Armor_Sp[2] + "-" + Armor_Sp[3] + "-" + Armor_Sp[4] + "-" + Armor_Sp[5];//Detials; +, -, HP, etc
uint F_Armor = Convert.ToUInt32(Convert.ToUInt32(Armor_ID) + Change);//Change the ID to the new ID
Char.RemoveItem(Char.Equips_UIDs[3]);//Delete old Armor
Char.AddItem(F_Armor + "-" + Armor_Details, 3, (uint)General.Rand.Next(346623472));//Add New Armor
//NOTE: Change the "3" to "0" if you want to add the item to your inventory instead of equiping it.
//Send Packets =P
World.UpdateSpawn(Char);
Char.SendEquips(true);
Say("There's your new armor!");
Link("Thanks!.", 255);
Face(20);
Finish();
}
}
Yikes... Sending a lot of unneeded packets there :\
Code:
Char.RemoveItem(Char.Equips_UIDs[3]);//Delete old Armor
Char.AddItem(F_Armor + "-" + Armor_Details, 3, (uint)General.Rand.Next(346623472));//Add New Armor
//NOTE: Change the "3" to "0" if you want to add the item to your inventory instead of equiping it.
//Send Packets =P
//Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 26, Char.GetStat())); Don't need this, unless you updated their statflags, which for all I can see you didn't.
//Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 12, ulong.Parse(Char.Avatar.ToString() + Char.Model.ToString()))); Didn't change model either.
World.UpdateSpawn(Char);
//World.SpawnMeToOthers(Char, false); Don't need this, its the same as UpdateSpawn pretty much.
//World.SpawnOthersToMe(Char, false); Why do you need to get the entites around them when you change armor??
Char.SendEquips(true);
Say("There's your new armor!");
Link("Thanks!.", 255);
Face(20);
Finish();
Yikes... Sending a lot of unneeded packets there :\
Code:
Char.RemoveItem(Char.Equips_UIDs[3]);//Delete old Armor
Char.AddItem(F_Armor + "-" + Armor_Details, 3, (uint)General.Rand.Next(346623472));//Add New Armor
//NOTE: Change the "3" to "0" if you want to add the item to your inventory instead of equiping it.
//Send Packets =P
//Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 26, Char.GetStat())); Don't need this, unless you updated their statflags, which for all I can see you didn't.
//Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 12, ulong.Parse(Char.Avatar.ToString() + Char.Model.ToString()))); Didn't change model either.
World.UpdateSpawn(Char);
//World.SpawnMeToOthers(Char, false); Don't need this, its the same as UpdateSpawn pretty much.
//World.SpawnOthersToMe(Char, false); Why do you need to get the entites around them when you change armor??
Char.SendEquips(true);
Say("There's your new armor!");
Link("Thanks!.", 255);
Face(20);
Finish();
Item Change 03/15/2010 - World of Warcraft - 1 Replies Moin,
habe da mal eine Frage ist es noch möglich mit dem Patch 3.3.2 einen Item Swap zu machen?
Zum Beispiel den Style von den Season 7 Schulter in Season 8 zu machen?
Damals ging es ganz einfach mit Glitchy nun meldet es bei mir nur noch einen Fehler bei dem Prozess. Wäre ganz Nett wenn mir da wer fixx helfen könnte und Auskunft geben könnte.
lg
i want to change name of item 07/18/2009 - CO2 Private Server - 4 Replies i want to change the name of item but when i open itemtype.dat its open with wrong language help me plz
change name from item? 03/11/2008 - Conquer Online 2 - 3 Replies hello ^^
can any1 tell me how can i change the name from a item on the ground?also not the name in inventory/wh/shop only on the ground ^^'
i will the name change from all ref and uni names to the same name ._.