Private Server Info and Support Thread

07/03/2015 09:45 lCulito#1906
who can give me a new link for download graphics of version 7.5 please? thanks :s original link don't work u.u
07/03/2015 11:28 oleg-19952008#1907
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?
07/03/2015 11:48 0wnix#1908
Quote:
Originally Posted by Requi View Post
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.

Old crappy bullshit:

Better class :p
Code:
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? :confused::confused:

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.
07/03/2015 12:32 cryz35#1909
Quote:
Originally Posted by player.elite View Post
Thanks, but what is the point of loading ship inventory into the Emulator? :confused::confused:

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

And dear pony, why you no like auto properties :D
07/03/2015 12:45 Requi#1910
Quote:
Originally Posted by player.elite View Post
Thanks, but what is the point of loading ship inventory into the Emulator? :confused::confused:

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.
07/03/2015 13:33 coltellino#1911
Quote:
Originally Posted by Requi View Post
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.

Old crappy bullshit:

Better class :p
Code:
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
	};
}
where this code is inserted
07/03/2015 13:36 0wnix#1912
Quote:
Originally Posted by Requi View Post
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 :D
07/03/2015 13:45 th0rex#1913
Quote:
Originally Posted by player.elite View Post
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 :D
Why would you need 1 query per item ?
07/03/2015 13:46 Requi#1914
Quote:
Originally Posted by player.elite View Post
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 :D
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.
07/04/2015 02:33 Sήøwy#1915
Quote:
Originally Posted by sveratus View Post
this thread is not useful at all, too bad that it was created
A thread can't learn you programming and will never do any work for you.
07/04/2015 02:34 S7K Yuuki#1916
Quote:
Originally Posted by sveratus View Post
this thread is not useful at all, too bad that it was created
Nevertheless that post is extremly useful.
07/04/2015 23:41 Destiny#1917
i rewrite game.xml for older client version this code from game.xml
Code:
<menu gap="3" actionSlots="10" menuSlots="7" maxVisiblePoolSlots="6" poolSlots="13">
		<menuButtons stdIcon="comb01_std.png" hoverIcon="comb01_hover.png" selectedIcon="comb01_selected.png">
			<menuButton id="0" resKey="laser.png" subAction="true" languageKey="ttip_menu_laser">
				<actionButtons stdIcon="comb02_std.png" hoverIcon="comb02_hover.png" selectedIcon="comb02_selected.png">
<!--					<actionButton id="0" resKey="laser.png" alwaysExist="true" languageKey="ttip_laser_activate" customizable="false"/>-->
					<activateButton id="0" resKey="laser.png" languageKey="ttip_laser_activate" customizable="false"/>
					<actionButton id="3" resKey="laserBat1.png" languageKey="ttip_laser" alwaysExist="true" counter="true" ammobar="true"/>
					<actionButton id="4" resKey="laserBat2.png" languageKey="ttip_laser" alwaysExist="true" counter="true" ammobar="true"/>
					<actionButton id="5" resKey="laserBat3.png" languageKey="ttip_laser" alwaysExist="true" counter="true" ammobar="true"/>
					<actionButton id="6" resKey="laserBat4.png" languageKey="ttip_laser" alwaysExist="true" counter="true" ammobar="true"/>
					<actionButton id="7" resKey="laserBat5.png" languageKey="ttip_laser" alwaysExist="true" counter="true" ammobar="true"/>
					<actionButton id="39" resKey="laserBat6.png" languageKey="ttip_laser" alwaysExist="true" counter="true" ammobar="true"/>
				</actionButtons>
			</menuButton>
is readed in client by this ??

Code:
private function init() : void
      {
         var _loc3_:XML = null;
         var _loc4_:* = 0;
         var _loc5_:String = null;
         var _loc6_:String = null;
         var _loc7_:String = null;
         var _loc8_:XML = null;
         var _loc9_:* = 0;
         var _loc10_:String = null;
         var _loc11_:String = null;
         var _loc12_:ActionButtonPattern = null;
         var _loc1_:SWFFinisher = SWFFinisher(ResourceManager.fileCollection.getFinisher("actionMenu"));
         var _loc2_:Bitmap = _loc1_.getEmbededBitmap("slot");
         this.slotWidth = _loc2_.width;
         this.slotHeight = _loc2_.height;
         this.gap = Main.gameXML.menu.attribute("gap");
         this.actionSlotCount = Main.gameXML.menu.attribute("actionSlots");
         for each(_loc3_ in Main.gameXML.menu.menuButtons.menuButton)
         {
            _loc4_ = _loc3_.@id;
            _loc5_ = _loc3_.actionButtons.attribute("stdIcon");
            _loc6_ = _loc3_.actionButtons.attribute("hoverIcon");
            _loc7_ = _loc3_.actionButtons.attribute("selectedIcon");
            for each(_loc8_ in _loc3_.actionButtons.actionButton)
            {
               _loc9_ = _loc8_.@id;
               _loc10_ = _loc8_.attribute("resKey");
               if(_loc8_.attribute("languageKey").length() > 0)
               {
                  _loc11_ = _loc8_.attribute("languageKey");
               }
               _loc12_ = new ActionButtonPattern(_loc9_,_loc4_,_loc10_,_loc5_,_loc6_,_loc7_,_loc11_);
               if(_loc8_.attribute("ammobar").length() > 0)
               {
                  _loc12_.setAmmobar(Main.parseBooleanFromString(_loc8_.attribute("ammobar")));
               }
               if(_loc8_.attribute("selectable").length() > 0)
               {
                  _loc12_.setSelectable(Main.parseBooleanFromString(_loc8_.attribute("selectable")));
               }
               if(_loc8_.attribute("alwaysExist").length() > 0)
               {
                  _loc12_.setAlwaysExist(Main.parseBooleanFromString(_loc8_.attribute("alwaysExist")));
               }
               if(_loc8_.attribute("counter").length() > 0)
               {
                  _loc12_.setCounter(Main.parseBooleanFromString(_loc8_.attribute("counter")));
               }
               if(_loc8_.attribute("active").length() > 0)
               {
                  _loc12_.setActiveAtStart(Main.parseBooleanFromString(_loc8_.attribute("active")));
               }
               else
               {
                  _loc12_.setActiveAtStart(true);
               }
               if(_loc8_.attribute("cooldown").length() > 0)
               {
                  _loc12_.setCooldown(Main.parseBooleanFromString(_loc8_.attribute("cooldown")));
               }
               if(_loc8_.attribute("customizable").length() > 0)
               {
                  _loc12_.setCustomizable(Main.parseBooleanFromString(_loc8_.attribute("customizable")));
               }
               actionButtonPatterns.push(_loc12_);
            }
         }
      }
07/05/2015 02:10 lCulito#1918
spacemap, link down... any link please? thanks :C

original post:
[Only registered and activated users can see links. Click Here To Register...]
07/05/2015 04:01 manulaiko3.0#1919
Quote:
Originally Posted by lCulito View Post
spacemap, link down... any link please? thanks :C

original post:
[Only registered and activated users can see links. Click Here To Register...]
Is fucking funny how you call yourself a programmer and owner of darkstars and you just beg for help.
Same goes for edox xD
07/05/2015 09:52 Destiny#1920
Quote:
Originally Posted by manulaiko3.0 View Post
Is fucking funny how you call yourself a programmer and owner of darkstars and you just beg for help.
Same goes for edox xD
nope i dont say i am programer i code server just try remake game xml for 2.1.20 main i remake action bar now i must find windown code and make it :P