Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

BryceTheCoder

Members
  • Content count

    481
  • Joined

  • Last visited

  • Days Won

    10

BryceTheCoder last won the day on February 11

BryceTheCoder had the most liked content!

Community Reputation

11 Good

About BryceTheCoder

  • Rank
    GMRL Contributor
  • Birthday December 5

Personal Information

  • Location
    California
  • Interests
    Professional Programming
  1. Need ideas to find the Fishing Spot

    Hey guys... I need some ideas on how I can find this fishing spot. Unfortunately I'm having some trouble. The color is extremely similar to a lot of other colors in the area. To be frank, this is the barb village in 07OSRS. Trying to make a fly fishing bot. Any ideas to help me out? Tried to look for the fishing poles which works WONDERS, but with the problem of if I'm already standing right next to the spot, you see my character and no fishing poles anymore. Any ideas to help me out?
  2. 07's InvCount

    Okay. If those colors needs it set to 1. Then that is the problem. I am using 2. Thanks for the info!
  3. 07's InvCount

    Solved the situation, changed the checkit parameter to false; all is well now. Although, I believe that still is a bug.
  4. 07's InvCount

    Hello wanted... Not sure whats going on here. This prints absolutely correct: repeat writeln(inttostr(InvCount(true))); until false; However... when I do something like this: repeat FindOre; writeln(inttostr(InvCount(true))); waitRR(333,666); until (InvCount(true) = 28); It always prints 0. Any ideas??? P.S. if I were to remove the FindOre; it works properly again. MY FindOre procedure contains a color finding: ColorToleranceSpeed(2); SetColorspeed2Modifiers(0.03, 0.38); if FindColorTol(x, y, 4028566, 60, 50, 450, 310, 16) then click on object..... Sooo maybe the colrTolSpeed an ColorMods need to be changed back before checking the InvCount ??? Not sure.... Please help
  5. Power Miner

    Video instructions on how to use the bot:
  6. Power Miner

    Power Miner Download + More info here: https://phgsosrs.createaforum.com/scripts/power-miner Needs the OSI2 include to run. (File -> Includes Manager -> OSI2) This is version 1.0 code: (please don't copy this into scar. Download the latest version via the links. This code may be out-of-date) {$DEFINE RS07} {$I OSI\OSI.scar} { Created by: BryceTheCoder } var topleftX, topleftY, botrightX, botrightY : Integer; topleft2X, topleft2Y, botright2X, botright2Y : Integer; xxColor, xxTol, oresMined, oreXp, pickSlot : Integer; searchLx, searchLy, searchRx, searchRy : Integer; cantFind : Integer; xxHue: Extended; xxSat: Extended; oreType, style : String; Form1_1: TForm; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Button1: TButton; ComboBox1: TComboBox; ComboBox2: TComboBox; Edit1: TEdit; const TheComputerCatchesOnFire = false; tVer = 'v1.0'; procedure ShowStats; var xp : Integer; begin xp := oresMined * oreXp; ClearDebug; writeln('=================== [ Power Miner ] ==================='); writeln('You have mined: ' + IntToStr(oresMined) + ' ores!'); writeln('Which gained you: ' + IntToStr(xp) + ' exp!'); writeln('=================== [ created by BryceTheCoder ] ==================='); writeln(''); end; procedure StartButton(sender: TObject); begin oreType := ComboBox1.Text; style := ComboBox2.Text; pickSlot := StrToInt(Edit1.Text); Form1_1.Modalresult := mrOK; end; procedure CudntFind; begin inc(cantFind); if (cantFind > 50) then begin ClearDebug; writeln(''); writeln(''); writeln('[Power Miner] Terminated the script because I cannot find any ores...'); writeln(''); writeln(''); TerminateScript; end; end; procedure Form1_1_Init; begin with Form1_1 do begin Form1_1 := CreateForm; Label1 := TLabel.Create(Form1_1); Label2 := TLabel.Create(Form1_1); Label3 := TLabel.Create(Form1_1); Label4 := TLabel.Create(Form1_1); Button1 := TButton.Create(Form1_1); ComboBox1 := TComboBox.Create(Form1_1); ComboBox2 := TComboBox.Create(Form1_1); Edit1 := TEdit.Create(Form1_1); with Form1_1 do begin Left := 527; Top := 129; BorderIcons := [biSystemMenu]; BorderStyle := bsSingle; Caption := 'Created by: BryceTheCoder'; ClientHeight := 217; ClientWidth := 382; Color := clWindow; Font.Charset := DEFAULT_CHARSET; Font.Color := clWindowText; Font.Height := -11; Font.Name := 'Tahoma'; Font.Style := []; OldCreateOrder := False; PixelsPerInch := 96; end; with Label1 do begin Parent := Form1_1; Left := 32; Top := 8; Width := 319; Height := 49; Caption := 'Power Miner - ' + tVer; Font.Charset := ANSI_CHARSET; Font.Color := clWindowText; Font.Height := -37; Font.Name := 'Tempus Sans ITC'; Font.Style := [fsBold]; ParentFont := False; end; with Label2 do begin Parent := Form1_1; Left := 48; Top := 68; Width := 82; Height := 17; Caption := 'Ore to Mine:'; Font.Charset := ANSI_CHARSET; Font.Color := clWindowText; Font.Height := -13; Font.Name := 'Tempus Sans ITC'; Font.Style := [fsBold]; ParentFont := False; end; with Label3 do begin Parent := Form1_1; Left := 228; Top := 68; Width := 61; Height := 17; Caption := 'Playstyle:'; Font.Charset := ANSI_CHARSET; Font.Color := clWindowText; Font.Height := -13; Font.Name := 'Tempus Sans ITC'; Font.Style := [fsBold]; ParentFont := False; end; with Label4 do begin Parent := Form1_1; Left := 32; Top := 142; Width := 110; Height := 17; Caption := 'Slot Pickaxe is in:'; Font.Charset := ANSI_CHARSET; Font.Color := clWindowText; Font.Height := -13; Font.Name := 'Tempus Sans ITC'; Font.Style := [fsBold]; ParentFont := False; end; with Button1 do begin Parent := Form1_1; Left := 5; Top := 176; Width := 373; Height := 37; Caption := 'Start Bot!'; Font.Charset := ANSI_CHARSET; Font.Color := clWindowText; Font.Height := -15; Font.Name := 'Tempus Sans ITC'; Font.Style := []; ParentFont := False; TabOrder := 0; OnClick := @StartButton; end; with ComboBox1 do begin Parent := Form1_1; Left := 20; Top := 87; Width := 137; Height := 25; Font.Charset := ANSI_CHARSET; Font.Color := clWindowText; Font.Height := -13; Font.Name := 'Tempus Sans ITC'; Font.Style := []; ParentFont := False; TabOrder := 1; Text := 'What ore to mine?'; Items.Add('Iron'); end; with ComboBox2 do begin Parent := Form1_1; Left := 168; Top := 87; Width := 193; Height := 25; Font.Charset := ANSI_CHARSET; Font.Color := clWindowText; Font.Height := -13; Font.Name := 'Tempus Sans ITC'; Font.Style := []; ParentFont := False; TabOrder := 2; Text := 'What playstyle?'; Items.Add('Extremely Focused'); Items.Add('Focused but I AFK sometimes'); Items.Add('I AFK a ton'); end; with Edit1 do begin Parent := Form1_1; Left := 144; Top := 139; Width := 25; Height := 23; Font.Charset := ANSI_CHARSET; Font.Color := clWindowText; Font.Height := -13; Font.Name := 'Tempus Sans ITC'; Font.Style := []; ParentFont := False; TabOrder := 3; Text := '-1'; end; end; end; procedure Form1_1_SafeInit; var v: TVariantArray; begin SetLength(v, 0); ThreadSafeCall('Form1_1_Init', v); end; function Form1_1_ShowModal: Boolean; begin Result := Form1_1.ShowModal = mrOk; end; function Form1_1_SafeShowModal: Boolean; var v: TVariantArray; begin SetLength(v, 0); Result := ThreadSafeCall('Form1_1_ShowModal', v); end; procedure SetupOreColors; begin if (oreType = 'Iron') then begin oreXp := 35; xxColor := 2042181; xxTol := 9; xxHue := 0.08; xxSat := 0.27; end; end; function btc_InRangeE(value, minimum, maximum: Extended): Boolean; begin Result := ((value >= minimum) and (value <= maximum)); end; function btc_PercentToValue(percent, source: Extended): Extended; begin if (percent <> 0) then Result := ((Extended(percent) / 100) * Extended(source)) else Result := 0.0; end; function btc_CountPixelsBx(area: TBox): Integer; begin if ((area.X1 > area.X2) or (area.Y1 > area.Y2)) then Result := -1 else Result := Integer(((area.X2 - area.X1) + 1) * ((area.Y2 - area.Y1) + 1)); end; procedure btc_Sleep(MS: Integer); var t: Integer; k: Byte; begin t := GetSystemTime; k := CharToVKey('s'); repeat try if (GetCurrentKeyState(VK_CONTROL) and GetCurrentKeyState(VK_MENU) and GetCurrentKeyState(k)) then TerminateScript; except end; Wait(0); until ((GetSystemTime - t) > MS); end; function btc_TIAMatch(TIA1, TIA2: TIntArray): Integer; var i, m: Integer; begin Result := 0; m := Min(High(TIA1), High(TIA2)); for i := 0 to m do if (TIA1[i] = TIA2[i]) then Inc(Result); end; function btc_AnimationPercentEx(XS, YS, XE, YE, minTime, maxTime: Integer; minPixelShiftPercent: Extended): Boolean; var bx: TBox; m, l, r: Integer; p: TPointArray; a, b: TIntArray; begin if btc_InRangeE(minPixelShiftPercent, 0, 100) then begin bx := Box(XS, YS, XE, YE); r := Round(btc_PercentToValue(minPixelShiftPercent, btc_CountPixelsBx(bx))); p := TPAFromBox(bx); b := GetColors(p); l := Length(b); btc_Sleep(minTime); m := GetSystemTime; repeat a := GetColors(p); Result := ((l - btc_TIAMatch(b, a)) >= r); SetLength(a, 0); btc_Sleep(0); until (Result or ((GetSystemTime - m) >= maxTime)); SetLength(p, 0); SetLength(b, 0); end else Result := False; end; function isAnimating(): Boolean; begin //btc_AnimationPercentEx(239, 162, 254, 176, 250, 1000, 42.0); Result := btc_AnimationPercentEx(250, 153, 269, 181, 250, 600, 25.0); end; procedure SetupConfig; begin Mouse(675,482,8,8,true); waitRR(70,100); Mouse(572,227,13,13,true); waitRR(70,100); Mouse(704,306,4,4,true); waitRR(70,100); Mouse(644,187,7,7,true); end; procedure SetupSearch1; var del : LongInt; begin ClearDebug; wait(1000); Writeln('[Search Area 1]'); Writeln('>>> Please click the top-left of the search area <<<'); PickColor(del, topleftX, topleftY); ClearDebug; wait(1000); ClearDebug; Writeln('[Search Area 1]'); Writeln('>>> Please click the bottom-right of the search area <<<'); PickColor(del, botrightX, botrightY); ClearDebug; wait(1000); end; procedure SetupSearch2; var del : LongInt; begin ClearDebug; Writeln('[Search Area 2]'); Writeln('>>> Please click the top-left of the search area <<<'); PickColor(del, topleft2X, topleft2Y); ClearDebug; wait(1000); ClearDebug; Writeln('[Search Area 2]'); Writeln('>>> Please click the bottom-right of the search area <<<'); PickColor(del, botright2X, botright2Y); ClearDebug; wait(1000); end; procedure MineOre; var x,y : Integer; begin cantFind := 0; if (random(11) = 1) then begin GetMousePos(x,y); Mouse(x,y,0,0,false); waitRR(35,100); ChooseOption('Mine'); if (random(4) = 1) then begin MMouse(377,219,300,300); end; end else begin GetMousePos(x,y); Mouse(x,y,0,0,true); if (random(4) = 1) then begin MMouse(377,219,300,300); end; end; writeln('[Power Miner] Found ore.'); waitRR(1500, 1900); if random(33) = 1 then begin MouseBox(563, 172, 589, 200, ClickLeft);//stats MouseBox(680, 210, 732, 235, MoveTo); waitRR(1, 999); if random(4) = 1 then begin MouseBox(680, 210, 732, 235, MoveTo); end; if (style = 'Extremely Focused') then begin waitRR(999, 2345); end else begin waitRR(999, 9999); end; MouseBox(631, 174, 655, 198, ClickLeft);//inv end else begin if (style = 'I AFK a ton') then begin if random(5) = 1 then begin MMouse(-50,-50,40,40); waitRR(1234, 10000); end; end; if (style = 'Focused but I AFK sometimes') then begin if random(10) = 1 then begin MMouse(-50,-50,40,40); waitRR(1234, 10000); end; end; end; end; procedure AlterSearchArea; begin if (topleft2X = 0) then begin searchLx := topleftX; searchLy := topleftY; searchRx := botrightX; searchRy := botrightY; exit; end; if (searchLx = topleftX) then begin searchLx := topleft2X; searchLy := topleft2Y; searchRx := botright2X; searchRy := botright2Y; writeln('[Power Miner] Looking in area2 now.'); exit; end; if (searchLx = topleft2X) then begin searchLx := topleftX; searchLy := topleftY; searchRx := botrightX; searchRy := botrightY; writeln('[Power Miner] Looking in area1 now.'); exit; end; end; procedure FindOre; var x,y: Integer; begin if not(isAnimating()) then begin AlterSearchArea; ColorToleranceSpeed(2); SetColorspeed2Modifiers(xxHue, xxSat); if FindColorTol(x, y, xxColor, searchLx, searchLy, searchRx, searchRy, xxTol) then begin MMouse(x, y, 3, 3); waitRR(30,100); if UpTextContains('Mine') then begin MineOre; waitRR(123, 456); end else begin CudntFind; FindOre; end; end else begin CudntFind; end; end else begin if random(25) = 1 then begin GetMousePos(x,y); MMouse(x,y,155,155); waitRR(123, 1234); end; if (style = 'I AFK a ton') then begin waitRR(123, 7777); end; if (style = 'Extremely Focused') then begin waitRR(123, 456); end; end; end; procedure ClosedForm; begin ShowMessage('Bot terminated!'); TerminateScript; ClearDebug; end; procedure StartForm; begin Form1_1_SafeInit; if Form1_1_SafeShowModal then begin FreeForm(Form1_1); end else begin ClosedForm; FreeForm(Form1_1); end; end; procedure SetupEverything; begin SetupOSI; SetupOreColors; //SetupConfig; SetupSearch1; SetupSearch2; searchLx := topleftX; searchLy := topleftY; searchRx := botrightX; searchRy := botrightY; MouseBox(631, 174, 655, 198, ClickLeft);//inv end; function TempInvFull: Boolean; var x,y : Integer; begin ColorToleranceSpeed(2); SetColorspeed2Modifiers(0.06, 0.14); if FindColorTol(x, y, 4086127, 691, 434, 720, 457, 8) then begin result := true; end else begin result := false; end; end; procedure ShiftDropAll; var i : Integer; itms : TIntegerArray; begin writeln('[Power Miner] Dropping all ores.'); itms := GetDropPattern(random(6)); VKeyDown(16); for i := 0 to 27 do begin if (itms[i] = pickSlot) then Continue; MouseBox(GetInvSlotBounds(itms[i]).X1, GetInvSlotBounds(itms[i]).Y1, GetInvSlotBounds(itms[i]).X2, GetInvSlotBounds(itms[i]).Y2, ClickLeft); end; VKeyUp(16); end; procedure Bot; begin repeat FindOre; until TempInvFull; oresMined := oresMined + 28; writeln('[Power Miner] Inventory is full.'); ShiftDropAll; ShowStats; end; begin StartForm; SetupEverything; oresMined := 0; writeln('[Power Miner] Started at ' + TimeToStr(Time)); repeat Bot; until TheComputerCatchesOnFire; end.
  7. Show script running time?

    Hey, I don’t see many time functions... How can i simple create a start time var and get total time ran in a script? i have this so far: start := Time; but when i try to do this: total := Time - start; it doesn’t work
  8. [C#] OSRS blocking my mouse clicks??

    Extremely weird results I just found....... 0.o If I run a script that just simply clicks somewhere, it will NOT click the mouse on the real osrs client. If I run that same script on the browser client in IE, it will actually click... WTF They blocking fake clicks on real osrs client????????? How...
  9. RS07 "InvFull" isn't working

    Perfect! Thanks :]
  10. RS07 "InvFull" isn't working

    Oddly enough it works perfectly on the first call? I just am printing out InvCount before I mine a rock everytime. And this is what I got lol: 26 0 0 0 0 0 Soooo why did it work the first time only? 0.o
  11. RS07 "InvFull" isn't working

    Hey there Wanted and Freddy! Can you guys please update the InvFull for RS07? I think im'a be making some rs07 scripts again :]
  12. [C#] OSRS blocking my mouse clicks??

    Not sure where the edit button is...... but wow!!!! Even the OSI's Mouse button won't click on the OSRS client!! Sooo jagex is blocking fake mouse clicks now!?!? HOW! And how can we combat this??
  13. [C#] OSRS blocking my mouse clicks??

    Also, does the OSI's Mouse actually click and the OSRS client will allow it to click? Or it just simply the way i'm trying to click the mouse???
  14. Hello everyone! Just out of curiosity how does Scar simulate your mouse actually left clicking. I am attempting to make my own custom bot in C# and currently have mouse movement pretty damn human. However, whenever I use this mouse_event methods and try to simulate a left-click, it will work ANYWHERE on my actual computer, but when I try to click on the OSRS client, it won't actually click??? [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo); private const int MOUSEEVENTF_LEFTDOWN = 0x02; private const int MOUSEEVENTF_LEFTUP = 0x04; private const int MOUSEEVENTF_RIGHTDOWN = 0x08; private const int MOUSEEVENTF_RIGHTUP = 0x10; public void DoMouseClick() { uint X = (uint)Cursor.Position.X; uint Y = (uint)Cursor.Position.Y; mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, X, Y, 0, 0); } Does anyone know why it isn't working only for osrs? Also, would love to see some code on how scar does left clicking :]
  15. Is(or was) Scar open-source?

    Hello there! Freddy or wanted, I was curious, is (or was) Scar open source ever? Or is still? I would love to create my own program (like an IDE to script your own programs/macros). And I am wondering because Scar and Simba are extremely similar, how did this come to be?
×