Hello everyone. I know no one uses loft anymore but i was bored so i picked up a loft source and figured how to use 2 npc into 1. The compose,enchant,bless npc and the +10 - +12 npc. I will release it even though i know no one will use it unless they have loft still or they have it and don't no how to do this. Ok here is the code.
Find Npc id 278 and replace the whole thing with this code
Oh and i made the prices for +10 - +12 300k - 900k cps so just change that to 100k - 300k cps like how it suppose to be.
Find Npc id 278 and replace the whole thing with this code
Next find again npc id 278 and replace the whole with this one just as you did the first timeQuote:
if (CurrentNPC == 278)
{
SendPacket(General.MyPackets.NPCSay("This machine here can compose, bless and enchant your items. Now can +10 - 12 your items thanks to Tobi at Upgrade section."));
SendPacket(General.MyPackets.NPCLink("Compose", 1));
SendPacket(General.MyPackets.NPCLink("Upgrade", 44));
SendPacket(General.MyPackets.NPCLink("Enchant", 2));
SendPacket(General.MyPackets.NPCLink("Bless", 10));
SendPacket(General.MyPackets.NPCLink("No Thanks", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
That it if you like it give me a thanks and if not please dont leave any negative comments or any type of flame please.Quote:
if (CurrentNPC == 278)//enchant bless and compose
{
if (Control == 1)
{
SendPacket(General.MyPackets.ETCPacket(MyChar, 1));
}
if (Control == 2)
{
SendPacket(General.MyPackets.NPCSay("Costs 100 Cps. After Enchanting Please Take Off The Item And Put It Back On. Which item do you want to Enchant?"));
SendPacket(General.MyPackets.NPCLink("Enchant helmet or earring.", 3));
SendPacket(General.MyPackets.NPCLink("Enchant necklace.", 4));
SendPacket(General.MyPackets.NPCLink("Enchant armor.", 5));
SendPacket(General.MyPackets.NPCLink("Enchant weapon.", 6));
SendPacket(General.MyPackets.NPCLink("Enchant ring, heavy ring.", 7));
SendPacket(General.MyPackets.NPCLink("Enchant boots.", 8));
SendPacket(General.MyPackets.NPCLink("Enchant shield.", 9));
SendPacket(General.MyPackets.NPCLink("Goodbye.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control >= 3 && Control <= 9)
{
if (MyChar.CPs >= 100)
{
string TheEquip = "";
if (Control == 3)
TheEquip = MyChar.Equips[1];
if (Control == 4)
TheEquip = MyChar.Equips[2];
if (Control == 5)
TheEquip = MyChar.Equips[3];
if (Control == 6)
TheEquip = MyChar.Equips[4];
if (Control == 7)
TheEquip = MyChar.Equips[6];
if (Control == 8)
TheEquip = MyChar.Equips[8];
if (Control == 9)
TheEquip = MyChar.Equips[5];
byte Pos = 0;
if (Control == 3)
Pos = 1;
if (Control == 4)
Pos = 2;
if (Control == 5)
Pos = 3;
if (Control == 6)
Pos = 4;
if (Control == 7)
Pos = 6;
if (Control == 8)
Pos = 8;
if (Control == 9)
Pos = 5;
MyChar.CPs -= 100;
string[] Splitter = TheEquip.Split('-');
uint ItemId = uint.Parse(Splitter[0]);
uint OldEnchant = uint.Parse(Splitter[3]);
uint NewEnchant = (uint)General.Rand.Next(1, 255);//fix
if (OldEnchant <= NewEnchant)
{
MyChar.GetEquipStats(Pos, true);
MyChar.Equips[Pos] = ItemId.ToString() + "-" + Splitter[1] + "-" + Splitter[2] + "-" + NewEnchant + "-" + Splitter[4] + "-" + Splitter[5];
MyChar.GetEquipStats(Pos, false);
MyChar.SendEquips(false);
SendPacket(General.MyPackets.AddItem((long)MyChar. Equips_UIDs[Pos], (int)ItemId, byte.Parse(Splitter[1]), byte.Parse(Splitter[2]), byte.Parse(Splitter[3]), byte.Parse(Splitter[4]), byte.Parse(Splitter[5]), Pos, 100, 100));
}
else
{
SendPacket(General.MyPackets.NPCSay("I'm Sorry The New enchantment was smaller than your old one."));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCLink("Ok...", 255));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
if (Control == 10)
{
SendPacket(General.MyPackets.NPCSay("Costs 100 Cps. After Blessing Please Take Off The Item And Put It Back On. Which item do you want to Bless?"));
SendPacket(General.MyPackets.NPCLink("Bless helmet or earring.", 13));
SendPacket(General.MyPackets.NPCLink("Bless necklace.", 14));
SendPacket(General.MyPackets.NPCLink("Bless armor.", 15));
SendPacket(General.MyPackets.NPCLink("Bless weapon.", 16));
SendPacket(General.MyPackets.NPCLink("Bless ring, heavy ring.", 17));
SendPacket(General.MyPackets.NPCLink("Bless boots.", 18));
SendPacket(General.MyPackets.NPCLink("Bless shield.", 19));
SendPacket(General.MyPackets.NPCLink("Goodbye.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control >= 13 && Control <= 19)
{
if (MyChar.CPs >= 100)
{
string TheEquip = "";
if (Control == 13)
TheEquip = MyChar.Equips[1];
if (Control == 14)
TheEquip = MyChar.Equips[2];
if (Control == 15)
TheEquip = MyChar.Equips[3];
if (Control == 16)
TheEquip = MyChar.Equips[4];
if (Control == 17)
TheEquip = MyChar.Equips[6];
if (Control == 18)
TheEquip = MyChar.Equips[8];
if (Control == 19)
TheEquip = MyChar.Equips[5];
byte Pos = 0;
if (Control == 13)
Pos = 1;
if (Control == 14)
Pos = 2;
if (Control == 15)
Pos = 3;
if (Control == 16)
Pos = 4;
if (Control == 17)
Pos = 6;
if (Control == 18)
Pos = 8;
if (Control == 19)
Pos = 5;
MyChar.CPs -= 100;
string[] Splitter = TheEquip.Split('-');
uint ItemId = uint.Parse(Splitter[0]);
uint NewBless = (uint)General.Rand.Next(1, 7);
uint OldBless = uint.Parse(Splitter[2]);
if (NewBless > OldBless)
{
MyChar.GetEquipStats(Pos, true);
MyChar.Equips[Pos] = ItemId.ToString() + "-" + Splitter[1] + "-" + NewBless + "-" + Splitter[3] + "-" + Splitter[4] + "-" + Splitter[5];
MyChar.GetEquipStats(Pos, false);
MyChar.SendEquips(false);
SendPacket(General.MyPackets.AddItem((long)MyChar. Equips_UIDs[Pos], (int)ItemId, byte.Parse(Splitter[1]), byte.Parse(Splitter[2]), byte.Parse(Splitter[3]), byte.Parse(Splitter[4]), byte.Parse(Splitter[5]), Pos, 100, 100));
}
else
{
SendPacket(General.MyPackets.NPCSay("I'm Sorry The New Bless was smaller than your old one."));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCLink("Ok...", 255));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
if (Control == 20)
{
SendPacket(General.MyPackets.NPCSay("Costs 300000 Cps. After Plusing Please Take Off The Item And Put It Back On. Which item do you want to +10?"));
SendPacket(General.MyPackets.NPCLink("+10 my helmet or earring.", 21));
SendPacket(General.MyPackets.NPCLink("+10 my necklace.", 22));
SendPacket(General.MyPackets.NPCLink("+10 my armor.", 23));
SendPacket(General.MyPackets.NPCLink("+10 my weapon.", 24));
SendPacket(General.MyPackets.NPCLink("+10 my ring, heavy ring.", 25));
SendPacket(General.MyPackets.NPCLink("+10 my boots.", 26));
SendPacket(General.MyPackets.NPCLink("+10 my shield.", 27));
SendPacket(General.MyPackets.NPCLink("Goodbye.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control >= 21 && Control <= 27)
{
if (MyChar.CPs >= 300000)
{
string TheEquip = "";
if (Control == 21)
TheEquip = MyChar.Equips[1];
if (Control == 22)
TheEquip = MyChar.Equips[2];
if (Control == 23)
TheEquip = MyChar.Equips[3];
if (Control == 24)
TheEquip = MyChar.Equips[4];
if (Control == 25)
TheEquip = MyChar.Equips[6];
if (Control == 26)
TheEquip = MyChar.Equips[8];
if (Control == 27)
TheEquip = MyChar.Equips[5];
byte Pos = 0;
if (Control == 21)
Pos = 1;
if (Control == 22)
Pos = 2;
if (Control == 23)
Pos = 3;
if (Control == 24)
Pos = 4;
if (Control == 25)
Pos = 6;
if (Control == 26)
Pos = 8;
if (Control == 27)
Pos = 5;
string[] Splitter = TheEquip.Split('-');
uint ItemId = uint.Parse(Splitter[0]);
uint NewPlus = 10;
uint OldPlus = uint.Parse(Splitter[1]);
uint ReqPlus = 9;
if (OldPlus == ReqPlus)
{
MyChar.CPs -= 300000;
MyChar.GetEquipStats(Pos, true);
MyChar.Equips[Pos] = ItemId.ToString() + "-" + NewPlus + "-" + Splitter[2] + "-" + Splitter[3] + "-" + Splitter[4] + "-" + Splitter[5];
MyChar.GetEquipStats(Pos, false);
MyChar.SendEquips(false);
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
SendPacket(General.MyPackets.AddItem((long)MyChar. Equips_UIDs[Pos], (int)ItemId, byte.Parse(Splitter[1]), byte.Parse(Splitter[2]), byte.Parse(Splitter[3]), byte.Parse(Splitter[4]), byte.Parse(Splitter[5]), Pos, 100, 100));
}
else
{
SendPacket(General.MyPackets.NPCSay("I'm Sorry Your Item Is Not +9"));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCLink("Ok...", 255));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
if (Control == 28)
{
SendPacket(General.MyPackets.NPCSay("Costs 600000 Cps. After Plusing Please Take Off The Item And Put It Back On. Which item do you want to +11?"));
SendPacket(General.MyPackets.NPCLink("+11 my helmet or earring.", 29));
SendPacket(General.MyPackets.NPCLink("+11 my necklace.", 30));
SendPacket(General.MyPackets.NPCLink("+11 my armor.", 31));
SendPacket(General.MyPackets.NPCLink("+11 my weapon.", 32));
SendPacket(General.MyPackets.NPCLink("+11 my ring, heavy ring.", 33));
SendPacket(General.MyPackets.NPCLink("+11 my boots.", 34));
SendPacket(General.MyPackets.NPCLink("+11 my shield.", 35));
SendPacket(General.MyPackets.NPCLink("Goodbye.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control >= 29 && Control <= 35)
{
if (MyChar.CPs >= 600000)
{
string TheEquip = "";
if (Control == 29)
TheEquip = MyChar.Equips[1];
if (Control == 30)
TheEquip = MyChar.Equips[2];
if (Control == 31)
TheEquip = MyChar.Equips[3];
if (Control == 32)
TheEquip = MyChar.Equips[4];
if (Control == 33)
TheEquip = MyChar.Equips[6];
if (Control == 34)
TheEquip = MyChar.Equips[8];
if (Control == 35)
TheEquip = MyChar.Equips[5];
byte Pos = 0;
if (Control == 29)
Pos = 1;
if (Control == 30)
Pos = 2;
if (Control == 31)
Pos = 3;
if (Control == 32)
Pos = 4;
if (Control == 33)
Pos = 6;
if (Control == 34)
Pos = 8;
if (Control == 35)
Pos = 5;
string[] Splitter = TheEquip.Split('-');
uint ItemId = uint.Parse(Splitter[0]);
uint NewPlus = 11;
uint OldPlus = uint.Parse(Splitter[1]);
uint ReqPlus = 10;
if (OldPlus == ReqPlus)
{
MyChar.CPs -= 600000;
MyChar.GetEquipStats(Pos, true);
MyChar.Equips[Pos] = ItemId.ToString() + "-" + NewPlus + "-" + Splitter[2] + "-" + Splitter[3] + "-" + Splitter[4] + "-" + Splitter[5];
MyChar.GetEquipStats(Pos, false);
MyChar.SendEquips(false);
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
SendPacket(General.MyPackets.AddItem((long)MyChar. Equips_UIDs[Pos], (int)ItemId, byte.Parse(Splitter[1]), byte.Parse(Splitter[2]), byte.Parse(Splitter[3]), byte.Parse(Splitter[4]), byte.Parse(Splitter[5]), Pos, 100, 100));
}
else
{
SendPacket(General.MyPackets.NPCSay("I'm Sorry Your Item Is Not +10"));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCLink("Ok...", 255));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
if (Control == 36)
{
SendPacket(General.MyPackets.NPCSay("Costs 900000 Cps. After Plusing Please Take Off The Item And Put It Back On. Which item do you want to +12?"));
SendPacket(General.MyPackets.NPCLink("+12 my helmet or earring.", 37));
SendPacket(General.MyPackets.NPCLink("+12 my necklace.", 38));
SendPacket(General.MyPackets.NPCLink("+12 my armor.", 39));
SendPacket(General.MyPackets.NPCLink("+12 my weapon.", 40));
SendPacket(General.MyPackets.NPCLink("+12 my ring, heavy ring.", 41));
SendPacket(General.MyPackets.NPCLink("+12 my boots.", 42));
SendPacket(General.MyPackets.NPCLink("+12 my shield.", 43));
SendPacket(General.MyPackets.NPCLink("Goodbye.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control >= 37 && Control <= 43)
{
if (MyChar.CPs >= 900000)
{
string TheEquip = "";
if (Control == 37)
TheEquip = MyChar.Equips[1];
if (Control == 38)
TheEquip = MyChar.Equips[2];
if (Control == 39)
TheEquip = MyChar.Equips[3];
if (Control == 40)
TheEquip = MyChar.Equips[4];
if (Control == 41)
TheEquip = MyChar.Equips[6];
if (Control == 42)
TheEquip = MyChar.Equips[8];
if (Control == 43)
TheEquip = MyChar.Equips[5];
byte Pos = 0;
if (Control == 37)
Pos = 1;
if (Control == 38)
Pos = 2;
if (Control == 39)
Pos = 3;
if (Control == 40)
Pos = 4;
if (Control == 41)
Pos = 6;
if (Control == 42)
Pos = 8;
if (Control == 43)
Pos = 5;
string[] Splitter = TheEquip.Split('-');
uint ItemId = uint.Parse(Splitter[0]);
uint NewPlus = 12;
uint OldPlus = uint.Parse(Splitter[1]);
uint ReqPlus = 11;
if (OldPlus == ReqPlus)
{
MyChar.CPs -= 900000;
MyChar.GetEquipStats(Pos, true);
MyChar.Equips[Pos] = ItemId.ToString() + "-" + NewPlus + "-" + Splitter[2] + "-" + Splitter[3] + "-" + Splitter[4] + "-" + Splitter[5];
MyChar.GetEquipStats(Pos, false);
MyChar.SendEquips(false);
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
SendPacket(General.MyPackets.AddItem((long)MyChar. Equips_UIDs[Pos], (int)ItemId, byte.Parse(Splitter[1]), byte.Parse(Splitter[2]), byte.Parse(Splitter[3]), byte.Parse(Splitter[4]), byte.Parse(Splitter[5]), Pos, 100, 100));
}
else
{
SendPacket(General.MyPackets.NPCSay("I'm Sorry Your Item Is Not +11"));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCLink("Ok...", 255));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
if (Control == 44)
{
SendPacket(General.MyPackets.NPCSay("Hello "+ MyChar.Name +". I am the Improved Composer."));
SendPacket(General.MyPackets.NPCSay("I can make your +9 item into a +10 and on until you have a full set of +12 items."));
SendPacket(General.MyPackets.NPCSay("Witch do you want to do?"));
SendPacket(General.MyPackets.NPCLink("+10 My Gear", 20));
SendPacket(General.MyPackets.NPCLink("+11 My Gear", 28));
SendPacket(General.MyPackets.NPCLink("+12 My Gear", 36));
SendPacket(General.MyPackets.NPCLink("Later Man.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
Oh and i made the prices for +10 - +12 300k - 900k cps so just change that to 100k - 300k cps like how it suppose to be.