Advertisement
Guest User

Untitled

a guest
May 9th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. -- Hagane Helper Script
  2. -- Author: Omnigamer
  3. -- 6/18/16
  4.  
  5. function draw_cross(x_pos,y_pos, color)
  6. gui.crosshair(x_pos,y_pos,color);
  7. end
  8.  
  9. function on_paint()
  10.  
  11. RNG = memory.readword(0x7E00AA);
  12. gui.text(20,60,string.format("RNG: %4X",RNG))
  13. --Coordinates
  14. cam_x = memory.readword(0x7E07A8);
  15. cam_y = memory.readword(0x7E07AE);
  16.  
  17. pos_x =memory.readword(0x7E0910);
  18. pos_y =memory.readword(0x7E0912);
  19.  
  20. draw_cross(pos_x, pos_y, "white");
  21.  
  22. x_off = memory.readsword(0x7E092C);
  23. y_off = memory.readsword(0x7E092e);
  24.  
  25. x_box = memory.readbyte(0x7E0930);
  26. y_box = memory.readbyte(0x7E0931);
  27.  
  28. gui.rectangle(pos_x + x_off,pos_y+y_off,x_box,y_box,"white")
  29.  
  30. gui.text(20, 75, string.format("X: %d",pos_x+cam_x));
  31. gui.text(20, 90, string.format("Y: %d",pos_y+cam_y));
  32.  
  33. for i = 0,0x20,1 do
  34. --gui.drawBox(x_coord + hitbox_x1,y_coord+hitbox_y1,x_coord+hitbox_x2, y_coord+ hitbox_y2,"white")
  35. ID = memory.readword(0x7E1000+i*0x80);
  36.  
  37. if(ID~=0x00)then
  38.  
  39. off_x = memory.readword(0x7E1000+ i*0x80+0x1a);
  40. pos_x = memory.readword(0x7E1000+ i*0x80+0x10);
  41. x_box = memory.readbyte(0x7E1000+ i*0x80+0x1e);
  42.  
  43. off_y = memory.readword(0x7E1000+ i*0x80+0x1c);
  44. pos_y = memory.readword(0x7E1000+ i*0x80+0x12);
  45. y_box = memory.readbyte(0x7E1000+ i*0x80+0x1f);
  46.  
  47. --x1 = memory.readword(i)-0x4000;
  48.  
  49. x1 = off_x + pos_x;
  50. x2 = x1+x_box;
  51. y1 = off_y+pos_y;
  52. y2 = y1+y_box;
  53.  
  54. draw_cross(x1, y1, "red");
  55. draw_cross(x2, y2, "green");
  56.  
  57. --gui.drawText(x2-10,y2-50,string.format("X1: %X", x1));
  58. --gui.drawText(x2-10,y2-40,string.format("Y1: %X", y1));
  59. --gui.drawText(x2-10,y2-30,string.format("X2: %X", x2));
  60. --gui.drawText(x2-10,y2-20,string.format("Y2: %X", y2));
  61.  
  62. --gui.drawText(pos_x,210,string.format("%d", i));
  63. gui.rectangle(x1,y1,x2-x1, y2-y1,"red");
  64. end
  65. end
  66. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement