Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buffer page = visit_url();
- //find 00 and 09 sand buttons because why not.
- string[int][int] buttons_to_change =
- page.group_string("(<button style=\"border: )0; background: none;( padding: 0\" name=\"coords\" value=\"\\d{1,2}\\,\\d{5}\" type=\"submit\"><img title=\")rough sand(\" alt=\"rough sand\" src=\"https://s3\\.amazonaws\\.com/images\\.kingdomofloathing\\.com/otherimages/beachcomb/sand(0[09])\\.png\" /></button>)");
- if(buttons_to_change.count() > 0){
- foreach i,j in buttons_to_change{
- if(j==1){
- //put a border around buttons that have whatever image you found. and add title text with that number.
- page.replace_string(buttons_to_change[i][0] , buttons_to_change[i][1]+"1; "+buttons_to_change[i][2]+buttons_to_change[i][4]+buttons_to_change[i][3]);
- //print(buttons_to_change[i][0]);
- }
- }
- }
- page.write();
Advertisement
Add Comment
Please, Sign In to add comment