Discussion on [Release] MillionaireLee (NPC) + DBScroll/MetScroll Functionality within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
Ok ive been trying to fix this but im just getting frustrated. When i get a scroll and thats the only thing in my inv. i click it and it gives me 10 mets(duh) but when i get another one and click it it says You dont have enough room. Anything i try doesnt work.
Any idea??
EDIT: Changed two '==' to '>=' as nTL3fTy pointed out, dunno what I was thinking Oh and for the people whom it's only taking 1 DB, This happened to me once but I can't seem to replicate it. It only happened when the DBs all had the same UID, which shouldn't have been in the first place...
Screenshot:
Code A: NpcTalk.cs:
Code:
case 5004: // MillionaireLee
{
if (LinkBack == 0)
{
Text("Hello! I can free up space in your inventory by packing 10 DragonBalls or Meteors into a DragonScroll or MeteorScroll!", CSocket);
Link("Make me a DragonScroll.", 1, CSocket);
Link("Make me a MeteorScroll.", 2, CSocket);
Link("No thanks!", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
int DBCount = 0;
List<int> DBList = new List<int>();
foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
{
if (Item.ItemID == 1088000)
{
DBCount++;
DBList.Add(Item.UID);
}
if (DBCount == 10)
break;
}
if (DBCount >= 10)
{
foreach (int DBUID in DBList)
{
CSocket.Client.Inventory.Remove(DBUID);
CSocket.Send(ConquerPacket.ItemUsage(DBUID, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(DBUID);
}
Struct.ItemInfo SubItem = new Struct.ItemInfo();
SubItem.Bless = SubItem.Enchant = SubItem.Position =
SubItem.Color = SubItem.Soc1 = SubItem.Soc2 = SubItem.Plus = 0;
SubItem.Dura = 1;
SubItem.ItemID = 720028;
SubItem.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(SubItem, CSocket);
while (!created)
{
SubItem.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(SubItem, CSocket);
}
CSocket.Client.Inventory.Add(SubItem.UID, SubItem);
CSocket.Send(ConquerPacket.ItemInfo(SubItem.UID, SubItem.ItemID, SubItem.Plus, SubItem.Bless, SubItem.Enchant, SubItem.Soc1, SubItem.Soc2, SubItem.Dura, SubItem.MaxDura, SubItem.Position, SubItem.Color));
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You obtained a DragonScroll!", Struct.ChatType.Top));
}
else
{
Text("Fool! How dare you try and rip me off!", CSocket);
Link("Sorry!", 255, CSocket);
End(CSocket);
break;
}
}
else if (LinkBack == 2)
{
int MetCount = 0;
List<int> MetList = new List<int>();
foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
{
if (Item.ItemID == 1088001)
{
MetCount++;
MetList.Add(Item.UID);
}
if (MetCount == 10)
break;
}
if (MetCount >= 10)
{
foreach (int DBUID in MetList)
{
CSocket.Client.Inventory.Remove(DBUID);
CSocket.Send(ConquerPacket.ItemUsage(DBUID, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(DBUID);
}
Struct.ItemInfo SubItem = new Struct.ItemInfo();
SubItem.Bless = SubItem.Enchant = SubItem.Position =
SubItem.Color = SubItem.Soc1 = SubItem.Soc2 = SubItem.Plus = 0;
SubItem.Dura = 1;
SubItem.ItemID = 720027;
SubItem.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(SubItem, CSocket);
while (!created)
{
SubItem.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(SubItem, CSocket);
}
CSocket.Client.Inventory.Add(SubItem.UID, SubItem);
CSocket.Send(ConquerPacket.ItemInfo(SubItem.UID, SubItem.ItemID, SubItem.Plus, SubItem.Bless, SubItem.Enchant, SubItem.Soc1, SubItem.Soc2, SubItem.Dura, SubItem.MaxDura, SubItem.Position, SubItem.Color));
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You obtained a MeteorScroll!", Struct.ChatType.Top));
}
else
{
Text("Fool! How dare you try and rip me off!", CSocket);
Link("Sorry!", 255, CSocket);
End(CSocket);
break;
}
}
break;
}
Code B: UseItem.cs:
Code:
#region Misc.
case 720027: // MeteorScroll
{
if (CSocket.Client.Inventory.Count <= 30)
{
for (int i = 0; i < 10; i++)
{
Struct.ItemInfo SubItem = new Struct.ItemInfo();
SubItem.Bless = SubItem.Enchant = SubItem.Position =
SubItem.Color = SubItem.Soc1 = SubItem.Soc2 = SubItem.Plus = 0;
SubItem.Dura = 1;
SubItem.ItemID = 1088001;
SubItem.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(SubItem, CSocket);
while (!created)
{
SubItem.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(SubItem, CSocket);
}
CSocket.Client.Inventory.Add(SubItem.UID, SubItem);
CSocket.Send(ConquerPacket.ItemInfo(SubItem.UID, SubItem.ItemID, SubItem.Plus, SubItem.Bless, SubItem.Enchant, SubItem.Soc1, SubItem.Soc2, SubItem.Dura, SubItem.MaxDura, SubItem.Position, SubItem.Color));
}
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You used the MeteorScroll and obtained 10 Meteors.", Struct.ChatType.Top));
}
else
{
Delete = false;
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Not enough space in inventory.", Struct.ChatType.Top));
}
break;
}
case 720028: // DragonScroll
{
if (CSocket.Client.Inventory.Count <= 30)
{
for (int i = 0; i < 10; i++)
{
Struct.ItemInfo SubItem = new Struct.ItemInfo();
SubItem.Bless = SubItem.Enchant = SubItem.Position =
SubItem.Color = SubItem.Soc1 = SubItem.Soc2 = SubItem.Plus = 0;
SubItem.Dura = 1;
SubItem.ItemID = 1088000;
SubItem.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(SubItem, CSocket);
while (!created)
{
SubItem.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(SubItem, CSocket);
}
CSocket.Client.Inventory.Add(SubItem.UID, SubItem);
CSocket.Send(ConquerPacket.ItemInfo(SubItem.UID, SubItem.ItemID, SubItem.Plus, SubItem.Bless, SubItem.Enchant, SubItem.Soc1, SubItem.Soc2, SubItem.Dura, SubItem.MaxDura, SubItem.Position, SubItem.Color));
}
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You used the DragonScroll and obtained 10 DragonBalls.", Struct.ChatType.Top));
}
else
{
Delete = false;
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Not enough space in inventory.", Struct.ChatType.Top));
}
break;
}
#endregion
Hope it helps,
Ahh! There we are, a nice, understandable release. I added that with ease and success. All releases should be as easy to understand as this. Unlike SOME out there.
Great code as expected. Now if i could get the whole adding npcs format down id almost be about ready to build a private server. I just cant seem to get the format down, i can place the npc, name the npc hell i can even make it look like the right npc, but when you click em... it does nothing.
bot stucked when executing StorageAuto functionality 01/08/2010 - Ragnarok Online - 0 Replies Hi All,
Basically i have two related problems
1) my character freezes on the storage map. However this only occurs when im autobuying something.
2) after the bot finish autobuying, autostorage is activated, it goes out of the map and get stuck/freeze.
issuing 'autostorage' makes it properly go to storage and store things. then it opens storage for the second time doing nothing. then tries to autosell even if i configured it to not autosell thereby producing error. now it freezes...
[TIP] EASY ALL WIN FOR ENGINES WITHOUT HOTKEY FUNCTIONALITY 08/25/2009 - Grand Chase - 25 Replies Guyz may technique ako para mabilis ang allwin
ndi na kailangan double click or enter para mag change ng value...
PARANG HOTKEY NA DIN
Requirements: Allwin Address.....
First..... double click mo muna ung value then change to 1.. sunod change value ulit sa 0......
[Release]MillionaireLee.sql For TQBinary 5065 07/15/2009 - CO2 PServer Guides & Releases - 5 Replies here is MillionaireLee.sql for TQBinary To Pack Mets And DBs
This Is Da Link MEGAUPLOAD - The leading online storage and file delivery service
if u liked my post plz hit thanks button
MetScroll Bugged? 06/29/2009 - CO2 Private Server - 2 Replies case 720027: // MeteorScroll
{
if (CSocket.Client.Inventory.Count <= 30)
{
for (int i = 0; i < 10; i++)
{
Struct.ItemInfo SubItem = new Struct.ItemInfo();
SubItem.Bless = SubItem.Enchant = SubItem.Position =
SubItem.Color = SubItem.Soc1 = SubItem.Soc2 = SubItem.Plus = 0;...
Omg Metscroll 04/09/2006 - Conquer Online 2 - 11 Replies right thats it im serverly pissed off i been hunting allllll day i get few +1 shit like that i get 10 mets i go to market turn mets into scroll and BAM no scroll someone gotta help me here before i kick the shit outa something lol