EnixSR
1633 posts
|
Hi everyone ,
Have you ever troubled in counting members’ net point / LP every week ?
This guide will solve all those troublesome works and save you from calculating members’ net in faction management. Continue reading and faction’s net dmg gain is just few steps away :)
Before we start , I assume you already know how to find out these 4 things and USING WINDOWS :
flashcode=
faction_id=
user_id=
game_auth_token=
If you don’t , continue reading .
( Those who already know how to get these 4 info , Congratz and please SKIP to Ruby parts below )
Fiddler
1. Download Fiddler , http://www.fiddler2.com/fiddler2/version.asp
2. After Fiddler installation complete , open up the fiddler and you should see something like this.

3. Now open your Tyrant , wait for it load and GO TO YOUR FACTION INFO page.
4. Back to Fiddler and you should search for “getFactionMembers” cache. Click on it and check the Right side columns. You should see this:

5. Congratz and now you get these 4 info.
________________________________________
If your pc already have RUBY , Skip to NET DMG
RUBY
1. Download Ruby from :
http://www.ruby-lang.org/en/downloads/
Scroll down until you see this , Press it to download

2. Download Ruby gem , TGZ :
http://rubygems.org/pages/download

3. Now you already download these 2 Ruby files , just save them anywhere in your pc and you don’t have to bother them anymore :)
4. Download Ruby Installer:
http://www.ruby-lang.org/en/downloads/
Same with 1st step , just scroll down until you see this:

You will be directed into this page ,

Proceed with the download.
5. After download the Ruby Installer , Run it and install to your pc . It might take few minutes for DOS to run.
Members’ Net DMG
1. Open up Notepad ( Must be a Notepad , wordpad & office word won’t work )
2. Go https://docs.google.com/document/d/1RB71U4ODcxfaSHWxHnrerfLCb3pb5zzpM1xXA9y_iZM/edit
3. Ctrl + A ( Copy All ) things in the google doc , and Paste it in your Notepad.
4. After pasting the script , Scroll down a bit and find these 4

5. Fill in these 4 info .
6. Save As , XXXXXXXXXXX.rb

7. Now Open “Command Prompt” / cmd.exe
Type your XXXXXXXXXXX.rb name in it and press ENTER.

If you didn’t do anything wrongly , wait for few minutes depends on your internet speed , and an Excel file with ALL MEMBERS’ NET will be recorded in Excel file.
A file named “Report15xxx” will appear in the same directory with your XXXXXXXX.rb
Congrats and any question can PM me :D

|
|
|
lol0lo
2758 posts
|
<.< nice effort… but I’m too lazy to go through all the trouble doing this lol…
|
|
|
QBcrusher
606 posts
|
what if u dont have excel?
|
|
|
leftylink
86 posts
|
QBCrusher: It’s just a CSV (comma-separated value) file. Any old text editor can open it. Use Vim, it’s the only text editor worth using. Stop relying on Excel when a plain text editor can do the job just fine.
Or Google Docs can probably do this. Again, why would you use that if you can use a text editor?
EnixSR: Thanks. Looks good.
|
|
|
EvilSplinter
1810 posts
|
Very helpful guide, thanks for sharing it Enix :D
|
|
|
Shadowhopeful
7421 posts
|
What if this is a phishing scam?
@below
I have no idea what Enix does in spare time., and I doubt you do either.
|
|
|
leftylink
86 posts
|
Shadowhopeful: Read the code yourself. It’s not hard to understand. Then you don’t have to take anyone’s word for it. Why do I need to know what Enix does in his spare time to understand some code?
I share this concern too, of course, but I examined the code carefully and the only place I see it making connections to is Tyrant’s server. If there’s phishing going on, it’s quite well hidden. =P
In general:
Code seems written oddly in some places. Why is the code that makes a request and parses the JSON out not a function? Code duplication is bad, and the same code appears three times in this script. Factoring that code out into a function trims about 25 lines out of the script.
The way data is shoved into the final array at the end seems clumsy too. Why is it using points.each_key when it could easily be using points.each? Makes the code much shorter.
I don’t understand what the “logging” thing at the top of the script is doing. The “writer” is never used.
Also all data should just be printed to standard output anyway; it should be up to the user to determine where the data goes, not automatically put it into a file.
But that’s okay, all easy fixes to make. This code was a good start. Obviously you could extend it to include all kinds of different statistics.
|
|
|
Sclep
50 posts
|
Originally posted by QBcrusher:
what if u dont have excel?
Open office is a free, open source, competent alternative.
|
|
|
EnixSR
1633 posts
|
Originally posted by Shadowhopeful:
What if this is a phishing scam?
@below
I have no idea what Enix does in spare time., and I doubt you do either.
Edit: Hmmm I earn my living as a IT coordinator in small company , I’m major in hardware maintenance and I fail at C++ :)
lol I may troll in forum sometimes , but this is a guide :)
All guide made by me are god damn serious and I will provide tech support after that , if anyone stuck in some steps , PM / Just leave a message here ~ You will receive a reply by me within 24 hours :D
An old sample of what you get from the Net ,

|
|
|
Shadowhopeful
7421 posts
|
Well, in that case.
It throws up an error.
AutoFactioNetScoreTracker.rb:127:in ""block in <main>"":undefined method “each” for nil:NilClass <nomethoderror>
from AutoFactioNetScoreTracker.rb:119: in “each”
from AutoFactioNetScoreTracker.rb:119: in “<main>”
|
|
|
mfronek
159 posts
|
Thanks man.
I was using something similar and this is much faster.
|
|
|
EnixSR
1633 posts
|
Originally posted by Shadowhopeful:
Well, in that case.
It throws up an error.
AutoFactioNetScoreTracker.rb:127:in ""block in <main>"":undefined method “each” for nil:NilClass <nomethoderror>
from AutoFactioNetScoreTracker.rb:119: in “each”
from AutoFactioNetScoreTracker.rb:119: in “<main>”
Hmmm make sure you get the right 4 info ~ Syntax error might pop up if any of the info input wrong.
But judging from the error message you got , it’s mostly you get the user_id / faction_id wrongly.
p.s. And yeah by using this method , the user id you used must still be in the faction. Applicant won’t work too :D
|
|
|
Moraku
3184 posts
|
Maybe you should include error-checking with meaningful error messages?
|
|
|
catepillar
2026 posts
|
Originally posted by Moraku:
Maybe you should include error-checking with meaningful error messages?
My guess (based largely off the below) is that he didn’t actually write this code, and that he probably has little to no idea about it.
Originally posted by EnixSR:
Note: Credit to Noobpownr for teaching me this :)
|
|
|
Shadowhopeful
7421 posts
|
Also, is there any way to grab net scores from further back than 7 days?
|
|
|
Kaeel
322 posts
|
just a question… if I Want to run this script on the FACEBOOK version of the game, how can I obtain my game_auth_token?
PS: ty for the GREAT guide!!!!!!
EDIT: Sorry, wrote flash instead of FACEBOOK on the previous message.. Need to sleep a bit more :)
|
|
|
Shadowhopeful
7421 posts
|
|
|
|
Kaeel
322 posts
|
Originally posted by Shadowhopeful:
The game is flash >.>
sorry for the correction… I wanted to write “FACEBOOK version of the game”… Ty for noticing the mistake (need some extra-sleep); I edited previous message :)
|
|
|
stillimproving
219 posts
|
When adding the info on the notepad do i put it after the "" or in the middle of them?
|
|
|
mamypoko
136 posts
|
Originally posted by stillimproving:
When adding the info on the notepad do i put it after the "" or in the middle of them?
middle
|
|
|
cfjem
252 posts
|
Originally posted by stillimproving:
When adding the info on the notepad do i put it after the "" or in the middle of them?
In the middle. And… sniped.
|
|
|
stillimproving
219 posts
|
Thanks both of you for quick reply
Edit: it is telling my on command prompt that tyrant.rb is not recognized as an internal or external command, operable or batch file. Any ideas what would cause that?
Edit edit: ok now i realized i wasnt doing the cd desktop step and now when i add that in and then do the xxxx.rb step it just takes me to a new line waiting for me to enter new command
|
|
|
stillimproving
219 posts
|
Originally posted by leftylink:
You typed “tyrant.rb”. That’s no good.
“ruby tyrant.rb” is the way to go.
I named my note pad file tyrant. Are you telling me to name it ruby tyrant? And also I edited my last post with a new problem I got.
Edit: Nvm dumb me it worked!
|
|
|
NETRAT
710 posts
|
good job, guys, now everyone can do that, not only by the chosen ones
I was thinking about adding this feature to EvaluateDecks, but I don’t quite have time for everything :D
I think you should add a link to noobpownr’s thread, might also add other useful links to DarkBlood1’s guides
retsamerol sorry, but they are too busy implementing crafting, useful stuff like that will take them ages
|
|
|
retsamerol
977 posts
|
Or better yet, the devs could just add net loyalty per week for faction leaders/officers. :P
|