qingqinghd
2012-03-14 20:35:04
How Long have You Played Runescape?
5 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
java and VB
Are you a member of any other communities?
powerbot
Tell us about yourself…
Please show us one (or multiple) of your scripts.
5 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
java and VB
Are you a member of any other communities?
powerbot
Tell us about yourself…
From: qingqinghd
i just like play game,and do something for me
Please show us one (or multiple) of your scripts.
program grenndrag;
{$i srl/srl/misc/smart.Simba}
{$DEFINE SMART}
{$i SRL\SRL.Simba}
const
FishNumber ='20';//
DisableSMARTPaint = False; //false or true
procedure DeclarePlayers;
begin
Fish := 8;
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Member := True;
Players[0].Active := True;
end;
(*
InFight
~~~~~~~~~~~
.. code-block:: pascal
procedure FrDTM;
Returns as True if player is in a fight.
See "srl_FindFight;" in /core/Globals.scar for more info.
.. note::
by Narcle
Example:
.. code-block:: pascal
while InFight do
begin
CheckHP;
EatFood;
end;
*)
procedure FrDTM;
begin
FreeDTM(Q[0]);
FreeDTM(Q[1]);
FreeDTM(Q[2]);
FreeDTM(Q[3]);
FreeDTM(Q[4]);
FreeDTM(Q[5]);
FreeDTM(Q[6]);
FreeDTM(Q[7]);
FreeDTM(Q[8]);
FreeDTM(Q[9]);
FreeDTM(Q[10]);
FreeDTM(Q[11]);
FreeDTM(Q[12]);
end;
(*
InFight
~~~~~~~~~~~
.. code-block:: pascal
procedure FrDTM;
Returns as True if player is in a fight.
See "srl_FindFight;" in /core/Globals.scar for more info.
.. note::
by Narcle
Example:
.. code-block:: pascal
while InFight do
begin
CheckHP;
EatFood;
end;
*)
Procedure SetupBackGround;
var
TPA: TPointArray;
B: TBox;
begin
if DisableSMARTPaint then
Exit;
B := IntToBox(0, 345, 515, 379);
TPA := TPAFromBox(B);
SMART_DrawDotsEx(True, TPA, 725267);
B := IntToBox(0, 378, 515, 378);
TPA := TPAFromBox(B);
SMART_DrawDotsEx(false, TPA, 2570567);
SMART_DrawTextEx(False, 44, 345, BigChars, tag, 2570567);
SMART_DrawTextEx(False, 250, 344+10, UpCharsEx, tag2, 2570567);
end;
(*
InFight
~~~~~~~~~~~
.. code-block:: pascal
procedure FrDTM;
Returns as True if player is in a fight.
See "srl_FindFight;" in /core/Globals.scar for more info.
.. note::
by Narcle
Example:
.. code-block:: pascal
while InFight do
begin
CheckHP;
EatFood;
end;
*)
procedure CrashSMART;
begin
Writeln('You are using CRASHSMART, so we are going to reload your client after the RS update!');
// SmartgetFieldObject(1488,'crash'); // will crash SMART (and Simba).
// IF THIS DOES NOT CRASH YOUR SIMBA, YOU ARE NOT USING THE PROPER PLUGIN
// AN ACCESS VIOLATION HERE IS NOT THE CRASH; MAKE SURE YOU MOVED THE EDITED PLUGIN
Wait(5000);
WriteLn('CRASHSMART Failed: Make sure you are using the proper plugin!');
WriteLn('Read more about this feature at villavu.com/forum/showthread.php?t=67864');
TerminateScript;
end;
procedure Setup;
begin
ClearDebug;
Smart_Server := 10; fisher;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := True;
SetupSRL;
SRL_Procs[srl_OnRSUpdate] := @CrashSMART;
DeclarePlayers;
Disguise(Players[0].Name);
if not (LoggedIn) then
LoginPlayer;
ObjDTM_Setup;StupSRL;
ObjDTM_Debug := True;
SetupBackGround;
Mouse(628, 100, 4, 4, true);
shijiao(38,1000);
end;
(*
InFight
~~~~~~~~~~~
.. code-block:: pascal
procedure FrDTM;
Returns as True if player is in a fight.
See "srl_FindFight;" in /core/Globals.scar for more info.
.. note::
by Narcle
Example:
.. code-block:: pascal
while InFight do
begin
CheckHP;
EatFood;
end;
*)
Function findchuanfu(number:integer): Boolean;
var
i, ii,L, P: integer;
T: TPoint;
NPCs, TPA: TPointArray;
ATPA: T2DPointArray;
BoxArr: TBoxArray;
Colors : TIntegerArray;
begin
if not (LoggedIn) then LoginPlayer;
if number =1 then
begin
Colors :=[1846322,3754342,5263181];
end else if number=2 then
begin
Colors :=[6513768,1649465,6250340];
end else if number=3 then
Colors :=[3284002,5256765,4745088];
P := GetSystemTime;
NPCs := GetMMDotsOnMS('npc');
L := Length(NPCs);
if L < 1 then
Exit;
SetLength(BoxArr, L);
for i := 0 to L-1 do
begin
T := MMtoMS(NPCs[i]);
BoxArr[i] := IntToBox(Max(T.x-40, MSX1), Max(T.y-40, MSY1), Min(T.x+40, MSX2), Min(T.y+40, MSY2));
end;
With Players[0] do
for i := 0 to L-1 do
with BoxArr[i] do
begin
SetLength(ATPA, Length(Colors));
For ii := 0 to High(Colors) do //Color array
FindColorsTolerance(ATPA[ii], Colors[ii], X1, Y1, X2, Y2, 4 );
TPA := MergeATPA(ATPA);
if Length(TPA) > 0 then
begin
ATPA := SplitTPA(TPA, 6);
SortATPASize(ATPA, True);
T := MiddleTPA(ATPA[0]);
if IsFightAt(T.x, T.y) then
Continue;
if not DisableSMARTPaint then
begin
SMART_ClearCanvasArea(IntToBox(0, 0, MSX2, MSY2));
SMART_DrawBoxEx(False, BoxArr[i], clBlue);
SMART_DrawDotsEx(False, ATPA[0], clRed);
end;
MMouse(T.x, T.y, 3, 3);
if WaitUpTextMulti(['Talk'], random(100)) then
begin
ClickMouse2(False);
if number =1 then
begin
Result := ChooseOption('Sail');
end else
begin
Result := ChooseOption('Bank Banker');
end;
if Result then
begin
FFlag(0);
Exit;
end Else Continue;
end;
end;
end;
Result := false;
end;
(*
InFight
~~~~~~~~~~~
.. code-block:: pascal
procedure FrDTM;
Returns as True if player is in a fight.
See "srl_FindFight;" in /core/Globals.scar for more info.
.. note::
by Narcle
Example:
.. code-block:: pascal
while InFight do
begin
CheckHP;
EatFood;
end;
*)
function FindLoot: Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2,n,m: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
Result :=false;
if not (LoggedIn) then LoginPlayer;
if InvFull then
begin
Wait(250);
if FindDTM(Q[7],m, n, MIX1,MIY1,MIX2,MIY2) or FindDTM(Q[8],m, n, MIX1,MIY1,MIX2,MIY2)then
begin
CMove(m, n, 0, 0, true);
CMove(m, n, 0, 0, true);
wait(500)
end else exit;
end;
SetColorSpeed2Modifiers(0.21, 0.89);
if FindColorsTolerance(arP, 2117400, 0, 25, MSX2, MSY2, 15) then
begin
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 1.22) and (X <= 15.22) and (Y >= 1.22) and (Y <= 15.93) and (Z >= 1.05) and (Z <= 15.90) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if WaitUpTextMulti(['ake','Take'],50) then
begin
GetMousePos(p.x, p.y);
CMove(p.x, p.y, 2, 2, false);
if WaitOptionMulti(Drags, 200) then Result :=true;
WaitOptionMulti(Drags, 200);
Wait(RandomRange(500, 700));
while IsMoving do
begin
Wait(250);
end;
if InvFull then
begin
Wait(250);
if FindDTM(Q[7],m, n, MIX1,MIY1,MIX2,MIY2) or FindDTM(Q[8],m, n, MIX1,MIY1,MIX2,MIY2)then
begin
CMove(m, n, 0, 0, true);
CMove(m, n, 0, 0, true);
wait(500)
end else exit;
end;
end;
end;
end;
if FindColorsTolerance(arP, 14343396, 0, 25, MSX2, MSY2, 15) then
begin
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 50.22) and (X <= 85.22) and (Y >= 52.22) and (Y <= 85.93) and (Z >= 55.05) and (Z <= 90.90) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if WaitUpTextMulti(['ake','Take'],50) then
begin
GetMousePos(p.x, p.y);
CMove(p.x, p.y, 2, 2, false);
if WaitOptionMulti(Drags, 200) then Result :=true;
WaitOptionMulti(Drags, 200);
Wait(RandomRange(500, 700));
while IsMoving do
begin
Wait(250);
end;
if InvFull then
begin
Wait(250);
if FindDTM(Q[7],m, n, MIX1,MIY1,MIX2,MIY2) or FindDTM(Q[8],m, n, MIX1,MIY1,MIX2,MIY2)then
begin
CMove(m, n, 0, 0, true);
CMove(m, n, 0, 0, true);
wait(500)
end else exit;
end;
end;
end;
end;
Result :=false;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
(*
InFight
~~~~~~~~~~~
.. code-block:: pascal
procedure FrDTM;
Returns as True if player is in a fight.
See "srl_FindFight;" in /core/Globals.scar for more info.
.. note::
by Narcle
Example:
.. code-block:: pascal
while InFight do
begin
CheckHP;
EatFood;
end;
*)
Function HpCheck(): boolean;
var
x, y:Integer;
begin
if not (LoggedIn) then LoginPlayer;
KeyDown(112);
wait(50);
KeyUp(112);
if not(FindColorTolerance(x, y, 65280, 718, 18, 744, 43,10)) and LoggedIn then
begin
while not(FindColorTolerance(x, y, 65280, 718, 18, 744, 43,10)) do
begin
if FindDTM(Q[8],x, y, MIX1,MIY1,MIX2,MIY2) or FindDTM(Q[7],x, y, MIX1,MIY1,MIX2,MIY2)then
begin
CMove(x, y, 0, 0, true);
CMove(x, y, 0, 0, true);
wait(800);
end else
begin
Result := true;
exit;
end;
end;
end;
if not(FindDTM(Q[7],x, y, MIX1,MIY1,MIX2,MIY2)) and not(FindDTM(Q[8],x, y, MIX1,MIY1,MIX2,MIY2)) then
begin
Result := true;
exit;
end;
if InvFull and LoggedIn then
begin
if FindDTM(Q[7],x, y, MIX1,MIY1,MIX2,MIY2) or FindDTM(Q[8],x, y, MIX1,MIY1,MIX2,MIY2) then
begin
CMove(x, y, 0, 0, true);
CMove(x, y, 0, 0, true);
wait(800)
end;
end;
Result := false;
end;
(*
InFight
~~~~~~~~~~~
.. code-block:: pascal
procedure FrDTM;
Returns as True if player is in a fight.
See "srl_FindFight;" in /core/Globals.scar for more info.
.. note::
by Narcle
Example:
.. code-block:: pascal
while InFight do
begin
CheckHP;
EatFood;
end;
*)
function isbank(id:integer): Boolean;
var
x,y,anti,ring,t,i:integer;
begin
ring :=1;
anti :=1;
CMove(687, 184, 0, 0,true);
wait(300);
if not(findzb(Q[3])) then
begin
CMove(656, 185, 0, 0,true);
wait(300);
CMove(579, 225, 0, 0,true);
CMove(579, 225, 0, 0,true);
wait(500);
CMove(620, 225, 0, 0,true);
CMove(620, 225, 0, 0,true);
wait(500);
CMove(660, 225, 0, 0,true);
CMove(660, 225, 0, 0,true);
anti :=0;
end else if not(findzb(Q[4])) then
begin
ring :=0;
end;
wait(500);
MarkTime(t);
if id=1 then
begin
repeat
if TimeFromMark(t) > 15000 then
begin
Result := false;
exit;
end;
findchuanfu(2);
until BankScreen;
end else if id=2 then
begin
repeat
OpenBankChestEdge(SRL_BANK_B);
wait(100);
if TimeFromMark(t) > 20000 then
begin
Result := false;
exit;
end;
until BankScreen;
end;
wait(500);
DepositAll;
wait(1000);
if anti=0 then
begin
CMove(96, 108, 0, 0,true);
wait(500);
CMove(140, 108, 0, 0,true);
end else if ring = 0 then
CMove(140, 108, 0, 0,true);
repeat
CMove(52, 108, 0, 0,false);
wait(500);
writeln(ChooseOption('X'));
wait(2500);
SendKeys(FishNumber,200);
KeyDown(13);
wait(100);
KeyUp(13);
wait(3000);
until FindDTM(Q[7],x, y, MIX1,MIY1,MIX2,MIY2) or FindDTM(Q[8],x, y, MIX1,MIY1,MIX2,MIY2);
closebank;
CMove(656, 185, 0, 0,true);
wait(300);
if anti = 0 then
begin
wait(1000);
CMove(579, 225, 0, 0,true);
CMove(579, 225, 0, 0,true);
CMove(579, 225, 0, 0,true);
CMove(579, 225, 0, 0,true);
wait(1000);
CMove(620, 225, 0, 0,true);
CMove(620, 225, 0, 0,true);
CMove(620, 225, 0, 0,true);
CMove(620, 225, 0, 0,true);
end else if ring = 0 then
begin
wait(1000);
CMove(579, 225, 0, 0,true);
CMove(579, 225, 0, 0,true);
CMove(579, 225, 0, 0,true);
CMove(579, 225, 0, 0,true);
end;
Result := true;
end;
(*
InFight
~~~~~~~~~~~
.. code-block:: pascal
procedure FrDTM;
Returns as True if player is in a fight.
See "srl_FindFight;" in /core/Globals.scar for more info.
.. note::
by Narcle
Example:
.. code-block:: pascal
while InFight do
begin
CheckHP;
EatFood;
end;
*)
Procedure Dead;
var
x,y,t,ring,anti:integer;
BEGIN
if FindColorTolerance(x, y, 1939681, 454, 20, 509, 133,10) then
begin
CMove(627, 154, 4, 4, true);
FFlag(6);
end;Runs;
repeat
if not(LoggedIn) then
begin
Loginplayer;
wait(2000);
Dead();
end;
Randomevent;
Mouse(749, 186, 4, 4, true);
wait(500);
Mouse(575, 227, 4, 4, true);
wait(100);
setrun(true);//开跑步
if FindColorTolerance(x, y, 2566303, 236, 125, 268, 157,10) then
begin
wait(500);
Mouse(252, 143, 1, 1, true);
shijiao(38,1000);
break;
end;
until(false);
//*************判断是否回城**********************
wait(15000);
CMove(621, 128, 0, 0,true);
//*************点击银行**************************
FFlag(6);
FindNPC('bank');
FFlag(6);
if not(isbank(2)) then Dead;
end;
(*
InFight
~~~~~~~~~~~
.. code-block:: pascal
procedure FrDTM;
Returns as True if player is in a fight.
See "srl_FindFight;" in /core/Globals.scar for more info.
.. note::
by Narcle
Example:
.. code-block:: pascal
while InFight do
begin
CheckHP;
EatFood;
end;
*)
procedure tobank;
begin
Disguise(Players[0].Name);
if AreTalking then TerminateScript;Runs; fisher;
CMove(687, 184, 0, 0,true);
wait(500);
MMouse(697, 384, 3, 3);
wait(500);
if not(WaitUpTextMulti(['Ring'], random(100))) then
begin
Dead;
tobank;
exit;
end;
repeat
CMove(699, 382, 0, 0,false);
wait(200);
until ChooseOption('Duel');
setrun(false);
wait(7000);
setrun(true);
RunRest(90);
if not(ObjeDtm(Path[0])) then
begin
CMove(627, 154, 4, 4, true);
wait(5000);
tobank;
exit;
end;
if not(ObjeDtm(Path[1])) then
begin
tobank;
exit;
end;
if not(ObjeDtm(Path[2])) then
begin
tobank;
exit;
end;
if not (LoggedIn) then LoginPlayer;
CMove(597, 121, 0, 0,true);
wait(3000);
FFlag(6);
CMove(587, 110, 0, 0,true);
wait(3000);
FFlag(6);
CMove(595, 131, 0, 0,true);
wait(3000);
FFlag(6);
wait(500);
writeln('********1*********');
if not(ObjeDtm(Path[8])) then
begin
tobank;
exit;
end;
ObjeDtm(Path[8]);
writeln('********2*********');
Randomevent;
writeln('********3*********');
end;
(*
InFight
~~~~~~~~~~~
.. code-block:: pascal
procedure FrDTM;
Returns as True if player is in a fight.
See "srl_FindFight;" in /core/Globals.scar for more info.
.. note::
by Narcle
Example:
.. code-block:: pascal
while InFight do
begin
CheckHP;
EatFood;
end;
*)
procedure smokedg;
var
x,y,num,t,t1:integer;
begin
MarkTime(t);
MarkTime(t1);
num :=1;
repeat
KeyDown(112);
wait(50);
KeyUp(112);
if not LoggedIn then Loginplayer;
FightIt(Colors1);
FightIt(Colors2);
FightIt(Colors3);
while InFight or IsMoving do
begin
SetupBackGround;
setrun(true);
wait(5000);
while InFight or IsMoving do
begin
if not (LoggedIn) then LoginPlayer;
if HpCheck() then
begin
FindLoot;
FindLoot;
exit;
end;
FindLoot;
MarkTime(t);
num :=1;
end;
end;
if(TimeFromMark(t1)>25*60000)then exit;
if(TimeFromMark(t)>60000)then
begin
if FindColorTolerance(x, y, 515035, 541, 2, 703, 71,20) then
begin
CMove(x, y, 0, 0,true);
MarkTime(t);
end;
end;
if num = 1 then
if not(FindLoot) then num := 2;
until (HpCheck());
FindLoot;
FindLoot;
end;
procedure GoHome;
var
i,x,y,num,t3,p,t:integer;
begin
tobank;
repeat
writeln(1);
wait(1000);
if not(isbank(1)) then begin GoHome; exit; end;
until FindDTM(Q[7],x, y, MIX1,MIY1,MIX2,MIY2) or FindDTM(Q[8],x, y, MIX1,MIY1,MIX2,MIY2);
writeln(2);
if not(ObjeDtm(Path[9])) then begin GoHome; exit; end;
wait(10000);
FFlag(6);
MarkTime(t);
repeat
if TimeFromMark(t) > 60000 then GoHome;
if not (LoggedIn) then begin GoHome; exit; end;
until findchuanfu(1);
wait(6000);
//**************1*****************
if not(ObjeDtm(Path[6])) then begin GoHome; exit; end;
if not(ObjeDtm(Path[7])) then begin GoHome; exit; end;
RunRest(90);
CMove(565, 115, 0, 0,true);
wait(4000);
setrun(true);
FFlag(6);
num :=0;
MarkTime(t);
repeat
if TimeFromMark(t) > 120000 then begin GoHome; exit; end;
if not (LoggedIn) then LoginPlayer;
Mouse(582, 141, 0, 0,true);
wait(5000-num*500);
if num*500<4000 then Inc(num);
until AreTalking;
Mouse(600, 89, 0, 0,true);
MarkTime(t);
while AreTalking or FindFlag(x,y) do
begin
if not (LoggedIn) then LoginPlayer;
if FindColorTolerance(x, y, 1118716, 165, 36, 191, 61,10) then
begin
CMove(183, 271, 0, 0,true);
break;
end;
Mouse(260, 468, 0, 0,true);
wait(100);
Mouse(257, 405, 0, 0,true);
wait(500);
if TimeFromMark(t) > 60000 then begin GoHome; exit; end;
end;
if FindColorTolerance(x, y, 1118716, 165, 36, 191, 61,10) then
begin
CMove(183, 271, 0, 0,true);
end;
wait(3000);
if not(FindColorTolerance(x, y, 1939681, 454, 20, 509, 133,10)) then TerminateScript;
RunRest(60);
CMove(563, 116, 0, 0,true);
FFlag(6);
CMove(587, 112, 0, 0,true);
FFlag(6);
wait(1000);
if not(ObjeDtm(Path[5])) then begin GoHome; exit; end;
FFlag(6);
CMove(605, 30, 0, 0,true);
wait(5000);
FFlag(6);
CMove(643, 20, 0, 0,true);
wait(4000);
FFlag(6);
for p:=0 to 3 do
begin
CMove(628, 18, 0, 0,true);
wait(4000);
FFlag(6);
end;
if not (LoggedIn) then LoginPlayer;
smokedg;
end;