• 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!

Open Tibia Flash client?

Do we need OTFlash Client?

  • Yeah! it will be awesome!

    Votes: 13 76.5%
  • Nope! Dont do this!

    Votes: 4 23.5%

  • Total voters
    17
  • Poll closed .

Fenrisus

Ferin-Sha
Joined
Mar 19, 2010
Messages
205
Reaction score
339
Location
Canada
Hello everyone, i have a question about flash client. Anyone work on this for make them? For example, i have a full cipsoft flash client source code (tibia.swf) but it needs alot of work for make possible of compilation this again from AS3 code.

For example some code (Network protocol):

Code:
package tibia.network
{
  import flash.events.EventDispatcher;
  import flash.utils.ByteArray;
  import tibia.creatures.Creature;
  import tibia.appearances.AppearanceStorage;
  import tibia.appearances.AppearanceInstance;
  import tibia.creatures.BuddySet;
  import shared.utility.Vector3D;
  import __AS3__.vec.*;
  import tibia.reporting.reportType.Type;
  import tibia.reporting.ReportWidget;
  import tibia.game.EditListWidget;
  import tibia.appearances.ObjectInstance;
  import flash.net.Socket;
  import flash.events.ProgressEvent;
  import flash.events.Event;
  import flash.events.IOErrorEvent;
  import flash.events.SecurityErrorEvent;
  import shared.cryptography.XTEA;
  import shared.utility.PerformanceTimer;
  import tibia.appearances.AppearanceTypeRef;
  import flash.events.TimerEvent;
  import flash.utils.getTimer;
  import mx.collections.ArrayCollection;
  import mx.collections.IList;
  import tibia.chat.Channel;
  import tibia.chat.ChatStorage;
  import tibia.chat.ChannelSelectionWidget;
  import tibia.appearances.OutfitInstance;
  import tibia.container.InventoryTypeInfo;
  import tibia.container.ContainerStorage;
  import tibia.container.Container;
  import mx.resources.ResourceManager;
  import tibia.trade.NPCTradeWidget;
  import tibia.trade.TradeObjectRef;
  import tibia.sidebar.SideBarSet;
  import tibia.sidebar.Widget;
  import tibia.game.EditTextWidget;
  import tibia.worldmap.WorldMapStorage;
  import tibia.questlog.QuestLogWidget;
  import tibia.questlog.QuestFlag;
  import tibia.game.PopUpBase;
  import tibia.chat.MessageMode;
  import tibia.spellbook.SpellStorage;
  import tibia.help.TutorialHint;
  import flash.utils.Endian;
  import flash.system.Security;
  import flash.utils.Timer;
  import flash.events.ErrorEvent;
  import tibia.creatures.Player;
  import tibia.trade.SafeTradeWidget;
  import tibia.appearances.EffectInstance;
  import tibia.game.BugReportWidget;
  import shared.utility.BrowserHelper;
  import flash.system.Capabilities;
  import tibia.creatures.CreatureStorage;
  import shared.cryptography.RSAPublicKey;
  import shared.utility.Colour;
  import tibia.minimap.MiniMapStorage;
  import tibia.questlog.QuestLine;
  import tibia.appearances.MissileInstance;
  import tibia.appearances.AppearanceType;
  import tibia.creatures.SelectOutfitWidget;
  import com.hurlant.crypto.prng.Random;
 
  public class Connection extends EventDispatcher
  {
     
      public function Connection(param1:AppearanceStorage, param2:ChatStorage, param3:ContainerStorage, param4:CreatureStorage, param5:MiniMapStorage, param6:Player, param7:SpellStorage, param8:WorldMapStorage) {
        this.m_LastSnapback = new Vector3D();
        this.m_PrfInConnection = new PerformanceTimer("Connection Incomming");
        this.m_PrfOutConnection = new PerformanceTimer("Connection Outgoing");
        super();
        this.m_ConnectionState = STATE_NOT_CONNECTED;
        this.m_Socket = null;
        this.m_InBuffer = new ByteArray();
        this.m_InBuffer.endian = Endian.LITTLE_ENDIAN;
        this.m_OutBuffer = new ByteArray();
        this.m_OutBuffer.endian = Endian.LITTLE_ENDIAN;
        this.m_OutLength = 0;
        this.m_PRNG = new Random();
        this.m_XTEA = new XTEA();
        this.m_RSAPublicKey = new RSAPublicKey();
        if(param1 == null)
        {
            throw new Error("Connection.Connection: Invalid appearance data.",2147483645);
        }
        else
        {
            this.m_AppearanceStorage = param1;
            if(param2 == null)
            {
              throw new Error("Connection.Connection: Invalid chat data.",2147483644);
            }
            else
            {
              this.m_ChatStorage = param2;
              if(param3 == null)
              {
                  throw new Error("Connection.Connection: Invalid container data.",2147483643);
              }
              else
              {
                  this.m_ContainerStorage = param3;
                  if(param4 == null)
                  {
                    throw new Error("Connection.Connection: Invalid creature list.",2147483642);
                  }
                  else
                  {
                    this.m_CreatureStorage = param4;
                    if(param5 == null)
                    {
                        throw new Error("Connection.Connection: Invalid mini-map.",2147483641);
                    }
                    else
                    {
                        this.m_MiniMapStorage = param5;
                        if(param6 == null)
                        {
                          throw new Error("Connection.Connection: Invalid player.",2147483640);
                        }
                        else
                        {
                          this.m_Player = param6;
                          if(param7 == null)
                          {
                              throw new Error("Connection.Connection: Invalid spell data",2147483639);
                          }
//blablabla cuted code, them too long :D
  public function sendCUSEOBJECT(param1:int, param2:int, param3:int, param4:int, param5:int, param6:int) : void {
  var b:ByteArray = null;
  var a_X:int = param1;
  var a_Y:int = param2;
  var a_Z:int = param3;
  var a_TypeID:int = param4;
  var a_PositionOrData:int = param5;
  var a_Data:int = param6;
  try
  {
  if(a_X != 65535)
  {
  this.m_Player.stopAutowalk(false);
  }
  b = this.createPacket();
  b.writeByte(CUSEOBJECT);
  b.writeShort(a_X);
  b.writeShort(a_Y);
  b.writeByte(a_Z);
  b.writeShort(a_TypeID);
  b.writeByte(a_PositionOrData);
  b.writeByte(a_Data);
  this.sendPacket(true);
  }
  catch(e:Error)
  {
  handleSendError(CUSEOBJECT,e);
  }
  }
   
  public function sendCCANCEL() : void {
  var b:ByteArray = null;
  try
  {
  b = this.createPacket();
  b.writeByte(CCANCEL);
  this.sendPacket(true);
  }
  catch(e:Error)
  {
  handleSendError(CCANCEL,e);
  }
  }
   
  public function sendCPASSLEADERSHIP(param1:int) : void {
  var b:ByteArray = null;
  var a_CreatureID:int = param1;
  try
  {
  b = this.createPacket();
  b.writeByte(CPASSLEADERSHIP);
  b.writeInt(a_CreatureID);
  this.sendPacket(true);
  }
  catch(e:Error)
  {
  handleSendError(CPASSLEADERSHIP,e);
  }
  }
//blahblahblah code from protocol, client side again
  protected function readSTRAPPERS(param1:ByteArray) : void {
  var _loc5_:* = 0;
  var _loc6_:Creature = null;
  var _loc2_:int = param1.readUnsignedByte();
  if(_loc2_ > NUM_TRAPPERS)
  {
  throw new Error("Connection.readSTRAPPERS: Too many trappers.",0);
  }
  else
  {
  _loc3_ = new Vector.<Creature>();
  _loc4_ = 0;
  while(_loc4_ < _loc2_)
  {
  _loc5_ = param1.readUnsignedInt();
  _loc6_ = this.m_CreatureStorage.getCreature(_loc5_);
  if(_loc6_ == null)
  {
  log("Connection.readSTRAPPERS: Creature not found: " + _loc5_);
  }
  _loc3_.push(_loc6_);
  _loc4_++;
  }
  this.m_CreatureStorage.setTrappers(_loc3_);
  return;
  }
  }

As you can see, here alot of param2, or _loc3_. That is identifiers. They cant be restored (as original) after AS3 project compilation. But possible to fix them (to something moar readable) by following code. So currently my progress on this

Client after compilation, on localhost:

otrj72r.jpg


Currently they wont connect to my server, but they can be launched. (idk what happens with swf networking after compilation right now).

One of lots of problems with project - i am working hard on my Ellestia Kingdoms, and dont have a much time for flash client. :( But if someone here have a AS3/Flash skillz, i can send my sources, and can help a bit with that (if have a free time). And if that needed for community of course.
Please, let me know what do you think about this, and vote please!


Note: project should be fully open-sourced!
 
awesome project. It would be great to never have to use another IP changer.
 
Hope this will be released, would be c00l :p
 
There is otclient already. I had a chance to test flash client and I was disappointed. There are some shitty delays and whole game window behaves strange ways.
I have good computer, but their software is just slow. This is why I prefer classic/ot client
 
Back
Top