Bixby Sayz Posted April 24, 2012 Share Posted April 24, 2012 Some functions I find myself using I thought I'd share. Wasn't entirely sure where to post this. Do we have a sub-forum for code snippets? DismissAd - Get rid of new madness ingame ad crap DismissMemberTrial - Get rid of "you are on day x of 14 day trial" DismissSqueal - Find and nuke annoying floating squeal icon [sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= procedure DismissAd; Contributors: Bixby Sayz Description: Find and close full screen ad. Date Created: April 24th, 2012. By Bixby Sayz. RS2 Build 713. Last Modification: April 24th, 2012. By Bixby Sayz. RS2 Build 713. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} procedure DismissAd; var Button: TBox; // Area to count color. begin Button := Box(493, 15, 503, 25); if SimilarColors(4498036, GetColor(195, 215), 5) then if (CountColor(2928892, Button.X1, Button.Y1, Button.X2, Button.Y2) > 10) then MouseBox(Button.X1, Button.Y1, Button.X2, Button.Y2, ClickLeft); end;[/sCAR] [sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= procedure DismissMemberTrial; Contributors: Bixby Sayz Description: Deal with "you are on day x of your 14 day trial". Date Created: April 18th, 2011. By Bixby Sayz. RS2 Build 712. Last Modification: April 18th, 2011. By Bixby Sayz. RS2 Build 712. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} procedure DismissMemberTrial; var Button: TBox; // Area to count color. begin Button := Box(180, 285, 340, 305); if (CountColor(2828881, Button.X1, Button.Y1, Button.X2, Button.Y2) > 200) then MouseBox(Button.X1, Button.Y1, Button.X2, Button.Y2, ClickLeft); end;[/sCAR] [sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= procedure DismissSqueal; Contributors: Bixby Sayz Description: Find and close "play squeal of fortune" floating icon. Date Created: April 8th, 2012. By Bixby Sayz. RS2 Build 711. Last Modification: April 24th, 2012. By Bixby Sayz. RS2 Build 713. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} procedure DismissSqueal; var P: TPoint; // Location of icon. begin // Find center of creature's green head. If found find and click button. if FindColorTolerance(P.X, P.Y, 7786666, MSX1, MSY1, MSX2, MCY2, 10) then if FindColorTolerance(P.X, P.Y, 4440570, (P.X + 45), (P.Y + 10), (P.X + 70), (P.Y + 35), 12) then Mouse(P.X, P.Y, 5, 5, True); end;[/sCAR] Quote Link to comment Share on other sites More sharing options...
Wanted Posted April 25, 2012 Share Posted April 25, 2012 hm I'll have to look into these Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted April 30, 2012 Share Posted April 30, 2012 They look nice to me:) Goodjob:) Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted April 30, 2012 Author Share Posted April 30, 2012 (edited) Just as a fyi, if you click the "Okay I want to signup" link on the member trial notice once, it goes away. Same thing for the Mad May ingame ad: Click on it once let it load in browser, and done. And trial accounts don't get the Mad May ad. Edit: I stand corrected. The member trial goes away for the remainder of that day. It comes back the next day. Edited April 30, 2012 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...