• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook pagefor updates, or we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.)

[HOLOGRAPH] [R26] Coding Custom Commands For Holograph Emu r26 [R26] [HOLOGRAPH]

Status
Not open for further replies.
Joined
Apr 24, 2007
Messages
644
Reaction score
157
.. kay.

ps. can you make Login achievement for Dissi's edit of Holograph Emu ACH_Login1 to ACH_Login10?
number of logins required:

ACH_Login1: 5
ACH_Login2: 25
ACH_Login3: 100
ACH_Login4: 160
ACH_Login5: 210
ACH_Login6: 350
ACH_Login7: 400
ACH_Login8: 430
ACH_Login9: 470
ACH_Login10: 500

Ok, i just coded this stuff

Search in virtualuser.cs:

Code:
case "@H"
Before the
Code:
break;
place this code:

Code:
#region Badge Login by Bjork
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {                                
                                {
                                    dbClient.runQuery("UPDATE users SET logins = logins + 1 WHERE id = '" + userID + "'");
                                    int logins = dbClient.getInt("SELECT logins FROM users WHERE id = '" + userID + "'");

                                    if (logins == 1)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login1','" + userID + "','0','1')");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 1 login, you receive a new badge!!");
                                    }
                                    else if (logins == 50)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login2','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login1' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 50 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 80)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login3','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login2' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 80 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 120)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login4','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login3' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 120 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 170)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login5','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login4' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 170 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 230)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login6','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login5' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 230 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 300)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login7','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login6' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 300 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 380)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login8','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login7' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 380 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 470)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login9','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login8' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 470 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 570)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login10','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login9' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 570, you receive a new badge!!");
                                    }                                    
                                }
                            }
                            #endregion
You can change the numbers of logins, badges... if you want ;)

And add in phpmyadmin a new column in users table named logins like that:

321olos - [HOLOGRAPH] [R26] Coding Custom Commands For Holograph Emu r26 [R26] [HOLOGRAPH] - RaGEZONE Forums


Don't forget to thank me :)
 
Junior Spellweaver
Joined
Mar 4, 2009
Messages
165
Reaction score
5
Ok i just got back from school accepting requests again.
 
Junior Spellweaver
Joined
Mar 4, 2009
Messages
165
Reaction score
5
You didnt finish mine? ;[

Yeah im still working on it but i dont know how to make it so the person being asked can accept.

If you use PHPRetro i could code the whole marriage system in PHP.
 
Junior Spellweaver
Joined
May 24, 2010
Messages
112
Reaction score
4
Ok, i just coded this stuff

Search in virtualuser.cs:

Code:
case "@H"
Before the
Code:
break;
place this code:

Code:
#region Badge Login by Bjork
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {                                
                                {
                                    dbClient.runQuery("UPDATE users SET logins = logins + 1 WHERE id = '" + userID + "'");
                                    int logins = dbClient.getInt("SELECT logins FROM users WHERE id = '" + userID + "'");

                                    if (logins == 1)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login1','" + userID + "','0','1')");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 1 login, you receive a new badge!!");
                                    }
                                    else if (logins == 50)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login2','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login1' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 50 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 80)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login3','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login2' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 80 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 120)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login4','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login3' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 120 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 170)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login5','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login4' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 170 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 230)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login6','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login5' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 230 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 300)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login7','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login6' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 300 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 380)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login8','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login7' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 380 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 470)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login9','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login8' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 470 logins, you receive a new badge!!");
                                    }
                                    else if (logins == 570)
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges (badgeid, userid, slotid, iscurrent) VALUES ('ACH_Login10','" + userID + "','0','1')");
                                        dbClient.runQuery("DELETE FROM users_badges WHERE badgeid = 'ACH_Login9' AND userid = '" + userID + "'");
                                        refreshBadges();
                                        this.sendData("BK" + "Good Game! 570, you receive a new badge!!");
                                    }                                    
                                }
                            }
                            #endregion
You can change the numbers of logins, badges... if you want ;)

And add in phpmyadmin a new column in users table named logins like that:

321olos - [HOLOGRAPH] [R26] Coding Custom Commands For Holograph Emu r26 [R26] [HOLOGRAPH] - RaGEZONE Forums


Don't forget to thank me :)


Is that so it will only add +1 loggins per day?
Or will it add +1 loggin every time your disconnect and than reloggin?

For example I disconnect 5 times in 1 day does it say I logged in 5 times?
 
Last edited:
Developer
Loyal Member
Joined
Jul 28, 2009
Messages
983
Reaction score
133
Is that so it will only add +1 loggins per day?
Or will it add +1 loggin every time your disconnect and than reloggin?

For example I disconnect 5 times in 1 day does it say I logged in 5 times?
It doesn't count the disconnect, only if you login.
so if you login it will add +1.
 
Junior Spellweaver
Joined
May 24, 2010
Messages
112
Reaction score
4
It doesn't count the disconnect, only if you login.
so if you login it will add +1.

Yeah ovs it's going to add +1 when you login but what i'm saying is does it only work every 24 hours (per day) or will it count every time you login.
 
Joined
Jul 15, 2008
Messages
657
Reaction score
444
Yeah ovs it's going to add +1 when you login but what i'm saying is does it only work every 24 hours (per day) or will it count every time you login.

Aren't you 'Roper' or the owner of Hectic hotel or something ? You've claimed you can code before. I think if you apply logical thinking and look at the code, you will get your answer right away HURP DERP.
 
Junior Spellweaver
Joined
May 24, 2010
Messages
112
Reaction score
4
Aren't you 'Roper' or the owner of Hectic hotel or something ? You've claimed you can code before. I think if you apply logical thinking and look at the code, you will get your answer right away HURP DERP.

Yea that's right, I can code but I never said I can code c# did I?
And no my names Hayden not Roper

---------- Post added at 08:18 AM ---------- Previous post was at 08:14 AM ----------

Btw I think it might start with this string to get it to only work for today: string now = DateTime.Today.ToString(); ?
 
Custom Title Activated
Loyal Member
Joined
Oct 21, 2007
Messages
2,098
Reaction score
464
Go to Packet Processing Then Logged In Ones Find > Enter/Leave Room
 
Joined
Jul 15, 2008
Messages
657
Reaction score
444
Yea that's right, I can code but I never said I can code c# did I?
And no my names Hayden not Roper

If you have a basic knowledge of coding you would clearly see that the code does not have any checker/timer as to when the badges are given out. You also created a Holograph Emulator development thread a few months back. Isn't Holograph in C# ? Yeah it is. Save it, don't bother replying or quoting me although you probably will anyway.
 
Last edited:
Junior Spellweaver
Joined
May 28, 2007
Messages
168
Reaction score
5
thanks for login achievements.
rated this thread 10/10.

wants new code:

emulator:lost_memory's emulator
command: :buyfurni FURNI-TID AMOUNT
what it does:
It will buy you furni with the tid FURNI-TID and the amount of furni are AMOUNT (replace FURNI-TID with the furni tid in db and AMOUNT with the amount of furni.
 
Last edited:
Junior Spellweaver
Joined
May 24, 2010
Messages
112
Reaction score
4
If you have a basic knowledge of coding you would clearly see that the code does not have any checker/timer as to when the badges are given out. You also created a Holograph Emulator development thread a few months back. Isn't Holograph in C# ? Yeah it is. Save it, don't bother replying or quoting me although you probably will anyway.

Wow, ur a looser.
Link me to my "Thread" that I made?
By the way, i'm pretty sure I can code, I dont need you to say I can't because I know it's not true, I will admit that I didnt read through his snippet before I posted, as I realise that now.

So please stop making up stories.
 
Status
Not open for further replies.
Back
Top