Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Birdylami Console Commands:
- Alarm Event for alarm 2:
- execute code:
- ///Command Example
- //if i = <number of arguments needed>
- //{ if string(array[0]) == "/commandname"
- //{ do stuff
- //}
- //}
- execute code:
- ///DEBUG COMMANDS "./debug" & "./debug show <data>"
- draw_set_font(font2)
- if i = 0
- if string(array[0]) == "/debug"
- if !instance_exists(displaydebug)
- {
- alarm[4] = 180
- instance_create(1,1,displaydebug)
- can_show_text = 1
- show_text = "Debug Enabled! Press Q to disable debug"
- }
- if i = 0
- if string(array[0]) == "/debug"
- {
- if instance_exists(displaydebug)
- {
- can_show_text = 1
- {
- show_text = "Debug is already Enabled!#Press Q to disable debug"
- alarm[4] = 180
- }
- }
- }
- if i = 1
- if string(array[0]) == "/debug"
- { switch(array[1])
- {
- case "gameFPS": global.show_debug = 0; break;
- case "mainStats": global.show_debug = 1; break;
- case "loadedObjects": global.show_debug = 2; break;
- case "systemInfo": global.show_debug = 3; break;
- case "enableTime": global.show_time = 1; break;
- case "disableTime": global.show_time = 0; break;
- default:
- {
- show_text = "No such argument exists: "+array[1]
- can_show_text = 1
- alarm[4] = 180
- }
- }
- }
- if i = 1
- if string(array[0]) == "/debug"
- {
- show_text = "Not Enough Arguments"
- can_show_text = 1
- alarm[4] = 180
- }
- objnme1 = array[2]
- objvar1 = array[3]
- // ./debug showObjectValue <object> <variable>
- if i = 3
- if string(array[0]) == "/debug"
- if string(array[1]) == "showObjectVar"
- if object_exists(asset_get_index(array[2]))
- {
- if instance_exists(array[2])
- with (array[2])
- {
- var myvar = other.objvar1
- if !is_undefined(other.objvar1)
- {
- global.customDebug = real(other.objvar1)
- global.customDebugObject = other.objnme1
- global.customDebugVar = other.objvar1
- }
- }
- }
- draw_set_font(font0)
- execute code:
- ///SETVALUE COMMANDS: ex. "./setlives <amount>" & "./setgems <amount>"
- var real1;
- real1 = real(array[1])
- // ./tp <x> <y>
- if i = 2
- if (string(array[0]) == "/teleport"
- || string(array[0]) == "/tp")
- && (string(real(array[1])) == string(array[1]) && (string(real(array[2])) == string(array[2])))
- {
- with (mainchar)
- {
- x = real(other.array[1])
- y = real(other.array[2])
- other.show_text = "You teleported to#the coordinates of ("+string(other.array[1])+","+string(other.array[2])+")"
- other.can_show_text = 1
- other.alarm[4] = 400
- }
- }
- if i < 2
- { if (string(array[0]) == "/teleport"
- || string(array[0]) == "/tp")
- {
- show_text = "Missing arguments, command syntax is#./tp <x-coord> <y-coord>"
- can_show_text = 1
- alarm[4] = 400
- }
- }
- // ./tprel <x> <y>
- if i = 2
- if (string(array[0]) == "/tprel"
- || string(array[0]) == "/tp~")
- && (string(real(array[1])) == string(array[1]) && (string(real(array[2])) == string(array[2])))
- {
- with (mainchar)
- {
- x += real(other.array[1])
- y += real(other.array[2])
- other.show_text = "You teleported to#the coordinates of ("+string(other.array[1])+","+string(other.array[2])+")"
- other.can_show_text = 1
- other.alarm[4] = 400
- }
- }
- if i < 2
- { if (string(array[0]) == "/tprel"
- || string(array[0]) == "/tp~")
- {
- show_text = "Missing arguments, command syntax is#./tprel <x-off> <y-off>"
- can_show_text = 1
- alarm[4] = 400
- }
- }
- // ./roomnav <roomname>
- if i = 1
- if (string(array[0]) == "/roomnav"
- || string(array[0]) == "/rn")
- if room_exists(asset_get_index(array[1]))
- {
- audio_stop_all()
- room_goto(asset_get_index(array[1]))
- }
- if i = 1
- { if (string(array[0]) == "/roomnav"
- || string(array[0]) == "/rn")
- if !room_exists(asset_get_index(array[1]))
- {
- other.show_text = "Room "+array[1]+" does not exist! D:"
- other.can_show_text = 1
- other.alarm[4] = 600
- }
- }
- // ./addexp <amount>
- if i = 1
- { if (string(array[0]) == "/addexp"
- || string(array[0]) == "/exp+")
- {
- global.add_exp = 1
- global.stamina_exp += real(array[1])
- show_text = "You have acquired: "+string(real1)+" exp!"
- can_show_text = 1
- alarm[4] = 400
- }
- }
- // ./set <variable> (integer)
- if i = 2
- { if (string(array[0]) == "/setvalue"
- || string(array[0]) == "/set")
- {
- switch(string(array[1]))
- {
- case "gems":
- {
- global.currency = real(array[2])
- show_text = "You now have "+array[2]+" gems!"
- can_show_text = 1
- alarm[4] = 400
- } break;
- case "lives":
- {
- global.gamelives = real(array[2])
- show_text = "You now have "+array[2]+" lives!"
- can_show_text = 1
- alarm[4] = 400
- } break;
- case "vspeed":
- {
- view_object[0].vspeed = real(array[2])
- show_text = "Your vertical speed has#been set to "+array[2]
- can_show_text = 1
- alarm[4] = 400
- } break;
- case "hspeed":
- {
- view_object[0].hspeed = real(array[2])
- show_text = "Your horizontal speed has#been set to "+array[2]
- can_show_text = 1
- alarm[4] = 400
- } break;
- case "hp":
- {
- global.marsoehp = real(array[2])
- show_text = "Your health has now been set to "+array[2]+"HP"
- can_show_text = 1
- alarm[4] = 400
- } break;
- default:
- {
- other.show_text = "Error: type ./set (variable) (value)#Your argument is invalid >:)#Usable variables: gems,lives,hspeed,vspeed"
- other.can_show_text = 1
- other.alarm[4] = 600
- }
- }
- }
- }
- if i = 1
- if string(array[0]) == "/setlives"
- {
- global.gamelives = real(array[1])
- show_text = "You now have "+array[1]+" lives!"
- can_show_text = 1
- alarm[4] = 180
- }
- // ./setgems (integer)
- if i = 1
- if string(array[0]) == "/setgems"
- {
- global.currency = real(array[1])
- show_text = "You now have "+array[1]+" gems!"
- can_show_text = 1
- alarm[4] = 180
- }
- // ./godmode
- if i = 0
- if string(array[0]) == "/godmode on"
- if global.godmode = 0
- {
- global.godmode = 1
- show_text = "God Mode is now Enabled!"
- can_show_text = 1
- alarm[4] = 180
- }
- if i = 0
- if string(array[0]) == "/godmode off"
- if global.godmode = 1
- {
- global.godmode = 0
- show_text = "God Mode is now Disabled!"
- can_show_text = 1
- alarm[4] = 180
- }
- // ./setmusicpitch <value>
- if i = 1
- if (string(array[0]) == "/setmusicpitch"
- || string(array[0]) == "/smp")
- {
- global.BGPitch = real(array[1])
- audio_sound_pitch(global.BGMusic,global.BGPitch)
- audio_sound_pitch(global.start_music,global.BGPitch)
- audio_sound_pitch(global.world1_theme,global.BGPitch)
- show_text = "Pitch has been set to "+array[1]+"!"
- can_show_text = 1
- alarm[4] = 180
- }
- // ./setmusicvolume <value>
- if i = 1
- if (string(array[0]) == "/setmusicvolume"
- || string(array[0]) == "/smv")
- if (is_real(real1))
- if (real1 <= 1) && (real1 >= 0)
- {
- global.musicvolume = real1
- audio_sound_gain(global.BGMusic,global.musicvolume,0);
- show_text = "Music volume has been set to: "+string(real1*100)+"%"
- can_show_text = 1
- alarm[4] = 180
- }
- // ./setsfxvolume <value>
- if i = 1
- if (string(array[0]) == "/setsfxvolume"
- || string(array[0]) == "/ssv")
- if (is_real(real1))
- if (real1 <= 1) && (real1 >= 0)
- {
- global.soundvolume = real1
- audio_sound_gain(global.SND,global.soundvolume,0);
- show_text = "SFX volume has been set to: "+string(real1*100)+"%"
- can_show_text = 1
- alarm[4] = 180
- }
- // ./timeset <day|(sunrise/sunset)|night>
- if i = 1
- if (string(array[0]) == "/timeset"
- || string(array[0]) == "/ts")
- {
- global.ignore_time_phase = "true"
- switch(string(array[1]))
- {
- case "day":
- {
- global.time_phase = "day";
- show_text = "Time has been set to: "+string(array[1])
- can_show_text = 1
- alarm[4] = 300
- } break;
- case "sunrise":
- {
- global.time_phase = "transition";
- show_text = "Time has been set to: "+string(array[1])
- can_show_text = 1
- alarm[4] = 300
- } break;
- case "sunset":
- {
- global.time_phase = "transition";
- show_text = "Time has been set to: "+string(array[1])
- can_show_text = 1
- alarm[4] = 300
- } break;
- case "night":
- {
- global.time_phase = "night";
- show_text = "Time has been set to: "+string(array[1])
- can_show_text = 1
- alarm[4] = 300
- } break;
- default:
- {
- show_text = ""+string(array[1])+" is not an#existing time#Please type#./timeset <day|(sunrise/sunset)|night>"
- can_show_text = 1
- alarm[4] = 300
- }
- }
- }
- // ./vsync <on/off>
- if i = 1
- if string(array[0]) == "/vsync"
- { switch(array[1])
- {
- case "enable":
- {
- global.toggle_vsync = 1;
- show_text = "Vsync has been Enabled!"
- can_show_text = 1
- alarm[4] = 180
- }
- break;
- case "disable":
- {
- global.toggle_vsync = 0;
- show_text = "Vsync has been Disabled!"
- can_show_text = 1
- alarm[4] = 180
- }
- break;
- default:
- {
- show_text = "You must either type:#./vsync enable#or#./vsync disable"
- can_show_text = 1
- alarm[4] = 180
- }
- }
- }
- execute code:
- /// ./settileshader <color> <alpha>
- if i = 2
- if instance_exists(parent_character)
- if (string(array[0]) == "/settileshader"
- || string(array[0]) == "/sts")
- {
- global.tilecolor1 = real(array[1])
- global.tilecolor1alpha = real(array[2])
- }
- execute code:
- ///Command Example
- // ./mycoords
- var cx, cy;
- if !instance_exists(view_object[0])
- {
- cx = 0;
- cy = 0;
- }
- if instance_exists(view_object[0])
- {
- cx = view_object[0].x
- cy = view_object[0].y
- }
- if i = 0
- if ((string(array[0]) == "/mycoords")
- || (string(array[0]) == "/myxy"))
- if instance_exists(view_object[0])
- {
- alarm[4] = 180
- can_show_text = 1
- show_text = "Your coordinates are:#( "+string(cx)+" , "+string(cy)+" )"
- }
- if i = 0
- if string(array[0]) == "/debug"
- if !instance_exists(displaydebug)
- {
- alarm[4] = 180
- instance_create(1,1,displaydebug)
- can_show_text = 1
- show_text = "Debug Enabled! Press Q to disable debug"
- }
- execute code:
- /// ./setwindowsize <4:3 scale res>
- //(ex. /setwindowsize 500, will set it to 500x75% of 500)
- var rel1, rel2;
- rel1 = real(array[1]);
- rel2 = real(array[2]);
- if i = 1
- if (string(array[0]) == "/setwindowsize"
- || string(array[0]) == "/sws")
- if (is_real(rel1))
- if (rel1 > 199) && (rel1 < 4097)
- {
- window_set_size(rel1,rel1*0.75)
- global.wwindow = rel1
- global.hwindow = rel1*0.75
- show_text = "Window size set to: "+string(global.wwindow)+"x"+string(global.hwindow)
- can_show_text = 1
- alarm[4] = 180
- }
- // ./setviewsize <width> <height>
- if i = 2
- if (string(array[0]) == "/setviewsize"
- || string(array[0]) == "/svs")
- if (is_real(rel1))
- if (is_real(rel2))
- {
- view_wport[0] = rel1
- view_hport[0] = rel2
- surface_resize(application_surface, rel1, rel2);
- show_text = "View size set to: "+string(rel1)+"x"+string(rel2)
- can_show_text = 1
- alarm[4] = 240
- }
- execute code:
- /// ./setshader <color of darkness> <color of light> <alpha>
- if i = 3
- if string(array[0]) == "/setshader"
- if real(array[3]) > 0 && real(array[3]) <= 1
- {
- global.darkColor = real(array[1])
- global.lightColor = real(array[2])
- global.shaderAlpha = real(array[3])
- show_text = "Modifications to the shaders#Have now been set!"
- can_show_text = 1
- alarm[4] = 180
- }
- // ./setshader <help>
- if i = 1
- if string(array[0]) == "/setshader"
- if string(array[1]) == "help"
- {
- show_text = "Syntax for this command is:#./setshader <darkcolor> <lightcolor> <alpha>"
- can_show_text = 1
- alarm[4] = 180
- }
- execute code:
- ///Spawn in an Image by Image URL
- // ./spawn_image <url> <x> <y>
- // ./spawn_image_with_properties <url> <x> <y>
- // ./siwp <url> <x> <y>ar4 = real(array[4])
- ar1 = real(array[1])
- ar2 = real(array[2])
- ar3 = real(array[3])
- ar5 = real(array[5])
- ar6 = real(array[6])
- ar7 = real(array[7])
- ar8 = real(array[8])
- var ob_x, ob_y, isColor;
- ob_x = real(array[2])
- ob_y = real(array[3])
- isColor = is_undefined(array[7])
- // ./spawn_image <url> <x> <y> <name>
- if i = 4
- { if ((is_real(ob_x)) && (is_real(ob_y)) && (is_string(array[4])))
- { if (string(array[0]) == "/spawn_image"
- || string(array[0]) == "/si")
- { with (instance_create(view_object[0].x+ob_x,view_object[0].y+ob_y,obj_customImage))
- { customImage = sprite_add(other.array[1],0,0,0,sprite_get_width(other.array[1])/2,sprite_get_height(other.array[1])/2)
- useProperties = 1
- myName = other.array[4]
- }
- }
- }
- }
- // ./editimage <property> <value(s)>
- if i = 2
- { if (string(array[0]) == "/editimage"
- || string(array[0]) == "/ei")
- { with (obj_customImage)
- { if canEdit = 1
- {
- switch(other.array[1])
- {
- case "xscale": myXscale = other.ar2; break;
- case "yscale": myYscale = other.ar2; break;
- case "rotation": myRot = other.ar2; break;
- case "name": myName = string(other.array[2]); break;
- case "layer": depth = other.ar2; break;
- case "alpha": myAlpha = other.ar2; break;
- case "color": myCol = other.ar2; break;
- default:
- {
- other.show_text = "Invalid Arguments#Your argument is invalid >:)"
- other.can_show_text = 1
- other.alarm[4] = 600
- }
- }
- }
- }
- }
- }
- if i = 0
- { if (string(array[0]) == "/exitimageeditor"
- || string(array[0]) == "/eie")
- { with (obj_customImage)
- { canEdit = 0 }
- show_text = "Exited image editor!"
- can_show_text = 1
- alarm[4] = 600
- }
- }
- if i = 1
- if (string(array[0]) == "/editimage"
- || string(array[0]) == "/ei")
- if instance_exists(obj_customImage)
- { with (obj_customImage)
- {
- if myName == other.array[1]
- { canEdit = 1; }
- if myName != other.array[1]
- {
- other.show_text = ""+string(other.array[1])+" is not an existing image!"
- other.can_show_text = 1
- other.alarm[4] = 300
- }
- }
- }
- if i = 0
- { if (string(array[0]) == "/deleteimage"
- || string(array[0]) == "/di")
- { with (obj_customImage)
- { if canEdit = 1
- {
- other.show_text = ""+string(myName)+" has been deleted!"
- other.can_show_text = 1
- other.alarm[4] = 600
- instance_destroy() }
- }
- }
- }
- // ./spawn_image_with_properties <url> <x> <y> <xscale> <yscale> <rotation> <color> <alpha>
- if i = 8
- { if ((is_real(ob_x)) && (is_real(ob_y)) && (is_real(ar4)) && (is_real(ar5)) && (is_real(ar6)) && (is_real(ar7)) && (is_real(ar8)))
- { if ((string(array[0]) == "/spawn_image_with_properties")
- || (string(array[0]) == "/siwp"))
- { with (instance_create(view_object[0].x+ob_x,view_object[0].y+ob_y,obj_customImage))
- {
- customImage = sprite_add(other.array[1],0,0,0,0,0)
- useProperties = 1
- myXscale = real(other.array[4])
- myYscale = real(other.array[5])
- myRot = real(other.array[6])
- myCol = real(other.array[7])
- myAlpha = 1;
- myAlpha = real(other.array[8])
- other.show_text = "Your inputs: xscale: "+string(myXscale)+"#yscale: "+string(myYscale)+"#rot: "+string(myRot)+"#color: "+string(myCol)+"#alpha: "+string(myAlpha)
- other.can_show_text = 1
- other.alarm[4] = 300
- }
- }
- }
- }
- execute code:
- ///SPAWN COMMANDS "./spawn x y <object>" & "./relspawn x y <object>"
- var xoffset, yoffset;
- xoffset = 0
- yoffset = 0
- //Command Example
- //if i = <number of arguments needed>
- //{ if string(array[0]) == "/commandname"
- //{ do stuff
- //}
- //}
- draw_set_font(font2)
- if i = 3
- { if string(array[0]) == "/spawn"
- { if object_exists(asset_get_index(array[1]))
- { instance_create(ob_x,ob_y,asset_get_index(array[1]))
- show_text = "Spawned "+array[1]
- can_show_text = 1
- alarm[4] = 180
- }
- }
- }
- //
- // "/relspawn"
- //
- if i = 3
- { if string(array[0]) == "/relspawn"
- { if object_exists(asset_get_index(array[1]))
- { instance_create(view_object[0].x+ob_x,view_object[0].y+ob_y,asset_get_index(array[1]))
- show_text = "Spawned "+array[1]
- can_show_text = 1
- alarm[4] = 180
- }
- }
- }
- // ./spawn_clones_in_array <object> <clone amount> <x> <y> <xoffset> <yoffset>
- if i = 6
- { if (string(array[0]) == "/spawn_clones_in_array")
- || (string(array[0]) == "/scia")
- { if object_exists(array[1])
- { if (string(real(array[2])) == string(array[2])) && (string(real(array[3])) == string(array[3])) && (string(real(array[4])) == string(array[4])) && (string(real(array[5])) == string(array[5])) && (string(real(array[6])) == string(array[6]))
- repeat(array[2])
- {
- instance_create((view_object[0].x+real(array[3]))+xoffset,(view_object[0].y+real(array[4]))+yoffset,asset_get_index(array[1]))
- {
- xoffset += real(array[5])
- yoffset += real(array[6])
- }
- show_text = "Spawned "+array[1]
- can_show_text = 1
- alarm[4] = 400
- }
- }
- }
- }
- if i >= 0
- if i != 6
- if (string(array[0]) == "/spawn_clones_in_array")
- || (string(array[0]) == "/scia")
- {
- show_text = "Not enough arguments :(#Type ./spawn_clones_in_array #<obj> <amount> <x> <y> <xoff> <yoff>"
- can_show_text = 1
- alarm[4] = 600
- }
- // ./smp <x> <y> <horizonal/vertical> <amplitude> <increment> <orbital radius> <orbital angle> <orbital speed>
- if i = 8
- if instance_exists(view_object[0])
- if (string(array[0]) == "/spawn_moving_wave_platform"
- || string(array[0]) == "/smwp")
- {
- with(instance_create(view_object[0].x+real(array[1]),view_object[0].y+real(array[2]),platform_verticalmove))
- {
- other.show_text = "Spawned moving platform"
- other.can_show_text = 1;
- other.alarm[4] = 180;
- switch(string(other.array[3]))
- {
- case("horizontal"): move_wave_horizontal(real(other.array[4]),real(other.array[5])); break;
- case("vertical"): move_wave_vertical(real(other.array[4]),real(other.array[5])); break;
- case("both"):
- move_wave_horizontal(real(other.array[4]),real(other.array[5]));
- move_wave_vertical(real(other.array[4]),real(other.array[5])); break;
- default:
- other.show_text = "Wrong input for the 3rd argument:#"+string(other.array[3]) + "#Must be horizontal vertical, or both";
- other.can_show_text = 1;
- other.alarm[4] = 400;
- }
- orbit_radius = real(other.array[5]);
- orbit_angle = real(other.array[6]);
- orbit_speed = real(other.array[7]);
- trig = true;
- }
- }
- //spawn moving platform command help
- if i >= 0
- if i != 8
- if (string(array[0]) == "/spawnmovingwaveplatform" ||
- string(array[0]) == "/smwp")
- {
- show_text =
- "Not enough arguments :(" +
- "#Type "+string(array[0])+
- " <x> <y>
- <horizontal/vertical>
- <amplitude> <increment>
- <orbit radius> <orbit angle>
- <orbit speed>"
- can_show_text = 1;
- alarm[4] = 700;
- }
- draw_set_font(font0)
- // ./debug
- // ./debug show loadedObjects
- // ./debug show mainStats
- // ./debug show systemInfo
- //
- //
- //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement