[Cocos2dx] "Heroes Charge" source code (Mobile)

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 36
  1. #16
    Cypher WireShark is offline
    MemberRank
    Jun 2009 Join Date
    Planet Earth xDLocation
    950Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    Wow great @GigaToni

  2. #17
    Member cosmin900 is offline
    MemberRank
    Nov 2013 Join Date
    76Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    Quote Originally Posted by GigaToni View Post


    Works :). I'll upload the stuff when ready on my github.
    Although.. Saving the player currently doesn't.
    You are a PRO ! Nice done

  3. #18
    Custom Title Enabled GigaToni is offline
    MemberRank
    Aug 2009 Join Date
    GER / FRLocation
    2,329Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    I guess it was already released here:
    http://forum.ragezone.com/f857/relea...-help-1126765/

    But the guy couldn't make it work lol.

    EDIT:
    Code is up on my github.
    Last edited by GigaToni; 22-03-18 at 12:50 PM.

  4. #19
    Member fameza123 is offline
    MemberRank
    Nov 2011 Join Date
    73Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    @GigaToni Nice bro

  5. #20
    Cypher WireShark is offline
    MemberRank
    Jun 2009 Join Date
    Planet Earth xDLocation
    950Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    Based on your image @GigaToni i think this is a different game than Hero Charge not same UI as Hero Charge maybe changed the Title of the thread it makes everyone confuse with this maybe same aspect but not the same thanks

    Sent from my SM-J730G using Tapatalk

  6. #21
    Custom Title Enabled GigaToni is offline
    MemberRank
    Aug 2009 Join Date
    GER / FRLocation
    2,329Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    I downloaded the code from the other thread. exactly the same engine.. And file/folder structure. Have to check if anything else is different.

  7. #22
    Cypher WireShark is offline
    MemberRank
    Jun 2009 Join Date
    Planet Earth xDLocation
    950Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    Quote Originally Posted by GigaToni View Post
    I downloaded the code from the other thread. exactly the same engine.. And file/folder structure. Have to check if anything else is different.
    Yeah its the same file and structure but not the game Hero Charge. This what i am pointing

    Sent from my SM-J730G using Tapatalk

  8. #23
    Custom Title Enabled GigaToni is offline
    MemberRank
    Aug 2009 Join Date
    GER / FRLocation
    2,329Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    Here is a decoder & decompiler for *.abc files found in one of those copycat games. It's not perfect but works.

    Example of Decoded & Decompiled DailyLoginReward.abc:
    Spoiler:
    Code:
    -- Decompiled using luadec 2.2 rev: 895d923 for Lua 5.1 from https://github.com/viruscamp/luadec
    -- Command line: Debug\dailylogin.luac 
    
    -- params : ...
    -- function num : 0
    local ed = ed
    local class = {
    mt = {}
    }
    -- DECOMPILER ERROR at PC5: Confused about usage of register: R2 in 'UnsetPending'
    
    ;
    (class.mt).__index = class
    -- DECOMPILER ERROR at PC7: Confused about usage of register: R2 in 'UnsetPending'
    
    ;
    (ed.ui).dailylogin = class
    local explain_text = T("\n每月累计签到天数,领取相应的签到奖励ぜ130\n\n在特定日子里,达到对应VIP等级及以上的玩家可以领取双朱28ΥŖ励!第二份奖励可以当日内升级VIP等级后补领䜱28\130\n\n注:每日签到奖励在每天的05:00计算隔天,当天未领取的奖励隔天不可以再补领䜱28\130\n\n")
    local getDate = function()
      -- function num : 0_0 , upvalues : ed
      local time = (ed.getFitServerTime)()
      local date = (ed.getYMDHMS)(time)
      local d = tonumber(date.day)
      local h = tonumber(date.hour)
      local m = tonumber(date.minute)
      local s = tonumber(date.second)
      do
        if d == 1 then
          local boa = (ed.checkBOA)({h = h, m = m, s = s})
        end
        if boa ~= "after" or boa == "before" then
          date = (ed.getYMDHMS)(time - 86400)
        end
        local y = tonumber(date.year)
        local m = tonumber(date.month)
        local d = tonumber(date.day)
        return {y = y, m = m, d = d}
      end
    end
    
    class.getDate = getDate
    ed.getDate = getDate
    local getRewardAt = function(i)
      -- function num : 0_1 , upvalues : ed
      local date = (ed.getDate)()
      if not i then
        local y, m, d = date.y, date.m, date.d
      end
      local row = ((((ed.getDataTable)("DailyLoginReward"))[y])[m])[d]
      if not row then
        return 
      end
      local type = row["Reward Type"]
      local id = row["Reward ID"]
      local amount = row["Reward Amount"]
      local vip = row["Double Reward VIP Level"] or 0
      return {type = type, id = id, amount = amount, vip = vip}
    end



    Zippyshare.com - Decode_and_Destroy.rar

    If you search for "520006_397" you'll find it.

    Did anybody try my "fixed" version? @WireShark @fameza123 Did it work for you? If not I suggest post an issue on github and I'll try and help you out. The game is actually fun, and I'd like to help people fixing & getting this working.

    EDIT:
    Before I forget it: The game I posted above is EXACTLY the same. Not the actual game but the download link the dude gave is the SAME SOURCE-CODE with SAME ASSETS. Nothing is different. This game here is also NOT Heroes charge. But who cares... There are about ~20 of these games released all exactly the same except for minor differences in UI and graphics. I guess one company developed the base & sold it, and others just changed the graphics. While researching I also found out that Lilith Games sued the company UCool which "developed" Heroes Charge because they "supposedly" "decompiled" and "stole" their code.. Yea right.. Decompiled a game which was made in C++ and replicated 1 to 1.. If it would be so easy :(
    Last edited by GigaToni; 23-03-18 at 11:45 AM.

  9. #24
    Cypher WireShark is offline
    MemberRank
    Jun 2009 Join Date
    Planet Earth xDLocation
    950Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    Quote Originally Posted by GigaToni View Post
    [/spoiler]


    Zippyshare.com - Decode_and_Destroy.rar

    If you search for "520006_397" you'll find it.

    Did anybody try my "fixed" version? @WireShark @fameza123 Did it work for you? If not I suggest post an issue on github and I'll try and help you out. The game is actually fun, and I'd like to help people fixing & getting this working.

    EDIT:
    Before I forget it: The game I posted above is EXACTLY the same. Not the actual game but the download link the dude gave is the SAME SOURCE-CODE with SAME ASSETS. Nothing is different. This game here is also NOT Heroes charge. But who cares... There are about ~20 of these games released all exactly the same except for minor differences in UI and graphics. I guess one company developed the base & sold it, and others just changed the graphics. While researching I also found out that Lilith Games sued the company UCool which "developed" Heroes Charge because they "supposedly" "decompiled" and "stole" their code.. Yea right.. Decompiled a game which was made in C++ and replicated 1 to 1.. If it would be so easy :(
    Yeah I found it also its the same base source of their games UCool just changed UI and make it as Heroes Charge clear now.

    Didn't try your fixed source downloading it now and got to comment on this later thanks.

    https://github.com/exmex/HC

  10. #25
    Custom Title Enabled GigaToni is offline
    MemberRank
    Aug 2009 Join Date
    GER / FRLocation
    2,329Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    The last 2 days I tried getting Protobuf2 to work with C#. It didn't work. So I guess I try to write a C++ library that parses the message with Protobuf c++ and call that from C#. While I was investigating the protocol the client/server uses I made a documentation for it:
    https://github.com/exmex/HC/wiki/Packet-Description

    This is how far I got with my C# code (Left C#, right PHP):


    I get as far as extracting the ProtoBuf message. But parsing it doesn't work.

  11. #26
    Cypher WireShark is offline
    MemberRank
    Jun 2009 Join Date
    Planet Earth xDLocation
    950Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    Quote Originally Posted by GigaToni View Post
    The last 2 days I tried getting Protobuf2 to work with C#. It didn't work. So I guess I try to write a C++ library that parses the message with Protobuf c++ and call that from C#. While I was investigating the protocol the client/server uses I made a documentation for it:
    https://github.com/exmex/HC/wiki/Packet-Description

    This is how far I got with my C# code (Left C#, right PHP):


    I get as far as extracting the ProtoBuf message. But parsing it doesn't work.
    I cant see the image clearly using tapatalk app the emulator work but i cant run the webserver what is the dependencies of the webserver files i see php files may i ask if you can give a guide how does the webserver works do I need a linux based machine to run this as I see the default source webserver is running on yiiframework.

    I know now I must run this with PHP and set the PHP to Environment Variables will be back here

    Sorry for the noob question here

    Update: My Problem now is how to compile the client? I have cocos2dx and other dependencies installed.
    Sent from my SM-J730G using Tapatalk
    Last edited by WireShark; 26-03-18 at 11:12 AM.

  12. #27
    Custom Title Enabled GigaToni is offline
    MemberRank
    Aug 2009 Join Date
    GER / FRLocation
    2,329Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    You only need PHP and MySQL for the webserver. With the bat file it creates a very weak webserver integrated into PHP. Following PHP Modules are REQUIRED:
    memcache, mysql(i)

  13. #28
    Cypher WireShark is offline
    MemberRank
    Jun 2009 Join Date
    Planet Earth xDLocation
    950Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    Yeah I already run it thanks I need a simple guide just to recompile the client source on cocos2dx. I reference it with your release it was a clean client source.
    Update: I see the client on the original release lol I didn't check it before will try it now

    My Problem now I check the config.lua and set the ip to 127.0.0.1 but serverlist error



    Problem Solved:

    You need to config Resource_Client\version_win32.cfg to

    Code:
    {   
    "branch" : "MAIN",   
    "inStoreUpdate" : "http://www.baidu.com",   
    "localVerson" : "1.000.16",   
    "sever" : "http://127.0.0.1/severs_dota_ios.php",   
    "severBackup" : "http://127.0.0.1/severs_dota_ios.php",   
    "version" : 1
    }


    Additional Note: copy the msyh.ttf & msyhbd.ttf fonts from GigaToni repo Resource_Client paste into the Resource_Client on the Original release
    Last edited by WireShark; 26-03-18 at 01:47 PM. Reason: Edit Problem Fixed

  14. #29
    Custom Title Enabled GigaToni is offline
    MemberRank
    Aug 2009 Join Date
    GER / FRLocation
    2,329Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    Quote Originally Posted by GigaToni View Post
    Did it work for you? If not I suggest post an issue on github and I'll try and help you out. The game is actually fun, and I'd like to help people fixing & getting this working.
    Please. Also post the *.log file.

    EDIT:
    You don't actually need to edit any *.lua files.

    version_win32.cfg is already "patched" in the Repository:
    https://raw.githubusercontent.com/ex...sion_win32.cfg

    Config.lua doesn't need to be modified. It gets the server IP from severs_dota_ios.php. Not from the LUA file.

    EDIT2:
    The only thing missing in my repository should be the *.exe file. Which you should compile yourself.
    Last edited by GigaToni; 26-03-18 at 01:54 PM.

  15. #30
    Cypher WireShark is offline
    MemberRank
    Jun 2009 Join Date
    Planet Earth xDLocation
    950Posts

    Re: [Cocos2dx] "Heroes Charge" source code (Mobile)

    Quote Originally Posted by GigaToni View Post
    Please. Also post the *.log file.

    EDIT:
    You don't actually need to edit any *.lua files.
    Yes only the version_win32.cfg only need to edit I did test not the lua but again I get this I try AccountID 1 2 3 not working



    Game & Server logs:
    GameLog
    ServerLog

    Attachment not working for logs sorry



Page 2 of 3 FirstFirst 123 LastLast

Advertisement