Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
A few notes:
I thank @Dominic for writing a CMS for Aurora. The new CMS (which will be much better than the garbage I have right now xD) will be written in Laravel. The CMS is currently made on the PhoenixCF style, but will later MOST LIKELY support more layouts (Habbo layout, come with which layouts you want). If it will only support one style, it will be the Habbo style.
Screens:
http://i.grab.la/07b0b-2359364a-e4f0...8dd685892c.png
http://i.grab.la/07b0b-e92a4a15-7b13...08c5d0ee35.png
http://i.grab.la/07b0b-2b8daaa2-48b8...ea48c46823.png
I let @Dominic post snippets later as he knows what the code does and I don't know Laravel that good so I can't really show much. I'm gonna learn it though.
Soon I'll try to work a bit more on the item stuff, maybe finish off gifts, recycler (I think this version does have it....???) and then see what has to be done.
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
Thanks for the great introduction, @Glaceon. Jesus, been ages since IWarfare, huh? Ha...
Aaaaanyways, hello there Aurora fans!
The avatar creation is my current master piece (current!)
I'm using a middleware to check whether the current player has an avatar as its current and whether is has one at all.
Code:
if (auth()->user()->avatars()->count()==0) {
return redirect()->route('avatar-show');
}
if (is_null(auth()->user()->avatar)) {
return redirect()->route('avatar-chooser');
}
return $next($request);
My player relationships looks like this:
Code:
public function avatar() {
return $this->hasOne(\App\Avatar::class, 'player_id', 'id')->whereCurrent('1');
}
public function avatars() {
return $this->hasMany(\App\Avatar::class, 'player_id', 'id');
}
Aaaand this is my Avatar controller, which checks names, creates and shows avatar creation page. Beware, this class is unfinished.
Code:
<?php
namespace App\Http\Controllers;
use App\Avatar;
use Illuminate\Http\Request;
class AvatarController extends Controller {
public function showForm() {
return view('pages.avatar.create');
}
public function nameCheck(Request $request) {
if ($request->ajaxAct !== "check_habbo_name") {
return response('0', 200);
}
$validate = validator($request->all(), [
'habbo_name' => 'required',
]);
if ($validate->fails()) {
return response('0', 200);
}
$avatarExists = Avatar::whereUsername($request->habbo_name)->count()>0;
if ($avatarExists) {
return response('0', 200);
}
return response('1', 200);
}
public function create(Request $request) {
$validate = validator($request->all(), [
'username' => 'required',
'figure' => 'required',
'gender' => 'required',
]);
if ($validate->fails()) {
abort(404, "Temp. error handling");
}
$avatar = Avatar::create([
'player_id' => auth()->user()->id,
'username' => $request->username,
'figure' => $request->figure,
'gender' => $request->gender,
'motto' => 'I | Aurora',
'sso_ticket' => '',
'current' => true,
]);
if (!is_null($avatar)) {
Avatar::where('created_at', '<', $avatar->created_at)
->wherePlayerId(auth()->user()->id)
->update([
'current' => false
]);
return redirect()->route('me-page');
}
return "error";
}
}
Documentation will be added upon release of BETA.
Much love!
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
Quote:
Originally Posted by
Dominic
Thanks for the great introduction, @
Glaceon. Jesus, been ages since IWarfare, huh? Ha...
Aaaaanyways, hello there Aurora fans!
The avatar creation is my current master piece (
current!)
I'm using a middleware to check whether the current
player has an avatar as its current and whether is has one at all.
Code:
public function avatar() {
return $this->hasOne(\App\Avatar::class, 'player_id', 'id')->whereCurrent('1');
}
public function avatars() {
return $this->hasMany(\App\Avatar::class, 'player_id', 'id');
}
Nice project both of u (any new progress?)
Was wondering wouldnt you be able to use the avatar class like this ?
Code:
public function avatar() {
return $this->hasOne(Avatar::class, 'player_id', 'id')->whereCurrent('1');
}
public function avatars() {
return $this->hasMany(Avatar::class, 'player_id', 'id');
}
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
Quote:
Originally Posted by
Rush Retros
Nice project both of u (any new progress?)
Was wondering wouldnt you be able to use the avatar class like this ?
Code:
public function avatar() {
return $this->hasOne(Avatar::class, 'player_id', 'id')->whereCurrent('1');
}
public function avatars() {
return $this->hasMany(Avatar::class, 'player_id', 'id');
}
Depends on what the namespace is of the Player class.
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
You will made with SSO for v9 ? , i re-made a CMS from 2006 using zabboweb and Holograph...
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
Quote:
Originally Posted by
m.tiago
You will made with SSO for v9 ? , i re-made a CMS from 2006 using zabboweb and Holograph...
v9 doesn't have SSO
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
Hi Josh,
Any updates? Where are u working currently on?
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
My apologizes. I haven't done much updates, because of a few things:
1. I work 40 hours a week, program the whole day. After work there's just no room for more development.
2. I do have other hobbies in the weekend and I mainly try to clear my head from things.
So no, the development isn't canceled, it just has a stop. I do want to start working on it sooner or later though. I have to see what features still has to be implemented as lots of the main features are done. As far as I remember.
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
Hi Josh,
This seems like a nice project.
Hope you're gonna continue is soon.
Greetz,
Nyma (yes you know me boi) :D
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
Quote:
Originally Posted by
Rush Retros
Nice project both of u (any new progress?)
Was wondering wouldnt you be able to use the avatar class like this ?
Code:
public function avatar() {
return $this->hasOne(Avatar::class, 'player_id', 'id')->whereCurrent('1');
}
public function avatars() {
return $this->hasMany(Avatar::class, 'player_id', 'id');
}
I have discontinued the development of this CMS, but..
Yeah, it could be, it's just a bad habit from my old work. :):
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
After months I finally did something. I had some private stuff going on and I felt kind of unmotivated. Also the source is pretty messy and couldn't be bothered to rewrite it. Nonetheless, I started working on it again. Did some small fixes and did one small feature. I'm going to work more on it from now on.
Fixes:
- When a new item was bought, for example a TV, you would have to double click TWICE to turn it on.
What caused the bug:
In my code I checked whether "item.Data" was an int. If not, set the NEXT state to 0. In other words, item.Data is empty when you purchase a furni, so double clicking it would make the data 0, which is ALSO off. Setting it to 1 fixed it.
- Item data is saved in database now
Also made home rooms, you can now change your home room, and when you set a room as home room, you'll automatically go to that room. Taking the home room off will make you go to the hotel view instead.
PHP Code:
public class UpdateNavigatorSettingsMessageEvent : IPacketEvent
{
public void Run(Client client, MessageEvent msgEvent)
{
var homeRoom = msgEvent.ReadVL64();
if (homeRoom != 0)
{
if (Engine.Locator.RoomController.GetRoom(homeRoom) == null) return;
}
client.Player.HomeRoom = homeRoom;
Engine.Locator.PlayerController.Dao.UpdateHomeRoom(client.Player.Id, homeRoom);
client.SendComposer(new NavigatorSettingsComposer(homeRoom));
}
}
The fixed code for interactions:
PHP Code:
if (!int.TryParse(item.Data, out int currentState) || currentState < 0)
{
nextState = 1;
}
else if (currentState >= item.Definition.MaxInteractionState)
{
nextState = 0;
}
else
{
nextState = currentState + 1;
}
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
Quote:
Originally Posted by
Glaceon
After months I finally did something. I had some private stuff going on and I felt kind of unmotivated. Also the source is pretty messy and couldn't be bothered to rewrite it. Nonetheless, I started working on it again. Did some small fixes and did one small feature. I'm going to work more on it from now on.
Fixes:
- When a new item was bought, for example a TV, you would have to double click TWICE to turn it on.
What caused the bug:
In my code I checked whether "item.Data" was an int. If not, set the NEXT state to 0. In other words, item.Data is empty when you purchase a furni, so double clicking it would make the data 0, which is ALSO off. Setting it to 1 fixed it.
- Item data is saved in database now
Also made home rooms, you can now change your home room, and when you set a room as home room, you'll automatically go to that room. Taking the home room off will make you go to the hotel view instead.
PHP Code:
public class UpdateNavigatorSettingsMessageEvent : IPacketEvent
{
public void Run(Client client, MessageEvent msgEvent)
{
var homeRoom = msgEvent.ReadVL64();
if (homeRoom != 0)
{
if (Engine.Locator.RoomController.GetRoom(homeRoom) == null) return;
}
client.Player.HomeRoom = homeRoom;
Engine.Locator.PlayerController.Dao.UpdateHomeRoom(client.Player.Id, homeRoom);
client.SendComposer(new NavigatorSettingsComposer(homeRoom));
}
}
The fixed code for interactions:
PHP Code:
if (!int.TryParse(item.Data, out int currentState) || currentState < 0)
{
nextState = 1;
}
else if (currentState >= item.Definition.MaxInteractionState)
{
nextState = 0;
}
else
{
nextState = currentState + 1;
}
Why not generate the item.Data on purchase?
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
Quote:
Originally Posted by
Dominic
Why not generate the item.Data on purchase?
Not sure, now you mention it I could've done it. Thanks for the suggestion, might be a better idea since for some items I need to generate item.Data anyways (such as stickies, moodlights...)
Re: [V9] [R38] Aurora Emulator [C#] [DotNetty] [Log4net]
I do want to tell about Aurora's future. The name "Aurora" was originally going to be used for a full developer website, however the name got used as an emulator name. The project started a long time ago with a R38 emulator, focussing on having a full experience with both Flash and Shockwave clients working. The source was pretty "shit" and nothing special, but as I lost the source, I wrote (together with @spreedblood) the current Aurora R38 emulator. After some months of development (minus the months I've been busy / unmotivated), @spreedblood said he didn't feel like working on this source, as the source could be HEAVILY improved, but neither @spreedblood nor I have the will to rewrite it. When it's stable and all basic features are done, Aurora R38 will be released officially (this means: emulator, database, SWF pack, CMS and help thread). After that, the source won't be build upon anymore (but will be open for anybody who want to work on it, or in noob-terms: rename).
Besides that, @spreedblood and I will be working on a secret project - maybe something revolutionary. It's unknown whether we'll finish it - but details might be given out when we've started. I won't be fully 24/7 working on it, but I'll split the development time 50/50 (or 80/20) to work on both projects. The main priority is Aurora.
However, as soon as Aurora is done, I wish to start something new. I want to have some input. What should I make? It can be anything, so surprise me.
Last, as for the v9 version of Aurora, I'm unsure whether this will be 100% done and completed, but it will be a much better source of my released Aurora V9 Dart version. While I don't like to talk much about it, Aurora V9 will be standalone, and will work on Sqlite instead of MySQL and will be written in Dart.
So, finally, leave any suggestions - not only for my next project but also for this project, as I'm still aiming for Aurora to be 100% finished. I might even do Shockwave too... ;-)
Hugs and kisses,
Oneyouneverknow
Psst... 2,250 posts already, 1007 likes, I'm proud on how much I've grown...