SRL Archive - First Scripts

Mistag Ore Seller


garf

2007-12-13 11:11:28

hey everyone,

here is my first script,

i basically mines an inventory of iron and then sells it to mistag

kinda like power mining but you make a nominal amout of cash whilst you do it

*how to use*
first off go see Mistag in the mine underneath lummy castle, then slightly north east to him are 2 iron rocks, start the script there and away you go


*notes*
1 - the anti-random dosent seem to work, i guess im missing something
2 - no anti-ban YET!
3 - No Proggie

once i get the anti-ndom working ill fix the other 2 points

let me know what you think

Psychor

2007-12-13 11:53:16

I've been thinking about making a script for this aswell, nice to see you giving it a go.
In FindOre you have
wait(1200+random(200));
OreMined := OreMined +1;
I don't see a reason for OreMined, maybe if you want to use it in a proggy later, but then i suggest in making another procedure that actually counts the ores in the inventory. Cause if the mining takes longer then the wait command for some reason your counting is gone be off.
In amount.scar and inventory.scar are a few procedures that can heklp you with that.

Your FindMistag procedure is dangerous, cause after that you find him or not you start to do a series of coordinate clicking, that will get you banned very fast. Can't give you real advice in that area as i don't know what your trying to accomplish with it.

EDIT: What is wrong with the FindNormalRandoms? It doesn't solve them or something else?

garf

2007-12-13 12:06:04

i know about the co-ords issuse, im just writing it in as random area clicks

with the OreMide part, i had a bit of a proggy, but left it out for the moment


and the FindNormalRandoms just dosent seem to do anything, my guy just keeps on mining away

Psychor

2007-12-13 12:16:30

For example, your script misses the random saying your nickname. This could be cause you don't use the FindNormalRandoms after the click to start mining.

procedure FindOre;
begin
if not LoggedIn then Exit;
If (FindNormalRandoms) or (InvFull) then Exit;
if (FindObjCustom(X, Y, ['Mine','ne Ro','e Roc','Rocks'], [2174025,2108231,1844541,2107974,7836558,2108231,2174282,1778490], 3)) then
begin
Mouse(X, Y, 0, 0, false);
chooseoption('ocks'); //The random will appear after this click
FindNormalRandoms; //Now it should catch the nickname
wait(1200+random(200));
end;
OreMined := OreMined +1;
end;

garf

2007-12-13 12:36:55

i have update the talkin to mistag part, i knew i had to do that (forgot i hadnt updated it it in reality)

just out of interest, what randoms will FindNormalRandoms; find?

connor da og

2007-12-13 12:39:20

i like this but as the person that posted first post without an anti ban that coordated clicking will get u banned..

garf

2007-12-13 12:43:35

From: connor da og
i like this but as the person that posted first post without an anti ban that coordated clicking will get u banned..


i have sorted that with this edit

procedure FindMistag;
begin
if not LoggedIn then Exit;
if (FindObjCustom(X, Y, ['Mistag'], [2045743,2837826,3035719,8033937], 3)) then
begin
Mouse(X, Y, 0, 0, True);
flag;
wait(2000+random(100));
Mouse(225+random(150),445+random(10),0,0,true);
wait(1500+random(100));
Mouse(175+random(150),380+random(10),0,0,true);
wait(1500+random(100));
Mouse(225+random(150),445+random(10),0,0,true);
wait(1500+random(100));
Mouse(225+random(150),445+random(10),0,0,true);
wait(1500+random(100));
Mouse(235+random(45),395+random(10),0,0,true);
wait(1500+random(100));
Mouse(225+random(150),445+random(10),0,0,true);
wait(1500+random(100));
end else
FindMistag;
end;

i tried witht he

    
chooseoption('ocks'); //The random will appear after this click
FindNormalRandoms; //Now it should catch the nickname

suggestion and its still not catching the randoms. any one got any ideas

noob-2

2007-12-13 20:15:48

this script has a great concept too it

Psychor

2007-12-14 09:51:10

Weird that it doesn't catch the randoms, which ones did you get?
The coord clicking is that for selecting the chat text with Mistag to sell the ores?

garf

2007-12-15 11:34:02

From: Psychor
Weird that it doesn't catch the randoms, which ones did you get?
The coord clicking is that for selecting the chat text with Mistag to sell the ores?


the randoms i got that it didnt catch were the old man, the security guard and giles

to coord thing was edited, that is the part that selects the options to sell the ore


i have looked around and i cant find a script or tutorial that i can work randoms from

Sir R. M8gic1an

2007-12-15 16:33:36

for randoms you normally have FindFastRandoms by WT-Fakawi, and FindNormalRandoms. i guess you might be setting your nickname right?
username: Rasta magician
possible nics: 'ast' 'sta' 'agi' 'gic'


if not(FindObjCustom(X, Y, ['Mistag'], [2045743,2837826,3035719,8033937], 3)) then
FindObjCustom(X, Y, ['Mistag'], [2045743,2837826,3035719], 3)
Mouse(X, Y, 0, 0, True);

this will mess up. the second FindObj won't make any difference because your looking for the same colors except one and with the same tol. also even you don't find it it'll still do Mouse, and since X and Y will be never it'll move to (0, 0)


if (FindObjCustom(X, Y, ['Mistag'], [2045743,2837826,3035719,8033937], 3)) then
begin
Mouse(X, Y, 0, 0, True);
flag;
wait(2000+random(100));
Mouse(283,454,0,0,true);
wait(1500+random(100));
Mouse(287,384,0,0,true);
wait(1500+random(100));
Mouse(283,454,0,0,true);
wait(1500+random(100));
Mouse(283,454,0,0,true);
wait(1500+random(100));
Mouse(249,403,0,0,true);
wait(1500+random(100));
Mouse(283,454,0,0,true);
wait(1500+random(100));
end else
writeln('couldn''t find Mistag');
you needed the begin in there, otherwise it'd still click the coords although there wasn't a chatbox.

you can add a pick checker, auto talker, better ways of finding the rocks, faster ways, ways of telling when the rock is already mined, etc.

~RM

garf

2007-12-15 23:22:15

thanks for that, ill add that into the mistag procedure

as for the nick name thing, i have partly got the anti-random working on a seperate script, it found there was the mysterious box in the inventory, clicked it, then continued to click it, never actually solving it, but again, that could be me missing something.

how would i be able to use the findrandom scripts in a while loop?

would that be possible?

id love to get this script working, as i think it would help a lot of people

as always thanks in advance

Psychor

2007-12-16 02:07:52

From: garf
the randoms i got that it didnt catch were the old man, the security guard and giles

Those should be handled by the findrandoms easely, FindNormalRandoms handles all randoms except a few unsolvebles like maze, that dragon one and a few others.

From: garf
as for the nick name thing, i have partly got the anti-random working on a seperate script, it found there was the mysterious box in the inventory, clicked it, then continued to click it, never actually solving it, but again, that could be me missing something.

how would i be able to use the findrandom scripts in a while loop?

would that be possible?


To use FindNormalRandoms in a while loop, you just call it in there, place FindNormalRandoms; where you want it to check for randoms, each time you call it it will do so.

I still don't understand why it doesn't handle those randoms what version of Scar and SRL are you using?

In SRL=>Core there's Text.scar, take a look at ClickOption and ClickText, with those you can still select the text while talking to Mistag and you'll get rid of the coord clicking, so it will be safer.

garf

2007-12-18 08:30:38

im using the latest scar 3.13 and have updated all the files to the latest versions

Psychor

2007-12-18 09:03:14

Have you tried it with 3.12c? 3.13 has been giving me problems also.

garf

2007-12-18 09:12:45

ill give that a look into

i have been using a script that just searches for randoms whilst i play, jst to see if i had made a typo or something this is the script


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

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'nikname';
Players[0].Active :=True;
end;
begin
SetupSRL;
ActivateClient;
DeclarePlayers;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
Wait(1000);
repeat
FindNormalRandoms;
until(false);
end.

i have put my player details in correctly, but every so ofte it just clicks the log out button, and there is no random

Psychor

2007-12-18 09:42:59

Depending on what your doing at that time, for example banking. At that time there are no gametabs on the screen. FindNormalRandoms will see that as a sign of a random, like with the Maze, Mime, Drill Demon, ScapeRune and there are a few more that have this quality. Anyways, The script will end up thinking it's in ScapeRune and as it's unsolved at the moment, log you out.

shro0ms

2007-12-18 12:59:20

I'll try it out right now

Naike

2007-12-19 14:57:48

Try to use more…

Procedure AntiRandom;
Begin
FindMaze;
FindMime;
FindQuiz;
FindDemon;
If FindFight=True then
RunAwayDirection('S');
FTwait(6000+random(3000));
Runback end else
begin
Break;
end;
end;

Sir R. M8gic1an

2007-12-19 15:02:44

From: n1keee
Try to use more…

Procedure AntiRandom;
Begin
FindMaze;
FindMime;
FindQuiz;
FindDemon;
If FindFight=True then
RunAwayDirection('S');
FTwait(6000+random(3000));
Runback end else
begin
Break;
end;
end;


FindNormalRandoms + FindFastRandoms will do all that for him.