Trigger/Script to return coordinates, and other.

Posted by Wimbley on Sat 23 May 2015 07:20 PM — 5 posts, 20,292 views.

#0
I am new to scripting, and practice a little python.

I am trying to make a trigger or script to do as follow:

You are located at 1, 1, 1

when this posts I want it to return "move 1, 1, 1" and the coordinates change all of the time, so I need it to just repeat the numbers.

My 2nd question, is with something like the top I wanted to make a sequence of walking commands but I need it to patrol so something like:

north, plant seed(action timer 3 seconds for this), south, east, plant seed(3 second time to plant), west. .etc.

So I will go to in a cross shaped pattern to plant all around.

Thank you for any help provided!
Australia Forum Administrator #1
My Python skills are pretty rusty. A lot of that would be easier in Lua, especially building in delays, because that is easy with Lua coroutines.
#2
I will take advice in any language. I just need some ideas on how I would go about it and I can either convert it, or maybe I will give lua a go.
#3
Could I do a long trigger to something that would time out the whole sequence? timer on everything because of restrictions to commands sent in a short time.
example:

The sun comes up.
DoAfter(math.random(1)+1, "out")
DoAfter(math.random(1)+1, "n")
DoAfter(math.random(1)+1, "get seed from bag")
DoAfter(math.random(1)+1, "plant seed")
DoAfter(math.random(1)+1, "s")
DoAfter(math.random(1)+1, "s")
repeat, and even reset itself automatically?
Australia Forum Administrator #4
In Lua you can build pauses in as described here:

http://www.gammon.com.au/forum/?id=4956

If you want to stop some loop you can always set a variable, and have the loop check the variable and then exit.