SRL Archive - First Scripts

Rogues AFK Blood Bath


rogue poser

2009-05-26 07:15:02

Alright so here goes, this is pretty much my first script. What do you think?

Features:
-Fights a monster based on its name and its color
-Eats food when hp is low, or logs out if hp is low and theres no food
-trivial antiban, srl's built in antirandoms

Coming soon:
a progress report that logs exp

i used two different techniques for finding the monster, ill improve on the first on soon, but i think im done for the night

What do you guys think?


this is a report i got on a char with 11 att and 16 str :-D

————————————-
…- AFK Blood Bath! -…
…- By: Rogue Poser -…
————————————-
.-Ran for: 23 Minutes and 31 Seconds-.
.- Total exp gained: 1296 -.
————————————-

bugger0001

2009-05-26 18:47:16

Pretty nice, although I'm not sure you need so many variables for this script. I mean the tempx and tempy, but I guess you know better ;)

Anyways looks a good script for beginning

rogue poser

2009-05-27 05:42:04

From: bugger0001
Pretty nice, although I'm not sure you need so many variables for this script. I mean the tempx and tempy, but I guess you know better ;)

Anyways looks a good script for beginning


yea if i dont think much about the script before i write it, i end up changing a bunch of things and not doing it as efficiently as possible, and thats exactly what i did…. same thing i do with many c++ programs i write without analyzing the situation and thinking of the best way to solve it

other criticisms besides that? Am i using the right mouse calls and such?

Griff

2009-05-27 05:53:30

Good work so far! I like how you did your attacking procedure so its less bannable. Try working on your standards,they're pretty good for most of the script, bu then you just stop with them for parts.

I noticed you have expgained not going in your proggie. Look in the includes section of SRL at the start, then check the exp at the end. Minus end from the start, and you have exp gained.

marpis

2009-05-27 15:02:06

I really can't get in to your mind :p
Why make the attacking procedure so diffiscult?
Also, you could use ChooseOption('ttack')

i suggest you to take away your consts and make variables instead.
for colors, make a global TIntegerArray and for names, TStringArray and attach these before your declare players procedure

var
mcolors: TIntegerarray;
mnames: TStringArray;

procedure DeclarePlayers;
begin
...

And then the colors and names could be set up in decalreplayers, like this

procedure declareplayers;
begin // use HowManyPlayers- variable, it's already in SRL
howmanyplayers:= 1; // How many characters??? currently it only supports one
CurrentPlayer:= 0; //
NumberOfPlayers(howmanyplayers); //

mcolors := [123123, 456456, 678678]; // <--- input as many as you like
mnames := ['oblin', 'hicken']; // <--- input as many as you like

Players[0].Name := ''; //User Name
Players[0].Pass := ''; //Password
Players[0].Nick := ''; //Nick Name
Players[0].Active := True; //Use This Player [ True / False ]
Players[0].Strings[0] := 'strength'; //attack,strength,defence
end;

rogue poser

2009-05-27 19:46:57

Thanks for the input guys, ooh wow i didnt know that, im not sure about all the different commands that are already built into scar so, if im not sure how to use it i just make my own :-D thankyou for pointing that out, it will be utilized in later scripts

bugger0001

2009-05-28 10:13:23

You can see all SRL functions by opening SRL files from Scar Includes Folder ;)

marpis

2009-05-28 13:55:58

From: rogue poser
Thanks for the input guys, ooh wow i didnt know that, im not sure about all the different commands that are already built into scar so, if im not sure how to use it i just make my own :-D thankyou for pointing that out, it will be utilized in later scripts


while writing in scar, press ctrl + space and it'll open a list of functions.
however, you can't see the parameters needed :(

rogue poser

2009-05-28 19:20:34

From: marpis
while writing in scar, press ctrl + space and it'll open a list of functions.
however, you can't see the parameters needed :(


i followed buggeres suggestion, looking through the srl includes you can see all functions and all parameters. very helpful with the current script im working on

Dynamite

2009-05-28 19:30:28

From: marpis
while writing in scar, press ctrl + space and it'll open a list of functions.
however, you can't see the parameters needed :(


OMG does it actually?!
I never knew that, it happened randomnly once but could never do it again :D
Thank you

T~M