moaL Posted October 30, 2012 Share Posted October 30, 2012 (edited) ^ That was for the Line 146 error {$IFDEF SCAR336_UP} var {==============================================================================] Created: October 27th, 2012. Updated: October 28th, 2012. Contributors: Janilabo Explanation: [==============================================================================} PRSC_StoredOW: LongWord; {$ENDIF} procedure PRSC_ClientSetup; {==============================================================================] Created: October 27th, 2012. Updated: October 28th, 2012. Contributors: Janilabo Explanation: [==============================================================================} var t: Integer; begin PRSC_Client := TSCARWindowClient(GetClient); PRSC_Client.Update; PRSC_Client.Activate; {$IFDEF SCAR336_UP} PRSC_StoredOW := GetOuterWindow(PRSC_Client.Handle); t := GetSystemTime; repeat Wait(100); until (((GetSystemTime - t) > 2000) or (GetActiveWindow = PRSC_StoredOW)); {$ELSE} Wait(2000); {$ENDIF} end; function PRSC_ValidClient: Boolean; {==============================================================================] Created: October 7th, 2012. Updated: October 28th, 2012. Contributors: Janilabo Explanation: [==============================================================================} var w, h: Integer; begin PRSC_Client.Update; if PRSC_Client.Exists then begin {$IFDEF SCAR336_UP} if (GetActiveWindow <> PRSC_StoredOW) then Exit; {$ENDIF} GetWindowSizeEx(PRSC_Client.Handle, w, h, True); if (InRange(w, 510, 513) and InRange(h, 338, 343) and (GetWindowClass(PRSC_Client.Handle) = 'SunAwtCanvas')) then Result := MSSL_BoxInBox(PRSC_Client.InputArea, GetWindowBox(GetDesktopWindow)); end; end; The line 20 error was here, on Client.scar Edited October 30, 2012 by moaL Quote Link to comment Share on other sites More sharing options...
Janilabo Posted October 30, 2012 Author Share Posted October 30, 2012 (edited) ^ That was for the Line 146 error {$IFDEF SCAR336_UP} var {==============================================================================] Created: October 27th, 2012. Updated: October 28th, 2012. Contributors: Janilabo Explanation: [==============================================================================} PRSC_StoredOW: LongWord; {$ENDIF} procedure PRSC_ClientSetup; {==============================================================================] Created: October 27th, 2012. Updated: October 28th, 2012. Contributors: Janilabo Explanation: [==============================================================================} var t: Integer; begin PRSC_Client := TSCARWindowClient(GetClient); PRSC_Client.Update; PRSC_Client.Activate; {$IFDEF SCAR336_UP} PRSC_StoredOW := GetOuterWindow(PRSC_Client.Handle); t := GetSystemTime; repeat Wait(100); until (((GetSystemTime - t) > 2000) or (GetActiveWindow = PRSC_StoredOW)); {$ELSE} Wait(2000); {$ENDIF} end; function PRSC_ValidClient: Boolean; {==============================================================================] Created: October 7th, 2012. Updated: October 28th, 2012. Contributors: Janilabo Explanation: [==============================================================================} var w, h: Integer; begin PRSC_Client.Update; if PRSC_Client.Exists then begin {$IFDEF SCAR336_UP} if (GetActiveWindow <> PRSC_StoredOW) then Exit; {$ENDIF} GetWindowSizeEx(PRSC_Client.Handle, w, h, True); if (InRange(w, 510, 513) and InRange(h, 338, 343) and (GetWindowClass(PRSC_Client.Handle) = 'SunAwtCanvas')) then Result := MSSL_BoxInBox(PRSC_Client.InputArea, GetWindowBox(GetDesktopWindow)); end; end; The line 20 error was here, on Client.scar Hey moaL, which version of SCAR Are you using? Which Windows version? Make sure, you are using webclient. Standalone client is problematic.. Also, make sure that you capture ONLY the applet area of ProjectRSC. So, drag that crosshair from SCAR Divi in middle of ProjectRSC screen. -Jani \ Adding food, Step 1. At the top add a new variable for your food, in this case bmpNEWFOOD var alarmTM, lastAttackTM, fatiguePercent: Integer; bmpSwordfish, bmpTuna, bmpNEWFOOD, bmpLobster: TSCARBitmap; Step 2 Add a new free step on script terminate. procedure ScriptTerminate; begin PlaySound(ScriptPath + 'empty.wav'); PRSC_RotateCamera(rcd_Nil3); bmpSwordfish.Free; bmpLobster.Free; bmpTuna.Free; bmpNEWFOOD.Free; MSSL_Unsetup; SetLength(cowColors, 0); end; Step 3 add another step to the FoodFound function. Notice i changed 2 to a 3 in the for line. (4 options of food) for i := 0 to 3 do begin PRSC_Wait(0); case i of 0: b := bmpSwordfish.Clone; 1: b := bmpLobster.Clone; 2: b := bmpTuna.Clone; 3: b := bmpNEWFOOD.Clone; end; Step 4 add the newfood bitmap to the scriptsetup function bmpNEWFOOD := TSCARBitmap.Create('STRING HERE'); get the string from the bitmap selector in scar Hey turner, thanks a lot for helping laive!On a side note, I have added all fishes + meat to the next version. The only thing I am missing right now, is that moderator/admin detection.. But I need to get crown of a [Player] Moderator. Edited October 30, 2012 by Janilabo Quote Link to comment Share on other sites More sharing options...
laive Posted October 30, 2012 Share Posted October 30, 2012 Thank you very much turner, I did all of that except creating the new bitmap , I assumed it was part of MSSL. Thanks again/ Quote Link to comment Share on other sites More sharing options...
moaL Posted October 30, 2012 Share Posted October 30, 2012 Hey moaL, which version of SCAR Are you using? Which Windows version? Make sure, you are using webclient. Standalone client is problematic.. Also, make sure that you capture ONLY the applet area of ProjectRSC. So, drag that crosshair from SCAR Divi in middle of ProjectRSC screen. -Jani Windows 7, Scar Divi 3.35. Was using client but using webclient now and getting the exact same problems. Quote Link to comment Share on other sites More sharing options...
Janilabo Posted October 30, 2012 Author Share Posted October 30, 2012 Windows 7, Scar Divi 3.35. Was using client but using webclient now and getting the exact same problems. Hello moaL, can you get me some client information (so I can figure out what is/could be wrong) Do this: -Open SCAR Divi -View => Show Target Client -Go to Target Client and read what these values say (I post mine as example, show me yours): ImageBox: (0, 0, 511, 338) and ClassName: SunAwtCanvas Then I can help you more. Regards, -Jani Quote Link to comment Share on other sites More sharing options...
moaL Posted October 31, 2012 Share Posted October 31, 2012 Imagebox: (0, 0, 1365, 767) ClassName: #32769 Quote Link to comment Share on other sites More sharing options...
Janilabo Posted October 31, 2012 Author Share Posted October 31, 2012 Imagebox: (0, 0, 1365, 767)ClassName: #32769 Hey moaL, so the problem is that you didn't drag SCAR Divi's crosshair to your client. See this ancient photo, of dragging crosshair to client: http://www.kaitnieks.com/files/SCARGUIDE/ScreenHunter_036.gif Use that to your Project RSC. Quote Link to comment Share on other sites More sharing options...
moaL Posted October 31, 2012 Share Posted October 31, 2012 Hey moaL, so the problem is that you didn't drag SCAR Divi's crosshair to your client. See this ancient photo, of dragging crosshair to client: http://www.kaitnieks.com/files/SCARGUIDE/ScreenHunter_036.gif Use that to your Project RSC. I already did that, the stuff I quoted to you was when I just opened it up and gave the values without me setting the crosshair up. Fixed now but I had to do something else. Thanks Buddy. Quote Link to comment Share on other sites More sharing options...
Janilabo Posted October 31, 2012 Author Share Posted October 31, 2012 (edited) I already did that, the stuff I quoted to you was when I just opened it up and gave the values without me setting the crosshair up. Fixed now but I had to do something else. Thanks Buddy. No problem, glad you got the script working! EDIT: New version out! Edited November 2, 2012 by Janilabo Quote Link to comment Share on other sites More sharing options...
turner850 Posted November 13, 2012 Share Posted November 13, 2012 (edited) I am getting unknown identifier MSSL_BoxCenter on line 68 EDIT: now OffsetBox is undefined in box.scar Edited November 13, 2012 by turner850 Quote Link to comment Share on other sites More sharing options...
Janilabo Posted November 13, 2012 Author Share Posted November 13, 2012 Yeah sadly this script is outdated. This wont work because the colors change in Project RSC, so there aint anymore single color to use. I am going to add in CowFighter soon that is based on MSSL 0.9-7b + SCAR Divi 3.37 - uses tolerance to deal with the color changings. Quote Link to comment Share on other sites More sharing options...
turner850 Posted November 13, 2012 Share Posted November 13, 2012 Ah, I noticed something was different. Quote Link to comment Share on other sites More sharing options...
Janilabo Posted November 13, 2012 Author Share Posted November 13, 2012 Ah, I noticed something was different.Yeah, they broke all of my scripts with that color changing update, but I am making a comeback now. SCAR Divi 3.37 version has got plenty of TPA power for me to use, so I can keep good speed with scripts even if they add even crazier color changing in Project RSC. Just takes some time to optimize things. I will be updating these *Killers soon aswell. By the way, I added a script's Current Status to the main post, that shows the status of the script currently - this is broken and needs updating. Quote Link to comment Share on other sites More sharing options...