Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. // /loadmod mods/cheats.mod.gml
  2.  
  3. #define init
  4. global.infhp = 0;
  5. global.showinst = 0;
  6.  
  7. #define chat_command
  8. switch(argument0)
  9. {
  10. case "area":
  11. {
  12. if(string_count("-", argument1) == 1)
  13. {
  14. var area = real(string_delete(argument1, string_pos("-", argument1), string_length(argument1)));
  15. var subarea = real(string_delete(argument1, 1, string_pos("-", argument1)));
  16. //trace(string(area) + "-" + string(subarea));
  17. GameCont.area = area;
  18. GameCont.subarea = subarea;
  19. with(Player)
  20. {
  21. if(index == 0)
  22. instance_create(x, y, Portal);
  23. }
  24. }
  25. else
  26. {
  27. trace("Usage: area [area]-[subarea]");
  28. }
  29.  
  30. return true;
  31. }
  32. case "loop":
  33. {
  34. GameCont.loops = argument1;
  35.  
  36. return true;
  37. }
  38. case "infhp":
  39. {
  40. if(global.infhp)
  41. {
  42. global.infhp = 0;
  43. }
  44. else
  45. {
  46. global.infhp = 1;
  47. }
  48.  
  49. return true;
  50. }
  51. case "alone":
  52. {
  53. with(enemy)
  54. {
  55. my_health = 0;
  56. }
  57.  
  58. return true;
  59. }
  60. case "stun":
  61. {
  62. with(enemy)
  63. {
  64. for(var i = 0; i <= 15; i += 1)
  65. {
  66. if(("alarm" + string(i)) in self
  67. && variable_instance_get(self, "alarm" + string(i)) > 1)
  68. {
  69. variable_instance_set(self, "alarm" + string(i), -1);
  70. }
  71. }
  72. }
  73.  
  74. return true;
  75. }
  76. case "showinst":
  77. {
  78. if(global.showinst)
  79. {
  80. global.showinst = 0;
  81. }
  82. else
  83. {
  84. global.showinst = 1;
  85. }
  86.  
  87. return true;
  88. }
  89. }
  90.  
  91. #define step
  92. if(global.infhp)
  93. {
  94. with(Player)
  95. {
  96. my_health = maxhealth;
  97. }
  98. }
  99.  
  100. #define draw
  101. if(global.showinst)
  102. {
  103. with(Player)
  104. {
  105. var t = "";
  106. with(GameObject)
  107. {
  108. if(mouse_x[other.index] >= x
  109. && mouse_x[other.index] < x+sprite_width
  110. && mouse_y[other.index] >= y
  111. && mouse_y[other.index] < y+sprite_height)
  112. {
  113. t += "#"+object_get_name(object_index);
  114. }
  115. }
  116. draw_text(mouse_x[index], mouse_y[index], t);
  117. }
  118. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement