PDA

View Full Version : Air Rune Crafter



da_professa
10-13-2006, 03:39 AM
Ok So I am making an air rune crafter.....
here is the code........

program air_crafter;
{.include SRL\SRL.SCAR}
{.include SRL\SRL\skill\Fishing.SCAR}

procedure getting;
BEGIN
PerfectNorth
OpenBankQuiet('fwb');
Withdraw(1, 1, 28);
wait(1000+random(33));
CloseBank;
wait(200+random(15));
ClickExactMMColor(6847363);
end;

begin
SetupSRL;
getting
end.

OK so there is the code.....First problem.. I have to click on runescape screen after running the script.. or start the script in the runescape screen, But i can live with that..

Next issue After it has found perfect north, it kinda goes out of screen. What I mean by this is that the cursor works but any thing you type does not appear, resulting in it not being able to withdrow the 28 ess in my first invo.

Next problem, the script ends without clicking. I want to find a way to make it walk to the altar without getting lost.. Plz tell me wht I should do.. doesnt matter how hard it is...
Thx in advance..
tc

Junior
10-13-2006, 09:02 PM
For SCAR to activate the RS window or click on it like you said
put :
activateclient;
somewhere at the top of your main loop when you first start.
~jR

EDIT:
And for you to walk to the alter you will have to make another procedure for that.
I do not recomend but you can try using integers to walk because you can get lost easy and it is detectable.
I would try learning how to use RadialRoadWalk; but that it pretty hard to understand.

da_professa
10-13-2006, 10:35 PM
Ok I cant really get radialwalk (wht ever the command is) to work properly.. I want it to walk to altar right... From bank... Wht command do u people recommend me to use?.. When i use the mouse command the cursor just goes to the corner of the rs screen...plz some1 hit me ur email addresse so I can ask for help..

Junior
10-13-2006, 11:13 PM
Ok I cant really get radialwalk (wht ever the command is) to work properly.. I want it to walk to altar right... From bank... Wht command do u people recommend me to use?.. When i use the mouse command the cursor just goes to the corner of the rs screen...plz some1 hit me ur email addresse so I can ask for help..

Try using a command like this:
mouse(0,0,0,0,true);
Change the first 2 0's to the cords you want the mouse to go to
The true/false at the end means:
True for left click, false for right click. But make sure you add flags and waits at the end like this
Flag;
wait(1000+random(1000)) <-- or how long you want to set it too

~jR

da_professa
10-14-2006, 12:36 AM
thx but problem with that is my banking thing opens a random bank..meaning if it opens a different bank than the one I choose it'll get lost

I Pick Axes
10-14-2006, 12:41 AM
thx but problem with that is my banking thing opens a random bank..meaning if it opens a different bank than the one I choose it'll get lostEither
1. For your first click out of the bank it, do it by icon/color and reorient yourself.
2. Start searching for bank booths from a specific side, guarenteeing you the left-/rightmost booth.

da_professa
10-14-2006, 01:01 AM
yeah thts wht i tried...thx for ur help guyz and gals.. I have made it to the altar now.. Now I am trying to use pixel thing to click altar so if some1 is lost but altar is near by they can get in..
edit: is there a way I can make it find road color and walk up it until it finds bank... Since U come out of Altar at random places I would like it to click once or twice in a certain place, then it will find the road.. how do i tell it to walk up tht road.

I Pick Axes
10-14-2006, 02:07 AM
For the altar and getting in, you can use some method to go around checking IsUpText until you find it. Using either random mouse spirals, or color picking.

Assuming you have the road color already in a var. (WARNING: There are two colors, once inside Fally and one outside.) What you can do is this. Let's say you're near the road, and you want to walk east on the road. Do a FindColorSpiralTolerance for the road color starting at the very right hand side of the MiniMap. Then MouseFlag the coordinate you get. It starts searching from the east side, so you get the eastern-most road point, and that gets you east. Similarly for going north.

The elegant way to do this would be to learn RadialWalk and walk east then north along a radial on the road color, but that's beyond my comprehension. The way above was the way they did it in the days when OSi and Squig stil worked. And my knowledge is kinda stuck that far back.

da_professa
10-14-2006, 04:40 AM
I dunt really understand...

I tried to just put in cordanates for Mouse to click to get to altar. But they worked the first time.. Second time it didnt get to the altar. Is it because of the random changes in the place where the mouse clicks or is it something that jagex does to prevent exact roots...

If possible can some1 plz tell me wht to do with the radial walk way... I spent loads of time trying to make it work, but it just doesnt seem to click where I want it to... Also does radial walk keep on walking or is it just a one time thing?..
any way thx for all ur help ppl... I guess I should take a break.. I have been trying to script this for the past 8 hours... This is what its at right now


program air_crafter;
{.include SRL\SRL.SCAR}
{.include SRL\SRL\skill\Fishing.SCAR}
{.include SRL\SRL\extended\xMapWalk.SCAR}
{.include SRL\SRL\extended\xObject.SCAR}
const BankColour = 2968161; //Put Bank Colour here for first Bank Slot.. leave it if your not gettin any trouble
var altar,cx,cy,cz,cv,xz,xv : Integer;
procedure loadbmps;
BEGIN
altar := BitmapFromString(8, 9, '55574A4E444C3C3739433E3E35' +
'3433303330373A372F302C5F714158594342373B3C3839323 A353' +
'736332C34313A3935362C346C745A5759554A3E42453D4036 3936' +
'282D2928302C1E171970876168755C72756D51534F4840464 C454' +
'4393C38212223406A1A4F4F48666C557984696972644F4A4F 4E44' +
'440E151B15171F3C3633322C2D3D3E2F6B6F626C79645A5F5 A030' +
'B11403D3C3A363335302F3833314039386157586B7460262A 2B42' +
'3C383F3B363837343D49463442404747435A52523D3935393 B373' +
'839383F393745444234403B2E3C393D4541');
end;

procedure getess;
BEGIN

activateclient;
OpenBankColor(BankColour);
FixBank;
DepositAll;
Withdraw(1, 1, 28);
wait(1000+random(33));
CloseBank;
ChanceWait(200);

end;

procedure toaltar;
BEGIN
Mouse(146,317,5,5,true);
CountFlag(1);
FindNormalRandoms;
Mouse(639,153,5,5,true);
CountFlag(1);
FindNormalRandoms;
Mouse(629,146,6,6,true);
PickUpMouse;
CountFlag(1);
Mouse(607,123,2,2,true);
CountFlag(1);
FindNormalRandoms;
Mouse(632,135,2,2,true);
CountFlag(1);
Mouse(630,93,1,2,true);
FindNormalRandoms;
end;
procedure altarinout;
BEGIN
FindObjFast(cx, cy, 'yst',3290168,5);
Mouse(cx,cy,5,6,true);
Wait(2000+random(100));
FindObjFast(cz, cv, 'tar',4671824,5);
Mouse(cz,cv,5,5,true);
Wait(3000+random(1000));
FindObjFast(xz,xv,'tal',7049368,5);
Mouse(xz,xv,2,2,true);
Wait(1000+random(300));
end;
procedure backtobnk;
BEGIN
Mouse(698,33,6,7,true);
CountFlag(1);
Mouse(678,22,3,3,true);
CountFlag(0);
Mouse(643,16,2,2,true);
CountFlag(0);
Mouse(652,13,2,2,true);
CountFlag(0);
Mouse(656,28,1,1,true);
CountFlag(0);
ToBankers(BankColor, 5,5);
end;

begin
repeat
SetupSRL;
loadbmps;
FindNormalRandoms;
activateclient;
getess;
FindNormalRandoms;
toaltar;
FindNormalRandoms;
altarinout;
FindNormalRandoms;
backtobnk;
until (LoggedIn = false)
end.


note: I have bitmap in there because at first I was trying to make it click altar throu bitmap.. But it just didnt seem to click..

thx
Plz pm me ur email if u can help me on msn

Junior
10-14-2006, 05:10 AM
First off a bitmap will NOT work for the alter, record the color as a const and just make it search for it until it finds isuptextmulti and then it will click on it. And radialroadwalk will only click once in the direction you want it to and thats it, unless you keep addind more radialroadwalk procedures.
The cords will not work because of the random turning of the screen every now and to make matters worse your walking a pretty far distance and you will easily get lost just if the cameras off by a little bit, since when you first set the cords.
And to learn more about radialroadwalk read this, it gives a pretty good explanation of it thanks to cheesehunk.
ALL CREDS TO CHEESE


Quote from: Cheesehunk on July 19, 2006, 08:41:44 AM
RadialRoadWalk(RoadColor, StartRadial, EndRadial, Radius, XMod, Ymod);

RoadColor: Pretty self exlpanitory. Make sure you have the script or user Get the RoadColor somehow.

StartRadial: The MiniMap is like a circle, and that is how RadialRoadWalk works. 0 degrees is the top, 90-east, 180-North, 270-West. The start radial is where you want the script to start looking for the RoadColor. For our example, we will say you are walking East. So we are gonna make a StartRadial of about 70 (MiniMap autorotates, so its not perfectly 90 for better finding.)

EndRadial: Where you want the script to stop searching for the RoadColor. Since we are walking east, lets have the EndRadial 105.

Radius: Radius is how far out you want the script to look for the RoadColor. For long distance walking (Lumbridge to Draynor on the open Road,) I use 45-50. However, when I have the script going by a bank, I don't want to overshoot it, so I use about 30-35 for short walking. For our example we will use 40.

XMod, YMod: These are not very important, and I have not perfected them, but I know what they do. Xmod, and Ymod are the distance you want to move your mouse in Pixels if the flag does not show up. They work together to make different angles. YOu would keep these at 0,0 if you don't want the mouse to move if the flag does not appear, it will just keep clicking in the same spot. They range from -1,-1 to 1,1. We will use 0,0 for our example.

Our example for walking east, searching for the RoadColor from 70 to 105 at a radius of 40.
RadialRoadWalk(RoadColor, 70, 105, 40, 0, 0);

If you wanted to search for the RoadColor from 105 to 70 all you have to do is spot them around like this:
RadialRoadWalk(RoadColor, 105, 70, 40, 0, 0);


There is also a LinearRoadWalk, it is the same as RadialRoadWalk, except it walks the excact angle given on the RoadColor. it is good for getting out of places with lots of RoadColor, such as falador.

Both of them, at loading screens, check to see if there is a new RoadColor, and will automatically replace the RoadColor with it. Jagex made it so at every loading screen just the RoadColor changes, but Fakawi was able to master walking, and create this.
Its pretty complex
~jR

I Pick Axes
10-14-2006, 06:50 PM
You should use both a color and UpText for the altar. Use something like FindObject or a related procedure.

Using Mouse with static coordinates won't work. Your camera angle changes slightly. Instead, you should be searching for things and clicking them somehow.

Mutant Squirrle
10-14-2006, 07:02 PM
yes you need to use a color finding procedure

da_professa
10-14-2006, 10:14 PM
for finding altar I have used this "FindObjFast(cx, cy, 'yst',3290168,5);".. But sometimes it doesnt find it and just skips to next step.. Isn't there a way I can make it wait until it finds it...and not skip steps..

Ok 1 more thing... See for uptext.. Uptext only checks if text is there or not.. how do I tell it to click it..

Junior
10-15-2006, 12:23 AM
This is only part of the procedure that should be in your coding.

if(not(FindObjFast(cx, cy, 'yst',3290168,5)))then
begin
;//Place a procedure here, that you want it to do incase it doesnt find the alter
end else
if(FindObjFast(cx, cy, 'yst',3290168,5))then
begin
mouse(x,y,0,0);
wait(50+random(50));
if(isuptextmulti('','','',)then//Place three different up textes -eg. 'Alt' 'ter' 'Alter' +
begin //^Make sure the caps are correct and other things.
Mouse(x, y, 0, 0, True);


This will find the object, if not it is going to do what you place in the empty procedure. If it does find the object it is going to move the mouse over it, check the up-text and then it will click on it if the up text matches yours.
Hope this helps
~jR

da_professa
10-15-2006, 01:33 AM
Thx a lot man... I am trying it right now..

On this note I would like to say . I have finally found the best cheating community. You guyz are seriously the best helpers. I have been trying to make a scar script for soo long but I never get help. I have posted on sythe, rs-resources.com,impsoft.net(b4 it got messed), and I can't remember. But always ppl just post for helpin me in a way its not really help, It's just telling me we dont care.

Ok I put ur code in..There were some probs in it like not enuff ends and stuff.. but i fixed it...Then the problem is that it finds the altar using the comman isupmultitext but does not click on it..I put an equation that if it doesnt find it then log out but it doesnt log out, meaning it has found it but does not click on it..Any ideas?

Junior
10-15-2006, 01:46 AM
Its been my pleasure helping you... I like helping people alot and passing down my knowledge of SCAR to new scripters.
Good luck on the script and your future scripts and if you need anything ill be glad to help you.
~jR

I Pick Axes
10-15-2006, 02:19 AM
Your last argument to Mouse should be false. You want a left click.
And anyways, you sure Mouse not MouseFlag?

da_professa
10-15-2006, 02:35 AM
thx man.. I found a way to make it click... Its lots of words and not tht user friendly to readers but hey.. at least it clicks.. Now I need to move on to how to get there and get back part, but for now back to homework. It was supposed to be a half an hour break turned out to be 1 hour...thx again