1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

What programming language is this?

Discussion in 'General Programming Chat' started by darkmassacre, Aug 20, 2015.

  1. darkmassacre

    darkmassacre Newbie

    Joined:
    Apr 27, 2015
    Messages:
    38
    Likes Received:
    11
    I used to modify bot codes for video games and make it better suited for the class I played. I ended up doing some of the best dps in the world with the modified code. The problem is I dont know how to program and I could only do this if someone wrote the base code that I could go off of. I have finally decided to learn programming but I dont know what language it is that I was editing, It might be LUA, C++ or c#.

    Here is a sample code, if you could please tell me what language this it, it would be greatly appreciated.

    Code:
    
    -- combat mode check --
    if combatMode ~= 2 then
        return false
    end
    
    
    -- bloodbath,if=enabled&buff.enrage.up
    if IsMeeleSpellAvailable(Bloodbath) then 
        if HasBuff("player", EnrageBuff) > 0 then
            CastSpellByID(Bloodbath)
        end
    end
        
        
    -- cleave,if=(rage>=60&debuff.colossus_smash.up)|rage>90
    if IsMeeleSpellAvailable(Cleave) then
        if (GetPlayerPower() >= 60 and HasDebuff("target", ColossusSmashDB) > 0) or GetPlayerPower() > 90 then
            CastSpellByID(Cleave)
        end
    end
    
    
    -- heroic_leap,if=buff.enrage.up
    if SpellCooldown(HeroicLeap) < latency then
        if HasBuff("target", EnrageBuff) > 0 then
            -- CastSpellByID(HeroicLeap)
        end
    end
    
    -- dragon_roar,if=enabled&(!debuff.colossus_smash.up&(buff.bloodbath.up|!talent.bloodbath.enabled))
    if IsMeeleSpellAvailable(DragonRoar)then
         if HasDebuff("target", ColossusSmashDB) == 0 then
             if HasBuff("player", BloodbathBuff) > 0.1 or IsSpellKnown(Bloodbath) == false then
                CastSpellByID(DragonRoar)
             end
         end
    end
        
    -- bladestorm,if=enabled&buff.enrage.up&(buff.bloodbath.up|!talent.bloodbath.enabled)
    if IsMeeleSpellAvailable(Bladestorm) then
        if HasBuff("player", EnrageBuff) > 0 and (HasBuff("player", BloodbathBuff) > 0 or IsSpellKnown(Bloodbath) == false) then
            CastSpellByID(Bladestorm)
        end
    end
    
    -- shockwave,if=enabled
    if IsMeeleSpellAvailable(Shockwave) then
        CastSpellByID(Shockwave) 
    end
    
    -- colossus_smash
    if IsMeeleSpellAvailable(ColossusSmash) then
        CastSpellByID(ColossusSmash)
    end
    
    -- bloodthirst,cycle_targets=1,if=dot.deep_wounds.remains<5
    if IsMeeleSpellAvailable(Bloodthirst) then
        if HasDebuff("target", DeepWoundsDB) > 5 then
            --SwitchTarget
            --TargetNearestEnemy(false)
        else
            CastSpellByID(Bloodthirst)
        end
    end
    
    -- bloodthirst,if=!(target.health.pct<20&debuff.colossus_smash.up&rage>=30&buff.enrage.up
    if IsMeeleSpellAvailable(Bloodthirst) then
        if not (InExecuteRange() and HasDebuff("target", ColossusSmashDB) > 0
          and GetPlayerPower() >= 30 and HasBuff("player", EnrageBuff) > 0) then  
            CastSpellByID(Bloodthirst)
        end
    end
        
    -- storm_bolt,if=enabled
    if IsSpellKnown(StormBolt) and SpellCooldown(StormBolt) < latency then
        CastSpellByID(StormBolt)
    end
        
    
    -- wait,sec=cooldown.bloodthirst.remains,if=!(target.health.pct<20&debuff.colossus_smash.up&rage>=30&buff.enrage.up)&cooldown.bloodthirst.remains<=1&cooldown.bloodthirst.remains
    if SpellCooldown(Bloodthirst) <= 1 and SpellCooldown(Bloodthirst) ~= 0 then 
        if not (InExecuteRange() and HasDebuff("target", ColossusSmashDB) > 0
          and GetPlayerPower() >= 30 and HasBuff("player", EnrageBuff) > 0) then
            return false
        end
    end
    
    -- execute,if=debuff.colossus_smash.up
    if IsMeeleSpellAvailable(Execute) then
        if TargetHealthPct() < 20 then
            if HasDebuff("player", ColossusSmashDB) > 0 then
                CastSpellByID(Execute)
            end
        elseif HasBuff("player", Tier16ExecuteBuff) > 0 then
            if HasDebuff("player", ColossusSmashDB) > 0 then
                CastSpellByID(Execute)
            end
        end
    end
    
    -- raging_blow,if=buff.meat_cleaver.up|target.health.pct<20
    if IsMeeleSpellAvailable(RagingBlow) then
        local remains, stacks = HasBuff("player", WhirlwindBuff) 
        if stacks == 1 or TargetHealthPct() < 20 then
            CastSpellByID(RagingBlow) 
        end
    end
    
    -- whirlwind,if=!buff.meat_cleaver.up
    if IsMeeleSpellAvailable(Whirlwind) then
        if HasBuff("player", WhirlwindBuff) == 0 then
            CastSpellByID(Whirlwind)
        end
    end
    
    -- battle_shout
    if SpellCooldown(BattleShout) < latency then
        if shoutMode == "battle" then
             CastSpellByID(BattleShout)
        else 
            CastSpellByID(CommandingShout)
        end 
    end
    
    -- heroic_throw
    if SpellCooldown(HeroicThrow) < latency then
        CastSpellByID(HeroicThrow)
    end
    
    
     
    Last edited: Aug 20, 2015
  2. Asif WILSON Khan

    Asif WILSON Khan Executive VIP Jr. VIP

    Joined:
    Nov 10, 2012
    Messages:
    12,171
    Likes Received:
    33,773
    Gender:
    Male
    Occupation:
    Fun Lovin' Criminal
    Location:
    London
    Home Page:
    I think it is Lua
     
    • Thanks Thanks x 3
  3. DTjai

    DTjai Regular Member

    Joined:
    Nov 24, 2013
    Messages:
    275
    Likes Received:
    66
    Gender:
    Male
    Occupation:
    Outreach / SEO / SEA Marketer
    Location:
    Planet Earth
    Can confirm, it is Lua.
     
  4. sula001

    sula001 Newbie

    Joined:
    Jun 14, 2015
    Messages:
    33
    Likes Received:
    7
    this is definitely not delphi, php, swift, C#, C++.
     
  5. Wowali

    Wowali Newbie

    Joined:
    Jun 22, 2014
    Messages:
    15
    Likes Received:
    3
    Yeah man.

    I think it's just an algorithm, it's not a language syntax!
     
  6. selo

    selo Junior Member

    Joined:
    Jan 23, 2009
    Messages:
    117
    Likes Received:
    25
    Location:
    Digital Nomad
    An algorithm? It's LUA! You can tell it by the comments and the "end"s.
     
  7. MuayThai

    MuayThai Jr. VIP Jr. VIP

    Joined:
    Aug 25, 2015
    Messages:
    614
    Likes Received:
    185
    LUA scripts are typical for game AI programming.
     
  8. abbas2

    abbas2 Newbie

    Joined:
    Oct 24, 2015
    Messages:
    35
    Likes Received:
    6
    Location:
    USA
    That definitely appears to be LUA though I'd consult others for further advice. cheers
     
  9. nocare

    nocare Junior Member

    Joined:
    Apr 29, 2013
    Messages:
    164
    Likes Received:
    81
    Location:
    Deep Code
    I do a bit of game modding, it most definitely looks like Lua :)
    Looks like a script from some kind of warrior game/mmo.
     
  10. backlinkingseo

    backlinkingseo BANNED BANNED

    Joined:
    Mar 31, 2014
    Messages:
    87
    Likes Received:
    3
    LUO the most common joysticks games language...
     
  11. AppCentral

    AppCentral Newbie

    Joined:
    Oct 7, 2015
    Messages:
    32
    Likes Received:
    8
    This is Lua, and was designed for World of Warcraft, warrior class.