SRL Archive - RS3 Outdated / Broken Scripts

Something Fighter


Narcle

2010-04-29 16:31:43

Something Fighter
OUTDATED


Features:
  • Fights any NPC (user setup)
  • Eats any food, will rest if none
  • Custom Pick ups
  • Range detection
  • Bone Burying

Update list - Last Update: 06-23-2010 [mm-dd-yyyy]

Update 1.00: 06-23-2010
-Made nInFight work much much better
-In 1.00 stage as I don't think I'll be changing much at this point

Update 0.26: 06-04-2010 - (14.1 KB, 13 views)
-InvItem changed to TPAItem
-Added nFlag so ppl can customize
-Added changes Ray submitted (failsafes ++)

Update 0.25: 06-01-2010 - (13.5 KB, 9 views)
-Bone Burying added
-Fighting improved (right clicks after a fail, skip search box on player)
-Reports every 10 mins now
-Ranging wait added (will wait extra 11 seconds after attack compared to 5)
-Resting added (will rest if out of food, also waits until HP > 60% now)

Update 0.20: 05-25-2010 - (13.0 KB, 8 views)
-Custom Pick ups added
-Range detection added
-Rotate camera improved
-FindColorSpiralTolerance working again..

First Release: 04-29-2010 - (6.2 KB, 38 views)
Test Script

Avaphi

2010-05-13 17:35:08

Ah thanks for this. I wanted a refresher on how to read code and this is perfect. Thanks bud.

Avaphi

2010-05-19 02:41:23

Hey tried to comment out the SMART client as the login isn't working on it- it ended up having an issue:

Exception: Range check error at line 108
The following DTMs were not freed: [SRL - Lamp bitmap]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Users\Rivers\Desktop\Simba\Includes\SRL\Logs\SRL Log 18-05-10 0.txt] has not been freed in the script, freeing it now.

i luffs yeww

2010-05-19 03:02:38

Line 107-109 == ?

Narcle

2010-05-19 03:04:14

Really? Working fine for me. I'm actually working on this right now.

Added item pickup and just experimenting with setups to improve it.

And FindColorSpiralTolerance is working again with new Simba.

Avaphi

2010-05-19 03:35:21

Ill give a test early tomorrow morning when I am at full capacity !

Avaphi

2010-05-19 19:42:00

Ah ok Narcle. Finally got Simba/SRL working in harmony ! Now for some reason it just stalls, but when I stop the script it says "you haven't recieved any messages to which you can reply" or something like that, I actually tried it on rats and it kept looking on my iron armor, so I took my armor off, my luck I had a little gray on my chars clothes XD

Sir R. M8gic1an

2010-05-19 19:56:59

From: Avaphi
Ah ok Narcle. Finally got Simba/SRL working in harmony ! Now for some reason it just stalls, but when I stop the script it says "you haven't recieved any messages to which you can reply" or something like that, I actually tried it on rats and it kept looking on my iron armor, so I took my armor off, my luck I had a little gray on my chars clothes XD


How about trying it out on cows then? :)

~RM

Avaphi

2010-05-19 22:05:49

From: Rasta Magician
How about trying it out on cows then? :)

~RM


Will do – Will post progress soon.

Narcle

2010-05-20 02:52:14

From: Avaphi
Ah ok Narcle. Finally got Simba/SRL working in harmony ! Now for some reason it just stalls, but when I stop the script it says "you haven't recieved any messages to which you can reply" or something like that, I actually tried it on rats and it kept looking on my iron armor, so I took my armor off, my luck I had a little gray on my chars clothes XD


Yeah I had that problem too. Maybe I should ask for a skip search box. Been needing one.

Gu3st...

2010-05-20 02:54:12

Just skip the ATPA if the length of the TPA is less than x

Narcle

2010-05-20 02:55:39

From: Zyt3x
Just skip the ATPA if the length of the TPA is less than x


I am not using TPA in this one. I've notice its too slow sometimes so just looking for the color is faster.

Avaphi

2010-05-20 03:13:33

From: Narcle
Yeah I had that problem too. Maybe I should ask for a skip search box. Been needing one.


It happened on YoHoJo's powercutter as well- so don't think your script has a problem- may be the current SRL- perhaps add a function that ignores the players tile?

Narcle

2010-05-20 04:18:45

From: Avaphi
It happened on YoHoJo's powercutter as well- so don't think your script has a problem- may be the current SRL- perhaps add a function that ignores the players tile?


That's what I just said. With a color search with a skip box I can ignore the player. I've ignored the search with TPAs its fairly easy to just take the TPAs out of the players area that way but its not as fast as color searching. The new Simba FindColors might be faster, ill have to test it see if it can be just as fast. Its usually the sorting that takes a bit.

Avaphi

2010-05-20 12:10:14

From: Narcle
That's what I just said. With a color search with a skip box I can ignore the player. I've ignored the search with TPAs its fairly easy to just take the TPAs out of the players area that way but its not as fast as color searching. The new Simba FindColors might be faster, ill have to test it see if it can be just as fast. Its usually the sorting that takes a bit.


As you can see I am fairly outdated with functions at this point :redface:

Narcle

2010-05-25 13:30:46

Released update for Raymond :P

mastaraymond

2010-05-26 04:03:19

From: Narcle
Released update for Raymond :P

Ha! It works great! Just a suggestion; make it do bones burying as well :D

Avaphi

2010-05-26 12:13:49

Running very smoothly ! Well done !

Avaphi

2010-05-26 16:06:39

Simple suggestion, if the script accidently clicks and goes through a door, add a failsafe that if it sees "you can't reach that" x amount of times, log out. Thanks again- great script.

Range/magic support would be a welcome addition :)
As would bone burying :)

Narcle

2010-05-26 17:46:38

From: Avaphi
Simple suggestion, if the script accidently clicks and goes through a door, add a failsafe that if it sees "you can't reach that" x amount of times, log out. Thanks again- great script.

Range/magic support would be a welcome addition :)
As would bone burying :)


I actually just added Bone burying and ranging detection is in it, but I think I forgot to add the wait for ranging in WaitFight. Version I'm working on has it. Just have to test bone burying.

Yeah the stuff like that going through a door is annoying. I'll try to figure something out.

mastaraymond

2010-06-01 06:19:40

Another suggestion. Make it rest if HP is too low?

Also; if it mis clicks a left click the next click should be right.. Otherwise the chance of mis clicking is huge again.

Narcle

2010-06-01 13:10:32

From: mastaraymond
Another suggestion. Make it rest if HP is too low?

Also; if it mis clicks a left click the next click should be right.. Otherwise the chance of mis clicking is huge again.


Yeah I forgot they added the rest feature. I'll put that in def. As for the click thing maybe if I put in a global var for it.

Edit:
Added both and released. Bone burying too.

BlueWorld

2010-06-03 15:19:53

i dont' have enough ammo when i have over 300 bolts? =/

mastaraymond

2010-06-04 08:06:11

Changed some things in the new version that I had changed local as well.. (TInvItem2 because reflection already defines TInvItem :( )

When eating food it clicked the next food item before it even ate the other one ;-).. Oh and I found the script LoggedOut one time, so I added it to do NextPlayer(false) if it's logged out.. And some other minor changes.


--- C:/Remake/Scripts/Something Fighter 0.25.simba vr jun 4 13:59:30 2010
+++ C:/Remake/Scripts/Something Fighter 0.26.simba vr jun 4 14:02:14 2010
@@ -6,9 +6,11 @@

Const
LogoutTime = 16;//Play for this many mins then switch/logout
- PickUpWhileFighting = false;//
+ PickUpWhileFighting = false;// Pick up during fight?
+ CheckHPWhileFighting = false; //Check (and heal) during fight?
KillAccuracy = 0.7;//How accurately after attacking it kills it [1.0 = perfect, 0.1 = 1/10th the time]

+
procedure DeclarePlayers;
begin
HowManyPlayers := 1;//Change this accordingly
@@ -46,7 +48,7 @@
PickupNames: array of string;
NPCTol, PickupTol: integer;
end;
- TInvItem = Record
+ TInvItem2 = Record
OutLine, Width, Height, Color: Integer;
end;

@@ -54,21 +56,29 @@
Playas: array [0..99] of TPlaya;
ReportTime: integer;
LeftClickFail: Boolean;//if the Left click fails attacking
- BonesTPA: TInvItem;
+ BonesTPA: TInvItem2;

procedure Debug(S: String);
begin
if DebugOn then
- Writeln(S);
+ Writeln(S)
+ else
+ DebugLn(s);
end;

-Function nInFight: Boolean;//In case someone wants to customize, this is a key function
+function nInFight: Boolean;//In case someone wants to customize, this is a key function
begin
Result := InFight;
end;

-function InvItem(cOutLine, cWidth, cHeight, cColor: Integer): TInvItem;
+procedure nFlag; //In case someone wants to customize the FFlag(0) function
begin
+ FFlag(0);
+end;
+
+
+function InvItem(cOutLine, cWidth, cHeight, cColor: Integer): TInvItem2;
+begin
with Result do
begin
OutLine := cOutLine;
@@ -78,7 +88,7 @@
end;
end;

-function FindInvItem(Item: TInvItem; B: TBox): Boolean;
+function FindInvItem(Item: TInvItem2; B: TBox): Boolean;
var
TPA: TPointArray;
Bt: TBox;
@@ -146,8 +156,13 @@
begin
Mouse(x,y,0,0,false);
if WaitOption('Eat', 400) then
- if (HPPercent > 50) then
+ begin
+ t := GetSystemTime;
+ while ExistsItem(i) and ((GetSystemTime-t) < 2000) do
+ wait(20);
+ if (HPPercent > 60) then
Exit;
+ end;
end;
end;
if (not LoggedIn) or (HPPercent > 50) then
@@ -289,7 +304,7 @@

Function BuryBones: Boolean;
var
- i, x, y: integer;
+ i, x, y,t: integer;
begin
for i := 1 to 28 do
begin
@@ -300,7 +315,15 @@
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
- Wait(900+random(300));
+ wait(900+random(300));
+ t := GetSystemTime;
+ while ExistsItem(i) and ((GetSystemTime-t) < 250) do
+ wait(75 + random(50));
+ if (GetSystemTime - t) >= 250 then //We cannot bury at this place..
+ begin
+ Result := false;
+ Exit;
+ end;
Inc(Players[CurrentPlayer].Integers[12]);
Result := true;
end;
@@ -338,24 +361,19 @@
0..1: begin
Mouse(T.x, T.y, 0, 0, true);
Result := DidClick(True, 100);
- if Result then
- LeftClickFail := false
- else
- LeftClickFail := true;
end;
2: begin
Mouse(T.x, T.y, 0, 0, false);
Result := ChooseOption('ttack');
- if Result then
- LeftClickFail := false;
end;
end;
+ LeftClickFail := not result;
if Result then
begin
Debug('Attack!');
- FFlag(0);
+ nFlag;
Exit;
- end Else Continue;
+ end else Continue;
end;
end;
end;
@@ -371,6 +389,13 @@
Exit;
for i := 0 to High(PickupColors) do
begin
+ if InvFull then
+ begin
+ if Players[CurrentPlayer].Booleans[1] then
+ BuryBones;
+ if InvFull then //Lazy coding, if the inv is still full, stop picking up!
+ exit;
+ end;
x:=MSCX;
y:=MSCY;
if (FindColorSpiralTolerance(x, y, PickupColors[i], MSX1, MSY1, MSX2, MSY2, PickupTol)) then
@@ -388,7 +413,7 @@
Debug('Picking up item');
Inc(Players[CurrentPlayer].Integers[11]);
Wait(100+random(100));
- FFlag(0);
+ nFlag;
end;
end;
end;
@@ -411,17 +436,20 @@
Debug('Killing monster...');
repeat
Wait(150+random(100));
- HpCheck;
+ if CheckHPWhileFighting then
+ HpCheck;
if PickUpWhileFighting then
CustomPickup;
FindNormalRandoms;
until (not nInFight) or (not FightOnScreen) or (not LoggedIn)
+ Debug('Done killing..');
end else
Wait(300);
end;

procedure SetupPlayer;
begin
+ GetAllLevels;
with Players[CurrentPlayer] do
begin
if not Booleans[0] then
@@ -511,8 +539,10 @@
With Players[CurrentPlayer] do
begin
if (NPCsOnScreen = 0) then
- RotateCamera
- else
+ begin
+ CustomPickup;
+ RotateCamera;
+ end else
Begin//Fighting
if not nInFight then
if FightIt then
@@ -523,16 +553,12 @@
end;
end;

+ HPCheck;
CustomPickup;
-
- if Booleans[1] then
- if InvFull then
- BuryBones;
-
- if (GetSystemTime > Integers[0]) then
+ if (GetSystemTime > Integers[0]) or (not LoggedIn) then
begin
Report;
- NextPlayer(true);
+ NextPlayer(LoggedIn);
SetupPlayer;
end;
end;

Here applied… (In case u fail)

program SomethingFighter;
{$include SRL/SRL/misc/smart.scar}
{$include srl/srl.scar}
{$include srl/srl/Skill/Fighting.scar}
{$include srl/srl/Skill/Ranging.scar}

Const
LogoutTime = 16;//Play for this many mins then switch/logout
PickUpWhileFighting = false;// Pick up during fight?
CheckHPWhileFighting = false; //Check (and heal) during fight?
KillAccuracy = 0.7;//How accurately after attacking it kills it [1.0 = perfect, 0.1 = 1/10th the time]


procedure DeclarePlayers;
begin
HowManyPlayers := 1;//Change this accordingly
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

With Players[0] do
begin
Name :=''; //Character Name
Pass :=''; //Character Pass
Nick :=''; //Nickname 3 - 4 Letter's of char name
Active := True; //True if you want this player to be ran in the script, false if not
Strings[0] := '';//Skill to train (if blank won't change anything)
Arrays[0] := [];//colors of monster(s)
Arrays[1] := [''];//monster name(s)
Arrays[2] := [];//[Pickup Colors]
Arrays[3] := [''];//[Pickup Names]
//This is options array
//[NPC Color Tolerance, Pickup Tolerance, Bury Bones (true/false)];
Arrays[4] := [3, 0, false];
end;

end;

Const
DebugOn = false;

type
TPlaya = record
NPCNames: TStringArray;
NPCColors: TIntegerArray;
Ranging: Boolean;
Weapon: Array of Array of String;
PickupColors: array of integer;
PickupNames: array of string;
NPCTol, PickupTol: integer;
end;
TInvItem2 = Record
OutLine, Width, Height, Color: Integer;
end;

var
Playas: array [0..99] of TPlaya;
ReportTime: integer;
LeftClickFail: Boolean;//if the Left click fails attacking
BonesTPA: TInvItem2;

procedure Debug(S: String);
begin
if DebugOn then
Writeln(S)
else
DebugLn(s);
end;

function nInFight: Boolean;//In case someone wants to customize, this is a key function
begin
Result := InFight;
end;

procedure nFlag; //In case someone wants to customize the FFlag(0) function
begin
FFlag(0);
end;


function InvItem(cOutLine, cWidth, cHeight, cColor: Integer): TInvItem2;
begin
with Result do
begin
OutLine := cOutLine;
Width := cWidth;
Height := cHeight;
Color := cColor;
end;
end;

function FindInvItem(Item: TInvItem2; B: TBox): Boolean;
var
TPA: TPointArray;
Bt: TBox;
x,y: integer;
begin
FindColorsTolerance(TPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(TPA) < 1 then
Exit;
Bt := GetTPABounds(TPA);
if (Length(TPA) = Item.OutLine) and (iAbs(Bt.x2-Bt.x1) = Item.Width) and (iAbs(Bt.y2-Bt.y1) = Item.Height) then
if Item.Color > -1 then
Result := FindColorTolerance(x, y, Item.Color, Bt.x1, Bt.y1, Bt.x2, Bt.y2, 9)
else
Result := True;
end;

function FightOnScreen: Boolean;
var
TBA: TBoxArray;
x, y: integer;
begin
x := MSCX;
y := MSCY;
TBA := FindAllHPBars(x, y, MSX1, MSY1, MSX2, MSY2);
if Length(TBA) < 1 then
Exit;
if PointInBox(Point((TBA[0].x1+TBA[0].x2)/2, (TBA[0].y1+TBA[0].y2)/2), IntToBox(x-39,y-25,x+39,y+5)) then
Result := (Length(TBA)-1) > 0
else
Result := Length(TBA) > 0;
end;

Function NPCsOnScreen: integer;
var
i: integer;
Mobs : TPointArray;
begin
FindColorsTolerance(Mobs, 195836,MMX1+40,MMY1+40,MMX2-40,MMY2-40, 0);
if High(Mobs) > 0 then
begin
RAaSTPA(Mobs, 4);
for i := 0 to High(Mobs) do
If InAbstractBox(MMCX-30, MMCY-17, MMCX+30, MMCY-17, MMCX+24, MMCY+14, MMCX-24, MMCY+14, Mobs[i].x, Mobs[i].y) then
Inc(Result);
end;
end;

procedure HpCheck;
var
c, T, i, x, y:Integer;
RunDir: String;
begin
if (HPPercent < 50) and LoggedIn then
begin
Writeln('HP low doing HP checks...');
if not InvEmpty then
for c := 0 to 2 do
begin
for i := 1 to 28 do
if ExistsItem(i) then
begin
MMouseItem(i);
GetMousePos(x, y);
if WaitUptext('Eat', 400) then
begin
Mouse(x,y,0,0,false);
if WaitOption('Eat', 400) then
begin
t := GetSystemTime;
while ExistsItem(i) and ((GetSystemTime-t) < 2000) do
wait(20);
if (HPPercent > 60) then
Exit;
end;
end;
end;
if (not LoggedIn) or (HPPercent > 50) then
Exit;
end;

if (HPPercent < 50) then
begin
if (HPPercent < 25) then
if (nInFight) then
begin
RunDir := 'nsewns';
Debug('Running away HP% < 25...');
RunAway(RunDir[random(6)+1], true, 1, 10000 + random(2000));
end;
T := GetSystemTime;
repeat
if not IsResting then
SetRest;
Wait(200+random(200));
FindNormalRandoms;
If ((GetSystemTime - T) > (50000+random(50000)) ) then
begin
case random(2) of
0: BoredHuman;
1: RandomMovement;
end;
T := GetSystemTime;
end;
if not LoggedIn then
Exit;
until (HPPercent > 60);
SetAngle(true);
end;
end;
end;

function GetWeaponData(var DArr: array of TStringArray): Boolean;
var
x, y, i, ii, Len: integer;
TB: TBox;
TP: TPointArray;
begin
Result := False;
if (not LoggedIn) then exit;
SetArrayLength(DArr, 4);
GameTab(tab_Combat);
for I := 0 to 3 do
begin
MMouse(680-(i+1) mod 2*85, 270+2 mod (i+1)*28, 12, 12);
SetArrayLength(DArr[i], 3);
wait(100);
Result := WaitFindColor(X, Y, 10551295, MIX1-10, MIY1-10, MIX2+10, MIY2+10, 0, 3000);
GetClientDimensions(TB.X2, TB.Y2);
TB := IntToBox(0, 0, TB.X2, TB.Y2);
FindColors(TP, 10551295, TB.X1, TB.Y1, TB.X2 - 1, TB.Y2 - 1);
if (Length(TP) = 0) then exit;
TB := GetTPABounds(TP);
Len := Round((TB.x2-TB.x1)/6.2);
for ii := 0 to 2 do
begin
DArr[i][ii] := GetTextAt(TB.x1+1, TB.y1+1, 0, 3, 4, 0, 0, Len, SmallChars);
Writeln(DArr[i][ii]);
IncEx(TB.Y1, 16);
end;
end;
end;

Function SetWeapon(Skill: string; WeaponData: array of TStringArray; SetIt: boolean): boolean;
var
i, ii: integer;
begin
for i := 0 to High(WeaponData) do
for ii := 0 to High(WeaponData[i]) do
if (Pos(Lowercase(skill), Lowercase(WeaponData[i][ii])) <> 0) then
begin
if SetIt then
Result := SetFightMode(i + 1)
else
Result := True;
Exit;
end;
end;

function RotateCamera: boolean;
var
mTPA: TPointArray;
mAng, T: Integer;
begin
FindColorsTolerance(mTPA, 195836,MMX1+40,MMY1+40,MMX2-40,MMY2-40, 0);
if Length(mTPA) < 1 then
Exit;
RAaSTPA(mTPA, 4);
SortTPAFrom(mTPA, Point(MMCx, MMCY));
if (Distance(mTPA[0].x, mTPA[0].y, MMCX, MMCY) > 20) then
begin
T := GetSystemTime + 3000+random(3000);
repeat
Wait(500+random(200));
if (NPCsOnScreen > 0) then
Result := true;
if Result then Exit;
until (GetSystemTime > T) or not LoggedIn;
end
else
begin
mAng := Round(Degrees(ArcTan2(mTPA[0].Y - MMCY, mTPA[0].X - MMCX)) + 90 + rs_GetCompassAngleDegrees);
if (mAng < 0) then
mAng := mAng + 360;
if (mAng > 360) then
mAng := mAng - 360;
mAng := RandomRange(mAng - 12, mAng + 12);
MakeCompass(inttostr(mAng));
//Mouse(mTPA[0].x, mTPA[0].y, 3, 3, true);
end;
if (NPCsOnScreen > 0) then
result := true;
end;



procedure Report;
begin
with Players[CurrentPlayer] do
begin
Writeln('|___Something Fighter Report___|');
Writeln('|__Player: ' + Padr(Capitalize(Name), 18)+'__|');
Writeln('|__Worked: ' + Padr(MSToTime(Worked, Time_Short), 18)+'__|');
Writeln('|__Kills: ' + Padr(IntTostr(Round(Extendeds[10])), 18)+'__|');
if (Integers[11] > 0) then
Writeln('|__Pickups: ' + Padr(IntTostr(Integers[11]), 17)+'__|');
if (Integers[12] > 0) then
Writeln('|__Bones Buried: '+Padr(IntTostr(Integers[12]), 12)+'__|');
end;

ReportTime := GetSystemTime + 10*60000;
end;


Function BuryBones: Boolean;
var
i, x, y,t: integer;
begin
for i := 1 to 28 do
begin
if FindInvItem(BonesTPA, InvBox(i)) then
begin
MMouseItem(i);
if WaitUpText('ury', 500) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
wait(900+random(300));
t := GetSystemTime;
while ExistsItem(i) and ((GetSystemTime-t) < 250) do
wait(75 + random(50));
if (GetSystemTime - t) >= 250 then //We cannot bury at this place..
begin
Result := false;
Exit;
end;
Inc(Players[CurrentPlayer].Integers[12]);
Result := true;
end;
end;
end;
end;


Function FightIt: Boolean;
var
i, r: integer;
T: TPoint;
begin
if nInFight then
if FightOnScreen then
Exit;
With Playas[CurrentPlayer] do
For i := 0 to High(NPCColors) do //Color array
begin
T := Point(MSCX, MSCY);
if FindColorSpiralTolerance(T.x, T.y, NPCColors[i], MSX1, MSY1, MSX2, MSY2, NPCTol) then
begin
if PointInBox(T, IntToBox(MSCX-15, MSCY-25, MSCX+35, MSCY+25)) then
Continue;
if IsFightAt(T.x, T.y) then
Continue;
MMouse(T.x, T.y, 3, 3);
if WaitUpTextMulti(NPCNames, 400) then//Text array
begin
GetMousePos(T.x, T.y);
r := Random(3);
if LeftClickFail then
r := 2;
case r of
0..1: begin
Mouse(T.x, T.y, 0, 0, true);
Result := DidClick(True, 100);
end;
2: begin
Mouse(T.x, T.y, 0, 0, false);
Result := ChooseOption('ttack');
end;
end;
LeftClickFail := not result;
if Result then
begin
Debug('Attack!');
nFlag;
Exit;
end else Continue;
end;
end;
end;
end;

function CustomPickup:boolean;
var
i,x,y:integer;
begin
With Playas[CurrentPlayer] do
begin
if Length(PickupColors) < 1 then
Exit;
for i := 0 to High(PickupColors) do
begin
if InvFull then
begin
if Players[CurrentPlayer].Booleans[1] then
BuryBones;
if InvFull then //Lazy coding, if the inv is still full, stop picking up!
exit;
end;
x:=MSCX;
y:=MSCY;
if (FindColorSpiralTolerance(x, y, PickupColors[i], MSX1, MSY1, MSX2, MSY2, PickupTol)) then
begin
if PointInBox(Point(x, y), IntToBox(MSCX-15, MSCY-25, MSCX+35, MSCY+25)) then
Continue;
MMouse(x,y,3,3);
if WaitUpText('ake', 400) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
if WaitOptionMultiEx(PickupNames, 'All', ClickLeft, 3000) then
begin
Result := True;
Debug('Picking up item');
Inc(Players[CurrentPlayer].Integers[11]);
nFlag;
end;
end;
end;
end;
end
end;


procedure WaitFight;
var
T: integer;
begin
T := GetSystemTime + 5000;
if Playas[CurrentPlayer].Ranging then
T := GetSystemTime + 6000;
while not nInFight and (GetSystemTime < T) do
wait(100);
if nInFight then
begin
Debug('Killing monster...');
repeat
Wait(150+random(100));
if CheckHPWhileFighting then
HpCheck;
if PickUpWhileFighting then
CustomPickup;
FindNormalRandoms;
until (not nInFight) or (not FightOnScreen) or (not LoggedIn)
Debug('Done killing..');
end else
Wait(300);
end;

procedure SetupPlayer;
begin
GetAllLevels;
with Players[CurrentPlayer] do
begin
if not Booleans[0] then
begin
Debug('Setting Angle');
SetAngle(true);
Debug('Setting Retaliate');
Retaliate(True);
GetWeaponData(Playas[CurrentPlayer].Weapon);
if (Strings[0] <> '') then
if SetWeapon(Strings[0], Playas[CurrentPlayer].Weapon, True) then
Debug('Weapon set');
Playas[CurrentPlayer].Ranging := SetWeapon('rang', Playas[CurrentPlayer].Weapon, false);
Booleans[0] := true;
end;
if Playas[CurrentPlayer].Ranging then
if ArrowAmount < 200 then
begin
Writeln('Player is low on ammo < 200');
NextPlayer(false);
SetupPlayer;
end;
Integers[0] := GetSystemTime + RandomRange((LogoutTime-1)*60*1000, (LogoutTime+1)*60*1000);
ReportTime := GetSystemTime + 10*60000;
end;
SetRun(True);
end;

procedure StartUp;
var
i, l: integer;
begin
for i := 0 to HowManyPlayers-1 do
begin
SetArrayLength(Playas[i].NPCColors, Length(Players[i].Arrays[0]));
for l := 0 to High(Players[i].Arrays[0]) do
Playas[i].NPCColors[l] := Players[i].Arrays[0][l];

SetArrayLength(Playas[i].NPCNames, Length(Players[i].Arrays[1]));
for l := 0 to High(Players[i].Arrays[1]) do
Playas[i].NPCNames[l] := Players[i].Arrays[1][l];

SetArrayLength(Playas[i].PickupColors, Length(Players[i].Arrays[2]));
for l := 0 to High(Players[i].Arrays[2]) do
Playas[i].PickupColors[l] := Players[i].Arrays[2][l];

SetArrayLength(Playas[i].PickupNames, Length(Players[i].Arrays[3]));
for l := 0 to High(Players[i].Arrays[3]) do
Playas[i].PickupNames[l] := Players[i].Arrays[3][l];

Try
Playas[i].NPCTol := Players[i].Arrays[4][0];
Playas[i].PickupTol := Players[i].Arrays[4][1];
Players[i].Booleans[1] := Players[i].Arrays[4][2];
Except;
end;
end;

BonesTPA := InvItem(98, 24, 18, -1);//Regular bones
//InvItem(84, 22, 19, -1);//Big bones
end;

{ Integers[0] = Logout timer
*
* Extendeds[10] = Kill count
* Integers[11] = Pick up count
* Integers[12] = Bones buried
*
* Booleans[0] = initial player setup
* Booleans[1] = Bury bones
*
}


begin
Smart_Server := 1;
Smart_Members:= True;
Smart_Signed := True;
SetupSRL;
DeclarePlayers;
StartUp;
LoginPlayer;
SetupPlayer;
Repeat
FindNormalRandoms;

With Players[CurrentPlayer] do
begin
if (NPCsOnScreen = 0) then
begin
CustomPickup;
RotateCamera;
end else
Begin//Fighting
if not nInFight then
if FightIt then
begin
WaitFight;
Extendeds[10] := Extendeds[10] + KillAccuracy;
FindNormalRandoms;
end;
end;

HPCheck;
CustomPickup;
if (GetSystemTime > Integers[0]) or (not LoggedIn) then
begin
Report;
NextPlayer(LoggedIn);
SetupPlayer;
end;
end;

if (GetSystemTime > ReportTime) then
Report;
until(AllPlayersInactive);
end.

Here my nFlag + nInFight if you're interested!


var
lastanim,lastinfight : longword;

function R_InFight : boolean;
var
x : TMe;
begin
x:= GetMe;
if lastanim = 0 then
lastanim := GetSystemTime
else if x.Animation <> -1 then
lastanim := GetSystemTime;
result := (x.InFight) or ((GetSystemTime - LastInfight) < 500) ;
if result then
result := (GetSystemTime - lastanim) < 1500;
if result then
lastinfight := GetSystemTime;
end;

Narcle

2010-06-04 15:58:56

Nice Ray. Added all your changes, made total sense. And yeah I saw InvItem is in reflection… So I change the system I had to TPAItem so hopefully there is no more duplicates in the future. This is mainly so ppl can add reflection if they want too.

Btw check out my smelter, added crafting to it ;)

Nava2

2010-06-04 23:52:47

Besure you check out the freeze() and unfreeze() methods. I think it would make your inventory updates much much faster ;) unless you check through uptext… In which case nvm me…

Just as a benchmark:
const COLOUR = 0; //pick a colour on the ms. 
Var t, i,x,y: integer;
begin
Activateclient();
T:=getsystemtime;
For i:=1 to 1000 do
Findcolour(x,y,COLOUR,msx1,msy1,msx2,msy2);
Writeln(getsystemtime-t);


T:=getsystemtime;
Freeze();
For i:=1 to 1000 do
Findcolour(x,y,COLOUR,msx1,msy1,msx2,msy2);
Unfreeze();
Writeln(getsystemtime -t);
end.

sorry if it doesn't compile i did it on my iPod.

e: So I just ran this, and it was 1/10th the time for the freeze loops. :)

BlueWorld

2010-06-06 23:04:14

|___Something Fighter Report___|
|__Player: __|
|__Worked: 01h 55m 49s __|
|__Kills: 293 __|

needed constant watching though xD

Narcle

2010-06-23 15:17:51

Did a small update but will result in a big difference.

nInFight (fighting detection) now works like it should… Was simple wish I thought of it before.

Due to this I say this is out of beta stages and will require little maintenance at this point.

shadohead

2010-06-25 13:30:54

Is there any way I can use only 1 char. But make it log out after 63 mins of playing for ~15mins, then log back in and repeat? That would be REALLY useful!

Also, which is better Narcle's Fast Fighter or Narcle's Something Fighter?

shadohead

2010-06-30 00:50:45

How is my set up?

program SomethingFighter;
{$include SRL/SRL/misc/smart.scar}
{$include srl/srl.scar}
{$include srl/srl/Skill/Fighting.scar}
{$include srl/srl/Skill/Ranging.scar}

Const
LogoutTime = 30;//Play for this many mins then switch/logout
CheckHPWhileFighting = true;//
PickUpWhileFighting = True;//
KillAccuracy = 1;//How accurately after attacking it kills it [1.0 = perfect, 0.1 = 1/10th the time]

procedure DeclarePlayers;
begin
HowManyPlayers := 2;//Change this accordingly
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

With Players[0] do
begin
Name :='*****'; //Character Name
Pass :='*****'; //Character Pass
Nick :='*****'; //Nickname 3 - 4 Letter's of char name
Active := True; //True if you want this player to be ran in the script, false if not
Strings[0] := '';//Skill to train (if blank won't change anything)
Arrays[0] := [6129320];//colors of monster(s)
Arrays[1] := ['Hill Giant'];//monster name(s)
Arrays[2] := [15066608, 2345213, 2518653, 12533821];//[Pickup Colors]
Arrays[3] := ['Big Bones, Coins, Limpwurt Root, Uncut Sapphire'];//[Pickup Names]
//This is options array
//[NPC Color Tolerance, Pickup Tolerance, Bury Bones (true/false)];
Arrays[4] := [3, 3, True];
end;

With Players[1] do
begin
Name :='****'; //Character Name
Pass :='****'; //Character Pass
Nick :='****'; //Nickname 3 - 4 Letter's of char name
Active := True; //True if you want this player to be ran in the script, false if not
Strings[0] := '';//Skill to train (if blank won't change anything)
Arrays[0] := [6129320];//colors of monster(s)
Arrays[1] := ['Hill Giant'];//monster name(s)
Arrays[2] := [15066608, 2345213, 2518653, 12533821];//[Pickup Colors]
Arrays[3] := ['Big Bones, Coins, Limpwurt Root, Uncut Sapphire'];//[Pickup Names]
//This is options array
//[NPC Color Tolerance, Pickup Tolerance, Bury Bones (true/false)];
Arrays[4] := [3, 3, True];
end;
end;

As soon as i activated pick up and bury feature, The cursor (red dot) fails to eat my food when i am dying. It is too busy right clicking on big bones and coins on the ground but not picking them up.

I need help!

Narcle

2010-06-30 01:47:00

From: shadohead
How is my set up?

program SomethingFighter;
{$include SRL/SRL/misc/smart.scar}
{$include srl/srl.scar}
{$include srl/srl/Skill/Fighting.scar}
{$include srl/srl/Skill/Ranging.scar}

Const
LogoutTime = 30;//Play for this many mins then switch/logout
CheckHPWhileFighting = true;//
PickUpWhileFighting = True;//
KillAccuracy = 1;//How accurately after attacking it kills it [1.0 = perfect, 0.1 = 1/10th the time]

procedure DeclarePlayers;
begin
HowManyPlayers := 2;//Change this accordingly
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

With Players[0] do
begin
Name :='*****'; //Character Name
Pass :='*****'; //Character Pass
Nick :='*****'; //Nickname 3 - 4 Letter's of char name
Active := True; //True if you want this player to be ran in the script, false if not
Strings[0] := '';//Skill to train (if blank won't change anything)
Arrays[0] := [6129320];//colors of monster(s)
Arrays[1] := ['Hill Giant'];//monster name(s)
Arrays[2] := [15066608, 2345213, 2518653, 12533821];//[Pickup Colors]
Arrays[3] := ['Big Bones, Coins, Limpwurt Root, Uncut Sapphire'];//[Pickup Names]
//This is options array
//[NPC Color Tolerance, Pickup Tolerance, Bury Bones (true/false)];
Arrays[4] := [3, 3, True];
end;

With Players[1] do
begin
Name :='****'; //Character Name
Pass :='****'; //Character Pass
Nick :='****'; //Nickname 3 - 4 Letter's of char name
Active := True; //True if you want this player to be ran in the script, false if not
Strings[0] := '';//Skill to train (if blank won't change anything)
Arrays[0] := [6129320];//colors of monster(s)
Arrays[1] := ['Hill Giant'];//monster name(s)
Arrays[2] := [15066608, 2345213, 2518653, 12533821];//[Pickup Colors]
Arrays[3] := ['Big Bones, Coins, Limpwurt Root, Uncut Sapphire'];//[Pickup Names]
//This is options array
//[NPC Color Tolerance, Pickup Tolerance, Bury Bones (true/false)];
Arrays[4] := [3, 3, True];
end;
end;

As soon as i activated pick up and bury feature, The cursor (red dot) fails to eat my food when i am dying. It is too busy right clicking on big bones and coins on the ground but not picking them up.

I need help!


PickUpWhileFighting = True;//

change this to

PickUpWhileFighting = False;//

shadohead

2010-06-30 01:54:01

From: Narcle
PickUpWhileFighting = True;//

change this to

PickUpWhileFighting = False;//




Now it doesn't pick up ANYTHING, it just right clicks on the items on the ground over and over and over again.

Also, what is "KillAccuracy = 1;//How accurately after attacking it kills it [1.0 = perfect, 0.1 = 1/10th the time]"

I did not understand this.

Help with the picking up feature tho, i really need it, also, is it possible to make the script bury the big bones it picks up?

Hamish

2010-07-26 13:04:07

Anyone got any tips on picking colours because my script just doesn't seem to do anything, just hovers over the inventory and areas around there.

topiser

2010-08-04 16:06:19

From: Hamish
Anyone got any tips on picking colours because my script just doesn't seem to do anything, just hovers over the inventory and areas around there.


Just use the colour picker and select the colours that are most prominent over the entire monster. Using this script to train 2 characters atm. Great script :D

Proggies so far:

|___Something Fighter Report___|
|__Worked: 02h 31m 29s __|
|__Kills: 218 __|
|__Pickups: 115 __|
|__Bones Buried: 31 __|



|___Something Fighter Report___|
|__Worked: 03h 38m 27s __|
|__Kills: 180 __|
|__Pickups: 5 __|

I'll edit this post later with the final proggies if i remember to xD

Only complaints I have is that the item pick up isn't working at all on my character thats fighting chickens, and on my other character it only buries like 3 bones every time inventory is full of bones, then it continues attacking. Oh and at time it constantly keeps examining bones, like 8 times.

Other than that its a great script.

Narcle

2010-08-04 17:35:38

From: topiser
Just use the colour picker and select the colours that are most prominent over the entire monster. Using this script to train 2 characters atm. Great script :D

Proggies so far:

|___Something Fighter Report___|
|__Worked: 02h 31m 29s __|
|__Kills: 218 __|
|__Pickups: 115 __|
|__Bones Buried: 31 __|



|___Something Fighter Report___|
|__Worked: 03h 38m 27s __|
|__Kills: 180 __|
|__Pickups: 5 __|

I'll edit this post later with the final proggies if i remember to xD

Only complaints I have is that the item pick up isn't working at all on my character thats fighting chickens, and on my other character it only buries like 3 bones every time inventory is full of bones, then it continues attacking. Oh and at time it constantly keeps examining bones, like 8 times.

Other than that its a great script.


Its all about the setup, it has to be really precise. I'd use 0 tolerance for colors for item pickup. Also due to a recent change in ChooseOption for SRL it'll examine the item sometimes instead of picking it up. For me I had to change the pickup option to 'ake Bones' and such… its a pain but its the only fix atm as I haven't figured out how to fix ChooseOption yet.

For the bone burying it might need a update to the TPA or due to the area your fighting in it doesn't read the uptext correctly due to background colors. I'm guessing its the later otherwise it would never bury a bone if the TPA item recognition didn't see it.

topiser

2010-08-04 21:55:20

From: Narcle
Its all about the setup, it has to be really precise. I'd use 0 tolerance for colors for item pickup. Also due to a recent change in ChooseOption for SRL it'll examine the item sometimes instead of picking it up. For me I had to change the pickup option to 'ake Bones' and such… its a pain but its the only fix atm as I haven't figured out how to fix ChooseOption yet.

For the bone burying it might need a update to the TPA or due to the area your fighting in it doesn't read the uptext correctly due to background colors. I'm guessing its the later otherwise it would never bury a bone if the TPA item recognition didn't see it.


Thanks for the info and the script. Are you working on anything other scripts at the moment?

chook

2010-08-04 22:12:20


Just a error I came across, maybe the script or simba.

By the way, its running on Windows Server 2008.

Narcle

2010-08-04 22:20:57

From: chook

Just a error I came across, maybe the script or simba.

By the way, its running on Windows Server 2008.


Its your java. Check the forums for that file, its a common thing and should be easily fixed. Either reinstalling java or placing that file in a certain folder.

Also could you remove the picture now? Its kinda big and messes up the forum layout (just annoying).

chook

2010-08-04 22:46:38

Removed, sorry.

Jmcver

2010-08-10 01:31:52

I cannot seem to get it to actually bury the bones it picks up.

topiser

2010-08-13 14:44:58

Another proggie:

|___Something Fighter Report___|
|__Player: X __|
|__Worked: 03h 12m 16s __|
|__Kills: 454 __|

TomTuff

2010-08-31 00:00:01

i had it set to pickup/bury bones but when it would right click to pick up it would click examine instaead of pickup, so i'm now just gonna run it till i hear this is fixed. proggie to come hopefully

Narcle

2010-08-31 10:30:34

From: TomTuff
i had it set to pickup/bury bones but when it would right click to pick up it would click examine instaead of pickup, so i'm now just gonna run it till i hear this is fixed. proggie to come hopefully


Its not my script its chooseoption(). Only way I worked around this was doing say for Nature runes I'd do 'ake Nat' and it fixed it. Its a pain but only way it works atm.

TomTuff

2010-08-31 15:42:19

From: Narcle
Its not my script its chooseoption(). Only way I worked around this was doing say for Nature runes I'd do 'ake Nat' and it fixed it. Its a pain but only way it works atm.


oh ok thanks ^_^ i'm working on skills to get explorer's ring 3 atm, but after that i'll run this at skellys and see how long of a proggie i can run :spot:

risingtide13

2010-09-01 17:49:40

yep worked for range :), got a level up

TomTuff

2010-09-11 13:25:57

|___Something Fighter Report___|
|__Player: *********** __|
|__Worked: 04h 27m 11s __|
|__Kills: 526 __|

stopped because smart black screened
E: actually it stopped because it ran out of food, smart happened to blackscreen while the script was inactive :P

Bubix

2010-09-20 01:19:30

hm… i`m thinking of trying this script, but i think, that it needs safe spot, for ranging, like doing X nad Y coordinates for safe spot. that it could range/mage from there.. and pick up arrows if its ranges. jsut a suggestion =]

EDIT: btw havent been here long time.. now i`m like a back.. and hope to try somthing out =]

TomTuff

2010-09-20 02:34:17

Hi Narcle,
While running this script in the 2nd level of the SoS at the Flesh Crawlers, it seems to think it's found itself in a random, and obviously not finding itself to be in a random, exits and cuts itself very short. Fast fighter does not do this, however, but i'd much rather use something fighter as i prefer it over FF. A fix would be nice =)

Nikize

2010-11-13 08:48:45

|___Something Fighter Report___|
|__Player: ********** __|
|__Worked: 02h 56m 43s __|
|__Kills: 398 __|

Fighter is ok, funny things is though, that i was fighting monsters, which had a small chanse to drop a chef's hat, and the fighter didnt pick anything else up, except 3 hats )

Good fighter though.

kylerperson

2010-11-22 22:00:25

So I've been having a couple of problems and have tried to research them all before posting this.

When running it I get messages saying:
"Warning! You passed a wrong ys to a finder function: -10. That is below 0, thus out of bounds. Setting the value to 0 for now."

The script will attack one monster, but before it's killed, it will start right clicking on other monsters without clicking on attack. It will continue doing this until I stop the script.

I've tried running this script on multiple monsters, but I've had no luck. It's the same thing every time.

Anyone know the problem? Any help would be appreciated :D

smurg

2010-11-23 04:24:12

From: kylerperson
So I've been having a couple of problems and have tried to research them all before posting this.

When running it I get messages saying:
"Warning! You passed a wrong ys to a finder function: -10. That is below 0, thus out of bounds. Setting the value to 0 for now."

The script will attack one monster, but before it's killed, it will start right clicking on other monsters without clicking on attack. It will continue doing this until I stop the script.

I've tried running this script on multiple monsters, but I've had no luck. It's the same thing every time.

Anyone know the problem? Any help would be appreciated :D


Whats your kill accuracy and are you picking anything up?

I found after 2-3 hours, it kills the script and says it ran out of memory. Must be a memory leak?

kylerperson

2010-11-23 20:38:37

From: smurg
Whats your kill accuracy and are you picking anything up?

I found after 2-3 hours, it kills the script and says it ran out of memory. Must be a memory leak?


Well, I'm not even able to run for 2-3 hours lol. It will kill literally one, and then will just sit there and right click the rest. Is it not recognizing the attack text?

Narcle

2010-11-23 22:30:06

Frement mentioned to me the InFight wasn't working right. I haven't had any plans to update this for awhile.

kylerperson

2010-11-24 01:44:28

Okay, I did a complete reinstallation of simba and srl… again. But hey, it worked XD.

Anyways heres a proggie
|___Something Fighter Report___|
|__Player: —– —- __|
|__Worked: 04h 01m 33s __|
|__Kills: 827 __|
|__Pickups: 258 __|

it seems like the wrong ys function message occurs more frequently as the script runs for a long amount of time

Narcle

2010-11-24 02:29:23

From: kylerperson
Okay, I did a complete reinstallation of simba and srl… again. But hey, it worked XD.

Anyways heres a proggie
|___Something Fighter Report___|
|__Player: —– —- __|
|__Worked: 04h 01m 33s __|
|__Kills: 827 __|
|__Pickups: 258 __|

it seems like the wrong ys function message occurs more frequently as the script runs for a long amount of time


Strange, only time I've seen the error message your referring to was with DidClick() function… which I fixed awhile ago (in SRL).

Frement

2010-11-24 03:25:27

I had the same with Fast Fighter.

smurg

2010-11-24 04:24:51

From: Frement
I had the same with Fast Fighter.


I run fast fighter like for 10+ hours, but this runs out of memory around 3.

Might try to port some of the item pickup procedures from this script to fast fighter.

Would be epic then.

WireMesh

2010-11-25 09:13:45

On my older laptop when I run this script it will run smooth until it attacks the first enemy (in my case guards). Then it will lag up really bad and pretty much freeze the computer. Any ideas? (My computer is able to run any other script smoothly)

Nikize

2010-12-02 03:46:09

This is actually atm the best fighter i use, +3 hours untill i have to fetch some more food, i have gotten mu strength from 64-77 using this :)

jkalpha

2010-12-02 16:54:12

Hey Narcle, I love your scripts.

I actually use powerbot a lot, but its currently down so I am having to use Simba.
That means that I am using your script :) because its easy and simple to use. There is also the added benefit of that it works :).

I look through all the post but I couldn't find an answer, but is there anyway to make the program look back through after it finishes?

Such as after it runs for X amount of time and logs is it possible to get it to wait say 10~15 minutes and then log back in and continue this cycle?

If this could be done that would be amazing! I am also sure there are a lot of people that would love that feature.

dalildrummerboi

2010-12-25 10:39:38

From: WireMesh
On my older laptop when I run this script it will run smooth until it attacks the first enemy (in my case guards). Then it will lag up really bad and pretty much freeze the computer. Any ideas? (My computer is able to run any other script smoothly)


Sounds like it's time for a new computer. :duh:

Mike408

2010-12-29 04:34:46

Got it working… Why does it not take breaks, instead it will log out trying to switch players, and revert back to player 1. Basically logging in/out.. :S Other than that, works great :D

Mike408

2010-12-29 05:20:46

Compiled succesfully in 759 ms.
SRL Compiled in 92 msec
SMART Initialized.
Loaded: Server 46, Members: True, Signed: True, Super Detail: False.
1
2
4
Welcome to Runescape.
*********
Succesfully saved: C:\Simba\Scripts\Something Fighter 1.00.simba
5
1
2
Accurate
Crush |
Attack XP
Aggressive
Crush |
Strength XP
Defensive
Crush N i
Defence XP
Warning! You passed a wrong ys to a finder function: -11. That is below 0, thus out of bounds. Setting the value to 0 for now.
|___Something Fighter Report___|
|__Player: ********* __|
|__Worked: 00s __|
|__Kills: 24 __|
|___Something Fighter Report___|
|__Player: ********* __|
|__Worked: 00s __|
|__Kills: 49 __|
No Reflection update
No SRL update / Plugins update available!
|___Something Fighter Report___|
|__Player: ********* __|
|__Worked: 00s __|
|__Kills: 77 __|
Warning! You passed a wrong ys to a finder function: -10. That is below 0, thus out of bounds. Setting the value to 0 for now.
Warning! You passed a wrong ys to a finder function: -8. That is below 0, thus out of bounds. Setting the value to 0 for now.
|___Something Fighter Report___|
|__Player: Sythesin __|
|__Worked: 00s __|
|__Kills: 102 __|
About an hour into the script.. (full text of box on bottom of simba, idk what its called but its not the black and white console.)

Warning! You passed a wrong ys to a finder function: -10. That is below 0, thus out of bounds. Setting the value to 0 for now.
Warning! You passed a wrong ys to a finder function: -8. That is below 0, thus out of bounds. Setting the value to 0 for now.

Anyone aware what this means?
Heres my whole setup..
program SomethingFighter;
{$include SRL/SRL/misc/smart.scar}
{$include srl/srl.scar}
{$include srl/srl/Skill/Fighting.scar}
{$include srl/srl/Skill/Ranging.scar}

Const
LogoutTime = 64;//Play for this many mins then switch/logout
CheckHPWhileFighting = true;//
PickUpWhileFighting = false;//
KillAccuracy = 0.7;//How accurately after attacking it kills it [1.0 = perfect, 0.1 = 1/10th the time]

procedure DeclarePlayers;
begin
HowManyPlayers := 1;//Change this accordingly
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

With Players[0] do
begin
Name :='*********'; //Character Name
Pass :='*********'; //Character Pass
Nick :='***'; //Nickname 3 - 4 Letter's of char name
Active := True; //True if you want this player to be ran in the script, false if not
Strings[0] := 'Magic';//Skill to train (if blank won't change anything)
Arrays[0] := [3421239,3422268,6843757,5526616,7962239,7238515,7830909,1644568,8423046,8423046,1317955];//colors of monster(s)
Arrays[1] := ['keleton'];//monster name(s)
Arrays[2] := [];//[Pickup Colors]
Arrays[3] := [''];//[Pickup Names]
//This is options array
//[NPC Color Tolerance, Pickup Tolerance, Bury Bones (true/false)];
Arrays[4] := [3, 0, true];
end;

end;

Const
DebugOn = false;

type
TPlaya = record
NPCNames: TStringArray;
NPCColors: TIntegerArray;
Ranging: Boolean;
Weapon: Array of Array of String;
PickupColors: array of integer;
PickupNames: array of string;
NPCTol, PickupTol: integer;
end;
TTPAItem = Record
OutLine, Width, Height, Color: Integer;
end;

var
Playas: array [0..99] of TPlaya;
ReportTime: integer;
LeftClickFail: Boolean;//if the Left click fails attacking
BonesTPA: TTPAItem;

procedure Debug(S: String);
begin
if DebugOn then
Writeln(S)
else
DebugLn(s);
end;

Function nInFight: Boolean;//In case someone wants to customize, this is a key function
var
T: Integer;
begin
T := GetSystemTime+500;
Repeat
Wait(5);
Result := InFight;
until Result or (GetSystemTime > T);
end;

procedure nFlag; //In case someone wants to customize the FFlag(0) function
begin
FFlag(0);
end;

function TPAItem(cOutLine, cWidth, cHeight, cColor: Integer): TTPAItem;
begin
with Result do
begin
OutLine := cOutLine;
Width := cWidth;
Height := cHeight;
Color := cColor;
end;
end;

function FindTPAItem(Item: TTPAItem; B: TBox): Boolean;
var
TPA: TPointArray;
Bt: TBox;
x,y: integer;
begin
FindColorsTolerance(TPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(TPA) < 1 then
Exit;
Bt := GetTPABounds(TPA);
if (Length(TPA) = Item.OutLine) and (iAbs(Bt.x2-Bt.x1) = Item.Width) and (iAbs(Bt.y2-Bt.y1) = Item.Height) then
if Item.Color > -1 then
Result := FindColorTolerance(x, y, Item.Color, Bt.x1, Bt.y1, Bt.x2, Bt.y2, 9)
else
Result := True;
end;

function FightOnScreen: Boolean;
var
TBA: TBoxArray;
x, y: integer;
begin
x := MSCX;
y := MSCY;
TBA := FindAllHPBars(x, y, MSX1, MSY1, MSX2, MSY2);
if Length(TBA) < 1 then
Exit;
if PointInBox(Point((TBA[0].x1+TBA[0].x2)/2, (TBA[0].y1+TBA[0].y2)/2), IntToBox(x-39,y-25,x+39,y+5)) then
Result := (Length(TBA)-1) > 0
else
Result := Length(TBA) > 0;
end;

Function NPCsOnScreen: integer;
var
i: integer;
Mobs : TPointArray;
begin
FindColorsTolerance(Mobs, 195836,MMX1+40,MMY1+40,MMX2-40,MMY2-40, 0);
if High(Mobs) > 0 then
begin
RAaSTPA(Mobs, 4);
for i := 0 to High(Mobs) do
If InAbstractBox(MMCX-30, MMCY-19, MMCX+30, MMCY-19, MMCX+24, MMCY+14, MMCX-24, MMCY+14, Mobs[i].x, Mobs[i].y) then
Inc(Result);
end;
end;

procedure HpCheck;
var
c, T, i, x, y:Integer;
RunDir: String;
begin
if (HPPercent < 50) and LoggedIn then
begin
Writeln('HP low doing HP checks...');
if not InvEmpty then
for c := 0 to 2 do
begin
for i := 1 to 28 do
if ExistsItem(i) then
begin
MMouseItem(i);
GetMousePos(x, y);
if WaitUptext('Eat', 400) then
begin
Mouse(x,y,0,0,false);
if WaitOption('Eat', 400) then
begin
t := GetSystemTime;
while ExistsItem(i) and ((GetSystemTime-t) < 2000) do
wait(20);
if (HPPercent > 60) then
Exit;
end;
end;
end;
if (not LoggedIn) or (HPPercent > 50) then
Exit;
end;

if (HPPercent < 50) then
begin
if (HPPercent < 25) then
if (nInFight) then
begin
RunDir := 'nsewns';
Debug('Running away HP% < 25...');
RunAway(RunDir[random(6)+1], true, 1, 10000 + random(2000));
end;
T := GetSystemTime;
repeat
if not IsResting then
SetRest;
Wait(200+random(200));
FindNormalRandoms;
If ((GetSystemTime - T) > (50000+random(50000)) ) then
begin
case random(2) of
0: BoredHuman;
1: RandomMovement;
end;
T := GetSystemTime;
end;
if not LoggedIn then
Exit;
until (HPPercent > 60);
SetAngle(true);
end;
end;
end;

function GetWeaponData(var DArr: array of TStringArray): Boolean;
var
x, y, i, ii, Len: integer;
TB: TBox;
TP: TPointArray;
begin
Result := False;
if (not LoggedIn) then exit;
SetArrayLength(DArr, 4);
GameTab(tab_Combat);
for I := 0 to 3 do
begin
MMouse(680-(i+1) mod 2*85, 270+2 mod (i+1)*28, 12, 12);
SetArrayLength(DArr[i], 3);
wait(100);
Result := WaitFindColor(X, Y, 10551295, MIX1-10, MIY1-10, MIX2+10, MIY2+10, 0, 3000);
GetClientDimensions(TB.X2, TB.Y2);
TB := IntToBox(0, 0, TB.X2, TB.Y2);
FindColors(TP, 10551295, TB.X1, TB.Y1, TB.X2 - 1, TB.Y2 - 1);
if (Length(TP) = 0) then exit;
TB := GetTPABounds(TP);
Len := Round((TB.x2-TB.x1)/6.2);
for ii := 0 to 2 do
begin
DArr[i][ii] := GetTextAt(TB.x1+1, TB.y1+1, 0, 3, 4, 0, 0, Len, SmallChars);
Writeln(DArr[i][ii]);
IncEx(TB.Y1, 16);
end;
end;
Result := (DArr[0][0] <> '');
end;

Function SetWeapon(Skill: string; WeaponData: array of TStringArray; SetIt: boolean): boolean;
var
i, ii: integer;
begin
for i := 0 to High(WeaponData) do
for ii := 0 to High(WeaponData[i]) do
if (Pos(Lowercase(skill), Lowercase(WeaponData[i][ii])) <> 0) then
begin
if SetIt then
Result := SetFightMode(i + 1)
else
Result := True;
Exit;
end;
end;

function RotateCamera: boolean;
var
mTPA: TPointArray;
mAng, T: Integer;
begin
FindColorsTolerance(mTPA, 195836,MMX1+40,MMY1+40,MMX2-40,MMY2-40, 0);
if Length(mTPA) < 1 then
Exit;
RAaSTPA(mTPA, 4);
SortTPAFrom(mTPA, Point(MMCx, MMCY));
if (Distance(mTPA[0].x, mTPA[0].y, MMCX, MMCY) > 20) then
begin
T := GetSystemTime + 3000+random(3000);
repeat
Wait(500+random(200));
if (NPCsOnScreen > 0) then
Result := true;
if Result then Exit;
until (GetSystemTime > T) or not LoggedIn;
end
else
begin
mAng := Round(Degrees(ArcTan2(mTPA[0].Y - MMCY, mTPA[0].X - MMCX)) + 90 + rs_GetCompassAngleDegrees);
if (mAng < 0) then
mAng := mAng + 360;
if (mAng > 360) then
mAng := mAng - 360;
mAng := RandomRange(mAng - 12, mAng + 12);
MakeCompass(inttostr(mAng));
//Mouse(mTPA[0].x, mTPA[0].y, 3, 3, true);
end;
if (NPCsOnScreen > 0) then
result := true;
end;



procedure Report;
begin
with Players[CurrentPlayer] do
begin
Writeln('|___Something Fighter Report___|');
Writeln('|__Player: ' + Padr(Capitalize(Name), 18)+'__|');
Writeln('|__Worked: ' + Padr(MSToTime(Worked, Time_Short), 18)+'__|');
Writeln('|__Kills: ' + Padr(IntTostr(Round(Extendeds[10])), 18)+'__|');
if (Integers[11] > 0) then
Writeln('|__Pickups: ' + Padr(IntTostr(Integers[11]), 17)+'__|');
if (Integers[12] > 0) then
Writeln('|__Bones Buried: '+Padr(IntTostr(Integers[12]), 12)+'__|');
end;

ReportTime := GetSystemTime + 10*60000;
end;


Function BuryBones: Boolean;
var
i, x, y, t: integer;
begin
for i := 1 to 28 do
begin
if FindTPAItem(BonesTPA, InvBox(i)) then
begin
MMouseItem(i);
if WaitUpText('ury', 500) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
Wait(900+random(300));
t := GetSystemTime;
while ExistsItem(i) and ((GetSystemTime-t) < 250) do
wait(75 + random(50));
if (GetSystemTime - t) >= 250 then //We cannot bury at this place..
begin
Result := false;
Exit;
end;
Inc(Players[CurrentPlayer].Integers[12]);
Result := true;
end;
end;
end;
end;


Function FightIt: Boolean;
var
i, r: integer;
T: TPoint;
begin
if nInFight then
if FightOnScreen then
Exit;
With Playas[CurrentPlayer] do
For i := 0 to High(NPCColors) do //Color array
begin
T := Point(MSCX, MSCY);
if FindColorSpiralTolerance(T.x, T.y, NPCColors[i], MSX1, MSY1, MSX2, MSY2, NPCTol) then
begin
if PointInBox(T, IntToBox(MSCX-15, MSCY-25, MSCX+35, MSCY+25)) then
Continue;
if IsFightAt(T.x, T.y) then
Continue;
MMouse(T.x, T.y, 3, 3);
if WaitUpTextMulti(NPCNames, 400) then//Text array
begin
GetMousePos(T.x, T.y);
r := Random(3);
if LeftClickFail then
r := 2;
case r of
0..1: begin
Mouse(T.x, T.y, 0, 0, true);
Result := DidClick(True, 100);
end;
2: begin
Mouse(T.x, T.y, 0, 0, false);
Result := ChooseOption('ttack');
end;
end;
LeftClickFail := not result;
if Result then
begin
Debug('Attack!');
nFlag;
Exit;
end Else Continue;
end;
end;
end;
end;

function CustomPickup:boolean;
var
i,x,y:integer;
begin
With Playas[CurrentPlayer] do
begin
if Length(PickupColors) < 1 then
Exit;
for i := 0 to High(PickupColors) do
begin
if InvFull then//check
begin
if Players[CurrentPlayer].Booleans[1] then
BuryBones;
if InvFull then
exit;
end;
x:=MSCX;
y:=MSCY;
if (FindColorSpiralTolerance(x, y, PickupColors[i], MSX1, MSY1, MSX2, MSY2, PickupTol)) then
begin
if PointInBox(Point(x, y), IntToBox(MSCX-15, MSCY-25, MSCX+35, MSCY+25)) then
Continue;
MMouse(x,y,3,3);
if WaitUpText('ake', 400) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
if WaitOptionMultiEx(PickupNames, 'All', ClickLeft, 3000) then
begin
Result := True;
Debug('Picking up item');
Inc(Players[CurrentPlayer].Integers[11]);
Wait(100+random(100));
nFlag;
end;
end;
end;
end;
end
end;


procedure WaitFight;
var
T: integer;
begin
T := GetSystemTime + 5000;
if Playas[CurrentPlayer].Ranging then
T := GetSystemTime + 6000;
while not nInFight and (GetSystemTime < T) do
wait(100);
if nInFight then
begin
Debug('Killing monster...');
repeat
Wait(150+random(100));
if CheckHPWhileFighting then
HpCheck;
if PickUpWhileFighting then
CustomPickup;
FindNormalRandoms;
until (not nInFight) or (not FightOnScreen) or (not LoggedIn)
end else
Wait(300);
end;

procedure SetupPlayer;
begin
with Players[CurrentPlayer] do
begin
if not Booleans[0] then
begin
Debug('Setting Angle');
SetAngle(true);
Debug('Setting Retaliate');
Retaliate(True);
GetWeaponData(Playas[CurrentPlayer].Weapon);
if (Strings[0] <> '') then
if SetWeapon(Strings[0], Playas[CurrentPlayer].Weapon, True) then
Debug('Weapon set');
Playas[CurrentPlayer].Ranging := SetWeapon('rang', Playas[CurrentPlayer].Weapon, false);
Booleans[0] := true;
end;
if Playas[CurrentPlayer].Ranging then
if ArrowAmount < 200 then
begin
Writeln('Player is low on ammo < 200');
NextPlayer(false);
SetupPlayer;
end;
Integers[0] := GetSystemTime + RandomRange((LogoutTime-1)*60*1000, (LogoutTime+1)*60*1000);
end;
ReportTime := GetSystemTime + 10*60000;
SetRun(True);
end;

procedure StartUp;
var
i, l: integer;
begin
for i := 0 to HowManyPlayers-1 do
begin
SetArrayLength(Playas[i].NPCColors, Length(Players[i].Arrays[0]));
for l := 0 to High(Players[i].Arrays[0]) do
Playas[i].NPCColors[l] := Players[i].Arrays[0][l];

SetArrayLength(Playas[i].NPCNames, Length(Players[i].Arrays[1]));
for l := 0 to High(Players[i].Arrays[1]) do
Playas[i].NPCNames[l] := Players[i].Arrays[1][l];

SetArrayLength(Playas[i].PickupColors, Length(Players[i].Arrays[2]));
for l := 0 to High(Players[i].Arrays[2]) do
Playas[i].PickupColors[l] := Players[i].Arrays[2][l];

SetArrayLength(Playas[i].PickupNames, Length(Players[i].Arrays[3]));
for l := 0 to High(Players[i].Arrays[3]) do
Playas[i].PickupNames[l] := Players[i].Arrays[3][l];

Try
Playas[i].NPCTol := Players[i].Arrays[4][0];
Playas[i].PickupTol := Players[i].Arrays[4][1];
Players[i].Booleans[1] := Players[i].Arrays[4][2];
Except;
end;
end;

BonesTPA := TPAItem(98, 24, 18, -1);//Regular bones
//TPAItem(84, 22, 19, -1);//Big bones
end;

{ Integers[0] = Logout timer
*
* Extendeds[10] = Kill count
* Integers[11] = Pick up count
* Integers[12] = Bones buried
*
* Booleans[0] = initial player setup
* Booleans[1] = Bury bones
*
}


begin
Smart_Server := 46;
Smart_Members:= True;
Smart_Signed := True;
SetupSRL;
DeclarePlayers;
StartUp;
LoginPlayer;
SetupPlayer;
Repeat
FindNormalRandoms;

With Players[CurrentPlayer] do
begin
if (NPCsOnScreen = 0) then
RotateCamera
else
Begin//Fighting
if not nInFight then
if FightIt then
begin
WaitFight;
Extendeds[10] := Extendeds[10] + KillAccuracy;
FindNormalRandoms;
end;
end;

CustomPickup;

if Booleans[1] then
if InvFull then
BuryBones;

if (GetSystemTime > Integers[0]) then
begin
Report;
NextPlayer(true);
SetupPlayer;
end;
end;

if (GetSystemTime > ReportTime) then
Report;
until(AllPlayersInactive);
end.

After a while it will come up with the error…

Failed to create new thread, code:8.
Press OK to ignore and risk data corruption.
Press Cancel to kill the program.

ALSO, how do i get it to take breaks? Does this script support?
Thank you! : )

KingKong

2010-12-29 05:25:25

I don't think that's not a problem with the script, try restarting simba and run the script again.

Mike408

2010-12-29 05:40:11

From: kongking
I don't think that's not a problem with the script, try restarting simba and run the script again.

Happend to me 3 times already

kevinconklin

2010-12-29 17:14:10

do i need to get the colors of the drops inside the game, when they are actually on the ground, or can i just get the colors from rs wiki?

elmotheskaat

2010-12-30 15:02:21

I was actually surprised to find out how great this script still works. Great!
Especially detecting if it's infight, absolutely stunning.

|___Something Fighter Report___|
|__Player: ?? __|
|__Worked: 04h 32s __|
|__Kills: 678 __|
|__Pickups: 275 __|

Still running

@kevinconklin: Just get a free colorpicker, and use the numbers you get from that ingame.

kevinconklin

2010-12-31 17:19:29

hey, uhh when i start the script, it opens up smart, but it wont log me on, it just doesnt type anything at the log on screen.(i have the form set up correctly in the script & rs is on fixed and minimum detail)

Sgt Soul

2011-01-01 00:01:19

I think you have to hold down 's' as runescape starts up to put it into safe mode, I have heard that is what you have to do, I never had to do it though I just had fixed and low graphics :S

kevinconklin

2011-01-01 10:18:41

thats not working :(

Mike408

2011-01-02 17:04:32

This script has a memory leak. It will comtinue to add 9 MB every second until it maxes out at 2 GB on my computer.

mohsin12331

2011-01-09 03:18:41

how do you make the script attack faster? like if you kill an npc..it will probably wait like 10 seconds before it attacks another one.

fyodor

2011-01-09 16:09:18

got a good run :Z failed molly random though

|___Something Fighter Report___|
|__Player: *** __|
|__Worked: 12h 14m 19s __|
|__Kills: 1909 __|

Becks

2011-01-11 23:42:44

From: mohsin12331
how do you make the script attack faster? like if you kill an npc..it will probably wait like 10 seconds before it attacks another one.


I'm having the same problem.

XRaye

2011-01-12 17:45:28

|___Something Fighter Report___|
|__Player: ******** __|
|__Worked: 00s __|
|__Kills: 827 __|
Great script, time running doesn't seem to have worked?

day416

2011-02-17 17:38:35

Exception in Script: Unable to find file 'SRL/SRL/misc/smart.scar' used from ''
doesn't exist

what does this mean?

apx900

2011-02-24 20:12:28

From: day416
Exception in Script: Unable to find file 'SRL/SRL/misc/smart.scar' used from ''
doesn't exist

what does this mean?


it basicly means what it says. i think you may need to do some updating. have a look into your simba installation folder and then into Includes\SRL\SRL\misc and look for a file called smart. if you cant find that file or any of the srl folders then simply update your SRL.

feel free to give me a PM.

Mystic

2011-03-11 18:03:42

|___Something Fighter Report___|
|__Player: ***** __|
|__Worked: 05h 59m 59s __|
|__Kills: 1009 __|
|__Pickups: 944 __|


Amazing! :D

vashanddou

2011-03-12 21:08:04

i'm lost in both your fighters how do I set the "color" of a monster? like how do I know what to set for what color? (can i fight rock crabs btw?)

fanboy

2011-03-13 01:57:20

Sorry if this is a nooby error on my part but i keep getting this error after SMART initializes

Error: Exception: Invalid variant type cast at line 492
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]

if you know how or a tut on how to solve that your help is appreciated ! :]

EDIT:
yep nooby error lol just realized i didn't put commas between the colors… :p ill run this one over night as well as the fast fighter

just a suggestion not sure if it would help or not: when monsters arn't detected click on the yellow dots to move to monsters that are spawned :/ that would work well with beginning accounts for fighting in cow pen

bmx pk

2011-04-30 00:05:02

had a quick question. i cant seem to get the script to pick any items up. i get it to kill monsters but it wont pick anything up not sure if im doing it wrong or something. im trying to pick up charms green crimson and blue. if someone has the colors that would be awesome or tell me how to get it i tried the same way for charms as i did for the monsters and it didnt work. is it color or item id that i add in that spot??

Narcle

2011-04-30 01:43:47

From: bmx pk
had a quick question. i cant seem to get the script to pick any items up. i get it to kill monsters but it wont pick anything up not sure if im doing it wrong or something. im trying to pick up charms green crimson and blue. if someone has the colors that would be awesome or tell me how to get it i tried the same way for charms as i did for the monsters and it didnt work. is it color or item id that i add in that spot??


I've used it to pick up charms you have to be precise on the colors if you reset the client you might have to get the colors again. Inside the outline of the charms is a most common color, that is what I use for picking them up. Make sure you put pickup tolerance to 0 for this.

Its pointless to request the colors of them as they will change with every client start-up (sometimes they dont but its rare). I've noticed that you can make a list of colors for each charm and you'll notice they change to a previous color sometime. This might change on a Runescape update however.

bmx pk

2011-04-30 08:18:01

ok thanx ill just try and add more colors see if that helps for now i just had 1 color for each charm so ill try like 5 or so ill let you know what happens if it works

is there a way to get it to left click monsters instead of right click or even make mouse speed faster?

bmx pk

2011-04-30 08:41:57

yo narcle this is my set up its still not picking up anything you see anything im doing wrong this is all i changed in the script is there something im missing? i tried it and it missed 6 green 2 crim and 1 blue


Nick :=''; //Nickname 3 - 4 Letter's of char name
Active := True; //True if you want this player to be ran in the script, false if not
Strings[0] := '';//Skill to train (if blank won't change anything)
Arrays[0] := [4216464, 8760236, 3689342, 4216464, 5598830, 3821187];//colors of monster(s)
Arrays[1] := ['Basilisk', 'asilisk', 'isk'];//monster name(s)
Arrays[2] := [4018246, 6714991, 6780784, 1843291, 855310, 5065496, 8093550];//[Pickup Colors]
Arrays[3] := ['Green charm, Crimson charm, Blue charm'];//[Pickup Names]
//This is options array
//[NPC Color Tolerance, Pickup Tolerance, Bury Bones (true/false)];
Arrays[3] := [0, 0, false];

maybe you can give me ur set up for charms and the monster u used ? if thats a possibility.

Narcle

2011-04-30 14:39:40

From: bmx pk
yo narcle this is my set up its still not picking up anything you see anything im doing wrong this is all i changed in the script is there something im missing? i tried it and it missed 6 green 2 crim and 1 blue


Nick :=''; //Nickname 3 - 4 Letter's of char name
Active := True; //True if you want this player to be ran in the script, false if not
Strings[0] := '';//Skill to train (if blank won't change anything)
Arrays[0] := [4216464, 8760236, 3689342, 4216464, 5598830, 3821187];//colors of monster(s)
Arrays[1] := ['Basilisk', 'asilisk', 'isk'];//monster name(s)
Arrays[2] := [4018246, 6714991, 6780784, 1843291, 855310, 5065496, 8093550];//[Pickup Colors]
Arrays[3] := ['Green charm, Crimson charm, Blue charm'];//[Pickup Names]
//This is options array
//[NPC Color Tolerance, Pickup Tolerance, Bury Bones (true/false)];
Arrays[3] := [0, 0, false];

maybe you can give me ur set up for charms and the monster u used ? if thats a possibility.


That's basically how I did it. Umm, Arrays[3] should be:
Arrays[3] := ['Green charm', 'Crimson charm', 'Blue charm'];
And if that doesn't work just try this
Arrays[3] := ['charm'];

bmx pk

2011-04-30 22:00:58

ok i did that
['Green Charm', 'Crimson Charm', 'Charm', 'Nature rune'

it finds it now right clicks but doesnt click the charm or even the nature it will right click every time like 5 times while attacking another monster but will not pick it up will just move mouse away from item after it right clicks it

Narcle

2011-05-01 02:07:58

From: bmx pk
ok i did that
['Green Charm', 'Crimson Charm', 'Charm', 'Nature rune'

it finds it now right clicks but doesnt click the charm or even the nature it will right click every time like 5 times while attacking another monster but will not pick it up will just move mouse away from item after it right clicks it


Yeah its not finding the text correctly sounds like. Try just 'harm' and 'rune' see if that works.

bmx pk

2011-05-01 18:56:36

nope isnt working for some reason i have no clue whats going on with it i am trying everything llol im using
charm, harm, arm, green, reen, een, i have no clue why it wont find the text could it be anything else?

Narcle

2011-05-01 19:33:38

From: bmx pk
nope isnt working for some reason i have no clue whats going on with it i am trying everything llol im using
charm, harm, arm, green, reen, een, i have no clue why it wont find the text could it be anything else?


If it clicks on the item(s), brings up the choose-option menu and its not clicking it then its not reading the text correctly I'm assuming. =/

bmx pk

2011-05-01 20:05:33

how can i make it read the text correctly?
i have used everything you said i think
'harm', everything like that

Narcle could do make a setup for me and test it for charms and send it to me. same monster diff dont matter just so i can run for a long time and not die i have 99 str 99 att 92 def so i can last a while basiliks dont hit me very often so thats why i picked that for green charms even thou its expensive to do greens. if you could do that it would be awesome for some reason i cannot get it to pick up charms lolz or even nature runes or laws even water runes… i have no clue bub
thanx

fumaor

2011-05-03 15:35:05

Still works ? xD

sm0k3

2011-05-03 19:28:29

Realy sorry to boast but i have NO problems whith this script what so ever so it should work fine for others to
could people having problems please post their full copy of script
(plz make sure no details are left in . i will take a look and check against mine )
also will help us all to debug where your problem may be.

bojanglesm1

2011-05-09 16:04:23

SMART Initialized.
Loaded: Server 1, Members: True, Signed: True, Super Detail: False.
Invalid world number or corrupted world list. Please review your settings
Successfully executed.

Just got this error, tried switching off members and changing the world, still doesnt even start SMART

Narcle

2011-05-09 18:11:56

From: sm0k3
Realy sorry to boast but i have NO problems whith this script what so ever so it should work fine for others to
could people having problems please post their full copy of script
(plz make sure no details are left in . i will take a look and check against mine )
also will help us all to debug where your problem may be.


Thank you. Its really in the setup the makes or breaks whether it works or not. I'm not around as much as Summer is here and I finally have some work again. So any help is appreciated to help people with my scripts. :)

Spelletje

2011-05-16 08:27:49

I have tried it couple of times, only thing have gotten it working for is Banshee. And all I can get it to pick up is 1 thing at a time. If I write more than 1 it doesn't pick up anything anymore.

Tried to get it to fight other monsters but no luck, tried every color i could find on them.

I have all latest updates relating to simba, latest flash.
Is something else I need to try or update?

Spelletje

2011-05-20 04:14:08

Could someone pm me the part of the script they have used succesfully. With let say ice giants and ice warriors or something simular lvl. With pick up of all charms.

If it worked for you and will not work for me than I can look for why and how

Spelletje

2011-05-22 16:18:38

What I find most strange is that it will pick up anything as long as I only tell it to pick 1 thing. As soon as i tell it to do more it doesn't pick up anything anymore

sm0k3

2011-05-22 18:51:19

well ill put my version up here . um do you want

black knights
Chaos Druids
goblins (colors for lumbie but should work anyware)
white Knights

lol .


: also have you remembered that when you set the uptext you remove the first letter
for example goblin would be just oblin ?

Note the chaos druids version picks up herbs (it picks them all up for me Every time )

:edit

try this

Strings[0] := '';//Skill to train (if blank won't change anything)
Arrays[0] := [4216464, 8760236, 3689342, 4216464, 5598830, 3821187];//colors of monster(s)
Arrays[1] := ['asilisk','Basilisk'];//monster name(s)
Arrays[2] := [4018246, 6714991, 6780784, 1843291, 855310, 5065496, 8093550];//[Pickup Colors]
Arrays[3] := ['reen, 'rimson', 'lue'];//[Pickup Names] // you need ' ' in each uptext :Sm0k3
//This is options array
//[NPC Color Tolerance, Pickup Tolerance, Bury Bones (true/false)];
Arrays[3] := [15, 15, false]; // Dont set the tolerance as 0 RS colors Change A LOT :Smok3

see if this works for you
remember .. DONT set tolerance as 0 unless you REALY have to

Spelletje

2011-05-24 02:56:12

Don't ask me how but I think I managed to get it right
With these settings it picks up any rune, any charm and the coins I added to see if it would work.

Arrays[2] := [8553352,11579576,11316660,9408662,9211026,855310,9677215,5801118,5724803,2277360];//[Pickup Colors]
Arrays[3] := ['rune','charm','Coins'];//[Pickup Names]

I did not alter any of the other settings


|__Kills: 450 __|
|__Pickups: 420 __|

sm0k3

2011-05-25 00:00:37

cool cool .

but you do still need to set the tolerance other than 0

other wise when RS change the colours you wont pick anything up again

here ..

Below arrays[3]

//[NPC Color Tolerance, Pickup Tolerance, Bury Bones (true/false)];
Arrays[3] := [15, 15, false]; // Dont set the tolerance as 0 RS colors Change A LOT :Smok3

Spelletje

2011-05-25 10:00:43

From: sm0k3
well ill put my version up here . um do you want
: also have you remembered that when you set the uptext you remove the first letter
for example goblin would be just oblin ?



I write the name as it is in screen with capitals and all no problem there.
Only one I had problem with was Ice giant and Ice warriors, just put in Ice and 3 colors of them both after that it attacked them both

And never chanced any of the tolerance settings

sm0k3

2011-05-26 21:02:57

Ok then
but i warn you lol in few weeks you may be back to square one. :)
honest :~)

Jakkle

2011-05-29 05:45:20

Hi Narcle, this is a really nice script. Only thing I found is that when fighing moss giants i've set it to pick up the big bone and set bury bones to true but yet it wont bury them. Could you please help me out, is it ment to bury big bones ? if not could you please add that to the script :) Thanks Whacko

blab

2011-05-30 13:29:45

|___Something Fighter Report___|
|__Player: **** __|
|__Worked: 00s __|
|__Kills: 426 __|

For some reason the time doesn't seem to be working with me.

blackfire553

2011-06-04 14:03:42

From: Narcle
Its not my script its chooseoption(). Only way I worked around this was doing say for Nature runes I'd do 'ake Nat' and it fixed it. Its a pain but only way it works atm.


Im getting the 'examine' over and over error as well.
It won't bury bones for me, when i have it set to not pick stuff up in combat it does anyways.

mika

2011-09-25 21:24:42

great script seems to be working but it freezes upon start up . What happens it it attacks the monster its supposed to after mousing over the attack styles then clicks on the stats tab and then it seems to be clicking repeatedly on the inventory tab causing it to freeze up and stop functioning. Can anyone help me plz?

Silent

2011-10-30 17:01:34

Using this script right now, working quite well. I'll post a full proggy later.

Been a while since I've seen a script that uses manual color picking :o

Narcle

2011-10-30 17:29:18

From: Silent SPY
Using this script right now, working quite well. I'll post a full proggy later.

Been a while since I've seen a script that uses manual color picking :o


Haha, nice. I actually wanted to work on fighting functions to increase speed and accuracy. Namely InFights, and monster finding/clicking. :)

skileg

2011-10-30 21:37:08

How do I Use This Script…. I'm A Noob At This. I Ran The Script But After I Logged Into Rs Nothing Popped Up Or Happened. Can Anyone Show Me How To Use It? I'm Trying To Bot Giant Spiders

inpherus

2011-10-31 07:31:37

This bot can pick up all items and bank them correct? so you can make money?

Simtoon

2011-10-31 08:26:37

From: inpherus
This bot can pick up all items and bank them correct? so you can make money?


You will need to setup the picking up items, but it does not bank them.

This does not support banking.

Silent

2011-10-31 12:16:29

From: Narcle
Haha, nice. I actually wanted to work on fighting functions to increase speed and accuracy. Namely InFights, and monster finding/clicking. :)


Well there was only a slight delay between each fight during the time I ran it. The bigger problem I ran into is that it didn't eat food. Had a full load of lobsters just sitting there, almost died but I was paying attention so I got it in time.

Not really a big deal to me because I have multiple screens so I can watch it, but it will probably matter more to other people.

Great script though Narcle, just needs a few tweaks I think :)

João Lopes

2011-11-05 11:43:45

Doesn't work for me , Im new can some one help me?

swizzy123

2011-11-06 18:09:09

hey what do i type in simba like i got the name and pass just the strings color of monster how do i find this out?? like i want to fight lesser demons and i want to range , will it safe spot for me too so i dont die ??

system1234

2011-11-06 19:39:26

How i find the monster color ?

swizzy123

2011-11-07 17:06:49

hey can someone please explain to me how to make this work in simba ?? like i dont get how to put the monster s colour , or the name of it can someone please explain to me how to do this :(

BinaryX

2011-11-09 16:40:42

Doesnt work, missclicks, picks up when not selected etc…

Goku123

2011-11-11 15:44:47

Ok i got the Script to kill things but i have no idea on how to make it right click and pick up stuff like charms.

i have some experience in java language but i am completely new at this with putting stuff in from the code itself.