yojimbos_law

build your own mmger registry!

Jun 4th, 2018
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. int server_hits;
  2. while("dumbasses" == "dumbasses"){
  3. //name[playerID][betID][betAmount]
  4. string[int][int][int] idiots_and_their_bets;
  5. file_to_map("known mmgers.txt", idiots_and_their_bets);
  6. string page_of_idiots = visit_url("bet.php");
  7.  
  8. //sample line in table of bets:
  9. //<b>Dare Devil</b> (#3193713)</a></font></td><td>5,000 Meat</td><form style='display: inline' name='form95287715' method=post action='bet.php'><td align=right><input type=hidden name=pwd value=stuff><input type=hidden name=action value='bet'><input type=hidden name=whichbet value='95287715'>
  10.  
  11. string[int][int] parsed_page_of_idiots = page_of_idiots.group_string("<b>([0-9a-zA-Z _]+)</b> \\(#(\\d+)\\).*?([0-9,]+) Meat.*?name=\'form([0-9]+)\'");
  12.  
  13. foreach i,j in parsed_page_of_idiots{
  14. //print(i+","+j+": "+parsed_page_of_idiots[i][j]);
  15. if(j==1){
  16. idiots_and_their_bets[parsed_page_of_idiots[i][2].to_int()][parsed_page_of_idiots[i][4].to_int()][parsed_page_of_idiots[i][3].to_int()] = parsed_page_of_idiots[i][1];
  17. }
  18. }
  19.  
  20. //stored as playerID betID betAmount Idiot
  21. map_to_file(idiots_and_their_bets,"known mmgers.txt");
  22. server_hits++;
  23. print("server hits: "+server_hits);
  24. waitq(69);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment