• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Using Flash Client in Ots

I think there's an issue with sending a message of MESSAGE_STATUS_CONSOLE_BLUE to the flash client.
If I do so I get an internal error (code 436.0).
Can anyone confirm this?

The Flash client is pickier than the standalone when it comes to message types. Use orange or some other color.
 
Seems like MESSAGE_STATUS_CONSOLE_[ORANGE/RED/BLUE] wont work. Only the ones that outputs to the game-screen and the console.

PUKHA0F.png

Pretty useless, but fun that it now works on a phone :D
 
Last edited:
This is why I love coming back to play Tibia, because WibbenZ is still here. Great job mate.
 
We all talked about it and we decided to not release anything, we spent alot of time on this :p
Afaik only me and @Milice have fully working ones, last I heard from moker was that he coulden't get spells and runes to work aswell as hotkey savings. No ide how it is now.
But after jo3Bingham released some of the stuff they did they can just copy paste alot of the stuff, and if you ask me he shoulden't have released stuff about flash but insted let people work for it.
I felt the same about Syntax, like "why not help us" but now when we have a working flash client im kinda glad, I learned alot and diden't copy and code from someone who posted it on otland.

All we do with flash atm is update it kinda :p

Disappointing.
There won't be a lot of users competent enough in flash in order to reverse engineer the client.
Your average OT host/developer also won't have enough knowledge of the client authentication to really know what to look for to do this themselves.

Too much segregation and cash grabs in the OT community nowadays :/

Can grab the majority of what you need from WibbenZ's github repo:
https://github.com/tarantonio/flash


Still a bit of work to do though...

Re-inventing the wheel is a real pain:

A1BrS3f.png


Bombs out on client_options_serverscript...
This looks to be a non-vital file that just holds account flash options.

Should be able to remove the reference in catalog-client.xml until its functionality is truly understood.

wOv2Yg2.png
 
Last edited:
Disappointing.
There won't be a lot of users competent enough in flash in order to reverse engineer the client.
Your average OT host/developer also won't have enough knowledge of the client authentication to really know what to look for to do this themselves.

Too much segregation and cash grabs in the OT community nowadays :/

Can grab the majority of what you need from WibbenZ's github repo:
https://github.com/tarantonio/flash


Still a bit of work to do though...

You should not that you are not allowed to do more then one post in a row, insted of spamming the forum edit your posts.

Yes that was the point, we invested alot of time even getting to where the client tries to connect to the server.
If you think you will get anywhere with those files then go ahead xD There was a reason I removed those files, they did not really help us.

We have rewritten most of the code and nothing extreme was included, the files you can find there are the files we downloaded from tibia.
The only thing I can think of is the php handler, and that has been rewritten due to bugs.

If you have read this thread you should know that you will need alot more then just those few files :p
 
You should not that you are not allowed to do more then one post in a row, insted of spamming the forum edit your posts.

Yes that was the point, we invested alot of time even getting to where the client tries to connect to the server.
If you think you will get anywhere with those files then go ahead xD There was a reason I removed those files, they did not really help us.

We have rewritten most of the code and nothing extreme was included, the files you can find there are the files we downloaded from tibia.
The only thing I can think of is the php handler, and that has been rewritten due to bugs.

If you have read this thread you should know that you will need alot more then just those few files :p

Oh I've re-read everything, many times.
Effectively still stuck here:

Code:
public class en_US$Connection_properties extends ResourceBundle {

  public function en_US$Connection_properties(){
  super("en_US", "Connection");
  }
  override protected function getContent():Object{
  var _local1:Object = {
  MSG_INTERNAL_ERROR:"An internal error has occurred (Code: {0}.{1}).",
  MSG_COULD_NOT_CONNECT:"Could not connect to the game server. Please try again later.",
  MSG_LOST_CONNECTION:"Lost connection to the game server. Please close the client and try again."
  };
  return (_local1);
  }

  }
Code:
  private function handleConnectionError(_arg1:int, _arg2:int=0, _arg3:Object=null):void{
  this.disconnect(false);
  var _local4:String;
  switch (_arg1){
  case ERR_COULD_NOT_CONNECT:
  _local4 = ResourceManager.getInstance().getString(BUNDLE, "MSG_COULD_NOT_CONNECT");
  break;
  case ERR_CONNECTION_LOST:
  _local4 = ResourceManager.getInstance().getString(BUNDLE, "MSG_LOST_CONNECTION");
  break;
  case ERR_INTERNAL:
  default:
  _local4 = ResourceManager.getInstance().getString(BUNDLE, "MSG_INTERNAL_ERROR", [_arg1, _arg2]);
  };
  var _local5:ConnectionEvent = new ConnectionEvent(ConnectionEvent.ERROR);
  _local5.message = _local4;
  _local5.data = null;
  dispatchEvent(_local5);
  }
Code:
  protected function onDelayComplete(_arg1:TimerEvent):void{
  var a_Event:* = _arg1;
  if (a_Event != null){
  try {
  this.m_ConnectionDelay.removeEventListener(TimerEvent.TIMER_COMPLETE, this.onDelayComplete);
  this.m_ConnectionDelay.stop();
  this.m_ConnectionDelay = null;
  this.m_LastEvent = getTimer();
  this.m_Socket.connect(this.m_Address, this.m_Port);
  } catch(e:Error) {
  handleConnectionError(ERR_COULD_NOT_CONNECT, 0, e);
  };
  };
  }

Which looked like it needed a custom solution from what has been posted...
Needs alot of research, which is fine - I'll figure it out sooner or later;
Tis just a little de-motivating when you're putting days of effort into something; and you already know the solution exists. Feels like a waste.
 
Last edited:
Oh I've re-read everything, many times.
Effectively still stuck here:

Code:
public class en_US$Connection_properties extends ResourceBundle {

  public function en_US$Connection_properties(){
  super("en_US", "Connection");
  }
  override protected function getContent():Object{
  var _local1:Object = {
  MSG_INTERNAL_ERROR:"An internal error has occurred (Code: {0}.{1}).",
  MSG_COULD_NOT_CONNECT:"Could not connect to the game server. Please try again later.",
  MSG_LOST_CONNECTION:"Lost connection to the game server. Please close the client and try again."
  };
  return (_local1);
  }

  }
Code:
  private function handleConnectionError(_arg1:int, _arg2:int=0, _arg3:Object=null):void{
  this.disconnect(false);
  var _local4:String;
  switch (_arg1){
  case ERR_COULD_NOT_CONNECT:
  _local4 = ResourceManager.getInstance().getString(BUNDLE, "MSG_COULD_NOT_CONNECT");
  break;
  case ERR_CONNECTION_LOST:
  _local4 = ResourceManager.getInstance().getString(BUNDLE, "MSG_LOST_CONNECTION");
  break;
  case ERR_INTERNAL:
  default:
  _local4 = ResourceManager.getInstance().getString(BUNDLE, "MSG_INTERNAL_ERROR", [_arg1, _arg2]);
  };
  var _local5:ConnectionEvent = new ConnectionEvent(ConnectionEvent.ERROR);
  _local5.message = _local4;
  _local5.data = null;
  dispatchEvent(_local5);
  }
Code:
  protected function onDelayComplete(_arg1:TimerEvent):void{
  var a_Event:* = _arg1;
  if (a_Event != null){
  try {
  this.m_ConnectionDelay.removeEventListener(TimerEvent.TIMER_COMPLETE, this.onDelayComplete);
  this.m_ConnectionDelay.stop();
  this.m_ConnectionDelay = null;
  this.m_LastEvent = getTimer();
  this.m_Socket.connect(this.m_Address, this.m_Port);
  } catch(e:Error) {
  handleConnectionError(ERR_COULD_NOT_CONNECT, 0, e);
  };
  };
  }

Which looked like it needed a custom solution from what has been posted...
Needs alot of research, which is fine - I'll figure it out sooner or later;
Tis just a little de-motivating when you're putting days of effort into something; and you already know the solution exists. Feels like a waste.

Once again, how do you think we felt when Syntax gave us the same respond?
It took us a long time to get everything working, me and milice have alot of experience but nothing with actionscript etc.
Can't say a time exaclly but probbly more then a month(from start to end).

And I still can find bugs, there is so much things that needs new code.
If I wouldn't have gotten this far already I would have given up, would not be worth it imo.

Trust me I know exaclly everything that code links to, as I said ive been in the same position trying to figger out where the bug is with all debuggers you can think of.


But... After all im "happy" that @Syntax did not help us nor release it, since atleast I learned ALOT by actually debugging everything and would have it alot easier if they do a huge update on flash now.
Start with the files you found on github if you wish, but a small tip would be to just redo everything and find the correct way to decompile and compile the swf file, you will just get a headache by using those worthless files :p
Good luck!
 
Once again, how do you think we felt when Syntax gave us the same respond?
It took us a long time to get everything working, me and milice have alot of experience but nothing with actionscript etc.
Can't say a time exaclly but probbly more then a month(from start to end).

And I still can find bugs, there is so much things that needs new code.
If I wouldn't have gotten this far already I would have given up, would not be worth it imo.

Trust me I know exaclly everything that code links to, as I said ive been in the same position trying to figger out where the bug is with all debuggers you can think of.


But... After all im "happy" that @Syntax did not help us nor release it, since atleast I learned ALOT by actually debugging everything and would have it alot easier if they do a huge update on flash now.
Start with the files you found on github if you wish, but a small tip would be to just redo everything and find the correct way to decompile and compile the swf file, you will just get a headache by using those worthless files :p
Good luck!

My concern isn't the AC3 code.
It's any required custom .PHP handlers.

Anyways... time to dig in:
alice-falling-down-rabbit-hole-1cp1iga.jpg
 
Last edited:
So much of the original .SWF code needs re-writing to get it re-compiled.
..this isn't gonna happen with my current work hours.

Could rip Ruxera's content....
http://ruxera.com/flash-regular-bin/

Sigh...

I miss the way used to all share when Otland first popped up.

EDIT:
Fk it.
Someone PM if they're interested in selling their working flash client resources.
(I'm not kidding or fking around.)

EDIT 2:
Still working on this on my own, progress is progress - but this is still painful...
DKIuXHg.png


Oke i've edited the source to see where it exactly fails. Turns out it's the session key.
4da61cbe94.png


added this to protocolgame.cpp

3c8753e2b1.png

So its effectively working, socket connection is ✔
JzW0Lzl.png


Edited TFS source in the same way as @Mokerhamer but I'm clearly missing something here...
Isn't connecting through to the game server?

Anyone want to throw me a bone?
 
Last edited by a moderator:
8i8w7dH.jpg


And now I need to sleep.
few missing features, but that's for another day.

Few bugs out of the box;
Corpses prevent stairs from being used and the smart-click functionality prevents you from trying to USE an item that isn't typically usable (IE: The healing fountains in the Temple).
 
So much of the original .SWF code needs re-writing to get it re-compiled.

EDIT:
Fk it.
Someone PM if they're interested in selling their working flash client resources.
(I'm not kidding or fking around.)

Screenshot..
 
Screenshot..

Is quite a fun project, the real pain here is re-compiling the SWF and knowing enough about TFS to be able to edit the source for the new flash functions.
There is a lot of work that needs to be done in TFS source to get everything working 100%.

I doubt anyone has all functions bug-free, yet..
Why has no one got a public github project going for this? unnecessarily delaying OT migration to flash.
 
Is quite a fun project, the real pain here is re-compiling the SWF and knowing enough about TFS to be able to edit the source for the new flash functions.
There is a lot of work that needs to be done in TFS source to get everything working 100%.

I doubt anyone has all functions bug-free, yet..
Why has no one got a public github project going for this? unnecessarily delaying OT migration to flash.
Because it's a really heavy project and about 98% of everyone in the OT community are leechers who never gives anything useful back. Why would we sit here and give all of our hard work away for free? Let's say you have a full time job, would you just give away half your salary for no good reason? The answer: no. no you wouldn't.
 
Because it's a really heavy project and about 98% of everyone in the OT community are leechers who never gives anything useful back. Why would we sit here and give all of our hard work away for free? Let's say you have a full time job, would you just give away half your salary for no good reason? The answer: no. no you wouldn't.

You assume too much and you're missing the whole point of open-source - the whole foundation on why OTs exist.
The whole cash grab mindset killed Tibia, and it feels like the same mindset is infecting the OT community.

We were all leechers at one point, we then either gave up; or developed our skill-sets to become contributors.

I owe my current career to my hobby creating terrible OT servers nearly 6 years ago.
I've enjoyed coming back to it this year, TFS is at the point where you can do anything with it - Its bloody RPGMaker for an Ultima clone!

But why all the secrets? why is there such a push for in-game shops? donations? the eff?
When this did turn into a business rather than a hobby?
 
You assume too much and you're missing the whole point of open-source - the whole foundation on why OTs exist.
The whole cash grab mindset killed Tibia, and it feels like the same mindset is infecting the OT community.

We were all leechers at one point, we then either gave up; or developed our skill-sets to become contributors.

I owe my current career to my hobby creating terrible OT servers nearly 6 years ago.
I've enjoyed coming back to it this year, TFS is at the point where you can do anything with it - Its bloody RPGMaker for an Ultima clone!

But why all the secrets? why is there such a push for in-game shops? donations? the eff?
When this did turn into a business rather than a hobby?

I can make a quick respond with a question;
If people want things released (this is a thing that alot of people want) why don't they release things aswell?
The only things that gets released here are things like talking teleports and once in a while something decent.

But in most cases people keep it private, so I don't see a reason why we should release something that no one else helped with and no one else can handle.
We would just end up getting spammed each version update, since flash is not that simple to update without the tools we have created and the time we have spent to find out how to decrypt, decompile, do the changes needed and then recompile.
 
You assume too much and you're missing the whole point of open-source - the whole foundation on why OTs exist.
The whole cash grab mindset killed Tibia, and it feels like the same mindset is infecting the OT community.

We were all leechers at one point, we then either gave up; or developed our skill-sets to become contributors.

I owe my current career to my hobby creating terrible OT servers nearly 6 years ago.
I've enjoyed coming back to it this year, TFS is at the point where you can do anything with it - Its bloody RPGMaker for an Ultima clone!

But why all the secrets? why is there such a push for in-game shops? donations? the eff?
When this did turn into a business rather than a hobby?

What open-source? The flash client is a proprietary piece of software authored by CipSoft. Hosting a modified version on your own server is sort of a grey area when it comes to legality, but straight up posting the modified source code on GitHub would be a complete violation of the license, most likely resulting in a ban of the poster on GitHub and removal of the repository, if someone reported it.
 
I can make a quick respond with a question;
If people want things released (this is a thing that alot of people want) why don't they release things aswell?
The only things that gets released here are things like talking teleports and once in a while something decent.

But in most cases people keep it private, so I don't see a reason why we should release something that no one else helped with and no one else can handle.
We would just end up getting spammed each version update, since flash is not that simple to update without the tools we have created and the time we have spent to find out how to decrypt, decompile, do the changes needed and then recompile.

Other people are keeping quality progress (regardless of context) to themselves, so I should too?
Makes sense in a capitalist business sense; doesn't make sense in an open-source community.

Actually... do you run Linux by chance? do you see the irony?

I can make a quick respond with a question;
If people want things released (this is a thing that alot of people want) why don't they release things aswell?

You need to be waaaaay over qualified to do anything of real quality here nowadays.
Those that do contribute, don't do it for personal gain (I hope).
Those doing it for monetary gain, are doing the whole life thing wrong.

Anyone with those skillsets don't need to be working on OT servers - they could be creating their own games or taking those skills to the corporate/IT workforce like I did.

Anyways... back on topic:

PROGRESS:
  • Flash options now save.
    It's account-based not player-based because it doesn't query client_options_serverscript when you CHANGE characters
    (Not a priority at the moment).
  • Spell actions now work and show appropriate cool-downs:
OgahlHl.png


The flash login concept is still tagging off the original PHP socket script proposed earlier in this thread.
Need to read up on it some more to see if there are other ways to approach it.


What open-source? The flash client is a proprietary piece of software authored by CipSoft. Hosting a modified version on your own server is sort of a grey area when it comes to legality, but straight up posting the modified source code on GitHub would be a complete violation of the license, most likely resulting in a ban of the poster on GitHub and removal of the repository, if someone reported it.

Gives me an idea of where you stand when it comes to intellectual property.
Again, ironic due to the foundation of OTs - we are the heart of copyright infringement.

Nonetheless, that isn't something I care for.
I care about content and creativity in all its forms - fck money and how it corrupts.
 
Last edited:
Its bloody RPGMaker for an Ultima clone!
almost. The more I make stuff the more I see its still code made to copy tibia. But its still epic!

Btw, why we want flash client so badly? If you ask me this looks ugly and downloadable client is much easier to manage imo.
 
Back
Top