[PlusEMU]Getting Consecutive Login Achievements & True Habbo Achievements Working [Help]

treebeard

Member
Jan 16, 2018
317
173
Hello all,

I have recently been trying to get the achievements for consecutive login days working as well as the achievements for your account being so old.

My thing is I haven't worked on achievements before so I'm not really sure where to start on this.

I know where the classes for achievements are in the emulator, Habbo Hotel > Achievements, and the code there seems fine as my other achievements work but I'm really unsure how to even start on fixing other achievements. There isn't specific code for each achievement in the emulator classes in this section which leads me to believe I wouldn't be working in these classes anyways. I know that there are two tables in the database for achievements and it seems the proper entries are there for these achievements.

I'm using PlusEMU R2 & PRODUCTION-201701242205-837386173

I've noticed that a lot of hotels don't have these working and I've checked here, Google, and some rival forums but I haven't seen anything about this at all.

I'm trying to get a lot of the stock features in my emulator working before I move onto updating to a more current swf and adding the newer features.

Any help, tips, or general feedback is appreciated.
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
Database
Your achievements table is a record of each achievement that users can earn.

You would first need to create an achievement, lets say ACH_LoggedInDays is your group_name
So you would fill out the rest of the row as wanted.
Category = What section it appears under when users view achievments
Level would be the step it is. For example 2 ACH_LoggedInDays
Reward Pixels and Points would be easily understood.

Progress Needed would be the number of days you want them to login.

Under the users table you have a field called 'last_online' - You will utilize this field
Under user_stats field add an int column (11,0) to handle how many times the user has logged in , in a row
-----------------------------------
Emulator

Now, Inside of your emulator (After the Habbo Class is fully generated)
You will take the last_online column

If it is greater than 24 hours ago, and less than 48 hours ago - You will add 1 to the value keeping track of the amount of times the user has logged in, in a row.

Then have it call to a class that checks the achievement level

If the user has the achievement don't worry about it.


Most of the achievement giving code can be found in the emulator, you can look to see how other columns are grabbed for the Habbo and just add it that way - but the rest will require a bit of thought / coding.
 

treebeard

Member
Jan 16, 2018
317
173
Database
Your achievements table is a record of each achievement that users can earn.

You would first need to create an achievement, lets say ACH_LoggedInDays is your group_name
So you would fill out the rest of the row as wanted.
Category = What section it appears under when users view achievments
Level would be the step it is. For example 2 ACH_LoggedInDays
Reward Pixels and Points would be easily understood.

Progress Needed would be the number of days you want them to login.

Under the users table you have a field called 'last_online' - You will utilize this field
Under user_stats field add an int column (11,0) to handle how many times the user has logged in , in a row
-----------------------------------
Emulator

Now, Inside of your emulator (After the Habbo Class is fully generated)
You will take the last_online column

If it is greater than 24 hours ago, and less than 48 hours ago - You will add 1 to the value keeping track of the amount of times the user has logged in, in a row.

Then have it call to a class that checks the achievement level

If the user has the achievement don't worry about it.


Most of the achievement giving code can be found in the emulator, you can look to see how other columns are grabbed for the Habbo and just add it that way - but the rest will require a bit of thought / coding.
Shit, I missed that anyone even replied to this.

So a tl;dr would be make sure the achievement is in db & properly filled out, add column to users table for consecutive_days, then code checks into the Habbo.cs class in the emulator to see if they have progressed?

Thanks for the well thought out and lengthy response! I always appreciate the help of you and everyone else who provides thorough and comprehensive feedback.
 

Users who are viewing this thread

Top