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:3.)Go to your server folder, find VirtualUser.cs.PHP Code:ALTER TABLE users ADD trades INT(10) NOT NULL DEFAULT '0'
( Default folder > Source > Virtual > Users > VirtualUsers.cs.
4.) Open VirtualUser.cs and search for:
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: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()); }
6.) Save this image: Save it on your pc and copy it to your c_image folder (where your other badges are)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!"); } } }
(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.


![[Holograph] New Achievement System!](http://ragezone.com/hyper728.png)


