Code by UjEdwin


To make bots in the first steps can be hard, and dont know where to start, but this code can make it more easier.

This is some much used functions of a mob, you have to explore the other by own.

Functions:

The main of bot
abot.main

Get length of tables:
abot.get_length(var)

get the distance between the object and a position:
abot.get_distance(self,pos)

abot.set_look(self,goto)
abot.set_anim(self,string)

after it is looking at someting, use this to walk to it:
abot.set_walk(self)



creating a bot:
abot.registry_bot({
	name="test",
	type="npc",
	hp=20,
	collisionbox = {-0.35,-1.0,-0.35,0.35,0.8,0.35},
	visual_size ={x=1,y=1},
	mesh = "character.b3d",
	textures = {"character.png"},
	anim={
		walk={a=168,b=187,speed=30},
		stand={a=0,b=79,speed=30},
		attack={a=189, b=198, speed=30}
	},
	speed=3,
	damage=4,
	team="test",
	type="npc",
	range=15,
})