Compare commits
4 Commits
e85d02cee2
...
7828d754f5
Author | SHA1 | Date | |
---|---|---|---|
7828d754f5 | |||
58e78c6c44 | |||
e0d86ee529 | |||
228b3e3e54 |
@ -111,6 +111,10 @@ function attack_entities(target_kind, minimum)
|
||||
end
|
||||
|
||||
function check_food(hunger)
|
||||
if not hunger then
|
||||
hunger = client.hunger
|
||||
end
|
||||
|
||||
if hunger.food >= 20 then
|
||||
return
|
||||
end
|
||||
|
@ -61,9 +61,11 @@ function update_listeners()
|
||||
message = function()
|
||||
info("bot successfully logged in!")
|
||||
end,
|
||||
},
|
||||
spawn = {
|
||||
eat = function()
|
||||
sleep(5000)
|
||||
check_food(client.hunger)
|
||||
check_food()
|
||||
end,
|
||||
},
|
||||
death = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user