[REL] PatchRP Emulator (R63B)

Status
Not open for further replies.

aliking

New Member
Jul 9, 2014
20
8
As I need a screenie of the topic; here's a snippet of the Roleplay.CS (per client)
IMG:
Features (that are done)
-> NodeJS (socket manager)
-> Mus TCP manager (allows data to be sent to emulator)
-> Roleplay caching, this means all data is saved when exit
-> Weapons caching (you can reload them with a command); you can add them aswell (roleplay_weapons)
-> Store robbery (Rasheed, the store clerk will immediately call the police - whilst you continue to rob the store)
-> Wanted manager
-> Police bots (unlike most police bots, they immediately arrest you)... well, this is how mine work;
My police bots will find you in the room (follow you), then they will point their gun at you, now this can work two ways.
If you run, you will be raised to wanted level 2, which means police will shoot/stun you for resisting arrest. Or, you will suddenly have a big message on the screen (like GTA V (xbox/ps3/pc/laptop)) which says "BUSTED" (made w/ photoshop and NodeJS)..
-> Arrows (fully working, also a system added to check if you're stuck after using an arrow).
-> Taxi system (fully working, also a system to check if stuck also).
-> Anti-script system (works 1.9/2 of the time, may be able to be bypassed - even then, the encryption is fairly good.. so hardly any chance)!
-> Fully working timer system (this is used with System.Timers, one of the best possible timers, running in the System's thread, but creating a child rather than stopping the main thread w/ thread.sleep (which is a bad timer (used on reality))).
-> Street robbery
-> Vault system robbery (this isn't like any other roleplays, this is UNIQUE!!)
How the vault robbery works;
First you run into the bank with three other people (the ones that joined first) - (this is a mission by the way, (15 players MAX) - hosted by the server itself every 30 minutes).
Then, two people take out the closed circuit television (CCTV) and then the other one shoots the cashier, until they die.
Once the bot dies and disappears - there will be a key/id (haven't decided yet) on the floor where they died. Stand on it, then you will collect it (either one of you).
Then simply walk over to the door and double click the door (the one with the ID/key will be able to open the door and the rest of the members run into the vault. Once all in the vault, you will have 10 minutes until police start raiding.
This means, whilst the LAST 5 minutes of robbing the vault, you will need to kill police with your team mates.
## Also, you know where you have to wait fully for the robbery to end until you get your money? Well, it's not like that. With this system you collect money per minute, meaning even if you are killed by one team mate, you'll still most likely get money (you won't be able to shoot until police start raiding the room(s))! - Yes, there is more than one vault ;) ##

Who's interested? This will be coming soon
 

Jaden

not so active
Aug 24, 2014
886
263
I think there's a lot to be done with this RP emulator but it looks good nevertheless...

A few questions:
Do you load bots via MySQL like AstroRP2 did? If so, unnecessary.
Can we see some more code?
Any more detail on that anti-script system?
Why is this in "Habbo Releases" if its not a release?

Also:
I have switched to ThreadPooled timers (System.Threading) instead of Elapsed (System.Timers) and have used tickers for the users roleplay processes like robberies... Basically 1 timer per session, you should look into that.

I think you should consider using accessors for your main roleplay class.
There are many reasons I could list for you why this would be a better resort than just internal values.
Example:
Code:
private int _health;

public int Health
{
     get { return this._health; }
     set { this._health = value; }
}

AND ALSO:

Reality creates its own thread when starting a new timer instance, and it uses Thread.Sleep() to pause that thread rather than the main thread itself. Still redundant for a timer.
 
Last edited by a moderator:

aliking

New Member
Jul 9, 2014
20
8
Bots are loaded by MySQL, on start up (so it's cached), then added into a BotManager dictionary to handle all the bots which have been added, so they can be fetched at a later date. I've removed unnecessary MySQL queries and re-coded my socket manager for a faster experience. I do not need to move into other timers, System.Timers is good enough for a basic roleplay emulator which will be released to the community.
The anti-script system is basic, and I'm not going to release my code for it as it'd be copied (I'm not stupid, lol).
It's in the Habbo Releases because it's going to be released, I'm just getting opinions beforehand (which I will add onto the thread once complete 2/3 days)
I do not need to handle my class fields the way you have, they're perfectly fine how they are.

I know Reality creates a new thread to handle another timer, but creating more threads causes memory leaks (CPU leaks/high cpu count).

I do not need this to be perfection, it's not going to the Queen, it's simply going to the community which should of had finished by now, it's really boring.
 
I'm not sure if reality has done it, but it's also good to exit/dispose of the thread once the timer has finished (because it keeps creating new threads per timer the client has)
I do not dispose my timers until the client has disconnected.
 

Jaden

not so active
Aug 24, 2014
886
263
Bots are loaded by MySQL, on start up (so it's cached), then added into a BotManager dictionary to handle all the bots which have been added, so they can be fetched at a later date. I've removed unnecessary MySQL queries and re-coded my socket manager for a faster experience. I do not need to move into other timers, System.Timers is good enough for a basic roleplay emulator which will be released to the community.
The anti-script system is basic, and I'm not going to release my code for it as it'd be copied (I'm not stupid, lol).
It's in the Habbo Releases because it's going to be released, I'm just getting opinions beforehand (which I will add onto the thread once complete 2/3 days)
I do not need to handle my class fields the way you have, they're perfectly fine how they are.

I know Reality creates a new thread to handle another timer, but creating more threads causes memory leaks (CPU leaks/high cpu count).

I do not need this to be perfection, it's not going to the Queen, it's simply going to the community which should of had finished by now, it's really boring.
 
I'm not sure if reality has done it, but it's also good to exit/dispose of the thread once the timer has finished (because it keeps creating new threads per timer the client has)
I do not dispose my timers until the client has disconnected.
Well if its a really good anti-script system it will be copied on release? Scripting can be prevented with some extra if-statements on the function that the packet parses through like Chat(). and your Roleplay Class could be improved unless you want people to improve for themselves? I don't see why you wouldn't want to use acessors... And theres already a cycle timer on the emulator you may be basing on, that's a thread itself. If you are going to remove that cycle and basically have to recode a ton of shit, and you aren't going to use a ThreadPooled Timer (System.Threading.Timer) which gives the session its own timer instead of using a foreach statement to grab all the clients individually than you might aswell use the cycle instead of System.Timers because it does the same thing... i.e. ShockRP

and whats the point of loading and caching bots on emulator startup where you can just have an array of bots inside the emulator where you can call them randomly... Its no big deal though really.
 
Last edited:
Status
Not open for further replies.

Users who are viewing this thread

Top