RE: DrugWars: Custom JSON Operations

You are viewing a single comment's thread from:

DrugWars: Custom JSON Operations

in drugwars •  3 months ago
  1. Get the code
    1. Open Developer tools in Chrome
    2. Go to drugwars game page
    3. Copy the JS (in my case the last line was enough (line 137))
  2. Replace \n with new lines
  3. Format the code for e. g. using ([]
  • Learn Websocket (API uses it)
    • Calls which are used by the game you can find also in Developer Tool, just switch the tab to correct one
  • Look for text next to interesting values for e. g. in if you want to know how are the values displayed next to "Current Capacity" HTML text
    1. look for the text it in the code
    2. Next to it you will find
    3. Then look for definition of calculate_capacity function
      calculate_capacity: function () {
    4. Now you got the math which is behind the capacity calculation
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!