[PlusEMU] Emulator Development [UPDATED]

Status
Not open for further replies.

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
To add something else to the TODO list, seen a lot of people go on about the filter - I'll re-work that tonight.

It'll probably have two or three modes, standard, aggressive, etc..

Also, I'd like to re-do the MUS, so expect something from that later on.

Sorry for throwing things in, just went over the help & support section and those 2 bring up a lot.
 

Aizzy

New Member
Dec 20, 2016
28
21
This is getting incredible, I ended up finding some very strange bugs with the mascots I will add to the support
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
After adding the pet interaction stuff from developement, then I get this error; ItemData does not contain a definition for BehaviourData and no extension method accepting a first argument of type could be found (are you missing a using directive or an assembly reference?)

Hey,

Be careful with this for now, you'll need to add a variable into ItemData.cs, I'd advise not going through with this until I make the next release. Unless you're working from your own files, then you'll need to compare where the new variables & methods are.

Cheers.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Hey,

Did nothing last night, working on the emulator now for a good couple hours, should hopefully make a release late tonight (maybe 11 PM my time, UK, GMT?)

Props to @Damiens for syncing some of his work, again - anyone who syncs to the Git is free to post it in here.

@Damiens log:
  • (when I originally did them, I gave up because couldn't find a nicer way to loop them).
Cheers to Damien.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Oops, just accidentally pushed the development branch into the master branch, this isn't ready yet.

I just noticed the merge request had been requested by someone, and I misread it, though it meant another repo into dev, not dev to master, derp.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Hey,

So I've replaced 'MUS' with 'RCON'.

Can be seen here ( ).

Commands are very similar to how chat commands are, uses an interface the same way - if you add commands to the repo, please use the description in the interface! So others know how to call the commands.

The parameters are split by a colon ( : ).

Commands added so far..

Hotel Related:
  • reload_bans
  • reload_quests
  • reload_server_settings
  • reload_vouchers
  • reload_ranks
  • reload_navigator
  • reload_items
  • reload_catalog
  • reload_filter
User Related
  • alert_user
  • disconnect_user
  • reload_user_motto
  • give_user_currency (This will update their REAL TIME currency and give them credits, and update it in the database).
  • take_user_currency (This will take their REAL TIME currency down, and update it in the database).
  • sync_user_currency (This will sync their current REAL TIME currency into the database.).
  • reload_user_currency (This updates their currency to the database value).
  • reload_user_rank (Reloads their rank and permissions, gives them the mod tool if they have the right).
  • reload_user_vip_rank
  • progress_user_achievement

So.. If I had a shop, and the user bought a VIP package which gave them credits & duckets, I could do..

PHP:
doCommand('give_user_currency', '1:credits:1000');
doCommand('give_user_currency', '1:duckets:1000');
doCommand('reload_user_vip_rank', '1');
doCommand('alert_user', '1:Thank you for purchasing VIP. You have been given 1,000 credits & 1,000 duckets! You do not need to reload.');

function doCommand($header, $data = '')
{
    $musData = $header . chr(1) . $data;
    $sock = socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));

    socket_connect($sock, '127.0.0.1', '30001');
 
    socket_send($sock, $musData, strlen($musData), MSG_DONTROUTE);
    socket_close($sock);
}

In each command class, there is a string that tells you what you need to send through for each command.
 
Adding onto the above, I've just added 'GiveUserBadgeCommand' & 'TakeUserBadgeCommand'.

I've also made a change to badges, on the GiveBadge method in the BadgeComponent that is now 'REPLACE INTO' rather than 'INSERT INTO'.

You'll also need this:

PHP:
ALTER TABLE `user_badges`
ADD UNIQUE INDEX `user_id, badge_id` (`user_id`, `badge_id`);

IF YOU ALREADY HAVE DUPLICATES, YOU'LL GET AN ERROR WITH THAT SQL, IN WHICH YOU WILL NEED TO RESOLVE YOURSELF.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Can you make a muscommand like giveitem ?

I have a CMS Rareshop and i need this command

Yea no problem.

Just working on the logging atm, going to use log4net properly, next commit will be fucking huge as I have to get rid of the core/logging.cs & core/consolewriter/logging.cs files.

Release might be midnight now, but it'll be worth it regardless.
 

KylePr0zZ

Member
Jul 22, 2016
51
14
Yea no problem.

Just working on the logging atm, going to use log4net properly, next commit will be fucking huge as I have to get rid of the core/logging.cs & core/consolewriter/logging.cs files.

Release might be midnight now, but it'll be worth it regardless.
Take your time bro, perfection doesn't come over night ;), we will be waiting for release 2 regardless of the timeframe
:)
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Question, would we prefer to see everything from PlusStaticGameSettings.cs in a server_settings table?

Cheers.
 

Meap

Don't need glasses if you C#
Nov 7, 2010
1,045
296
Question, would we prefer to see everything from PlusStaticGameSettings.cs in a server_settings table?

Cheers.
Ive already done this and I can say it so much easier because I just run the update settings mus so it implements it all straight away when I change it from my hk page
 

yoyok

Member
Apr 24, 2013
197
24
Question, would we prefer to see everything from PlusStaticGameSettings.cs in a server_settings table?

Cheers.
Make both work if it's possible, a setting at the config as example: When it's on > 1 it will take it from the server_settings, if it's not on 1 but on = 0 it will take it from PlusStaticGamesettings.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Ive already done this and I can say it so much easier because I just run the update settings mus so it implements it all straight away when I change it from my hk page

Alrighty, will do this now.

Just synced to the dev branch with the changes to the logging, I still need to go over each area and just check what is logging should be logging etc. E.g, there are a number of try-catch blocks around the emulator that shouldn't be.

Also I decided to move the 'ConnectionManager' to the communication folder, will probably go over the connection manager one week to see what we can do there.


 
One issue I have with log4net atm, is the errors will display to the console. However, I think this isn't that much of an issue, as it makes it more noticable to see?

Regardless, the 'newlogs' folder is now just 'logs, and there will be 5 new files.

  • Critical_errors
  • Exception_errors
  • MySQL_errors
  • Thread_errors
  • Wired_errors
Thanks.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Ok, hi.

Just synced a couple more changes...
  • Refactored language locales to a manager, have a plan to make this multilingual in the future.
  • Added a settings manager, all settings will come from server_settings table.
  • Updated figuredata checker - I coded this for Habboon ages ago, back when we all patched the issues & the only thing the scripters were doing afterwards was scripting their figures. I'm certain this 100% fixes it.
The figuredata checker will check absolutely everything; correct genders, parts, purchasable clothing (if a user doesn't own the purchasable clothing they will not be able to wear it) and a HC check, however this is set to true right now since no HC exists. Will add this in the future.

Will release the SQL for the server_settings and server_locale soon. Probably going to change server_locale to server_language, not sure yet.


Gonna finally finish that mod tool now, maybe not properly finish, but atleast have it in a decent enough state.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Okay, gonna run through testing things and will make the release asap.

I've left sanctions as they changed since last time. I hate moderation tools, they work for the most part - just not the sanctions.
 
Made the second release, big thanks to those who contributed.



Full information is on the release thread.
 
Any of ya'll have a hotel using this? Preferably not too custom, so I could run this on there and debug a little better.

Aka, be your dev - but won't be too active, and mostly be there for the purpose of improving this.

PM me.
 

Liam

smooth and dynamic
Staff member
FindRetros Moderator
Apr 10, 2013
1,275
864
Good luck with this, it's nice to see others contributing too. I'll be following this project. :up:
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
One other thing I forgot to mention, I ripped the badges from .COM today, in the 'Misc' tab on the website you'll find the SQL and the badge images.


 
Just a heads up, won't be working on this for the rest of the weekend now. Next set of updates from me will probably be midweek.
 

Menkz

Member
Jul 9, 2010
374
167
Love this, I've also messaged you on skype about some things ;)
Also, are you planning on this to be purely vanilla (exactly like Habbo), or have random custom features.
 
Status
Not open for further replies.

Users who are viewing this thread

Top