if (CurrentNPC == 278)
{
SendPacket(General.MyPackets.NPCSay("This machine here can compose, bless and enchant your items. Appearently it can only compose, because it is broken."));
SendPacket(General.MyPackets.NPCLink("Compose", 1));
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());
}
Now Search Again For :
if (CurrentNPC == 1010)
And Under Add:
Code:
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());
}
}
}
}
[Release] Bless NPC (5165) 08/28/2010 - CO2 PServer Guides & Releases - 12 Replies Hi hi!
Just change the npc id and it will work fine : D
#region Ethereal
case ID HERE:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("I can set your itens bless, for some tortoise gens super."));
[Release]Composer,Enchant,Bless with +10 - +12 function 03/04/2010 - CO2 PServer Guides & Releases - 5 Replies 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
Next find again npc id 278 and replace the whole with this one just as you did the first time
[Release] Bless Skill (LuckyTime) 07/26/2009 - CO2 PServer Guides & Releases - 79 Replies Go here: http://www.elitepvpers.com/forum/co2-pserver-discus sions-questions/203219-release-extremely-basic-but -working-bugless-c-source.html
Its good, use it!
Its your guys' lucky day, here is the BASE code for Bless and LuckyTime.
Created 100% by myself, and yes parts were leaked on E*Pvp.