PDA

View Full Version : Comsic Crafter



Daniel.Blaze
06-30-2006, 11:15 PM
Hi all,

this is my first scar script which is acually constructive and does something :D
Its still in the making, and i would really like some feedback and stuff on it and how to improve on it, cos it sux at the moment :p
I have a bit of past coding experience in other languages but not much. Sorry for the bad scar standards



program CosmicCrafter;
{.include SRL\SRL.scar}

// Wear tiera and start at bank

const
Banker = 4737101; //Banker fairy type thing shirt color
Altar = 4735048; //Grey Altar color on the runescape screen
Portal = 10405063; //Portal color

Banksymbol = 123456; //Bank symbol color on the round small map
Floor = 4804952; //Floor color in the altar on the round small map
WaterSymbol = 14498311; //Water symbol color on the round small map

Tripp = 5; // how many trips to do
Rundirection = 'N'; //direction to run away in

var
Trips:integer;
Area:String;

Procedure PrintProgressReport;
Begin
SRLRandomsReport;
End;

Procedure MMouse2(x,y: Integer); //stolen from osi and modified :)
begin
if(x<=789)and(x>=0)and(y<= 592)and(y>=0)then
begin
wait(10);
MoveMouseSmoothEx(x,y,1,6,15,20,10);
getmousepos(x,y);
end;
end;

Procedure Findrandoms;
begin
findnormalrandoms;
if(FindFight)then
begin
RunAwayDirection(RunDirection);
Wait(5000+random(1000));
RunBack;
end;
end;

Procedure TalkIfNeeded;
Var C:integer;
Begin
If(Findcolorspiral(x,y,16711680,212,426,400,463))t hen
Begin
Mouse(x+7,y,18,1,true);
wait(700 + random(900));
Mouse(148,390,20,2,true);
C:=0;
repeat
wait(100);
C:=C+1;
until(Bankscreen)or(C>19)
end;
end;

Procedure Openbank4;
Var C:Integer;
Begin
If(Findobj(x,y,'Talk',Banker,3))then
Begin
Mouse(x,y,1,1,false);
if(ChooseOption(x,y,'Bank'))then
begin
Flag;
C:=0;
repeat
Wait(100);
c:=c+1;
TalkIfNeeded;
until(BankScreen)or(c>=50)
end;
end;
end;

Procedure CloseBank2;
Var CloseBankScreen,C:Integer;
begin
CloseBankScreen := BitmapFromString(73, 15, 'z78DAE598E10E82300' +
'C845F89B8C5E07F7DFF57320A3FB61C576EEBA8A8982C6616 2CFD' +
'766DD33CA7474A19D75B9E520E5D9927D7744F979D95DDEB5 9E32' +
'3E08952BCCF1E5EFF468D452CFE84FC04B5797A7DCE406DF1 84F9' +
'D3E0E711A480DAEA8FF97CC5C6436DB942A911228B27C8A8C 1CF8' +
'3799544567F4C6AB64D1FBB506AA682D08772671835372F0F B51D' +
'F57D1535E5DF99659557CDE85596C085FEEAD011B3418E767 5C03' +
'795A2215799D62AE9A146F32A569677FC27B84A5EA54DC5CE A1A3' +
'561BBB3AE09B4AD1904FBEAE5C3F35BA53E4435D6548B095D AE09' +
'DBE7717764AA67DF9D63E5D9D7E029D0D1D15D4369428740E A576' +
'366242F2E11938B2EFADBD25E664A51BC1BA86D98FEAC8569 CDC2' +
'DB07B917E1F35560195BA66DBD8967ABF579D76B0B7F76D95 D936' +
'D4523E7BBA5AEDFE84ED607CA468E8DE8E9D63B43E61506FF F81F' +
'94CDF44257E3EE69FF9F87921B5E3E69C9134CF40CD3E5DA3 5416' +
'339DFE2A764F2F25481A');
If Findbitmapin(CloseBankScreen,x,y,411,27,500,55)the n
Begin
Mouse(x+5,y+3,2,0,true);
C:=0;
repeat
wait(100);
C:=C+1;
Until not(IsTextAt2(185,36,'The Bank of RuneScape',100))or(c>19)
end;
Freebitmap(CloseBankScreen);
end;

Function ColorFromBottom(Color:Integer):Boolean;
Var A:integer;
begin A:= 162;
Repeat
If(Findcolorspiral(x,y,Color,570,A,725,162))then begin
Result:=true; end
else A:= A-5;
until(Result=true)or(A<=5)
If(A<=5)then
Result:=false;
end;

Function CircleMouse(StartAngle,EndAngle,Color:integer;Want Color:Boolean):Boolean;
var StopPoint,Counter:integer;
Begin
Counter:=0;
If(StartAngle=360)then
Startangle:=0;
StopPoint:= (EndAngle-StartAngle);
StartAngle:=StartAngle-90;
Repeat
Mmouse2(Round(60*cos(Startangle * (pi/180)))+646,Round(60*sin(Startangle * (pi/180)))+81);
GetmousePos(x,y);
If((Not(Getcolor(x,y)=Color))and(WantColor=False)) or
((Getcolor(x,y)=Color)and(WantColor=true))then
begin
result:=true; Mouse(x,y,1,1,true); Exit;
end;
StartAngle:=Startangle+1;
Counter:=counter+1;
Until(Startangle>270)or(Counter=StopPoint)
end;


Procedure WalktoAltar; //sometimes walking dont work
begin
Status('Walking to Altar');
Findrandoms;
Mouse(708,109,4,2,true);
Setrun(true);
wait(1200);
flag;
Mouse(672,101,5,5,true);
flag;
If(ColorfromBottom(WaterSymbol))then
Begin
Mouse(x+3,y-3,1,1,true);
flag;
If(ColorfromBottom(WaterSymbol))then
Begin
Mouse(x+31,y+38,1,1,true);
flag;
If(CircleMouse(163,195,0,false))then flag;
If(CircleMouse(185,270,0,false))then flag;
If(CircleMouse(265,275,0,false))then flag;
If(CircleMouse(160,270,0,false))then
Begin
Repeat wait(100); until not(Flagpresent)
Repeat Wait(100); until(flagpresent);
wait(2000); flag;
If(CircleMouse(170,270,0,false))then flag;
If(Findobj(x,y,'Enter',Altar,3))then
Begin
Mouse(x,y,2,2,true);
repeat
wait(100);
until (Findcolorspiral(x,y,floor,570,5,725,162))
end;
end;
end;
end;
end;

Procedure DetectArea;
Begin
Status('Finding Where We Are');
Area:='';
Repeat
If not(Getcolor(646, 151)=0)and(area='')then
Begin
Area:='N'; Mouse(646,153,3,3,true); wait(2000); flag; exit;
end;
If not(Getcolor(584,84)=0)and(area='')then
Begin
Area:='E'; Mouse(584, 84,3,3,true); wait(2000); flag; exit;
end;
If not(Getcolor(713, 80)=0)and(area='')then
Begin
Area:='W'; Mouse(713,80,3,3,true); wait(2000); flag; exit;
end;
If not(Getcolor(653, 18)=0)and(area='')then
Begin
Area:='S'; Mouse(653,18,3,3,true); wait(2000); flag; exit;
end;
Until not(area='')
end;

Procedure CraftandBack;
begin
Status('Crafting');
Findrandoms;
If(Findobj(x,y,'Craft',Altar,5))then
Begin
Mouse(x,y,2,2,true);
repeat
wait(100);
until(inventorycount=1)
wait(1700 + random(600));
RunAwayDirection(Area);
gametab(4);
If(Findcolorspiral(x,y,floor,614,40,689,112))then
Begin
Mouse(x,y,2,2,true);
flag;
wait(1300 + random(400));
end;
end;
end;

Procedure PortalOut;
begin
Status('Finding Portal');
repeat
Findrandoms;
until(Findcolorspiraltolerance(x,y,portal,1,1,512, 336,5));
If(Findobj(x,y,'Use',Portal,5))then
Begin
Mouse(x,y,1,1,true);
flag;
repeat
wait(100);
Findrandoms;
until not(Findcolorspiral(x,y,floor,570,5,725,162))
end;
end;

Procedure AltartoBank; //sometimes walking dont work
begin
wait(random(500));
If(CircleMouse(270,360,0,false))then wait(2000); flag;
If(CircleMouse(30,45,0,false))then
Begin
wait(1600);
Repeat wait(100); until not(Flagpresent)
Repeat Wait(100); until(flagpresent);
wait(3000 + random(1000)); flag;
If(CircleMouse(30,90,0,false))then flag;
If(CircleMouse(0,0,0,false))then wait(8000); flag;
Mouse(635,49,5,5,true);
flag;
If(ColorfromBottom(WaterSymbol))then
Begin
Mouse(x-5,y-9,1,1,true);
flag;
repeat
Mouse(594,57,10,10,true);
flag;
until(Findcolorspiral(x,y,Banksymbol,570,5,725,162 ))
If(Findcolorspiral(x,y,Banksymbol,570,5,725,162))t hen
Begin
Mouse(x,y,2,2,true);
wait(1400);
flag;
Findrandoms;
end;
end;
end;
end;

begin
Activateclient;
SetupSRL;
ChatsOff;
Repeat
Openbank4;
Deposit(1,28,2);
wait(random(500));
withdraw(1,1,0);
wait(500 + random(200));
Closebank2;
GameTab(4);
WalktoAltar;
DetectArea;
CraftandBack;
PortalOut;
AltartoBank;
Trips:=trips+1;
PrintProgressReport;
Until(Trips>=Tripp)
Logout;
end.


i have tried my best, i still need some help with the multi player stuff and making it switch players. I also need better walking since the circlemouse sucks a bit.
I would appreciate if anyone could help me on IM. My IM is
Daniel.Blaze.100@googlemail.com
I hope to get lots better at scripting :D
Thank you
Dan

WT-Fakawi
07-01-2006, 12:12 AM
wowie! First Script? Look genuine to me. CircleMouse :D. Brilliant.

Admitted :D

Daniel.Blaze
07-01-2006, 12:18 AM
wow, thank you very much.
Its my first working script for runescape, about my 100th script over all :P
and i dont like circlemouse :P but its the only thing which i can use to map walk in dungeons easily. Any other suggestions on what to use?

WT-Fakawi
07-01-2006, 12:21 AM
No, on the contrairy. I like it. It is creative :D

QQu
07-01-2006, 01:39 AM
Well Done Blaze, I can see you moving on further into Scripting ;)

Nice CircleMouse ^^

Daniel.Blaze
07-01-2006, 11:39 AM
:D:D thank you very much.
I found circlemouse on another forum, sythe.com i think it was.
anyone offer to help me with the multiple player stuff?

Eludis
07-01-2006, 12:30 PM
I would be happy to, I'll add you on MSN. I'm a relatively new scripter too :). Talk to ya soon.

Starblaster100
07-02-2006, 01:10 AM
Nice start to scripting.
Btw, i made CircleMouse :p

QQu
07-02-2006, 01:11 AM
Oh ok, Good Work Star :D

But still, good work for a NewCommer Blaze ;)

Daniel.Blaze
07-02-2006, 12:32 PM
Nice start to scripting.
Btw, i made CircleMouse :p

Oops :rolleyes:
Sorry StarBlaster, its a good procedure. I did use it in the first place :o
And thanks for the support guys :D

Starblaster100
07-02-2006, 06:11 PM
Oops :rolleyes:
Sorry StarBlaster, its a good procedure. I did use it in the first place :o
And thanks for the support guys :D

nah, its ok ;)
Keep up the good work

the scar noob
12-16-2006, 10:27 PM
wow going to try it out, once i get member :p it sounds good when you get those reactions from the masters like WT-Fakawi and Starblaster100 it should be nice work!

I also wanne learn scripting can you help me with it? :p:) lol

add me: bulls52_3@hotmail.com

Maxtriplex
02-12-2007, 03:49 PM
hmmm its very good made 500 cosmics lol in 4 hours! but still good for a first script! XD

dertykid555
03-08-2007, 07:04 PM
hey thats a really sweet script... could anybody make a air or earth crafter ?
i'm not very good at scripting and wondering if anybody could teach me how to make an earth script ( kinda like walk me thrue thrue the process )

THANKS

pop_4_u@hotmail.com is my msn could sombody add me??

Nazgand
03-10-2007, 06:17 PM
Wow, I never so fully appreciated the power of SRL that script is so small compared to the one I only half finished, and thank you for making this, as my bro was bothering me for one.

Pwnt by Pwnt
03-10-2007, 07:42 PM
Blaze if u still need help with multiplayer add me on MSN im pwnt_by_pwnt@hotmail.com and idk if u already got it figured out but still add me lol

Starblaster100
03-11-2007, 03:14 PM
i'm not sure if this guy is still around anymore, its a pretty old thread.

Pwnt by Pwnt
03-11-2007, 07:32 PM
>_< grrrrr lol well anyone can add me :)

I C4RL I
04-11-2007, 01:10 AM
lol would anyone like making a more updated version of this script??maybe with SRL?? cuz i would really like to use one

Wanted
04-11-2007, 11:20 PM
Possibly, if the creator gives me permission I could completly re-vamp it.

ronny.m.p
04-11-2007, 11:36 PM
Lol this is an srl script I C4RL I!

I C4RL I
04-14-2007, 04:55 AM
that does not work....

h0ck3y k1d
04-18-2007, 03:23 AM
lol forgot login here may i suggest this add it after direction you want to run at the top it works i just tested only with old scar 2.03 i havent tryed with new version


procedure declareplayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := ''; //3 to 4 letters of your name (not a capital!)
Players[0].loc := 'Bank'; //No need to touch
Players[0].Boolean1 := true; //True if you have a Tiara, false if not
Players[0].Active := true;
Players[0].String1 := ''; //If you have a bankpin, enter it here :-)

end;

supermormon
04-26-2007, 02:46 PM
ill set up soon ty looks nice

GO247
08-24-2007, 05:25 AM
im getting Line 109: [Error] (14558:11): Unknown identifier 'IsTextAt2' in script

Garrett
08-24-2007, 11:31 AM
script looks old... last post 04-26-2007, 08:46 AM

Starblaster100
08-24-2007, 12:22 PM
IsTextAt2 has been removed from SCAR divi.

I might get in contact with this guy and see if he'll allow me to update it, it seems like an interesting project

SPARTAN
11-12-2007, 04:28 AM
Star, that would be great. Your an awesome scripter.

legendaryhero90
11-13-2007, 01:52 PM
Star, that would be great. Your an awesome scripter.

this script is outdated and i dont think its going to be updated soon

JuKKa
11-13-2007, 04:15 PM
Star, that would be great. Your an awesome scripter.

Nice gravedig

admin/mod close it >_<'

Belt
12-31-2007, 04:46 AM
that would be great :D a cossy crafter would own atm...