SRL Archive - First Scripts

Alienware's first Script


Alienware

2010-01-02 14:43:57

Hi there everyone this is my first script and it is really simple auto chopper and dropper. Works fine for I have tested it, I just wanted the pros out there to see it and possibly tell me where I could improve and how to fix the load counter is messed up.


Edit: Taking out script till i make suggested changes and i am going to work on a banking function.

Dervish

2010-01-02 15:09:48

What are integers 3 4 ?

Alienware

2010-01-02 15:17:09

From: Dr D. Dervish
What are integers 3 4 ?


started out supporting multi player but then I changed it.


Updated script.

JPHamlett

2010-01-02 15:42:03


procedure DropTheLogs;
var
I : Integer;
begin
if(not(LoggedIn)) or (not(invFull))then
Exit
else
begin
WriteLn('Dropping Logs Engaged');
if(Players[CurrentPlayer].Booleans[0])then
begin
for I := 2 to 28 do
begin
DropItem(i);
Inc(Drops);
Inc(Players[CurrentPlayer].Integers[0]);
end;
end else
begin
for I := 1 to 28 do
begin
DropAll;
Inc(Drops);
Inc(Players[CurrentPlayer].Integers[0]);
end;
end;
end;
end;

you could use dtms for that

over all very ice first script

Alienware

2010-01-02 15:48:14

From: J_Pizzle

procedure DropTheLogs;
var
I : Integer;
begin
if(not(LoggedIn)) or (not(invFull))then
Exit
else
begin
WriteLn('Dropping Logs Engaged');
if(Players[CurrentPlayer].Booleans[0])then
begin
for I := 2 to 28 do
begin
DropItem(i);
Inc(Drops);
Inc(Players[CurrentPlayer].Integers[0]);
end;
end else
begin
for I := 1 to 28 do
begin
DropAll;
Inc(Drops);
Inc(Players[CurrentPlayer].Integers[0]);
end;
end;
end;
end;

you could use dtms for that

over all very ice first script


Thank you for the advice.

Dervish

2010-01-02 15:50:16

Agreed, very nice script for a first and for a registered member.

Indents are 2 spaces for standards ;).

Alienware

2010-01-02 15:55:48

From: Dr D. Dervish
Agreed, very nice script for a first and for a registered member.

Indents are 2 spaces for standards ;).


Thanks for the positive feed back, i plan on making a big impact to this community.

Blumblebee

2010-01-02 16:11:23

to shorten drop logs you can simply do…

procedure DropTheLogs;
var
I : Integer;
int : Integer;
begin
if(not(LoggedIn)) or (not(invFull))then
Exit;
WriteLn('Dropping Logs Engaged');
if(Players[CurrentPlayer].Booleans[0])then
int := 2 else int := 1; // the slot that the script will drop
for I := int to 28 do // now we drop from the slot provided to 28
begin
DropItem(i);
Inc(Drops);
Inc(Players[CurrentPlayer].Integers[0]);
end;
end;

just to simplify things for you. I hope you kind of get the idea.

You must have past programming/scripting knowledge of some sort to be implementing types and records so soon (that or you copied someone haha).

this:
        case Random(2) of
0 :
begin
Mouse(x, y, 0, 0, False);
Wait(100 + Random(200));
ChooseOption('hop');
WriteLn('Chopping Tree Using Right Click Engaged');
GetMousePos(x, y);
end;
1 :
begin
Mouse(x, y, 0, 0, True);
WriteLn('Chopping Tree Using Left Click Engaged');
GetMousePos(x, y);
end;
end

can be
Mouse(x, y, 0, 0, Random(2) <> 1);
chooseoption('hop');

although it kind of reduces readability i enjoy it for times sakes and I would assume its faster.

random(2) <> 1 = conditional. if random(2) = 1 then it left clicks, else it right clicks. ChooseOption only occurs if the menu is open so it doesn't slow anything down when its not present.

I'm too lazy to pick your script apart anymore, its quite well done and the only way i could be of help is to nit-pick (like i've already done haha).with that said some of your script reminds me of someone else's, or maybe you posted this previously. Some parts just seem, really, really familiar. That or I'm going crazy. Anyways, looks good, congratulations on your first script :) now work on adding some walking ;)

oh and you should think about using SCAR tags instead of CODE tags, simply put
 
(without the spaces) instead of
 

Alienware

2010-01-02 17:04:32

Yes I have previous scripting knowledge, i used/still do make scripts for Diablo 2 bots.

Heavenguard

2010-01-02 18:27:23

A Tip if your making this script for Draynor. Dont struggle too much with Walking to the bank, make a simple DTM of the Bank NPC's. Always works for me. Nice job btw, and scripting for Blizzard games is awesome, i remember way~back in Warcraft III and TFT. Those were the days :D Even though i never knew how to do all that stuff.

jimmy_mac

2010-01-02 19:47:33

From: Heavenguard
A Tip if your making this script for Draynor. Dont struggle too much with Walking to the bank, make a simple DTM of the Bank NPC's. Always works for me.


how can you do that, if the npc's in the minimap are always moving?

Heavenguard

2010-01-02 19:51:24

the bankers on the MM are constantly in a row.
I have to go out right now, when i come back ill post a pic.
Theres a yellow static color in the middle of each of those dots, use that.
Grab ~ 4 of those dots and 1 mainpoint (were you want to walk) with 300 tolerance, and boom good DTM.

jimmy_mac

2010-01-02 19:54:46

From: Heavenguard
the bankers on the MM are constantly in a row.
I have to go out right now, when i come back ill post a pic.
Theres a yellow static color in the middle of each of those dots, use that.
Grab ~ 4 of those dots and 1 mainpoint (were you want to walk) with 300 tolerance, and boom good DTM.

thanks ill give it a shot.

Kyle Undefined

2010-01-02 19:54:57

Alienware, don't steal shit from my scripts without credit.

~Camo

Alienware

2010-01-02 22:23:31

From: Camo Developer
Alienware, don't steal shit from my scripts without credit.

~Camo


I'll add credit don't worry, adding more to it.