who can give me a new link for download graphics of version 7.5 please? thanks :s original link don't work u.u
Thanks, but what is the point of loading ship inventory into the Emulator? :confused::confused:Quote:
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 }; }
3muchoop5uQuote:
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:Quote:
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.
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 { }
}
where this code is insertedQuote:
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 }; }
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 ;/Quote:
That's like the worst thing you can ever do. With that example you could calculate the damage like that:
Then play a bit around with the value to get a random one.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 { } }
Why would you need 1 query per item ?Quote:
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?Quote:
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
<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>
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_);
}
}
}
Is fucking funny how you call yourself a programmer and owner of darkstars and you just beg for help.Quote:
spacemap, link down... any link please? thanks :C
original post:
[Only registered and activated users can see links. Click Here To Register...]
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 :PQuote:
Is fucking funny how you call yourself a programmer and owner of darkstars and you just beg for help.
Same goes for edox xD