[Holograph] New Achievement System!

Results 1 to 25 of 25
  1. #1
    Horror! Rajito is offline
    MemberRank
    Aug 2010 Join Date
    The NetherlandsLocation
    1,046Posts

    thumbs up [Holograph] New Achievement System!

    Heey RaGEZONE,
    I just wanted to test my skills.
    (i'm a horrible coder, this is my first release.)
    So i made this "Trade Achievement System"
    It works like this:
    - Everytime when you trade with a person, and you both accept the trade, your trade "level" will increase.
    With 1 Trade "level" you will get a badge.
    with 10 Trade points you'll get a level 2 badge, etc.
    Like the other achievements.
    I made it working perfect, but i did something wrong, and CTRL + Z wasn't working anymore :S
    Now it is only till trade point 1.
    I wanted to change it, but i'm in a hurry to write this thread, because i g2g now.
    Tomorrow i'll release the total "system"
    Ok, now i'll start with it.
    To use it:
    1.)Go to your MySQL Database.
    2.)Insert this SQL Query:
    PHP Code:
    ALTER TABLE users ADD trades INT(10NOT NULL DEFAULT '0' 
    3.)Go to your server folder, find VirtualUser.cs.
    ( Default folder > Source > Virtual > Users > VirtualUsers.cs.
    4.) Open VirtualUser.cs and search for:
    Code:
     StringBuilder sb = new StringBuilder("'a'='b'");
                                            for (int i = 0; i < _tradeItemCount; i++)
                                                if (_tradeItems[i] > 0)
                                                    sb.Append(" OR id = '" + this._tradeItems[i] + "'");
    
                                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                            {
                                                dbClient.runQuery("UPDATE furniture SET ownerid = '" + Partner.userID + "',roomid = '0' WHERE" + sb.ToString());
                                            }
    5.) Place after:
    Code:
     StringBuilder sb = new StringBuilder("'a'='b'");
                                            for (int i = 0; i < _tradeItemCount; i++)
                                                if (_tradeItems[i] > 0)
                                                    sb.Append(" OR id = '" + this._tradeItems[i] + "'");
    
                                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                            {
                                                dbClient.runQuery("UPDATE furniture SET ownerid = '" + Partner.userID + "',roomid = '0' WHERE" + sb.ToString());
                                            }
    This:
    Code:
    //Rajito's Trades Achievement System
                                        using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                        {
                                            {
                                           
                                                dbClient.runQuery("UPDATE users SET trades = trades + 1 WHERE id = '" + userID + "'");
                                                int trades = dbClient.getInt("SELECT trades FROM users WHERE id = '" + userID + "'");
                                                if (trades == 1)
                                                {
                                                    dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('Trades','" + userID + "','0','1')");
                                                    this.sendData(" You traded 1 time!! <br> New achievement badge added!");
                                                }
                                            }
                                        }
    6.) Save this image: Save it on your pc and copy it to your c_image folder (where your other badges are)
    (The badge isn't so good, but not bad either, because i'm not so good at pixeling)
    Finished!
    If this isn't working, or you want to give feedback, please give.
    This is my first C# Release.
    I'm still learning it.

    Credits:
    - 99,9% to ®ajito™
    - 0,1 to AWA (He helped me with a stupid } that i forgot. , i asked him how much credits he wanted, and he wanted 0.1% credits for it =] )

    Please Give FeedBack! =]
    Tomorrow i'm going to make it better, cause i don't have anymore time today.
    I will also release a :addbot <roomid> command this or next week, because many people ask for it.


  2. #2
    Account Upgraded | Title Enabled! FlyCoder is offline
    MemberRank
    Jan 2011 Join Date
    United KingdomLocation
    469Posts

    Re: [Holograph] New Achievement System!

    Any images etc?

  3. #3
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: [Holograph] New Achievement System!

    trades is not a legit field.

  4. #4
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: [Holograph] New Achievement System!

    Your better off leaving the coding to people who actually know what they're doing.

  5. #5
    Banned RockStar7 is offline
    BannedRank
    Aug 2008 Join Date
    IndianaLocation
    379Posts

    Re: [Holograph] New Achievement System!

    Quote Originally Posted by Tr0ll.™ View Post
    I'm better off leaving the coding to people who actually know what they're doing.
    Good point. ^.^

  6. #6
    Member Im Legend is offline
    MemberRank
    Mar 2009 Join Date
    93Posts

    Re: [Holograph] New Achievement System!

    stfu.
    Everyone needs to start somewhere. And you guys really wonder, why every developer leaves this section? Idiots.

  7. #7
    Horror! Rajito is offline
    MemberRank
    Aug 2010 Join Date
    The NetherlandsLocation
    1,046Posts

    Re: [Holograph] New Achievement System!

    Quote Originally Posted by Im Legend View Post
    stfu.
    Everyone needs to start somewhere. And you guys really wonder, why every developer leaves this section? Idiots.
    Thanks.
    And @ the others, you can flame so much if you want.
    I'm still learning it so i don't care.
    Like Legend said, i've to start somewhere.

  8. #8
    Demi-God tweeney is offline
    MemberRank
    Aug 2008 Join Date
    888Posts

    Re: [Holograph] New Achievement System!

    Nice

    But it could be better i guess,

    What happens if you just constantly trade the same person? :P

  9. #9
    Horror! Rajito is offline
    MemberRank
    Aug 2010 Join Date
    The NetherlandsLocation
    1,046Posts
    Quote Originally Posted by tweeney View Post
    Nice

    But it could be better i guess,

    What happens if you just constantly trade the same person? :P
    didn't tought about that...
    maybe i can make it so it is 2 trades a day.
    (not that you can only Trade 2 days per day, but only 2 trades will count for the trade level.)
    i'll look later.
    but now i'm going to eat, and then (trying),to make a :addbot command.
    (because many people asks for this)

  10. #10
    Proficient Member DjInTrouble is offline
    MemberRank
    Dec 2010 Join Date
    The NetherlandsLocation
    180Posts

    Re: [Holograph] New Achievement System!

    Well.. I see wgat you mean.. BAD

  11. #11
    Banned PEjump2 is offline
    BannedRank
    Jan 2010 Join Date
    The NetherlandsLocation
    2,838Posts

    Re: [Holograph] New Achievement System!

    Quote Originally Posted by DjInTrouble View Post
    Well.. I see wgat you mean.. BAD
    You'r "code" was even worse, shutup.

  12. #12
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: [Holograph] New Achievement System!

    Quote Originally Posted by ®ajito™ View Post
    PHP Code:
    //Ok let me critique your work..
    //Rajito's Trades Achievement System
                                        
    using (DatabaseClient dbClient Eucalypt.dbManager.GetClient())
                                        {
                                            {
                                           
                                                
    dbClient.runQuery("UPDATE users SET trades = trades + 1 WHERE id = '" userID "'");
                                                
    /*int trades = dbClient.getInt("SELECT trades FROM users WHERE id = '" + userID + "'");
                                                if (trades == 1)*/
    //This doesn't make the bit of sense.. Why does the user need to have 1 trade.. You already ran a query saying add one, so obviously they will have one trade?!?!
                                                
    {
                                                    
    dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('Trades','" userID "','0','1')");
                                                    
    /*this.sendData(" You traded 1 time!! <br>In Holograph, you don't use "<br>'s" New achievement badge added!");*/
    //Better Code
    sendData("BK" "You've traded for the first time" "/r" "You have now received the achievement badge!");
    refreshBadges(truetruefalse)//If you have this code.

                                                
    }
                                            }
                                        } 
    You should learn to take critiques to the heart like any other releaser.

  13. #13
    Member Im Legend is offline
    MemberRank
    Mar 2009 Join Date
    93Posts

    Re: [Holograph] New Achievement System!

    Quote Originally Posted by Tr0ll.™ View Post
    You should learn to take critiques to the heart like any other releaser.
    He shoud learn critique? Yeah, awesome critique:
    "Your better off leaving the coding to people who actually know what they're doing."
    and gtfo of the thread, thanks, idiot.

  14. #14
    Horror! Rajito is offline
    MemberRank
    Aug 2010 Join Date
    The NetherlandsLocation
    1,046Posts

    Re: [Holograph] New Achievement System!

    Quote Originally Posted by Tr0ll.™ View Post
    You should learn to take critiques to the heart like any other releaser.
    you could also just say nice how i had to do it.
    if you read good , i said that i'm still learning it.

  15. #15
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: [Holograph] New Achievement System!

    Quote Originally Posted by Im Legend View Post
    He shoud learn critique? Yeah, awesome critique:
    "Your better off leaving the coding to people who actually know what they're doing."
    and gtfo of the thread, thanks, idiot.
    No thanks. I don't take requests from low-lifes who just "Magically Came Back" and believe they Run Shit.

  16. #16
    Horror! Rajito is offline
    MemberRank
    Aug 2010 Join Date
    The NetherlandsLocation
    1,046Posts

    Re: [Holograph] New Achievement System!

    More people that want to give feedback?

  17. #17
    Thanks for the memories! Mithex is offline
    MemberRank
    May 2010 Join Date
    HeavenLocation
    2,014Posts

    Re: [Holograph] New Achievement System!

    Quote Originally Posted by Tr0ll.™ View Post
    You should learn to take critiques to the heart like any other releaser.
    Bingo.

  18. #18
    sexiess is a sin. Subway is offline
    MemberRank
    Jun 2010 Join Date
    2,491Posts

    Re: [Holograph] New Achievement System!

    lol @ above, nice codes raj.

  19. #19
    Thanks for the memories! Mithex is offline
    MemberRank
    May 2010 Join Date
    HeavenLocation
    2,014Posts

    Re: [Holograph] New Achievement System!

    Quote Originally Posted by ®ajito™ View Post
    More people that want to give feedback?
    Isnt that bumping?

  20. #20
    Horror! Rajito is offline
    MemberRank
    Aug 2010 Join Date
    The NetherlandsLocation
    1,046Posts

    Re: [Holograph] New Achievement System!

    So this release failed.

    does anyone have more ideas for v26?

  21. #21
    Thanks for the memories! Mithex is offline
    MemberRank
    May 2010 Join Date
    HeavenLocation
    2,014Posts

    Re: [Holograph] New Achievement System!

    Yes I do! Please PM me for details!

  22. #22

    herp a derp

    vLife is offline

    Super ModRank
    Apr 2009 Join Date
    The BahamasLocation
    3,811Posts

    Re: [Holograph] New Achievement System!

    Not a failed release. Its more of a "Jumping the gun."
    If you want to do Retro things in C# just learn the language a bit more. Understand how and when to use functions and so on. Always make your code short and simple instead of cluttered and buggy.

  23. #23
    Account Upgraded | Title Enabled! salah-salah is offline
    MemberRank
    Jan 2009 Join Date
    UndergroundLocation
    716Posts

    Re: [Holograph] New Achievement System!

    Quote Originally Posted by ®ajito™ View Post
    So this release failed.

    does anyone have more ideas for v26?
    V26 coding is not your favourite 'code'
    Maybe you can try it at R63 (UBER)
    And if it is a usefull release, i am sure you will get more positive comments

  24. #24
    Horror! Rajito is offline
    MemberRank
    Aug 2010 Join Date
    The NetherlandsLocation
    1,046Posts

    Re: [Holograph] New Achievement System!

    V26 is my favorite version, so i want to code things for v26.

    and Vlife, thanks for the feedback.
    This is my first (or one of the first) c# releases.
    Just to look what small things i already can do. (Because i'm still learning)
    I'll make the code better in 2 weeks.
    (my grandmother died, i'm now atm in the airplane to curacao for the funeral, and i'm back in 2 weeks.)
    Last edited by Rajito; 03-04-11 at 09:00 AM.

  25. #25
    Developer Eronisch is offline
    MemberRank
    Jul 2009 Join Date
    The NetherlandsLocation
    1,328Posts

    Re: [Holograph] New Achievement System!

    Change the <br> to \r or /r (i forgot) for a new line.
    Last edited by Eronisch; 03-04-11 at 09:48 AM.



Advertisement