Results 1 to 8 of 8
  1. #1
    OwnageMoreDE's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Australia
    Posts
    102
    Reputation
    10
    Thanks
    3

    Need help understanding this.

    I'm at a level below beginner, I'm not even sure what code language this is, please move me to the right sub-forum if I get this wrong, but I need help understanding

    these two lines of code.

    DamageReductions[it].PercentageReduction*2.0*(DamageReductions[it].PercentageReduction<0?NEGATIVE_EQUIPMENT_STAT_WEI GHT:1.0); //120


    StatModifiers[it]*9.0*(StatModifiers[it]<0?NEGATIVE_EQUIPMENT_STAT_WEIGHT:1.0); //300

    I don't understand what the //120 and the //300 at the end are for. Nor negative_equipment_stat_weight:1.0

    I'd appreciate it if someone could explain both lines in full detail. (or somewhat near it)
    Last edited by OwnageMoreDE; 09-03-2012 at 05:12 AM.

  2. #2
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,682
    My Mood
    Breezy
    The Conditional (or Ternary) Operator (? - C++ Articles

    Code:
    (expression 1) ? expression 2 : expression 3
    If expression 1 evaluates to true, then expression 2 is evaluated.
    
    If expression 1 evaluates to false, then expression 3 is evaluated instead.
    In this case:
    StatModifiers[it]*9.0*(StatModifiers[it]<0?NEGATIVE_EQUIPMENT_STAT_WEIGHT:1.0);

    So if StatModifiers[it] is less than 0, use the NEGATIVE_EQUIPMENT_STAT_WEIGHT value and mutliply it with the other values. If StatModifiers[it] is bigger than or equal to 0, use 1.0 and multiply it with the other values.

    As for the // 120 and //300, I got no idea. Doesn't tell me anything.
    Last edited by master131; 09-03-2012 at 06:49 AM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  3. #3
    OwnageMoreDE's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Australia
    Posts
    102
    Reputation
    10
    Thanks
    3
    Oh you're from Melbourne too . Happy 9.45pm.

    Also, can you explain what this means - (StatModifiers[it]<0?NEGATIVE_EQUIPMENT_STAT_WEIGHT:1.0)

    I'm trying to figure out (or get someone else to) a quality/rating system of items.

    What I'm trying to find is how to get to this number - 863.6

    With that equation, and a positive value of 1146.
    And a negative value of 191.

    The part I truly don't understand is how to get from 1146 and 191 to 863.6. Someone has told me that negative values are 1.4 more than positives.
    So 1146 - 191 is 955, which is clearly not 863.6
    But if I take what they told me that negatives are 1.4 more? - 1146 - 286.5, which is 859.5
    Still not 863.6.

    If I work backwards from 1146 and 863.6. The value of multiplying is 1.4785, but I don't see how that fits into the script there, Am I missing something? Or just not understanding it.

    EDIT: After searching for awhile i found this - NEGATIVE_EQUIPMENT_STAT_WEIGHT = 1.4;

    But, if that is correct, how is the other one wrong. I did not find the value 863.6, so the only conclusion I can draw is that they lied?
    Sorry for this being so long, I've tried to put spaces so it doesn't look as long

    EDIT AGAIN: If it's alright with you, can you give me your msn so I don't have to have such long posts? (It's alright if you say no, I actually do realize how much of a burden and stupid I am )
    Last edited by OwnageMoreDE; 09-03-2012 at 07:13 AM.

  4. #4
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,682
    My Mood
    Breezy
    Quote Originally Posted by OwnageMoreDE View Post
    Oh you're from Melbourne too . Happy 9.45pm.

    Also, can you explain what this means - (StatModifiers[it]<0?NEGATIVE_EQUIPMENT_STAT_WEIGHT:1.0)
    I explained this before:
    Quote Originally Posted by master131
    In this case:
    StatModifiers[it]*9.0*(StatModifiers[it]<0?NEGATIVE_EQUIPMENT_STAT_WEIGHT:1.0);

    So if StatModifiers[it] is less than 0, use the NEGATIVE_EQUIPMENT_STAT_WEIGHT value and mutliply it with the other values. If StatModifiers[it] is bigger than or equal to 0, use 1.0 and multiply it with the other values.
    Quote Originally Posted by OwnageMoreDE
    What I'm trying to find is how to get to this number - 863.6
    Sorry, no idea. Not really sure what you're trying to achieve.
    Last edited by master131; 09-03-2012 at 07:41 AM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  5. #5
    .::SCHiM::.'s Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    733
    Reputation
    180
    Thanks
    880
    My Mood
    Twisted
    And btw, we can't tell what language that is because it could really be anything. You should provide more source. This could be C++ or C# or phyton or ruby or php, I have no idea.

    I'm SCHiM

    Morals derive from the instinct to survive. Moral behavior is survival behavior above the individual level.

    Polymorphic engine
    Interprocess callback class
    SIN
    Infinite-precision arithmetic
    Hooking dynamic linkage
    (sloppy)Kernel mode Disassembler!!!

    Semi debugger




  6. #6
    giniyat101's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    Not telling.
    Posts
    1,935
    Reputation
    130
    Thanks
    1,380
    My Mood
    Dead
    let me try to explain:

    DamageReductions : avariable. probably type of someclass array

    [in]: the array index.

    .PercentageReduction : a member in the class

    *2.0 : multiplied by 2.0

    *(DamageReductions[it].PercentageReduction<0?NEGATIVE_EQUIPMENT_STAT_WEI GHT:1.0) : multiplied by NEGATIVE_EQUIPMENT_STAT_WEIGHT if the condition DamageReductions[it].PercentageReduction<0 is true or by 1.0 if it is false.

    ; : end of the line

    //120 : a comment by the coder

    the second line is almost the same. but the variable StatModifiers type is something numberic array this time (could be float array for example)


     



    [img]https://i43.photobucke*****m/albums/e367/DeteSting/Steam-update.gif[/img]

  7. #7
    OwnageMoreDE's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Australia
    Posts
    102
    Reputation
    10
    Thanks
    3
    Quote Originally Posted by master131 View Post


    I explained this before:




    Sorry, no idea. Not really sure what you're trying to achieve.
    Thanks for helping, Just trying to figure out a games quality rating system.

    And I wrote in the post, I have no idea what language it is.

    Does DamageReductions refer to another line in the code? Should I go search for this?

  8. #8
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    You should learn first how programming works, dont you think?

    DamageReduction as giniyat101 said, its an array. (If you dont know what an array is, you are doing everything wrong)
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

Similar Threads

  1. [Help Request] Need help, Get this when i start crossfire with injector.
    By -zZz- in forum CrossFire Help
    Replies: 4
    Last Post: 07-10-2011, 03:26 PM
  2. [Help Request] hi i need help on this plss
    By nagif123 in forum CrossFire Help
    Replies: 8
    Last Post: 05-25-2011, 03:22 AM
  3. Need help with this error...
    By Screenlooker in forum Combat Arms Hacks & Cheats
    Replies: 6
    Last Post: 12-27-2008, 02:21 PM
  4. Need help by this Hack pls help
    By badgamer in forum WarRock - International Hacks
    Replies: 4
    Last Post: 04-14-2007, 09:52 AM
  5. Need help by this Hack pls help
    By badgamer in forum WarRock - International Hacks
    Replies: 0
    Last Post: 04-13-2007, 12:42 PM