PDA

View Full Version : Assistance required



BTpat
03-27-2016, 08:10 PM
Hello guys

Started to play around with scripting.
I've seen that this forum is preety much, "I'm a progger ure a noob" principle, which is totaly understandable since many ppl just want a scrips or 2 and theyre gona.
No negative points for that of course.;)
I'm looking for a "list" or a library with the basic commands for xenobot. And maybe a small How to "prog" in lua.
For ex.
----------------------
<Header, load thing 1,2,3>
<how to initiate a function>
<what the function does>
end.
----------------------
How a basic programm would look like, the main things you:eek: need in the start so that xenobot can read it.

And of course as metioned all the logical functions xenobot can take
ex.
------------------------------
Play.goto(x,y,z)
Open.door(direction)
use.item.from.bp(bp.nr.x,direction/location)
If(blablabla)than else (Those maybe just in case lua is difrent from usual c++ commands)
...
...
In case something like that exists than I'm sorry, just show me where and ill be happy :).


Ps. In case you don't know any of the above, maybe you know how to code the usage of a shovel on a quadrant next to you? :p

Much appreciated

Sheradial
03-27-2016, 10:11 PM
Hello guys

Started to play around with scripting.
I've seen that this forum is preety much, "I'm a progger ure a noob" principle, which is totaly understandable since many ppl just want a scrips or 2 and theyre gona.
No negative points for that of course.;)
I'm looking for a "list" or a library with the basic commands for xenobot. And maybe a small How to "prog" in lua.
For ex.
----------------------
<Header, load thing 1,2,3>
<how to initiate a function>
<what the function does>
end.
----------------------
How a basic programm would look like, the main things you:eek: need in the start so that xenobot can read it.

And of course as metioned all the logical functions xenobot can take
ex.
------------------------------
Play.goto(x,y,z)
Open.door(direction)
use.item.from.bp(bp.nr.x,direction/location)
If(blablabla)than else (Those maybe just in case lua is difrent from usual c++ commands)
...
...
In case something like that exists than I'm sorry, just show me where and ill be happy :).


Ps. In case you don't know any of the above, maybe you know how to code the usage of a shovel on a quadrant next to you? :p

Much appreciated

Everything is here buddy: http://xenobot.wikia.com/wiki/Documentation


If you need help post a thread in the Help section and people will help you! ;D

BTpat
03-28-2016, 09:39 AM
Ahhhhh, ok thanks a lot.

Ps. only maybe the second part of my question since i cant find anything to do it.

How would you script your character to use shovel on a tile next to you?
I found usepick but there aint no command with shovel :(

Merre
03-28-2016, 12:43 PM
There's a Hole-node in the Walker which will use a shovel for you, decide which shovel to use by right clicking on the walker and select Options

If you want the basic commands for opening doors/levers etc find the location of where you installed Xenobot and head to
C:\Program Files\Xenobot\Data\xb.****.**.**.****.lua (the latest one ofc). This is the xenobot library and most of the functions are explained well :)

BTpat
03-28-2016, 02:34 PM
There's a Hole-node in the Walker which will use a shovel for you, decide which shovel to use by right clicking on the walker and select Options

If you want the basic commands for opening doors/levers etc find the location of where you installed Xenobot and head to
C:\Program Files\Xenobot\Data\xb.****.**.**.****.lua (the latest one ofc). This is the xenobot library and most of the functions are explained well :)

Wouldn't have worked I needed to use a shovel on sand, but thanks to the file you showed me i found what i needed.
-----------------------
function Container:UseItemWithGround(spot, x, y, z)
self = type(self) == 'table' and self or Container.New(self)
return containerUseItemWithGround(self._index, spot, x, y, z)
end
-----------------------
Thanks to you both :)

BTpat
03-28-2016, 04:32 PM
ps. how did you get the lifetime sub? :P

Jontor
03-28-2016, 09:51 PM
ps. how did you get the lifetime sub? :P

Afaik you can only buy it from other users atm