SRL Archive - Help and Support

!!!need help with setting up SRL in scripts!!!


ub3r |<1||3r*1337*

2006-04-11 17:46:10

I need help with setting up SRL's AntiRandom features. It always says that there is an Unknown Identifier in the Anti-Random Include. I put in SetupSRL; in my main loop(even though the SRL include is chosen), but it still doesnt respond. I am trying not to show my so-far script until i have everything on it finished. Please Help Me:confused:

WT-Fakawi

2006-04-11 18:26:19

I am not sure what you mean exactly.
If you are referring to an error in your local SRL/AntiRandoms.scar file, then I suggest just redownloading SRL from the root of the forum.
Otherwise, download my cowkiller, it has a good antirandom procedure. Copy it to your own script.

Version 1 will have an updated FindNormalRandoms.

ub3r |<1||3r*1337*

2006-04-11 18:33:44

Line 73: [Error] (90:27): Unknown identifier 'bmpMod' in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\AntiRandoms.scar



I even redownloaded SRL.

WT-Fakawi

2006-04-11 18:38:26

You need to setup SRL, by calling SetupSRL; :)

ub3r |<1||3r*1337*

2006-04-11 18:50:15

Yep, put that there… or is it in the wrong place?(that pic is in the main loop. its kinda bad because i had to make it smaller size):(

Krazy_Meerkat

2006-04-11 18:55:50

From: WT-Fakawi
Version 1 will have an updated FindNormalRandoms.

I'm not sure if you've thought about this already, but could you add a procedure to find randoms that are specific to a skill? Like if you call FindRandoms; It will check the player's current skill in use and find randoms like the ent for woodcutting, or finding the pick head for mining..

masquerader

2006-04-11 18:57:45

From: ub3r |<1||3r
Yep, put that there… or is it in the wrong place?(that pic is in the main loop. its kinda bad because i had to make it smaller size):(


you should call setupsrl only once, at the beginnning

i think you had it in a loop

ub3r |<1||3r*1337*

2006-04-11 19:07:33

heh, never thought of that… well i'm gonna put in the magic antirands. Thanks for reminding me!
EDIT: there arent magic anti-randoms…
EDIT: ok… i guess i am forced to show my script… i just would like to learn from my mistakes and, if possible, learn more better procedures and functions to use.

PORT SARIM MAGER
{this will, of course, mage black knights in port sarim jail and buy runes at
aggies rune shop}
{will buy 100 of every rune you choose}
{INSTRUCTIONS!
1. have low quality
2.have 32-bit config
3.have as much money as you want in the first slot
4.setup below!
5. start in the rune shop at the doorway
6. have your runes already in your inventory
7.FACE NORTH ON MINIMAP!
8. you must be able to attack the knight with one left click
9.Use a staff with the spell already enabled}
{.include\SRL\SRL.scar}

Var
x,y,h:integer;




///////////////////SETUP THIS PART!////////////////////////////////////////
const
////colors! put colors here!!/////
runeshopsymbol= 1142014; ///////////color of the rune shop symbol,
foodshopsymbol= 6396346; ///////////color of the food shop symbol,
jewlerysymbol= 1451203;////////////color of the jewlery symbol
minigame= 3291597;////////////color of the minigame symbol
fishingsymbol= 10721281;////////////color of the fishing symbol
doorsymbol= 229;///////////a door symbol on minimap
bettypants= 1184277;////////////color of bettie's pants (black)
blackknight= 5921378;////////////color of the black knight
////////////////rune buyer setup/////////
rune1= 0;{0 fire,1 water,2 air,3 earth,4 minds,5 body,6 chaos,7 deaths}
rune2= 2;/////^^^^^^^^^^^^^^^^^^^^^^^^^////
rune3= 4;/////^^^^^^^^^^^^^^^^^^^^^^^^^////
//////////////miscellanious things///////////
autologout= 1;/////how many times to buy runes? 0= unlimited
//////////END OF SETUP! DO NOT MODIFY ANYTHING ELSE!!!!////////
procedure movetojail;
Begin
findcolortolerance(x,y,jewlerysymbol,617,112,656,153,3)
clickmouse(x+18,y,True)
wait(14000)
findcolortolerance(x,y,minigame,664,137,693,144,8)
clickmouse(x,y,True)
wait(14000)
findcolortolerance(x,y,fishingsymbol,615,98,656,144,8)
clickmouse(x,y+25,True)
wait(14000)
findcolortolerance(x,y,foodshopsymbol,638,112,674,143,4)
clickmouse(x,y,True)
wait(14000)
findcolortolerance(x,y,doorsymbol,621,120,648,151,7)
clickmouse(x,y,True)
end;

procedure attack;
Begin
repeat
findcolortolerance(x,y,9819,626,112,138,7)
clickmouse(x,y,True)
wait(8000)
clickmouse(681,91,True)
wait(8000)
findcolortolerance(x,y,blackknight,88,118,316,325,5)
clickmouse(x,y,True)
repeat
if findcolortolerance(x,y,blackknight,88,118,316,325,5)then
wait(4000)
until(findcolortolerance(x,y,blackknight,88,118,316,325,5)False)
until(wait(200000)
end;

procedure goback;
begin
repeat
sendarrowsilent(3)
until(findcolortolerance(x,y,15000811,614,36,614,36,5)
wait(8000)
findcolortolerance(x,y,doorsymbol,605,22,628,37,5)
clickmouse(x,y,True)
wait(14000)
findcolortolerance(x,y,foodshopsymbol,621,17,673,58,5)
clickmouse(x,y,True)
wait(14000)
clickmouse(664,14,True)
wait(14000)
findcolortolerance(x,y,minigame,626,28,674,47,5)
clickmouse(x,y,True)
wait(10000)
findcolortolerance(x,y,jewlerysymbol,609,11,656,44,5)
x+30
clickmouse(x,y,True)
wait(14000)
findcolortolerance(x,y,runeshopsymbol,623,18,663,55,5)
clickmouse(x,y,True)
wait(14000)
findcolortolerance(x,y,bettypants,52,40,394,288,5)
clickmouse(x,y,False)
wait(1000)
x-18
y+42
clickmouse(x,y,True)
wait(2000)
end;

procedure buyrunes;
begin
if rune1:=0 then
repeat
x:=99
y:=90
h:=0
clickmouse(x,y,False)
x-33
y-58
clickmouse(x,y,True)
wait(1000)
h+1
until(h>=10)else
if rune1:=1 then
repeat
x:=141
y:=87
h:=0
clickmouse(x,y,False)
x-35
y-66
clickmouse(x,y,True)
wait(1000)
h+1
until(h>=10)else
if rune1:=2 then
repeat
x:=191
y:=85
h:=0
clickmouse(x,y,False)
x-8
y-68
clickmouse(x,y,True)
wait(1000)
h+1
until(h>=10)else
if rune1:=3 then
repeat
x:=242
y:=90
h:=0
clickmouse(x,y,False)
x-33
y-58
clickmouse(x,y,True)
wait(1000)
h+1
until(h>=10)else
if rune1:=4 then
repeat
x:=283
y:=87
h:=0
clickmouse(x,y,False)
x-35
y-66
clickmouse(x,y,True)
wait(1000)
h+1
until(h>=10)else
if rune1:=5 then
repeat
x:=332
y:=86
h:=0
clickmouse(x,y,False)
x-8
y-68
clickmouse(x,y,True)
wait(1000)
h+1
until(h>=10)else
if rune1:=6 then
repeat
x:=380
y:=86
h:=0
clickmouse(x,y,False)
x-8
y-68
clickmouse(x,y,True)
wait(1000)
h+1
until(h>=10)else
if rune1:=7 then
repeat
x:=426
y:=86
h:=0
clickmouse(x,y,False)
x-8
y-68
clickmouse(x,y,True)
wait(1000)
h+1
until(h>=10)
end;

begin
SetupSRL
repeat
autologout:=autologout-1
DwarfItem;
FixChat;
movetojail;
LoadNpcArray;
FindDead;
FindNewBox;
FindTalk;
TalkToRand;
attack;
goback;
buyrunes;
until(autologout>=0)
end.

masquerader

2006-04-11 19:22:13

From: ub3r |<1||3r

{.include\SRL\SRL.scar)
{.include srl\srl\core\AntiRandoms.scar}


should be
{.include\SRL\SRL.scar}

watch your ) and }

i think you had antirandoms.scar included and not srl.scar :p
you never need to put antirandoms.scar, its a core include

ub3r |<1||3r*1337*

2006-04-11 19:26:43

OMG! THANK YOU! lol. now umm… can i have some help with these invaild number of paramater errors?(i put up the more improved version of my script.)

WT-Fakawi

2006-04-11 19:34:01

Nice one Ub3r!

Some Suggestions:
You could try using FindSymbol; It auto finds a given Symbol on the MiniMap and returns the coordinates in x and y. That way you dont need to setup so many colors manually.
And could you try to indent your code a little, Ifindnonindentedcodeveryunpleasanttotheeye if you know what I mean.

Can you really actually walk from Symbol to Symbol? I find that a rather ingenious idea :)

good work.

ub3r |<1||3r*1337*

2006-04-11 19:38:41

thank you. And thank you for the tips, I hope they help me in my next script. I'm curious, did the script actually run without having it said 'Invaild number of Parameters' at some point? if it did, then what the heck is wrong with my SCAR?

EDIT: I can't run my script… i dont see any problems with
clickmouse(x,y,True)
in the middle of my script

ReFLeX

2006-04-11 19:51:08

From: ub3r |<1||3r
thank you. And thank you for the tips, I hope they help me in my next script. I'm curious, did the script actually run without having it said 'Invaild number of Parameters' at some point? if it did, then what the heck is wrong with my SCAR?

EDIT: I can't run my script… i dont see any problems with
clickmouse(x,y,True)
in the middle of my script

make sure you define x, y in your variables and don't use clickmouse (it'll get you banned), use mouse

ub3r |<1||3r*1337*

2006-04-11 20:01:55

so… which kind of 'clickmouse' should I use? i cannot see what other function there can be used…:confused:

EDIT: i see what you mean 'Mouse' is what makes your mouse move smoothly and click at that spot, right?

EDIT: can you give me a heads up on how to use the 'Mouse'? it doesnt say it in the F1 help manual