|
You last visited: Today at 07:38
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.
05/31/2009, 19:34
|
#16
|
elite*gold: 0
Join Date: Dec 2007
Posts: 226
Received Thanks: 55
|
this is working for me with the shoppingmall.
just replace it
Code:
public static void ItemBuy(byte[] Data, ClientSocket CSocket)
{
int ID = PacketProcessor.ReadLong(Data, 8);
int Amount = PacketProcessor.ReadLong(Data, 20);
if (CSocket.Client.Inventory.Count == 40)
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Your inventory is full.", Struct.ChatType.Top));
return;
}
string Shop = System.IO.File.ReadAllText("Shop.dat");
if (itemexist(Convert.ToString(ID), Shop))
{
[COLOR="Red"]//Struct.ItemInfo Item = new Struct.ItemInfo();[/COLOR]
if (Nano.Items.ContainsKey(ID))
{
Struct.ItemData NewItem = Nano.Items[ID];
if (NewItem.CPCost > 0)
{
for (int i = 0; i < Amount; i++)
{
if (CSocket.Client.CPs >= NewItem.CPCost)
{
[COLOR="Lime"]Struct.ItemInfo Item = new Struct.ItemInfo();[/COLOR]
Handler.CPs(NewItem.CPCost * -1, CSocket);
Item.ItemID = NewItem.ID;
Item.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(Item, CSocket);
while (!created)
{
Item.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(Item, CSocket);
}
CSocket.Client.Inventory.Add(Item.UID, Item);
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, 0, 0, 0, 0, 0, 0, 0, 0, 0));
}
else
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] You do not have enough CPs.", Struct.ChatType.Top));
}
}
}
else if (NewItem.Cost > 0)
{
if (CSocket.Client.Money >= NewItem.Cost)
{
[COLOR="lime"]Struct.ItemInfo Item = new Struct.ItemInfo();[/COLOR] Handler.Money(NewItem.Cost * -1, CSocket);
Item.ItemID = NewItem.ID;
Item.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(Item, CSocket);
while (!created)
{
Item.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(Item, CSocket);
}
CSocket.Client.Inventory.Add(Item.UID, Item);
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, 0, 0, 0, 0, 0, 0, 0, 0, 0));
}
else
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] You do not have enough money.", Struct.ChatType.Top));
}
}
else
{
[COLOR="lime"]Struct.ItemInfo Item = new Struct.ItemInfo();[/COLOR]
Item.ItemID = NewItem.ID;
Item.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(Item, CSocket);
while (!created)
{
Item.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(Item, CSocket);
}
CSocket.Client.Inventory.Add(Item.UID, Item);
CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, 0, 0, 0, 0, 0, 0, 0, 0, 0));
}
}
}
else
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Item does not exist in Shop.dat", Struct.ChatType.Top));
}
}
the npc will eat all dbs
why?
Code:
[COLOR="Red"]foreach (int DBUID in DBList)[/COLOR]
{
CSocket.Client.Inventory.Remove(DBUID);
CSocket.Send(ConquerPacket.ItemUsage(DBUID, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(DBUID);
}
think a bit and you'll be able to change that 
good luck
|
|
|
05/31/2009, 19:40
|
#17
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
It just takes away all DBs now not just 10...
|
|
|
05/31/2009, 23:02
|
#18
|
elite*gold: 0
Join Date: Mar 2009
Posts: 56
Received Thanks: 31
|
I did some further testing. When you buy the dbs as a bulk. it only takes one. same goes for th mets. but if you buy one at a time. it will take all the dbs/mets and packs them.
|
|
|
05/31/2009, 23:08
|
#19
|
elite*gold: 0
Join Date: Dec 2007
Posts: 226
Received Thanks: 55
|
#edite
zerocelli updated his post
|
|
|
05/31/2009, 23:28
|
#20
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Reason why is; I updated the code in my server but forgot to update the code in my post. Sorry guys.
And, it's because the Shopping Mall Fix you guys use that it won't work if you buy 10 dbs at once, I fixed my mall myself so it doesn't give you 10 DB's with the same UID, thus you actually delete them all..
|
|
|
06/01/2009, 17:20
|
#21
|
elite*gold: 0
Join Date: Oct 2008
Posts: 76
Received Thanks: 47
|
the only problem for me that it take all db or all mets is there any ideas?
|
|
|
06/01/2009, 18:10
|
#22
|
elite*gold: 0
Join Date: Dec 2007
Posts: 226
Received Thanks: 55
|
yes you need the new npc he updated it after i send mine so i deleted that  . just recopy the new one
what he added is a break after the list has 10 dbs
good luck
|
|
|
06/01/2009, 19:34
|
#23
|
elite*gold: 0
Join Date: Sep 2008
Posts: 92
Received Thanks: 21
|
thx good work dude!
|
|
|
06/05/2009, 20:22
|
#24
|
elite*gold: 0
Join Date: Nov 2008
Posts: 38
Received Thanks: 18
|
Hmm i got a error can some 1 help me? It says The Name Delete Doesnt Exist in the current contest :/
|
|
|
06/05/2009, 21:14
|
#25
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
@PurePwnage23;
In compile? You might wanna check your 'using' includes at the top, though mouse-over n it will fix it for you in most cases.
|
|
|
06/06/2009, 07:46
|
#26
|
elite*gold: 0
Join Date: Apr 2009
Posts: 220
Received Thanks: 29
|
this works on tq binarys 5065?
|
|
|
06/06/2009, 09:00
|
#27
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Erm, It's for the CoEmu V2 source.
|
|
|
06/06/2009, 21:30
|
#28
|
elite*gold: 0
Join Date: Apr 2009
Posts: 220
Received Thanks: 29
|
****
Ok thanks
|
|
|
06/16/2009, 02:01
|
#29
|
elite*gold: 0
Join Date: Feb 2008
Posts: 154
Received Thanks: 53
|
Quote:
Originally Posted by Zeroxelli
Erm, It's for the CoEmu V2 source.
|
but someone use your codes and edit them to work on TQ binary v5065 can u help us to make it work on TQ binary ??please
|
|
|
06/16/2009, 05:32
|
#30
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
**** no, I'll never support the use of the binaries.
|
|
|
 |
|
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 07:38.
|
|