assets/colorIndex.png countdown = 0 update = function() if (countdown == 0) then countdown = math.random(100, 500) velx = math.random(-5, 5) * 0.001 vely = math.random(-5, 5) * 0.001 end countdown = countdown - 1 end assets/NPC_Sheet.png assets/NPC_Sheet.png assets/NPC_Sheet.png assets/NPC_Sheet.png assets/NPC_Sheet.png assets/NPC_Sheet.png assets/NPC_Sheet.png assets/NPC_Sheet.png assets/NPC_Sheet.png assets/NPC_Sheet.png assets/NPC_Sheet.png assets/NPC_Sheet.png countdown = 0 update = function() if (countdown == 0) then countdown = math.random(4000, 6000) velx = math.random(-1, 1) * 0.004 end countdown = countdown - 1 end assets/skirl.png countdown = 0 update = function() if (countdown == 0) then countdown = math.random(3000, 5000) velx = math.random(-1, 1) * 0.005 end countdown = countdown - 1 end hostile = function() end assets/robin.png countdown = 0 onetime = 0 update = function() if (onetime == 0) then onetime = 1 selfy = playery + 300 end if (math.abs(selfx - playerx) <= 150) then aggro = 1 end if (countdown == 0) then countdown = math.random(3000, 5000) if (velx >= 0) then velx = -0.01 else velx = 0.01 end end if (vely <= -0.05) then vely = 0.05 end countdown = countdown - 1 end dipping = 0 oldy = 0 hostile = function() if (dipping == 1) then if (selfy >= oldy) then dipping = 0 aggro = 0 vely = 0 onetime = 0 else vely = vely + 0.0006 if (math.abs(vely) < 0.01) then attack(selfx, selfy) end end else if (selfy - playery > 200) then if (playerx >= selfx) then velx = 0.01 else velx = -0.01 end dipping = 1 oldy = selfy vely = -.2 end end end assets/style/classic/house1.png assets/chest.png