SRL Archive - OSR Help

Prioritizing?


jatex

2012-01-21 01:10:53

How would I go about prioritizing certain things in my script?

Example:
I want to mine Mithril and Coal, but if there's Mithril I want the script to mine Mithril first.

Didn't see any tutorials on it. >.<

Brandon

2012-01-21 01:28:59

The easiest way I see is to put the colours in an array and loop from the beginning.. else you can write another complex way of doing it.. I personally prioritize using cases with arrays.


RockColors:= [MithrilColour, IronColor, TinColor.....]; //TIntegerArray;
For I:= 0 To High(RockColors) do
if FindColorsSpiralTolerance(..... RockColors[I].......) then
//Mine rock..

jatex

2012-01-21 21:48:39

From: ggzz
The easiest way I see is to put the colours in an array and loop from the beginning.. else you can write another complex way of doing it.. I personally prioritize using cases with arrays.


RockColors:= [MithrilColour, IronColor, TinColor.....]; //TIntegerArray;
For I:= 0 To High(RockColors) do
if FindColorsSpiralTolerance(..... RockColors[I].......) then
//Mine rock..


Alright thanks, one last question.

How would I go about keeping my character in a specific area?

cause

2012-01-24 19:13:37

Try objDTMs.