Jump to content
steff20

Need help with scripint .

Recommended Posts

Hello !

 

Can someone help me with that little scar script ?

 

I know a little bit about scripting but need still help.

 

How i can make this little script what Fishes rocktails until inventory is full and then banks ? and goes back to fish ..

 

 

 

0023.png

Link to comment
Share on other sites

There is many ways you could go about this. A simple way would be to use DTM's, or color finding. You could run into problems with the banking though. The OSI include, and SPS system provide things that could help you out. They are detailed on the forums, if not then install the include by File->Includes Manager in Scar. Then go to tools or view or something and there is Explore->Includes folder open it look at the includes files.

 

Scar has a dtm editor under tools, how it works is you take a screen shot of Runescape for example. Then pick points, like for instance on a lobster in Runescape you would pick the corners. Then there is a print code button, finally the DTM is in Scar's debug box.

 

DTM's, color finding, and mouse clicking functions for Scar look on the Wiki at http://www.wiki.scar-divi.com

 

Also there is a tutorial section and search button on the forums that could help you out.

Edited by LordJashin
Link to comment
Share on other sites

The best thing to do when doing anything like this is break it down into steps you can handle rather than try to tackle it all at once.

 

Write down the list of actions you have to do (watch yourself do it manually and write them down) and pick one: say find fish spot. Work on that until you get it working, then move on to the next.

Link to comment
Share on other sites

You can get the bounds of each inventory slot... then check each inventory slot for the outline color which is black. When you have all your inventory bounds setup 0 - 27 you can relay a check... or a for loop... to 27 if it finds an outline at 27 then your inv is full. You can also do this to find new items in your inventory ( each slot ) Though I do not recommend this method.

 

Second. Dont go with Lord Josh's advice this is a pretty easy way to make a fail bot for not only now but future use. Though DTMs are very useful. Many problems can occur with them just as easy as "Yay my bot works today... shit it doesnt work anymore and I cant figure it out " Using dtms or even ddtms are not the best choice, definatly.

Edited by rsutton
Link to comment
Share on other sites

LordJosh presiding...

 

Never said he "should" use DTM's. For the noobs sake start simple.

Provided links so he can learn, odds are he's a noob in this area. You're going to scare him away talking about complex ways.

 

Don't bash Dtm's, some scripts can be made and work really good with them. Like rotating dtms you could probably make a darn good willow chop and banker over at that one town.

 

One last thing I forgot to add, use fail safes, and make your script randomized if you walk the same path and click same places you risk getting banned.

Edited by LordJashin
Link to comment
Share on other sites

Either way im not going to argue which is better. there is many ways to skin a cat and some think some ways are better than others. I give me advice. DTMs are mainly good for minimap markers these days is what much are used for. The way to do a working inventory dtm is using ddtms which is more advanced than for most.

Simple to some but harder for others.

 

Failsafes are about 75% of a script

the other 25% is just getting it to work with those failsafes.

 

Be aware that even though failsafes are exactly what they say and are very important that too much can actually end up ruining a script and cause much headache.

Link to comment
Share on other sites

Or if that fishing script is hard to make .. Maybe someone can help me with " Magic tree cutter " ? That should be very easy .

 

0027.png

 

Wanna cut these " magic trees " ( marked with red ) The script should do only " CLICKING on tree " no need to bank. Because you dont get logs. So.. I need script what just clicks on these trees when they spawn. When 1 tree is choped down then script should click on other tree " Any1 help please ?

Link to comment
Share on other sites

Heres an example i put together really quick dont have that private server so you will have to test and maybe change some points or colors. Im sure they dont have a bot detection system so you could prob just use click mouse to move faster and get fish faster.

[scar]

program New;

 

Function InventroyFull: Boolean; // reutrns ture when inventory is full

Var

X,Y: Integer;

Begin

Result := FindColor(X,Y, 1253415, 679, 411, 720, 451);// finds the color of the fish in the last inventory slot

end;

 

Function Bank: Boolean; // find bank and open

var

X,Y: integer;

begin

Result := FindColor(X,Y, 6250601, 0, 0, 129, 163); // find the gray color on bank booth

If Result then // if we find the color move to the point and click

Begin

MoveWindMouseEx(X, Y, 0, 0, 15); // moving mouse

ClickMouse(X, Y, True); // clicking mouse

end;

 

// banking procedure here..

 

end;

 

begin

// fishing routine here

if InventroyFull then

Bank;

end.

[/scar]

Link to comment
Share on other sites

Heres an example i put together really quick dont have that private server so you will have to test and maybe change some points or colors. Im sure they dont have a bot detection system so you could prob just use click mouse to move faster and get fish faster.

[scar]

program New;

 

Function InventroyFull: Boolean; // reutrns ture when inventory is full

Var

X,Y: Integer;

Begin

Result := FindColor(X,Y, 1253415, 679, 411, 720, 451);// finds the color of the fish in the last inventory slot

end;

 

Function Bank: Boolean; // find bank and open

var

X,Y: integer;

begin

Result := FindColor(X,Y, 6250601, 0, 0, 129, 163); // find the gray color on bank booth

If Result then // if we find the color move to the point and click

Begin

MoveWindMouseEx(X, Y, 0, 0, 15); // moving mouse

ClickMouse(X, Y, True); // clicking mouse

end;

 

// banking procedure here..

 

end;

 

begin

// fishing routine here

if InventroyFull then

Bank;

end.

[/scar]

I changed colors what is marked with BOLD . But if i try to start script it just tells " successfully compiled & successfully executed " but dont do nothing on private server. ( marked client too )

 

Do you have msn or something where we can chat ?

Link to comment
Share on other sites

I changed colors what is marked with BOLD . But if i try to start script it just tells " successfully compiled & successfully executed " but dont do nothing on private server. ( marked client too )

 

Do you have msn or something where we can chat ?

 

Well you need to provide a loop this is just an example you need to add some more code for it to be completely working. My msn is grayscreek@live.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...