multi-page warehouse

03/06/2011 19:00 niquel65#1
I am looking for a way to make the warehouse hold more items

I know nothing about c or c++ programming but i am aware that somewhere there should be a variable that if I find the correct varriable that should give me multipage since the warehouseman in market already has but only one page holds items

I am using NewestCOServer

here is a copy of the warehouse.cs that I have

Quote:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewestCOServer.PacketHandling
{
public class Warehouse
{
public static void Handle(Main.GameClient GC, byte[] Data)
{
if (!GC.MyChar.WHOpen && GC.MyChar.WHPassword != "0")
return;

uint NPC = BitConverter.ToUInt32(Data, 4);
uint IUID = BitConverter.ToUInt32(Data, 12);
byte Type = Data[8];

ArrayList Warehouse = null;

switch (NPC)
{
case 8: { Warehouse = GC.MyChar.Warehouses.TCWarehouse; break; }
case 10012: { Warehouse = GC.MyChar.Warehouses.PCWarehouse; break; }
case 10028: { Warehouse = GC.MyChar.Warehouses.ACWarehouse; break; }
case 10011: { Warehouse = GC.MyChar.Warehouses.DCWarehouse; break; }
case 10027: { Warehouse = GC.MyChar.Warehouses.BIWarehouse; break; }
case 44: { Warehouse = GC.MyChar.Warehouses.MAWarehouse; break; }
case 4101: { Warehouse = GC.MyChar.Warehouses.SCWarehouse; break; }
}

if (Type == 1)
{
try
{
if (Warehouse.Count < Warehouse.Capacity)
{
Game.Item I = GC.MyChar.FindInvItem(IUID);
if (I.ID != 0)
{
GC.MyChar.RemoveItem(I);
Warehouse.Add(I);
GC.AddSend(Packets.AddWHItem(GC.MyChar, (ushort)NPC, I));
return;
}
else
GC.AddSend(Packets.ItemPacket(IUID, 0, 3));
}
}
catch { }
return;
}
else if (Type == 2)
{
try
{
if (GC.MyChar.Inventory.Count < 40)
{
Game.Item I = new Game.Item();
foreach (Game.Item II in Warehouse)
if (II.UID == IUID)
I = II;

if (I.ID != 0 && I.UID != 0)
{
GC.AddSend(Packets.RemoveWHItem(GC.MyChar, (ushort)NPC, I));
Warehouse.Remove(I);
GC.MyChar.AddItem(I); return;
}
}
}
catch { return; }
return;
}

switch (NPC)
{
case 8: { GC.MyChar.Warehouses.TCWarehouse = Warehouse; break; }
case 10012: { GC.MyChar.Warehouses.PCWarehouse = Warehouse; break; }
case 10028: { GC.MyChar.Warehouses.ACWarehouse = Warehouse; break; }
case 10011: { GC.MyChar.Warehouses.DCWarehouse = Warehouse; break; }
case 10027: { GC.MyChar.Warehouses.BIWarehouse = Warehouse; break; }
case 44: { GC.MyChar.Warehouses.MAWarehouse = Warehouse; break; }
case 4101: { Warehouse = GC.MyChar.Warehouses.SCWarehouse; break; }
}
GC.AddSend(Packets.SendWarehouse(GC.MyChar, (ushort)NPC));
}
}
}
Any suggestions on where to look for my answer would be helpful if I am wrong about the variable then I may need more help then I thought
03/06/2011 20:05 Iron~Man#2
First of all It's not C or c++, It's C#
Multi Page is client based, and only market has it on 5165 as I know.
To Open Multi-Page in Market, Search for MAWarehouse = new ArrayList(20); in Character.cs.
Change that to MAWarehouse = new ArrayList(40);

I gotta mention, This will probably Bug The characters, so please make new ones when you do this fix.
03/06/2011 21:30 pro4never#3
Simple solution...

Upgrade to a new patch. All warehouses have 3 pages (I think) and work perfectly fine.
03/07/2011 05:30 niquel65#4
Quote:
Originally Posted by Iron~Man View Post
First of all It's not C or c++, It's C#
Multi Page is client based, and only market has it on 5165 as I know.
To Open Multi-Page in Market, Search for MAWarehouse = new ArrayList(20); in Character.cs.
Change that to MAWarehouse = new ArrayList(40);

I gotta mention, This will probably Bug The characters, so please make new ones when you do this fix.
Thank you this worked perfectly for the warehouse version. I stand corrected on the c# although I am still not sure as to what is the differences in the three.

Also, I did not notice any problem with old chr after making change but not saying chr won't be bugged later

Quote:
Originally Posted by pro4never View Post
Simple solution...

Upgrade to a new patch. All warehouses have 3 pages (I think) and work perfectly fine.
Seems when I try to use new versions it don't want to work and am still having problems getting the elite-coemu working :(
03/07/2011 08:30 Syst3m_W1z4rd#5
Quote:
Originally Posted by niquel65 View Post

Seems when I try to use new versions it don't want to work and am still having problems getting the elite-coemu working :(
You have to update you packet structures.
[Only registered and activated users can see links. Click Here To Register...]
03/07/2011 11:25 _Emme_#6
If you don't even see the difference between C, C++ and C#, you should do some reading before jumping into game developing.
03/07/2011 13:32 Iron~Man#7
Quote:
Originally Posted by pro4never View Post
Simple solution...

Upgrade to a new patch. All warehouses have 3 pages (I think) and work perfectly fine.
Even if he does, the Warehouse saving on newestcoserver isn't proper.
It saves only 20 slots.
03/07/2011 22:50 niquel65#8
Quote:
Originally Posted by EmmeTheCoder View Post
If you don't even see the difference between C, C++ and C#, you should do some reading before jumping into game developing.

Truthfully I am not into game development I travel for a living and a lot of times I stay in places with no internet connection or lousy connections 30.00 hotel rooms (rare but can be found still)

I am just using as a way to play a game I like to play alone and when no internet
03/08/2011 19:01 Iron~Man#9
Quote:
Originally Posted by niquel65 View Post
Truthfully I am not into game development I travel for a living and a lot of times I stay in places with no internet connection or lousy connections 30.00 hotel rooms (rare but can be found still)

I am just using as a way to play a game I like to play alone and when no internet
I strongly NOT Recommend Conquer for that.
Try some Real Games. Need For Speed Hot Pursuit, GTA 4 etc etc. They're big as fuck, but it's worth.
03/09/2011 08:34 niquel65#10
More a matter of what kind of games you like and those games have no interest for me
03/10/2011 11:25 Syst3m_W1z4rd#11
Who wants to play Conquer offline?

YES IM LEVEL 130 I WILL GO TO JAIL AND PWN ALL.
Oh there was nobody.