Register for your free account! | Forgot your password?

You last visited: Today at 14:36

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

Shop with new MoneyType(DERPs)

Discussion on Shop with new MoneyType(DERPs) within the CO2 PServer - Discussions / Questions forum part of the Conquer Online 2 category.

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: 323
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)

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

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

        public byte whateveryouwant 
                return this._whateveryouwant ;
                this._whateveryouwant  = value;
and you are done

oh to reset it everyday
at the entitytable
        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
            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

go for it is offline  
Old 02/04/2013, 15:04   #3
elite*gold: 0
Join Date: Dec 2012
Posts: 1,633
Received Thanks: 841
Learn basic programming.

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

« Protecting EXE! | Legality Questions »

Similar Threads
+++ [Shop] Diablo 3 Gold Shop by Larali [Shop] +++
08/11/2012 - Diablo 3 Trading - 5 Replies 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 +1. The time now is 14:36.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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