|
You last visited: Today at 09:25
Advertisement
[Release] MillionaireLee (NPC) + DBScroll/MetScroll Functionality
Discussion on [Release] MillionaireLee (NPC) + DBScroll/MetScroll Functionality within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
06/16/2009, 06:57
|
#31
|
elite*gold: 0
Join Date: May 2009
Posts: 1
Received Thanks: 0
|
Hey Guys How To Add Please Explain
|
|
|
06/25/2009, 10:32
|
#32
|
elite*gold: 0
Join Date: Jun 2009
Posts: 1
Received Thanks: 0
|
Where Exactly I Should But That Codes ?
|
|
|
07/01/2009, 09:31
|
#33
|
elite*gold: 0
Join Date: Jun 2009
Posts: 140
Received Thanks: 12
|
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??
|
|
|
07/02/2009, 02:24
|
#34
|
elite*gold: 0
Join Date: Jul 2009
Posts: 1
Received Thanks: 0
|
thanks man
|
|
|
07/06/2009, 05:19
|
#35
|
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 99
|
Quote:
Originally Posted by Zeroxelli
Dunno if this was already released, but oh well.
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.
|
|
|
07/15/2009, 04:53
|
#36
|
elite*gold: 19
Join Date: Nov 2007
Posts: 248
Received Thanks: 30
|
thanks
|
|
|
07/15/2009, 07:06
|
#37
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
You're welcome.
|
|
|
09/22/2009, 00:20
|
#38
|
elite*gold: 0
Join Date: Apr 2007
Posts: 69
Received Thanks: 3
|
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.
|
|
|
09/22/2009, 00:32
|
#39
|
elite*gold: 0
Join Date: Apr 2009
Posts: 782
Received Thanks: 458
|
something si wrong with the code : X
|
|
|
10/18/2009, 00:56
|
#40
|
elite*gold: 0
Join Date: Oct 2009
Posts: 1
Received Thanks: 0
|
Quote:
Originally Posted by mohammed2007
i want help please add me in u email 
|
thank you man . im mohammed
|
|
|
10/18/2009, 03:06
|
#41
|
elite*gold: 0
Join Date: Oct 2009
Posts: 66
Received Thanks: 11
|
Very nice release.
|
|
|
12/29/2009, 19:31
|
#42
|
elite*gold: 0
Join Date: May 2008
Posts: 99
Received Thanks: 35
|
As of Late I'm glad your coding works. It's doin wonders for my C# Studying.
|
|
|
 |
|
Similar Threads
|
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
|
All times are GMT +1. The time now is 09:26.
|
|