Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // /loadmod mods/cheats.mod.gml
- #define init
- global.infhp = 0;
- global.showinst = 0;
- #define chat_command
- switch(argument0)
- {
- case "area":
- {
- if(string_count("-", argument1) == 1)
- {
- var area = real(string_delete(argument1, string_pos("-", argument1), string_length(argument1)));
- var subarea = real(string_delete(argument1, 1, string_pos("-", argument1)));
- //trace(string(area) + "-" + string(subarea));
- GameCont.area = area;
- GameCont.subarea = subarea;
- with(Player)
- {
- if(index == 0)
- instance_create(x, y, Portal);
- }
- }
- else
- {
- trace("Usage: area [area]-[subarea]");
- }
- return true;
- }
- case "loop":
- {
- GameCont.loops = argument1;
- return true;
- }
- case "infhp":
- {
- if(global.infhp)
- {
- global.infhp = 0;
- }
- else
- {
- global.infhp = 1;
- }
- return true;
- }
- case "alone":
- {
- with(enemy)
- {
- my_health = 0;
- }
- return true;
- }
- case "stun":
- {
- with(enemy)
- {
- for(var i = 0; i <= 15; i += 1)
- {
- if(("alarm" + string(i)) in self
- && variable_instance_get(self, "alarm" + string(i)) > 1)
- {
- variable_instance_set(self, "alarm" + string(i), -1);
- }
- }
- }
- return true;
- }
- case "showinst":
- {
- if(global.showinst)
- {
- global.showinst = 0;
- }
- else
- {
- global.showinst = 1;
- }
- return true;
- }
- }
- #define step
- if(global.infhp)
- {
- with(Player)
- {
- my_health = maxhealth;
- }
- }
- #define draw
- if(global.showinst)
- {
- with(Player)
- {
- var t = "";
- with(GameObject)
- {
- if(mouse_x[other.index] >= x
- && mouse_x[other.index] < x+sprite_width
- && mouse_y[other.index] >= y
- && mouse_y[other.index] < y+sprite_height)
- {
- t += "#"+object_get_name(object_index);
- }
- }
- draw_text(mouse_x[index], mouse_y[index], t);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement