-
Notifications
You must be signed in to change notification settings - Fork 10
the main
AiTechEye edited this page Sep 5, 2018
·
5 revisions
in this list you can see how the bots is prioriting, but if a function returns something, the run will stop there, to not mix different "events". bot.lua
Function | Comment |
---|---|
main | runs by entity on_step |
check for system freeze | |
check bot (self) delays | cooldown bot if needed |
bot | runs by main |
collect all bots deltatime, (too much usage clears bots to save the server from heavy lags) | |
check bot falling each 0.2s | |
dying | (after bot lost its health (self.hp)), ("dying mode"),or sets a timer until it destroys it self |
damage by blocks | |
self.step | customized step can control the bot |
sleep | |
jumping | |
fight | fighting self.fight and self.temper>0 |
fly | escape |
come | walk to object known as "some" when its near it |
folowing | folow object |
search help | scan for team members, and set member.fight and known as fight |
need_helper | gives stuff to other members |
light | searth to light or place nodes with light source |
node_handler | events near nodes, eg punch mesecon button, or use cart on rails |
timer | remove unnecessary / lazy (self.type=="monster") |
rndgoal | wlak to random position |
msghandler | bot chat |
pickup | picks up drops |
lookaround | rnd walk and look at stuff |
mine | create self.need and self.house then look for them the stuff |
findspace | self.need==nil and search space where the house fits |
build | self.task build |
self.task1 | customized (default is farming) |
self.task2 | (customized) |
self.task3 | (customized) |
self.task4 | (customized) |
self.task5 | (customized) |