shadowrecon Posted June 1, 2013 Share Posted June 1, 2013 Since the update yesterday the OSI RS07 login function does not work properly. It logs the character in but then says there was a problem and logs out. This can be reproduced by using the OSI RS07 login template. Quote Link to comment Share on other sites More sharing options...
Wanted Posted June 2, 2013 Share Posted June 2, 2013 Post debug box. I don't have time to try it right now. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 3, 2013 Author Share Posted June 3, 2013 unknown login error is the message after it logs the character in and then logs out ex-termly fast Quote Link to comment Share on other sites More sharing options...
Wanted Posted June 3, 2013 Share Posted June 3, 2013 That's a problem in the lobbyscreen?(between login and ingame) click to play screen..and or the logging into server text pixel count and or LoggedIn. I'll fix it later.. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 3, 2013 Author Share Posted June 3, 2013 Okay this is what is happening its reporting the I := 9 for the action messages found which means its not finding any of the action messages. But The FindLoginMessagesTextEx function works.. Confusing. LoggedIn function works because i use that in RS07, and it manages to click "Click Here To Play" So i would say the Server pixel count? Ill go through it and mess around i just knew since you wrote it that you can easily determine the area of conflict. Quote Link to comment Share on other sites More sharing options...
Wanted Posted June 4, 2013 Share Posted June 4, 2013 (edited) First thing I did was open Login.scar Ctrl+F Unknown login error! Rooting that call up it's preconditions I <=, then if (PressLogin(True, False)) then is obviously returning false incorrectly giving us this unknown error. Navigating to PressLogin we see MessageScreen then Result := True Quick test.. navigate to Message screen and perform WriteLn(MessageScreen); Returns 1 (True) so MessageScreen is fine Follow the result clause higher if (not (TIAContains([0, 799, 407, 301, 302], CountColor(clYellow, 247, 214, 519, 231)))) then looking at the context of the above lines this check takes place after clicking the login button : MouseBox(234, 304, 370, 340, ClickLeft); there is then a color count timer that waits for the color on the screen to change to whatever text to maximize script speed while compensating for lag (I know OSI is fucking awesome right? ) by comparing against the initial color points. [sCAR] C := CountColor(clYellow, 247, 214, 519, 231); if (UseEnterKey) then TypeSend('') else MouseBox(234, 304, 370, 340, ClickLeft); T := GetSystemTime + RR(2000, 3000); repeat if (CountColor(clYellow, 247, 214, 519, 231) <> C) then Break; WaitRR(10, 20); until (T < GetSystemTime); [/sCAR] So now we know when to do the check and what it's looking for... to make it easy lets add a line into OSI to spit out numbers for us: [sCAR] C := CountColor(clYellow, 247, 214, 519, 231); WriteLn©; if (not (TIAContains([0, 799, 407, 301, 302], C))) then[/sCAR] Obviously you'll have to save this file for it work in your includes and then revert it later so you don't use a debugging copy of OSI or distribute one Now you can just run OSI normally like you were before using the whole entire Login command like normal and it will output what the numbers it's getting in the debug box: Logging in ****... 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 407 199 Unknown login error! We see it threw 199... which is not already on the TIA list because of a Jagex update so we correct and revert are original OSI copy [sCAR] TT := GetSystemTime + RR(35000, 40000); if (not (TIAContains([0, 799, 407, 301, 302, 199], CountColor(clYellow, 247, 214, 519, 231)))) then if (not (FindLoginMessageText('Your profile will be transferred'))) then[/sCAR] [sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= function PressLogin(UseEnterKey, CheckLS: Boolean): Boolean; Contributors: Wanted Description: Returns true if made it to MessageScreen. Date Created: March 10th, 2013. By Wanted. RS07 Build ???. Last Modified: June 3rd, 2013. By Wanted. RS07 Build ???. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}[/sCAR] Now we test our modification Successfully compiled (126.023 ms) OSI RS07 routines enabled. OSI RS07 color random detection and solving enabled. Loaded RS2 Fonts: UpChars, UpChars2, NPCChars, OptionChars, ScreenChars, SmallChars, StatChars, TradeChars (250 ms) Logging in ****... **** logged in Freed RS2 Fonts Freed OSI Successfully executed (7711.4375 ms) Our modification is successful... now time to review our modifications in version software Right click OSI folder go to diff.. right click Login.scar compare with base... every thing looks ok check over all your other revisions etc make sure everything is in order. Update your copy of OSI to make sure you have all the latest updates already done (especially important for SVN) Run Compile OSI.scar one more time to ensure you have everything working properly Everything compiles successfully. Commit and push your new revisions to github and SVN with a follow up thread in the updates section with explanations and links to the revisions. http://forums.scar-divi.com/osi-updates/2316-updated-rs07-login#post13202 Congratulations you've now graduated basic OSI diagnostics Edited June 4, 2013 by Wanted Quote Link to comment Share on other sites More sharing options...