SRL Archive - First Scripts

ranging guild <<TargetOwner>>


Phran6

2009-02-16 19:27:16

Hello Hello

this is my first script finished.
i know its basic scripting but im currently learning scripting so all help will be aprecied.



WHY A RANGING GUILDER ? :
1- good ranging exp for an autoer
2- money making from buying rune arrow with tickets
3- you gain no hp exp
4- perfect for pure and you can stay there a long time because you dont need food (but my script isnt perfect so i think youll cant overnignt and i dont recomend)

WHAT DOES IT DO?
1-this script is doing the mini game at he ranging guild.
2-it have good anti-ban (i think)
3-it have srl anti-random
4-it contain my own autorespond ( for now only respond your lvl later it will respond how many tickes you have and more … like qestion: hi respond YO…)

CREDIT:
-Camo¤Kyle for help
-hy (i dont remember his name lol ) for his change music track in my antiban procedure.


REQUIRMENT: 40 ranged ( think), money (more you longer youll can stay)


SETUP:
1-put your guy near the judge
2-press start.


NOTE: this script is using smart.


THING TO ADD:

1- alot of thing (lol)
2-multiplayer
3-sleep - break
4-an if hp lower then % then tele (with teletab) to camelot then walk back because i found the anti random not working at 100%.
5-other (like more failsafe)



this is the beta vertion, im currently banned for 10 day with my member account so i didnt tested the last vertion but i think it should work.


its slow , i added lot of wait . ill make it faster whene ill have my account back.



i will accept all help to improve this script (i will give credit)
and please put bug and repport it will help me to make the script bether:)


IM NOT REPONSABLE IF YOUR GETTING BANNED FROM THIS SCRIPT, ITS ONLY BETA (my FIRST SCRIPT)

Thanx
– FRANCISHELIE –

Pheter

2009-02-16 21:29:14

You forgot to indent the progress report :P

I haven't got an account with high enough range to enter the guild and try this out unfortunatly so I can't let you know weather it works for me or not!

Kyle Undefined

2009-02-16 22:33:14

First of all, not bad for first script. Here are some pointers.

1)
procedure Antiban;
var
mx , my :integer;
begin
if(not(LoggedIn))then
Exit;
case Random(AntibanChance) of
1:begin
You have a const in the wrong place tho, and you really don't even need it. Your numbers jump around way to much in there. Try doing them in order. If you want to have multiple numbers on one thing you can just put them all and space them with commas.
procedure Antiban;
var
mx , my :integer;
begin
if(not(LoggedIn))then
Exit;
case Random(30) of
1 : begin
{code}
end;
{....................}
5, 7, 9 : begin
{code}
end;
{etc}

2)
Your FindJudge procedure looks alright. But you need a wait after right clicking. Also, a begin…end is needed after the if…then statement.
    wait(50 +  random (50));
if IsUpText('petition') then
begin
Mouse(x, y, 1, 1, False);
Wait(50 + Random(50));
ChooseOption('alk');
Wait(100 + Random(50));
end;

3)
The reason why your random target color isn't working is because it's after your ClickTarget procedure. Looks good tho. Putting it before the ClickTarget will make it work.
procedure TheTargetColor;
begin
case Random(3) of
0: TargetColor := 8249835;
1: TargetColor := 5659836;
2: TargetColor := 11301473;
end;
end;

procedure ClickTarget;
var
x, y : integer;
begin
setangle(false);
MakeCompass('315');
wait(800 + random(100));
if FindColorSpiralTolerance(x, y, TheTargetColor, MSX1, MSY1, MSX2, MSY2, 22) then
begin
mmouse(x, y, 3, 3)
wait(400 + random (50));
if IsUpText('arget') then
Mouse(x, y, 2, 2, true);
end;
end;

4)
Your talk to judge can be summed up. You can use a For…to…do loop. I also don't know why you have an else in there. Else means if this doesn't happen, do this.
procedure TalkJudge;
var
I : Integer;
begin
FindNPCChatText('lick', ClickLeft);
wait(500 + random(40))
if FindNPCChatText('give', ClickLeft) then
for I := 0 to 2 do
begin
wait(100 + random(20));
FindNPCChatText('lick', ClickLeft);
wait(100 + random(20));
end;
end;

5)
Your shooting loop is pretty good actually. I'm guessing that the MouseItem is for the items. You could make a DTM and use that instead of MouseItem. Just needs some standards.
procedure ShootingLoop;
begin
MouseItem(2, true);
repeat
FindNormalRandoms;
wait(100 + random(100));
ClickTarget;
wait(1500 + random(20));
CloseWindow;
inc(Af)
until(FindNPCChatText('lick',ClickLeft));
end;

6)
Your mainloop isn't bad either. But using until(false); isn't good. Try using until(AllPlayersInactive); That will work until your players active boolean is set to false. Read up on some multiplayer and learn how to set a players active boolean to false if something messes up. Your proggress procedure never gets called so it needs to be added.
procedure progress;
begin
writeln(' /////////////////////|\\\\\\\\\\\\\\\\\\\\')
writeln(' /////// MADE BY FRANCISHELIE \\\\\\\\\\')
writeln(' ///////////////////////|\\\\\\\\\\\\\\\\\\\\\\')
writeln(' // we have fired ' + IntToStr(Af) + ' arrows \\')
writeln('// we have runned ' + TimeRunning + ' \\ ');
writeln('\\ we did ' + IntToStr(Ad) + ' anti random //')
writeln(' \\\\\\\\\\\\\\\\\\\\\\\\|/////////////////////// ')
end;

procedure MainLoop;
begin
repeat
Antiban;
wait(300 + random(50));
FindJudge;
wait(2000 + random(100));
TalkJudge;
wait(300 + random(50));
Antiban;
wait(300 + random(50));
ShootingLoop;
progress;
until(AllPlayersInactive);
end;

That's all I can see but it's not a bad start. Read some more tutorials and keep practicing. Some of it looks like it came from my RangeGuilder in the Range section in Jr. Mems and I don't care if you use it. I made it horribly, when I first started learning to script, and could use alot of work. Keep up the work. ;)

~Camo

Phran6

2009-02-17 16:15:25

thanx for you help i fixed some thing , and for the mouseitem, its for equip arrow. i dont know why the function in ranged section for equip arrow wasnt working for me but ill try to make my own.

Phran6

2009-02-18 16:11:51

VERTION 0.1 ADDED
with my own equip arrow procedure
and my own auto respond !!


-still untested cause my account is banned (8 day left)
so please test it for me and post report and bug

-thanx-

mitch12555

2009-02-18 19:56:49

ill test this baby out 2ngiht

Smarter Child

2009-02-18 20:06:26

in load dtms procedure you don't have to name it DTM…it can be anything.

Ok, for a first script, make TPointArray's it is much better finding.

Try some nice AntiBan functions like BoredHuman, HoverSkill, etc.

But a very nice first script indeed if it actually does it's function/

Phran6

2009-02-18 21:04:58

i already have anti ban with boredhuman, hoverskill and more …
for tpa i dont know how use them for now, ill read some tut and try to use it in my script.

-thanx for your help.

Phran6

2009-02-21 13:43:30

VERTION 0.2 ADDED

NOW FIND JUDGE WITH TPA !!
MORE ANTI BAN
BETHER ANTI RANDOM
AND BETHER PROGRESS REPORT!!!

May be slow ill make it faster whenne ill be unbanned

-still untested cause my account is banned (5 day left)
so please test it for me and post bug and report !