Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 00:29

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Hello just want to ask Money Type

Discussion on Hello just want to ask Money Type within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
Hello just want to ask Money Type

we have Money type followed here

Gold = 0
ConquerPoints = 1
BoundConquerPoints = ?
HorseRacePoints = ?
HonorPoints = 4

if you guys know about that will you please let us know, I had search for it but found nothing, I dont know if I just missed searching...
marlyandedsel is offline  
Old 05/26/2012, 09:26   #2
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 705
BCPs are 3
turk55 is offline  
Thanks
2 Users
Old 05/26/2012, 09:37   #3
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
thanks how about the horseRacePoints

I have tried to used the bound conquer points with this code in the Packet Handler
PHP Code:
 case Conquer_Online_Server.Database.ShopFile.MoneyType.BoundConquerPoints:
                            {
                                if (
iteminfo.BaseInformation.ConquerPointsWorth Amount client.Entity.BoundConquerPoints)
                                    return;
                                if (
client.Entity.BoundConquerPoints - (iteminfo.BaseInformation.ConquerPointsWorth Amount) > client.Entity.BoundConquerPoints)
                                    return;
                                
item.ID itemUsage.dwParam;
                                if (
item.ID 730000 <= 12)
                                    
item.Plus = (Byte)(item.ID 730000);
                                
item.Color = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(48);
                                
item.Durability item.MaximDurability iteminfo.BaseInformation.Durability;
                                
uint NewAmount itemUsage.dwExtraInfo itemUsage.dwExtraInfo 1;
                                while (
NewAmount 0)
                                {
                                    if (
client.Inventory.Contains(iteminfo.BaseInformation.IDiteminfo.BaseInformation.StackSizeout _ExistingItem))
                                    {
                                        if (
_ExistingItem.StackSize == 0)
                                            
_ExistingItem.StackSize 1;

                                        
ushort _StackCount iteminfo.BaseInformation.StackSize;
                                        
_StackCount -= (ushort)_ExistingItem.StackSize;

                                        if (
_StackCount >= NewAmount)
                                            
_StackCount = (ushort)NewAmount;
                                        
_ExistingItem.StackSize += _StackCount;

                                        
Database.ConquerItemTable.UpdateStack(_ExistingItem);
                                        
_ExistingItem.Mode Game.Enums.ItemMode.Update;
                                        
_ExistingItem.Send(client);
                                        
_ExistingItem.Mode Game.Enums.ItemMode.Default;
                                        
NewAmount -= _StackCount;

                                        
//uint _TotalItemStacks = Math.Min(1, (itemUsage.dwExtraInfo / iteminfo.BaseInformation.StackSize));
                                    
}
                                    else
                                    {
                                        if (
iteminfo.BaseInformation.StackSize && itemUsage.dwExtraInfo 1)
                                        {
                                            
item = new ConquerItem(true);
                                            
item.ID itemUsage.dwParam;
                                            
item.Bound true;
                                            
item.Durability item.MaximDurability iteminfo.BaseInformation.Durability;
                                            
item.Color = (Conquer_Online_Server.Game.Enums.Color)3;
                                            
ushort _StackCount iteminfo.BaseInformation.StackSize;
                                            if (
NewAmount <= iteminfo.BaseInformation.StackSize)
                                                
_StackCount = (ushort)NewAmount;
                                            
item.StackSize = (ushort)_StackCount;
                                            
client.Inventory.Add(itemGame.Enums.ItemUse.CreateAndAdd);
                                            
Database.ConquerItemTable.UpdateStack(item);
                                            
NewAmount -= _StackCount;
                                        }
                                        else
                                        {
                                            if ((
itemUsage.dwParam 730000) <= 12)
                                            {
                                                
Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true);
                                                
newItem.ID itemUsage.dwParam;
                                                
newItem.Bound true;
                                                
newItem.Plus = (Byte)(newItem.ID 730000);
                                                
client.Inventory.Add(newItemGame.Enums.ItemUse.CreateAndAdd);
                                            }
                                            else
                                            {
                                                
item = new ConquerItem(true);
                                                
item.ID itemUsage.dwParam;
                                                
item.Bound true;
                                                
item.Durability item.MaximDurability iteminfo.BaseInformation.Durability;
                                                
item.Color = (Conquer_Online_Server.Game.Enums.Color)3;
                                                
item.StackSize 1;
                                                
client.Inventory.Add(itemGame.Enums.ItemUse.CreateAndAdd);
                                            }
                                            
NewAmount--;
                                        }
                                    }
                                }
                                
client.Entity.BoundConquerPoints -= (iteminfo.BaseInformation.ConquerPointsWorth Amount);
                                break;
                            } 
with this shofile
PHP Code:
 public static class ShopFile
    
{
        public static 
Dictionary<uintShopShops;
        public class 
Shop
        
{
            public 
uint UID;
            public 
MoneyType MoneyType;
            public 
int Count get { return Items.Count; } }
            public List<
uintItems;
            public 
Dictionary<UInt32HonorShopItemHonorShopItems;
            public class 
HonorShopItem
            
{
                public 
uint cost;
                public 
uint itemid;
            }
        }
        public static 
void LoadHonorShop()
        {
            
String[] text File.ReadAllLines("database\\honorshop.ini");
            
Shop shop = new Shop();
            
shop.UID 6000;
            
shop.MoneyType MoneyType.HonorPoints;
            
shop.HonorShopItems = new Dictionary<uintShop.HonorShopItem>();
            for (
int x 0text.Lengthx++)
            {
                
String line text[x];
                
String[] split line.Split(',');
                if (
Convert.ToUInt32(split[0]) != 0)
                {
                    if (!
shop.HonorShopItems.ContainsKey(Convert.ToUInt32(split[0])))
                    {
                        
Shop.HonorShopItem shopi = new Shop.HonorShopItem();
                        
shopi.cost Convert.ToUInt32(split[1]);
                        
shopi.itemid Convert.ToUInt32(split[0]);

                        
shop.HonorShopItems.Add(shopi.itemidshopi);
                    }
                }
            }
            
Shops.Add(6000shop);
        }
        public static 
void Load()
        {
            
string[] text File.ReadAllLines(ServerBase.Constants.ShopsPath);
            
Shop shop = new Shop();
            for (
int x 0text.Lengthx++)
            {
                
string line text[x];
                
string[] split line.Split('=');
                if (
split[0] == "Amount")
                    
Shops = new Dictionary<uintShop>(int.Parse(split[1]));
                else if (
split[0] == "ID")
                {
                    if (
shop.UID == 0)
                        
shop.UID uint.Parse(split[1]);
                    else
                    {
                        if (!
Shops.ContainsKey(shop.UID))
                        {
                            
Shops.Add(shop.UIDshop);
                            
shop = new Shop();
                            
shop.UID uint.Parse(split[1]);
                        }
                    }
                }
                else if (
split[0] == "MoneyType")
                {
                    
shop.MoneyType = (MoneyType)byte.Parse(split[1]);
                }
                else if (
split[0] == "ItemAmount")
                {
                    
shop.Items = new List<uint>(ushort.Parse(split[1]));
                }
                else if (
split[0].Contains("Item") && split[0] != "ItemAmount")
                {
                    
uint ID uint.Parse(split[1]);
                    if (!
shop.Items.Contains(ID))
                        
shop.Items.Add(ID);
                }
            }
            if (!
Shops.ContainsKey(shop.UID))
            {
                
Shops.Add(shop.UIDshop);
            }
            
LoadHonorShop();
            
Program.WriteLine("Shops information loaded.");
        }
        public 
enum MoneyType
        
{
            
Gold 0,
            
ConquerPoints 1,            
            
BoundConquerPoints 3//2
            
HonorPoints 4
        
}
    } 
with this one
PHP Code:
 public uint BoundConquerPoints
        
{
            
get { return _BoundConquerPoints; }
            
set
            
{
                if (
value <= 0)
                    
value 0;

                
_BoundConquerPoints value;

                 if (
EntityFlag == EntityFlag.Player)
                    
Update(Network.GamePackets.Update.BoundConquerPoints, (uint)valuefalse);
            }
        } 
seems like it only affect the ConquerPoints not the BoundConquerPoints
marlyandedsel is offline  
Old 05/26/2012, 12:33   #4
 
elite*gold: 0
Join Date: Mar 2009
Posts: 228
Received Thanks: 47
Exclamation

u can handle race store by shop id, like this.

Code:
            if (itemUsage.UID == 6001) //steedrace
            {
                if (!Database.ShopFile.RaceShop.ContainsKey((uint)itemUsage.dwParam))
                { Program.WriteLine("Error! Cannot puchase item ID: " + itemUsage.dwParam + " from Race shop"); return; }
                Database.ShopFile.ShopByPoints raceitem = Database.ShopFile.RaceShop[(uint)itemUsage.dwParam];

                if (client.Inventory.Count == 40)
                    return;
                uint price = raceitem.Price;

                Interfaces.IConquerItem item = new ConquerItem(true);
                Database.ConquerItemInformation iteminfo = new Conquer_Online_Server.Database.ConquerItemInformation(itemUsage.dwParam, 0);
                if (price > client.Entity.HorseRacingPts)
                    return;
                if (client.Entity.HorseRacingPts - price > client.Entity.HorseRacingPts)
                    return;
                item.ID = itemUsage.dwParam;
                item.Bound = true;
                if (iteminfo.BaseInformation.MaxStackSize > 0)
                    item.StackSize = 1;
                item.Color = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8);
                item.Durability = item.MaximDurability = iteminfo.BaseInformation.MaxDurability;
                client.Inventory.Add(item, Game.Enums.ItemUse.CreateAndAdd);
                client.Entity.HorseRacingPts -= price;
                return;
            }
& this is money type
Money = 0, Cps = 1, BoundCps = 2;
dego4ever is offline  
Thanks
1 User
Old 05/26/2012, 12:59   #5
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
i have change money type of BoundCps to 2 still not working

#edit : its working now just missing something
marlyandedsel is offline  
Old 05/27/2012, 02:55   #6
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
Quote:
Originally Posted by marlyandedsel View Post
...
Code:
Conquer_Online_Server.Database.ShopFile.MoneyType.BoundConquerPoints
nTL3fTy is offline  
Thanks
1 User
Old 05/27/2012, 03:27   #7
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by nTL3fTy View Post
Code:
Conquer_Online_Server.Database.ShopFile.MoneyType.BoundConquerPoints
Well i do remember the same thing u posted in one of my Threads b4 ... Actually it Helped me Alot in making codes much simple ..Thanks
shadowman123 is offline  
Reply


Similar Threads Similar Threads
money Type
04/07/2012 - CO2 Private Server - 7 Replies
Does Any1 Know the Money Type number of the Horse Race currency ?
Need item type and token type boot
03/18/2008 - Conquer Online 2 - 1 Replies
Hi All programers and makers of boots, Great job. Could some one make item and token type boot for patch 5118. Please



All times are GMT +1. The time now is 00:30.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.