What you need for writing your emulator (straight arm that's understandable xD ) the language is c#, it's just the emulator will without a database, perhaps all this will be loaded from files, and where you can find a full list of packages for writing code, then I need to read? Only what to read?
For both of you. Learn coding and reversing. There are enough tutorials for reversing the main.swf
Because I've seen people still use this crappy method for configs in their public servers (i cried a lot.) I wrote some example class in like 5 minutes.
namespace Example
{
public class UserShip
{
private List<ShipConfig> _configs = new List<ShipConfig>();
private ShipConfig _currentConfig;
public UserShip()
{
_configs.Add(new ShipConfig()); //Deserialize or whatever
_currentConfig = _configs.FirstOrDefault();
}
public List<ShipConfig> Configs
{
get
{
return _configs;
}
private set { }
}
public ShipConfig Config
{
get
{
return _currentConfig;
}
set
{
_currentConfig = value;
}
}
}
public class ShipConfig
{
private List<ShipLaser> _lasers = new List<ShipLaser>();
private List<ShipGenerator> _generators = new List<ShipGenerator>();
public List<ShipLaser> Lasers
{
get
{
return _lasers;
}
set
{
_lasers = value;
}
}
public List<ShipGenerator> Generators
{
get
{
return _generators;
}
set
{
_generators = value;
}
}
}
public class ShipGenerator
{
private int _power; //shield or speed
private GeneratorType _type;
public int Power
{
get
{
return _power;
}
set
{
_power = value;
}
}
public GeneratorType Type
{
get
{
return _type;
}
set
{
_type = value;
}
}
}
public enum GeneratorType
{
Speed,
Shield
};
public class ShipLaser
{
private int _damage;
private LaserType _type;
public int Damage
{
get
{
return _damage;
}
set
{
_damage = value;
}
}
public LaserType Type
{
get
{
return _type;
}
set
{
_type = value;
}
}
}
public enum LaserType
{
MP_1,
MP_2,
LF_1,
LF_2,
LF_3,
LF_4
};
}
Thanks, but what is the point of loading ship inventory into the Emulator?
I'd strongly recommand to calcul the damages/shield/speed etc... directly from the website after changing configurations and then load those values into the emulator.
Thanks, but what is the point of loading ship inventory into the Emulator?
I'd strongly recommand to calcul the damages/shield/speed etc... directly from the website after changing configurations and then load those values into the emulator.
3muchoop5u
Better if you have upgrade system, havocs, or something that each laser/shield are required to be updated.
And you can just unequip a laser & calculate damage again without logging out & you dont have to reload all from database.
And to decrease the laser amount after use, you can easily know how many lasers are equipped => Ship.Config.Lasers.Count
And even if you save them into database, you still should use classes for configs, instead of damage1, damage2 because that's so gay
Thanks, but what is the point of loading ship inventory into the Emulator?
I'd strongly recommand to calcul the damages/shield/speed etc... directly from the website after changing configurations and then load those values into the emulator.
That's like the worst thing you can ever do. With that example you could calculate the damage like that:
Code:
public int Damage
{
get
{
var retDamage = 0;
foreach(var laser in Config.Lasers)
{
retDamage = (retDamage + laser.Damage) * AmmoType; //AmmoType not declared yet. Simple enum should be fine
}
return retDamage;
}
private set { }
}
Then play a bit around with the value to get a random one.
For both of you. Learn coding and reversing. There are enough tutorials for reversing the main.swf
Because I've seen people still use this crappy method for configs in their public servers (i cried a lot.) I wrote some example class in like 5 minutes.
namespace Example
{
public class UserShip
{
private List<ShipConfig> _configs = new List<ShipConfig>();
private ShipConfig _currentConfig;
public UserShip()
{
_configs.Add(new ShipConfig()); //Deserialize or whatever
_currentConfig = _configs.FirstOrDefault();
}
public List<ShipConfig> Configs
{
get
{
return _configs;
}
private set { }
}
public ShipConfig Config
{
get
{
return _currentConfig;
}
set
{
_currentConfig = value;
}
}
}
public class ShipConfig
{
private List<ShipLaser> _lasers = new List<ShipLaser>();
private List<ShipGenerator> _generators = new List<ShipGenerator>();
public List<ShipLaser> Lasers
{
get
{
return _lasers;
}
set
{
_lasers = value;
}
}
public List<ShipGenerator> Generators
{
get
{
return _generators;
}
set
{
_generators = value;
}
}
}
public class ShipGenerator
{
private int _power; //shield or speed
private GeneratorType _type;
public int Power
{
get
{
return _power;
}
set
{
_power = value;
}
}
public GeneratorType Type
{
get
{
return _type;
}
set
{
_type = value;
}
}
}
public enum GeneratorType
{
Speed,
Shield
};
public class ShipLaser
{
private int _damage;
private LaserType _type;
public int Damage
{
get
{
return _damage;
}
set
{
_damage = value;
}
}
public LaserType Type
{
get
{
return _type;
}
set
{
_type = value;
}
}
}
public enum LaserType
{
MP_1,
MP_2,
LF_1,
LF_2,
LF_3,
LF_4
};
}
That's like the worst thing you can ever do. With that example you could calculate the damage like that:
Code:
public int Damage
{
get
{
var retDamage = 0;
foreach(var laser in Config.Lasers)
{
retDamage = (retDamage + laser.Damage) * AmmoType; //AmmoType not declared yet. Simple enum should be fine
}
return retDamage;
}
private set { }
}
Then play a bit around with the value to get a random one.
I personally think that the worst is to load it into emulator, you will have to execute many sql query (1 per item) + you will have to calculate the shield, damages, speed etc... each time the User object is created into your emulator ;/
I prefer to calculate it once through PHP code than doing it your way, but everybody is free to do how he likes to do
I personally think that the worst is to load it into emulator, you will have to execute many sql query (1 per item) + you will have to calculate the shield, damages, speed etc... each time the User object is created into your emulator ;/
I prefer to calculate it once through PHP code than doing it your way, but everybody is free to do how he likes to do
I personally think that the worst is to load it into emulator, you will have to execute many sql query (1 per item) + you will have to calculate the shield, damages, speed etc... each time the User object is created into your emulator ;/
I prefer to calculate it once through PHP code than doing it your way, but everybody is free to do how he likes to do
Do you even JSON and serialize and deserialize? You know that 1 query is enough, if you store the inventory in one row?
It's much better and more efficient to store and calcute that stuff on the emulator side.
Private private server :P READ FOR MORE INFO 12/01/2010 - SRO Private Server - 12 Replies hey guys im wondering if there is anyway to make a real private server like ZSZC or SWSRO or MYSRO but to where i can only play and level a character and as if it was a real private server. but just for me, not like an emulator where im already lvl 90 or 120 or whatever. i mean one where i set the rates and i level. if not then ok u can close this. but i was just wondering.