Jump to content
rsutton

How does scar script execute?

Recommended Posts

If you know c++, this should be a breeze for you as it's just alimited subset of the pascal language. Now as for content, I have to work on my studies, this isn't my job, I produce as much content as I can, but I can't do it alone because I don't have the time, so rather than complain about it, it'd be nice if you'd help out instead.

Link to comment
Share on other sites

Hey guys, i have a similar question, seems as to his wasnt answered. Seems like what he was asking was whats the syntax? I was going through some scripts and looking at premade ones, and can see where the procedures were #defined but not where the "loop" to speak of is at. I noticed that at the end there was a begin with nothing after it and then at the very end of that was a end with a period instead of a ; which seems sloppy like he said but its a new lang. but seems to be based much like many others. just need the syntax and id be glad to help the community with scripts.

 

**Edit

With some digging on the pascal lang, on google i found the appropriate information. =) The procedures are defined and then at the end they are called within the loop =)

 

Program program_name;

 

{ Global variables }

Var

A_Variable: Variable_Type;

 

{ Other functions/procedures }

 

Procedure SayHello;

 

{ Local variables }

Var

T : String;

 

Begin

{ Redundant code to illustrate the use of local variables in a procedure }

T := 'Hello';

Writeln(T);

End;

 

{ Main function }

 

Begin

{ Do something }

SayHello;

End.

(http://en.wikibooks.org/wiki/Pascal_Programming/Syntax_and_functions, 2011)

Edited by shadowrecon
Link to comment
Share on other sites

it is at the end of the scripts. the very end. there is a Begin and End. notice the end has a period to it. this means that it will stop the script when it reaches that, usually you will see an "until" statement before this so it just loops it. In the sequence of Begin and end.... in this you will notice also the repeat, and where it calls the functions and procedures.

Link to comment
Share on other sites

Thanks for the reply guys, i edited the post to show what you said there rsutton, i just couldnt understand why the end statement calls were different for procedure and and "loop" as to speak. but its all good now, but im still having some transition problems from c++ to pascal... they are pretty similar, but when i go to use something as i would in c++ and it doesnt work its a bit confusing, i understand there are different library's and ive looked through the osi and rs2 folders checking functions but even then it doesnt work the same 0_o i think im gonna rewrite some of the library's to simply just change the the way they are called to make it a bit easier of a transition. wish i could change the way things are defined and set i hate the := assignment operator. id much rather = for assignment and == comparator .. lol anywho.... its a really nice program with alot of function, i just got to learn to retie my shoes i guess... lol

Link to comment
Share on other sites

Honestly, I came from c++ as well and im pretty well into it. Pascal and scar is VERY easy compared. I think within a few days I was able to write just about any script I wanted for myself. Shadow I wish you would add me to msn messanger. SoulByteGames@live.com I would like to speak to you.

 

YES, I agree. the assignment operators really made me mess up quiet a bit when I was switching lol.

Link to comment
Share on other sites

Ill gladly send you a request. =) I wrote a pretty simple wc bot last night and based all of its action on colors with not one specified x and y input. it worked pretty good, but needs a lot more routines, I basicly just made it to try different types of color finding routines and like test some of the other routines. Do you happen to know how to use the chat Lib? i tried the GetChatTextEx(7, 0) With 7 being the second to bottom line in chat box and 0 being the color black. but it just returns craziness like this

..--...i...-...... so i assumed maybe its not using ANSI? I dunno was really at a loss.

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...