SRL Archive - FAQ

Help with making a script


Alek000

2010-08-30 07:24:50

Well, I don't know if this goes here or not since I can't find the old Scripting Help section… I am thinking about making a High Alcher for Simba, but I really don't know how to even start with one. I know there is no walking involved, just need to know how to get stuff out of the bank, alch it, etc… Can anyone give me some advice or tips on how to get started? Thanks in advance.

EvilChicken!

2010-08-30 09:26:46

If I were you, I'd start off by trying to make it as simple as possible; make a solid core before you start adding additional features.

Here's how I'd do it, in order:
  1. Make the base: log in, cast the spell, click again.
  2. Add all sorts of failsafes for all possible outcomes and events that can occur.
  3. Add basic extra features, like progress reports and such.
  4. THEN start with the complex addons, like banking and such.

Alek000

2010-08-30 09:44:04

Ok sounds like a plan. How exactly would I go about casting spells exactly? I have never figured out how to do that.

Frement

2010-08-30 09:46:14

Theres a Cast() function in Magic.scar.

Shuttleu

2010-08-30 09:57:15

you can use the Cast function in Magic.scar
you can use bitmaps or DTM's to find the item in the inventory or bank
you can use OpenBankFast to open the bank

i would use DTM's as they can be easily changed and you can use just the outline of the item if you wanted to

~shut

HyperSecret

2010-08-30 10:14:50

You could also just 'Note' the item that is going to be alched and put it in slot 15(for f2p) or slot 16 (for p2p) and have it just click the alch icon and then it would be right on top of the note.

I have an alcher that is very simple and very short. Checks the magic skill exp every random(500) alchs. Has gotten me from 55 to currently 84 magic. I don't use the cast function because I just don't. I have it click a random area within the alch icon and as long as the mouse is on the item to be alched it clicks it.

Alek000

2010-08-30 10:24:21

I was just thinking about the "Note" option. I'll have to see what I can do when I get home. Thanks everyone for helping out, now if only my brain can function right while working on it lol

Heavenguard

2010-08-30 13:36:20

From: Alek000
I was just thinking about the "Note" option. I'll have to see what I can do when I get home. Thanks everyone for helping out, now if only my brain can function right while working on it lol


<3 you should have no problem my bro. Just take your time :) add anyone on this site to MSN for help if you ever need it. As long as you fully read tutorials and have an idea on the concepts that were taught, I promise it won't be as hard as you think :)

Alek000

2010-08-30 15:04:43

From: Heavenguard
<3 you should have no problem my bro. Just take your time :) add anyone on this site to MSN for help if you ever need it. As long as you fully read tutorials and have an idea on the concepts that were taught, I promise it won't be as hard as you think :)


You have no clue on how my brain works lol… Even after reading tutorials, going over peoples scripts, my brain still explodes when I try to make my own lmao

Heavenguard

2010-08-30 19:25:56

From: Alek000
You have no clue on how my brain works lol… Even after reading tutorials, going over peoples scripts, my brain still explodes when I try to make my own lmao


xD I know -exactly- how you feel. Its overwhelming sometimes, but if you have enough interest in it, you'll get it.

Alek000

2010-08-31 06:40:22

I know what my problem is with it, I don't know when to use a procedure or a function. I'm not sure what to do when to make it work basically.

Craig`

2010-08-31 07:21:38

From: Alek000
I know what my problem is with it, I don't know when to use a procedure or a function. I'm not sure what to do when to make it work basically.


If you have previous programming experience think of a procedure as a void function, that is it returns nothing (void) something.

Usually you'd use a procedure to name a block of code to keep it clean, or remove repetitiveness, for example you may have..


procedure MyInfo;
begin
WriteLn('Name: Craig');
WriteLn('Age: 16');
end;

etc etc, it doesn't return a value it just writes my details to the debug, i use a procedure because it allows my main code to be clean with a simple MyInfo; call rather than just having the two WriteLns there.

On the other hand functions return a value and this is very useful, for example I might want to have a function to check if i'm old enough to drink in the UK, ie.


function AbleToDriveAt(age: Integer): Boolean;
begin
Result := (age >= 17);
end;

this again makes my main code more beautiful because it's easier to read at first glance:


if AbleToDriveAt(17) then
WriteLn('woohoo you can drive!');

hope i haven't explained that badly

Alek000

2010-08-31 07:29:04

No that explained to me very well actually, thank you for explaining it. And I have no previous programming experience at all except a couple of times trying to learn Java which I failed at misserably lol

Craig`

2010-08-31 07:40:33

well to tell the truth you learn by experience, i came to this community a couple of years ago and leeched, then i was interested in making my own scripts; i've been saying ever since then that i'd like to start but i'm just not interested in runescape any more (well making bots for it that is), i've dabbled around with pascal and i didn't get it whatsoever when i started the idea of programming was so weird, i then heard `cool' stuff about c++ so i bought some books and attempted to learn that, i didn't get very far but from the book i got i learn the basics of c language constructs, ie. the if/while/do while/for loops and that started to give me a somewhat decent foundation, after that i didn't really program much but then i started doing web development, mainly, i think, because html and css are so easy (fair enough they aren't programming languages) and i just wanted to be able to make *something*.

A while after doing some web development i found ruby and i loved it (:3), fair enough some may say that it's easy to learn but i loved the language and i was half decent using it (as with python after this.)

tl;dr you aren't going to understand programming instantly, just keep trying, get your mind set on a goal and then research what you need in order to make what you want, (don't get your head set up too high as i have in the past you just get annoyed :))

the good thing is that well thought out tasks can be broken into sub tasks and they make it a lot easier.

again hope i haven't woffled on about nothing, Craig`.

Alek000

2010-08-31 07:43:17

Yeah it's just a pain sometime because I have a hard time understanding stuff mostly. But I don't think I'm going to make an alcher for Simba, I'm going to try to make a superheat script…. I hope lol

Edit: Anyone have any tips for making a superheat item script?
I'm always on msn, [email]trey_sturgeon@hotmail.com[/email], I would add you all but I don't want people to think I'm just trying to annoy them.