Register for your free account! | Forgot your password?

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

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

Advertisement



Shop with new MoneyType(DERPs)

Discussion on Shop with new MoneyType(DERPs) within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2013
Posts: 62
Received Thanks: 8
Shop with new MoneyType(DERPs)

Hello ,this Topic has a first part

LordGragen gave me a great idea, a shop with new money type.

i made a quick search and found this:
PHP Code:
 public enum MoneyType
        
{
            
ConquerPoints 1,
            
Gold 0,
            
Derps 19//i just added this
            
HonorPoints 4
        

now, all i got is making the checks and conditions to add/remove Derps/items.
is that all i have to do?
derpingson is offline  
Old 02/03/2013, 15:40   #2
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 327
away from how you code it and getting instant for each client and saving that to the database and update it
while im implementing similar systems i've had a problem with shops which is
assume you got 0 cps and 99999999 bound cps , it won't let you buy a bound expball from the new mall (it won't show the dialog which you decided at to buy the item with cps or bound cps and how many you are going to buy)

Quote:
Quote:
client.Entity.QuizPoints = 1;
dafuq ? are you for real ? resting people quizpoints when they vote ? such a trap ?

EDIT : just saw your reply and the other topic and figured out you are using it(the quizshow uint variable) cuz you can't create new instance -.-

k here

Code:
go to database , ctrl+d , entinity , create new column , call it whateveryouwant  type byte , default 0
at entinity tables
Code:
            client.Entity.whateveryouwant = reader.ReadUInt16("whateveryouwant");
at entity
Code:
public  byte _whateveryouwant;

        public byte whateveryouwant 
        {
            get
            {
                return this._whateveryouwant ;
            }
            set
            {
                this._whateveryouwant  = value;
            }
        }
and you are done

oh to reset it everyday
at the entitytable
Code:
        public static void Resetwhateveryouwant(GameState client)
        {
            Conquer_Online_Server.Database.MySqlCommand command = new Conquer_Online_Server.Database.MySqlCommand(MySqlCommandType.UPDATE);
            command.Update("entities").Set("whateveryouwant", (byte)0).Where("UID", (long)client.Entity.UID).Execute();
        }
and call the above function from wherever you reset other stuff (like expballs and stuff)
if you are using impulse base (trinity) then find this at entinity tables
Code:
            if (DateTime.Now.DayOfYear != client.LastResetTime.DayOfYear)
and call the reset function

wish that is helpful

so now you know what to do to create a new currency , forget about the reset cuz you won't reset there currency , search for the handlers of selling and buying at the packethandlers.cs
you will find how the server handle buying/selling to shops , if you couldn't get there then break on the method which spit packets and buy item and trace it

try everything i've said , if you couldn't get it to work then ill just provide you with codes
goodluck
go for it is offline  
Old 02/04/2013, 15:04   #3
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Learn basic programming.

A currency is nothing more than a variable.
Super Aids is offline  
Reply


Similar Threads Similar Threads
+++ [Shop] Diablo 3 Gold Shop by Larali [Shop] +++
08/11/2012 - Diablo 3 Trading - 5 Replies
http://i.epvpimg.com/mQ4ce.png Buy at me Price: EU = 20.000.000 Gold - 10€ PaySafeCard / Ukash US = 20.000.000 Gold - 10€ PaySafeCard / Ukash EU = 8.000.000 Gold - 10€ PaySafeCard / Ukash US = 6.000.000 Gold - 10€ PaySafeCard / Ukash



All times are GMT +2. The time now is 23:28.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.