Log in

View Full Version : Good understanding to making BASIC scripts



Webber
07-12-2008, 00:57
First you need to have a very basic understanding of how this works

To give you someunderstanding we will use this script! (note that i just put random numbers for cordinates and the ifTrue line is not accurate)
move 34442,54535,7
move 34442,54535,5
move 34442,54535,6
move 34442,54535,2
move 34442,54535,7
ifTrue $mycap$#=<#30 $nlineoflabel:cap$
gotoScriptLine 0
:cap
#your cap is under 30!
gotoscriptline 0

having a quick look at scripts we can understand that its executed with the behaviour of a falling rock, unless its told to do other wise.

For example

It will tell your character to move to move 34442,54535,7 repeativly until you finally get there, then procide to the next line (thats obvious)
it will do this until its executed ALL of those lines, now it hits this line

ifTrue $mycap$#=<#30 $nlineoflabel:cap$

This asks the bot, is my capacity under or eqaul to 30?

Yes it is:

It will goto the label "cap" labels are defined with ":" infront of the word in this case the label looks like this :cap
after wich it will goto the label, and execute the line after in our case its a comment line!

whats a comment line? a comment is just for users of the script to understand whats happening, or telling what loot it will loot, the bot doesnt even do anything with this line its just in a way for your eyes only.
then it will goto the next line wich is gotoScriptLine 0 wich will start this action all over again

No its not

The bot will see its not true, go right threw this line and hit

gotoScriptLine 0 wich will send it to line 0 of the cavebot thus starting over again

Questions you want answered and/or added to this tutorial, ask them here!

raoul
07-12-2008, 15:45
nice but still a small tutorial:(

nuboterich
07-16-2008, 15:16
i have some nub questions,
to go up in a ramps i have to add something? the wpt in the ramp? and to use rope?

lolzan1
07-16-2008, 15:28
with the ramp thing you add 1 script point on the ramp and 1 above it
when it comes to rope you add 1 under it and 1 over it

nuboterich
07-16-2008, 16:07
thanks
<short>

mqrcin
12-04-2008, 23:06
Not working for me.
IfTrue ($mycap$#number<=#1900) $nlineoflabel:depo$ ??
This is correct?
Or maybe
IfTrue ($mycap$#number<=#1900) GoTo $nlineoflabel:depo$ ??

Or maybe 1900 is too much for this bot? ;)

Can someone write me correct version, please?