SRL Archive - Simba (Testing) Scripts

FirstScript


serexcety

2012-01-21 00:45:03

i am making my first script, i have fallowed a guide. below.
http://villavu.com/forum/showthread.php?t=44942

i will be posting my script code, for anyone who wants to try it.

this isn't going to be the only thing the script does, in the future it will have bank, and drop logs. so far it only supports maple logs. future it will support regular,oak. just for powerchopping, banking.

serexcety

2012-01-21 00:46:03

//////powerchoppa by serexcety.//////
//////anyone who tries to copy my nooby script will be caught/
//////post bug reports please/////



program powerchoppa;
{$i srl/srl.simba}


Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
end;
end;
procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Woodcutting', false);
wait(2453+Random(432));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('S');
wait(50+random(133));
MakeCompass('N');
end;
end;
end;
procedure ChopTree;
var x, y: integer;
begin
if FindObj(x, y, 'hop',4027528,45)then
begin
Mouse(x,y,2,2, false);
ChooseOption('hop');
repeat
Wait(1200+random(250));
Until not IsUpText('aple') or (InvFull);
end;
end;


begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
ChopTree;
end.[SIMBA]

kevin33

2012-01-21 00:47:44

Put Simba tags around script. You need to work on your standards by first look at untagged. Congratz on release though. Hope to see more in the future!

serexcety

2012-01-21 01:11:17

From: kevin33
Put Simba tags around script. You need to work on your standards by first look at untagged. Congratz on release though. Hope to see more in the future!


Thank you so much. Also how do I put simba tags, an I will be upgrading this script till its full potential, after I figure out how to bank,drop logs, and have it supported on many trees I will then work on my next script. Either prayer or runecrafting. Since I'm 99 rc and need 95 prayer :3

kevin33

2012-01-21 01:12:56

When you click edit for the post, go advanced. Then highlight the script and click the lion picture (2 over from the banana)

Also banking and dropping are functions that are found if you search the function list on SIMBA. Pic below. Type in what you want, then copy and paste the function. Or if your up for the challenge, make your own. Other trees are not that difficult to add either. Its kind of the same thing with different colors. If you need more info, it is best to watch Yohojos video tutorials and/or read Coh3ns guide. They will teach you more and help you improve your script.

[ATTACH]13269[/ATTACH]

serexcety

2012-01-21 01:32:54

Okay. Thank you very much bro! Will keep this updated daily.

kevin33

2012-01-21 01:45:19

Just remember: They are other peoples functions so you have to give them credit if you use them. If you make your own, you wont have this problem.

serexcety

2012-01-21 01:52:41

Kk. Thanks for the heads up I don't want copyright fraud :/

kevin33

2012-01-21 01:57:54

They will just call you out on it thats all. Might as well save yourself the trouble.

serexcety

2012-01-21 02:01:47

From: kevin33
They will just call you out on it thats all. Might as well save yourself the trouble.


Your a lifesaver man! Thank you

serexcety

2012-01-21 02:40:49

[SIMBA]//////powerchoppa by serexcety.//////
//////anyone who tries to copy my nooby script will be caught/
//////post bug reports please/////
//giving DROPALLEXCEPT credits to nova2//


program powerchoppa;
{$i srl/srl.simba}


Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
end;
end;
procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Woodcutting', false);
wait(2453+Random(432));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('S');
wait(50+random(133));
MakeCompass('N');
end;
end;
end;
procedure ChopTree;
var x, y: integer;
begin
if FindObj(x, y, 'hop',4027528,45)then
begin
Mouse(x,y,2,2, false);
ChooseOption('hop');
repeat
Wait(1200+random(250));
Until not IsUpText('aple') or (InvFull);
end;
end;
procedure DropAllExcept(DontDrop: TIntegerArray);
var
inv, i, h: Integer;
begin
h := high(DontDrop);
for i := 1 to h do
{ Set the bit associated with the DontDrop Array }
inv := inv or (1 shl DontDrop[i]);
for i := 2 to 28 do
{ Check the bit at i, and if its high, then we dont drop. }
if (((inv shr i) and 1) = 0) then
DropItem(i);
end;

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
ChopTree;
end.


at line 57 im getting an error…can't figure out what this means..:s [Error] (57:11): Duplicate identifier 'DROPALLEXCEPT' at line 56

Inception

2012-01-21 03:01:30

From: serexcety

at line 57 im getting an error…can't figure out what this means..:s [Error] (57:11): Duplicate identifier 'DROPALLEXCEPT' at line 56


Remove the DropAllExcept procedure from your script. You defined Srl, so you will be able to use it without having it in your script.

serexcety

2012-01-21 10:20:02

so if i don't have to add a drop procedure/function… do i just say….
if (InvFull) then
begin Drop 'aple logs'
end;
end;?


??????/

Inception

2012-01-21 14:03:58

From: serexcety
so if i don't have to add a drop procedure/function… do i just say….
if (InvFull) then
begin Drop 'aple logs'
end;
end;?


??????/


No, the DropAllExcept procedure takes an array of the inventory items that you don't want to drop.

So:


if (InvFull) then
DropAllExcept([1])

would drop everything except for whatever was in your first inventory slot.

serexcety

2012-01-21 15:52:11

From: Inception
No, the DropAllExcept procedure takes an array of the inventory items that you don't want to drop.

So:


if (InvFull) then
DropAllExcept([1])

would drop everything except for whatever was in your first inventory slot.


damn inception, thank you so much. your a beast.

serexcety

2012-01-21 16:19:06

//////powerchoppa by serexcety.//////
//////anyone who tries to copy my nooby script will be caught/
//////post bug reports please/////
//credits for helping drop-inception//


program powerchoppa;
{$i srl/srl.simba}
{$DEFINE SRL_SMART}
{$DEFINE SMART}

{.include SRL/SRL/Misc/SMART.simba}
{.include/SRL/SRL.simba}

const
SmartWorld := 15; // Which World/Server do you want to use?
SmartMembers := False; // Is it a Members World?
SmartSigned := True; // Signed/UnSigned Client?
SmartSuperDetail: False; // Use Super Detail?
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
SetupSRL;
end;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
end;
end;
procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('Woodcutting', false);
wait(2453+Random(432));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('S');
wait(50+random(133));
MakeCompass('N');
end;
end;
end;
procedure ChopTree;
var x, y: integer;
begin
if FindObj(x, y, 'hop',4027528,45)then
begin
Mouse(x,y,2,2, false);
ChooseOption('hop');
repeat
Wait(1200+random(250));
Until not IsUpText('aple') or (InvFull);
if (InvFull) then
DropAllExcept([1])
end;
end;

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
ChopTree;
end.[SIMBA]



for some reason it wont open smart..anyone wanna help me out?

Inception

2012-01-21 19:34:09

You don't need:
{$DEFINE SRL_SMART}

and personally, I would get rid of this too because you are using them once and it's immediately after you assign values to them:
  SmartWorld := 15;              // Which World/Server do you want to use?
SmartMembers := False; // Is it a Members World?
SmartSigned := True; // Signed/UnSigned Client?
SmartSuperDetail: False; // Use Super Detail?

As for why SMART won't load, you need to move this:

  Smart_Server := 15;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;

out of const and into a procedure.

serexcety

2012-01-22 03:57:56

that makes more sense to me now.

serexcety

2012-01-24 21:54:52

for some reason my script wont find the maple tree, i wonder if i should use object dtm?

maigel

2012-01-24 22:00:34

From: serexcety
for some reason my script wont find the maple tree, i wonder if i should use object dtm?


As far as I know object DTMs are used for walking. They detect minimap "symbols" like ladders, trees, rocks, … So this won't help for finding the actual tree (It could help for navigating towards the tree though).
I prefer TPA's for object finding, some good tutorials on that:
http://villavu.com/forum/showthread.php?t=33111
http://villavu.com/forum/showthread.php?t=49067

Inception

2012-01-24 22:17:42

I would personally use Auto Color Aid, it works great for finding maples in my script!

Check out this tutorial: http://villavu.com/forum/showthread.php?t=71074&highlight=auto+color

tehq

2012-02-05 16:21:35

From: serexcety
...
[simba]

Remove the extra simba tags ;)

xSorrels

2014-08-26 00:43:44

Sweet! (:

Justin

2014-08-26 00:54:09

From: xsorrels
Sweet! (:


This script is from 2012 and is outdated.

Please don't gravedig!

https://villavu.com/forum/showthread.php?t=6964&p=67456#bump

Bumping and Grave Digging:
Bumping is unnecessary and unneeded. People will reply in time, so please be patient. Grave Digging is when you reply to a topic that has been inactive for over 3 months and the conversation is obviously dead.