SRL Archive - First Scripts

My First Script (Teleporter) REWRITTEN!


Andyz55

2008-10-31 22:39:25

Hey, I made a really crappy script about 6 weeks ago and now I re wrote it. Its a tele that I think works really well. Here it is!
Please Post PROGGIES!!

Andyz55

2008-10-31 22:42:03

RESERVED FOR BEST PROGGIES:

#1:



#2:




#3:




Thanks! -Andyz55

Sandstorm

2008-10-31 23:26:38

Alright, I've gone through this.

Writeln('Teled ' + IntToStr(teles * times) +' Times!');

Can't you just do this?

Writeln('Teled ' + IntToStr(teles) +' Times!');

  Procedure Teleport;
begin
teles := 0; //Dont change
teles2do := 1; //Times to tele per times to do
repeat
If (not (LoggedIn)) then Exit;
GameTab(7);
If Findcolortolerance(x, y, telecolor, MIX1, MIY1, MIX2, MIY2, 0) then
MMouse(x, y, 2, 2);
Wait(200+random(200));
Mouse(x, y, 2, 2, true);
Antiban;
Wait(1000+random(300));
Antirandoms;
Wait(1000+random(300));
Inc(teles);
Until teles =(teles2do);
if not findcolortolerance(x, y, telecolor, MIX1, MIY1, MIX2, MIY2, 0) then
Writeln('Sorry, I could not find your tele color. Maybe you should get a new color.');
Writeln('Logging out');
Writeln('Please Wait For Proggie!');
Logout;
Proggie2;
end;

That could be shortened to this, couldn't it?

Procedure Teleport;
begin
If (not (LoggedIn)) then Exit;
If GameTab(7) Then
Begin
CastSpell(Spell);
Wait(500+random(500))
Antiban;
Wait(1000+random(300));
Antirandoms;
Wait(1000+random(300));
End else
Writeln('Sorry, I could not cast your spell. Perhaps you''re out of runes?');
Writeln('Logging out. Please Wait For Your Proggie!');
Logout;
Proggie2;
end;

And you could make it cast all the spells by doing this:

Procedure SetSpell;
Begin
Case Spell2 Of
'varrock teleport', '16': Spell:=16;
'camelot teleport', '27': Spell:=27;
'falador teleport', '22': Spell:=27;
'lumbridge teleport', '19': Spell:=19;
'house teleport', '24': Spell:=24;
'ardougne teleport','33': Spell:=33;
'watchtower teleport', '38': Spell:=38;
'trollheim teleport', '45': Spell:=45;
'ape atoll teleport', '48': Spell:=48;
end;
end;

And making this your mainloop:

begin
times := 0;//Times you want to tele (line 62) number of times//Dont change
SetupSrl;
DeclarePlayers;
SetSpell;
LoginPlayer;
repeat
Teleport;
Inc(times);
Until times = (Teleports);//Times you have teled (line 62) number of times
Proggie;
end.

While this gets put into the constants:

Teleports = 100;
Spell2 = 'varrock teleport'; //This is the name of the spell, or the number. //Read the comments up above for the numbers

And this put into the Comments above the constants:

//varrock teleport=16
//camelot teleport=27
//falador teleport=22
//lumbridge teleport=19
//house teleport=24
//ardougne teleport=33
//watchtower teleport=38
//trollheim teleport=45
//ape atoll teleport=48

I also fixed your standards for you, to the best of my ability. Here you go:

program CammyTele;
{.include srl/srl.scar}
{.include srl/srl/skill/Magic.scar}

{ Hi, Im Andyz55. Im pretty new to scar, but I have the basics
all down. Awhile back I made a script for cammy teleporting.
It wasn't very good.. Well, I remade it with this
and I am pretty satisfied. Please try it out and tell me
what you think! }
////Big thanks to anyone who has written a good and helpful tutorial and anyone who gave me positive feedback
/////I suggest you start logged in, because login player doesnt always work.
/////fill out Declare Players, Lines 32, 62, and 86. Please post bugs and proggies!! THANK YOU! -Andyz55
//varrock teleport=16
//camelot teleport=27
//falador teleport=22
//lumbridge teleport=19
//house teleport=24
//ardougne teleport=33
//watchtower teleport=38
//trollheim teleport=45
//ape atoll teleport=48

const
TeleColor = 16645886; //The color of your tele spell
Teleports = 100;
Spell2 = 'varrock teleport'; //This is the name of the spell, or the number. Read the comments up above for the numbers

var teles, teles2do, times, Spell: integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Dont touch
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //Dont touch this line or line 20 unless you want to add more players ( I dont recommend doing that )

Players[0].Name := 'Username'; //Obvious what this is
Players[0].Pass := 'Password'; //<<Obvious what this is too

Players[0].Nick := 'sern'; //Must be part of your username! NO FIRST LETTER!
Players[0].Active := True; //Dont touch
end;

procedure antiban;
begin
case random(12) of //Change the case according to how many times you will preform the teleport procedure!
2: MMouse(0, 0, 800, 600); //Random Mouse movement
3: Mouse(0, 0, 800, 600, false); //Random Right Click
end;
end;

procedure SetSpell;
begin
case Spell2 of
'varrock teleport', '16': Spell := 16;
'camelot teleport', '27': Spell := 27;
'falador teleport', '22': Spell := 27;
'lumbridge teleport', '19': Spell := 19;
'house teleport', '24': Spell := 24;
'ardougne teleport', '33': Spell := 33;
'watchtower teleport', '38': Spell := 38;
'trollheim teleport', '45': Spell := 45;
'ape atoll teleport', '48': Spell := 48;
end;
end;


procedure Proggie;
begin
if teles = (teles2do) then
begin
ClearDebug;
Writeln('Thank you for using Andyz55''s Ultimate Tele!');
Writeln('Ran for ' + timerunning);
Writeln('Teled ' + IntToStr(teles) + ' Times!');
Writeln('Please Post Progress Reports and Feedback!!');
Writeln('Right Now!!!!!');
Writeln(' -Andyz55');
end;
end;

procedure Proggie2;
begin
if teles = (teles2do) then
begin
Writeln('Thank you for using Andyz55''s Ultimate Tele!');
Writeln('Ran for ' + timerunning);
Writeln('Teled ' + IntToStr(teles) + ' Times!');
Writeln('Please Post Progress Reports and Feedback!!');
Writeln('Right Now!!!!!');
Writeln(' -Andyz55');
end;
end;

procedure AntiRandoms;
begin
FindnormalRandoms;
if (FindFight) then
RunAway('e', True, 1, 13200 + random(5500)); //Change this according to your prefered run direction and wait time
FTWait(20 + random(10));
end;

procedure Teleport;
begin
if (not (LoggedIn)) then Exit;
if GameTab(7) then
begin
CastSpell(Spell);
Wait(500 + random(500))
Antiban;
Wait(1000 + random(300));
Antirandoms;
Wait(1000 + random(300));
end else
Writeln('Sorry, I could not cast your spell. Perhaps you''re out of runes?');
Writeln('Logging out. Please Wait For Your Proggie!');
Logout;
Proggie2;
end;

begin
times := 0; //Times you want to tele (line 62) number of times//Dont change
SetupSrl;
DeclarePlayers;
SetSpell;
LoginPlayer;
repeat
Teleport;
Inc(times);
until times = (Teleports); //Times you have teled (line 62) number of times
Proggie;
end.

These changes haven't been tested, but the program compiles. I believe it should work, as it's relatively simple, but if it doesn't, let me know. :).

All in all, pretty good for a first script + remake.

Andyz55

2008-11-01 13:39:30

Hey thanks. I just didn't make the script so that it could set different spells
according to a number in the const because then there would be alot more typing, when you could just fillout a castspell. I like the castspell idea though lol. Sorry I entirely forgot about the function lol. I would like adding that in there so that they could just edit that one line, insted of the colors and things. Also the colors got sort of confusing because the symbols all had very similar colors to them. It still worked if you got a unique one. Thanks for fixing up my standards too lol. I dont really know how to make the script look good so im gonna look over a few tuts on standards. Everything else looked great and I think Im going to try to find a function to cast the next tele only when the previous one was finished, insted of waiting 4 seconds or 5. I think my main problem was using colors though. Thank you!
Rep + for taking all that time to edit my script!

ron1337

2008-11-01 13:45:30

Sorry for the n00b question…

Why do people need an auto-teleport script?
Is this just an easy way to get xp?

Sandstorm

2008-11-01 13:59:27

Easiest way till level 55, yes.

Also, I realize the case and stuff is a lot more code, but it's a LOT more user friendly. Many of the people here (the leechers!) won't use a script if it's not explained/self-explanatory. I wouldn't be surprised if half the leechers here don't even know how to pick a color.

Anyways, no problem. Again, feel free to pm me if you have question :).

Andyz55

2008-11-06 12:37:48

No proggies or anything??
I think im gonna have to post this in free for all or maybe jr. scripts..
what do u think sand?

Sandstorm

2008-11-06 17:42:52

I'll test it out, but I don't have members to test it yet.

Andyz55

2008-11-06 20:26:54

You dont need members, just a high enough level to tele to varrock or lumby or fally.. Do you think i should put it in free for all? its not getting looked at much here..
?

Sandstorm

2008-11-06 20:45:07

Members costs far less for the teleports in the long run, as there is no need for a third rune.

Andyz55

2008-11-06 23:10:51

Ya i know but do you think that I should put the tele in the free for all scripts section or the junior members section insted of here? its not getting looked at much..

in2it

2008-11-07 01:17:58

good script man like my first :P

exhounter

2008-11-09 15:52:35

i will try this :D

Andyz55

2008-11-15 20:54:34

Ok seriously, Is ANYONE going to post a proggie? Im gonna move it to either free for all or jr. mem or delete it if there arent any proggies soon.

Goodpeople

2008-11-23 01:00:22

Dear andy,
imma new poster and an old RS playa….
i noticed a problem with your script…
1. teles to lumbridge insted of desierd place
THE FIX!!!
you have to include: (.include srl/srl/skill/magic.scar}
next
line 16- spell = 'whateverspell';
takeout lines 80,81
insted add cast(spell) to line81



Procedure Teleport;
begin
teles := 0; //Dont change
teles2do := 876; //Times to tele per times to do
repeat
If (not (LoggedIn)) then Exit;
GameTab(7);
cast(spell)
Wait(200+random(200));
Mouse(x, y, 2, 2, true);
Antiban;
Wait(1000+random(300));
Antirandoms;
Wait(1000+random(300));
Inc(teles);
Until teles =(teles2do);
if not findcolortolerance(x, y, telecolor, MIX1, MIY1, MIX2, MIY2, 0) then
Writeln('Sorry, I could not find your tele color. Maybe you should get a new color.');
Writeln('Logging out');
Writeln('Please Wait For Proggie!');
Logout;
Proggie2;
end;
should look like that^^^^^^^^^^^^^^

pce out,
good

Griff

2008-11-23 15:56:23

Goodpeople, use scar tags when you post things like that. Second of all, the whateverspell is a const, so it doesn't matter what the name is :P.

Andyz55

2008-11-23 21:16:37

yeah, I know I should do that but Im working really hard on my willow cut and drop right now. I dont care about this script that much btw lol.

Ah well..

Magiic

2008-11-25 15:01:10

never release a script and the forget about it ;) but yeah i'd move it to jr's to save a lot of spam…

Andyz55

2008-11-25 17:41:01

Lol good advice i guess. Yeah how do I move it exactally..?

(im feeling like a complete noob right now)

RichNubzor

2008-11-25 22:41:51

sounds good, I will post proggie once I try this later =]

Andyz55

2008-11-30 00:14:14

There is way too much "sounds good, will try" spam going on here!
I gotta get this to be moved..

kryad3

2008-12-06 16:19:29

Works well :) id post a proggy but my computer crashed on my a few days ago, so i lost basicly everything… just got back up and runing.

Andyz55

2008-12-11 19:12:41

Well, thats alright. I dont really even care about this script but I should at least move it to jr mems. Idk maybe I'll do that later. Im pretty busy with some things..

-Andy