;Terminal Menu Plugin @terminalterminalmenuregister SET pluginname, "terminalmenu" SET optionsarray, 1 SET optionsarray-1, "4, tmenu, terminaltmenu" SET callbacksarray, 1 SET callbacksarray-1, "0, terminaltmenulockreset" STRCMP "#", "unregister" IF= @terminalvspluginunregister CALL 2240@terminalregisterplugin #, optionsarray, callbacksarray GOTO @terminalterminalmenuafter @terminalterminalmenuunregister CALL 2240@terminalunregisterplugin #, optionsarray, callbacksarray RETURN 0 @terminaltmenulockreset SET terminaltmenulocked, 0 RETURN 0 @terminaltmenu CALL 2240@menusetchecks # # MENU "Actor Commands=@terminaltmenuactorcommands","Scenery Commands=@terminaltmenuscenecommands","Cookie Commands=@terminaltmenucookiecommands","Give/Take Commands=@terminaltmenugivecommands","Fights and Offer Commands=@terminaltmenufightoffercommands","Miscellaneous QUEST Commands=@terminaltmenumisccommands","#Scene Locked=@terminaltmenulocktoggle","#Right-Click Default Action=@terminaltmenutogglerclick","Terminal Prompt=@terminal","Cancel=@terminalend" RETURN END @terminaltmenulocktoggle COMPARE #, 1 IF= @terminaltmenulocktoggleoff ;otherwise turn it on SET terminaltmenulocked, 1 LOCK 1 RETURN END @terminaltmenulocktoggleoff SET terminaltmenulocked, 0 LOCK 0 RETURN END @terminaltmenutogglerclick COMPARE #, 1 IF= @terminaltmenutogglerclickoff ;otherwise turn it on CALL 2240@terminalregisterhook terminaltmenu COMPARE #, 0 IF!= @terminaltmenutogglerclickregisterfail SET terminaltmenurclick, 1 RETURN END @terminaltmenutogglerclickregisterfail N: Can't set right-click default right now. N: Is another plugin using it? RETURN END @terminaltmenutogglerclickoff CALL 2240@terminalunregisterhook terminaltmenu SET terminaltmenurclick, # RETURN END @terminaltmenucommandftoggle COMPARE #, 1 IF= @terminaltmenuftoggleoff ;otherwise turn it on SET terminaltmenuf, 1 GOTO @terminaltmenucookiecommands @terminaltmenuftoggleoff SET terminaltmenuf, 0 GOTO @terminaltmenucookiecommands END @terminaltmenucommandEx CALL 2240@splitcommand # STRCMP #, "null" IF= @terminaltmenucommandfail CALL 2240@ExCommand# #, #, #, #, #, #, #, #, #, # RETURN END @terminaltmenucommandfail N: Error: command cannot be executed! N: (#) RETURN END @terminaltmenuactorcommands MENU "ACTOR=@terminaltmenucommandactor","COLOR=@terminaltmenucommandcolor","Dialog=@terminaltmenucommanddialog","FACE=@terminaltmenucommandface","MOVE=@terminaltmenucommandmove","POSE=@terminaltmenucommandpose","SEL[ECT]=@terminaltmenucommandsel","Back=@terminaltmenu" END @terminaltmenuscenecommands MENU "BKGND=@terminaltmenucommandbkgnd","COLOR=@terminaltmenucommandcolor","FLAGS=@terminaltmenucommandflags","FX=@terminaltmenucommandfx","MUSIC=@terminaltmenucommandmusic","SOUND=@terminaltmenucommandsound","THEME=@terminaltmenucommandtheme","WEATHER=@terminaltmenucommandweather","Back=@terminaltmenu" END @terminaltmenucookiecommands CALL 2240@menusetchecks # MENU "ADD=@terminaltmenucommandadd-#","AND=@terminaltmenucommandand","COMPARE=@terminaltmenucommandcompare-#","DIV=@terminaltmenucommanddiv-#","#F_ ...=@terminaltmenucommandftoggle","GET_SERVER_VAR=@terminaltmenucommandgetservervar","MOD@terminaltmenucommandmod-#","MUL=@terminaltmenucommandmul-#","NOT=@terminaltmenucommandnot","OR=@terminaltmenucommandor","POP=@terminaltmenucommandpop","PUSH=@terminaltmenucommandpush","SET=@terminaltmenucommandset","SET_LEN=@terminaltmenucommandsetlen","SET_SUBSTR=@terminaltmenucommandsetsubstr","SET_SERVER_VAR=@terminaltmenucommandsetservervar","SHUFFLE=@terminaltmenucommandshuffle","STRCMP=@terminaltmenucommandstrcmp","STRSTR=@terminaltmenucommandstrstr","SUB=@terminaltmenucommandsub-#","View Value=@terminaltmenucommandview","Back=@terminaltmenu" END @terminaltmenugivecommands MENU "GIVE=@terminaltmenucommandgive","HOST_GIVE=@terminaltmenucommandhostgive","HOST_TAKE=@terminaltmenucommandhosttake","PARTY_GIVE=@terminaltmenucommandpartygive","PARTY_TAKE=@terminaltmenucommandpartytake","TAKE=@terminaltmenucommandtake","Back=@terminaltmenu" END @terminaltmenufightoffercommands MENU "FIGHT=@terminaltmenucommandfight","FIGHT2=@terminaltmenucommandfight2","GAME=@terminaltmenucommandgame","MISSIONS=@terminaltmenucommandmissions","OFFER=@terminaltmenucommandoffer","OFFER2=@terminaltmenucommandoffer2","Back=@terminaltmenu" END @terminaltmenumisccommands MENU "COUNTDOWN=@terminaltmenucommandcountdown","EJECT=@terminaltmenucommandeject","GOTO EXIT=@terminaltmenucommandgotoexit","GOTO LINK=@terminaltmenucommandgotolink","GOTO SCENE=@terminaltmenucommandgotoscene","HTML=@terminaltmenucommandhtml","PARTY=@terminaltmenucommandparty","WAIT=@terminaltmenucommandwait","Back=@terminaltmenu" END @terminaltmenucommandactor SET terminaltmenucommand, "actor" N: Actor ID? ASK 240 1 SET terminaltmenucommand, "# #" N: Actor name? ASK 240 1 SET terminaltmenucommand, "#, #" N: Actor skin name? ASK 240 1 SET terminaltmenucommand, "#, #" N: Actor skin offset? ASK 240 1 SET terminaltmenucommand, "#, #" N: Actor X coordinate? ASK 240 1 SET terminaltmenucommand, "#, #" N: Actor Y coordinate? ASK 240 1 SET terminaltmenucommand, "#, #" N: Actor color table (default: 0)? ASK 240 1 SET terminaltmenucommand, "#, #" N: Actor pain sound? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandadd-0 SET terminaltmenucommand, "add " N: Cookie to add to? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to add? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandand SET terminaltmenucommand, "and " N: Cookie to boolean and? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to and? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandbkgnd SET terminaltmenucommand, "bkgnd " N: Background to set? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandcolor SET terminaltmenucommand, "color " N: Color Table to use? N: (Add 2000 to apply to scene background) ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandcountdown SET terminaltmenucommand, "countdown " N: Countdown time (in seconds)? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommanddialog SET terminaltmenucommand, "dialog " N: Actor to speak? ASK 240 1 SET terminaltmenucommand, "# #" N: Words to say? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommanddiv-0 SET terminaltmenucommand, "div " N: Cookie to divide? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to divide by? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandeject SET terminaltmenucommand, "eject " N: Conditional to stay in scene? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandadd-1 SET terminaltmenucommand, "f_add " N: Cookie to add to? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to add? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommanddiv-1 SET terminaltmenucommand, "f_div " N: Cookie to divide? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to divide by? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandmod-1 SET terminaltmenucommand, "f_mod " N: Cookie to modulus? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to modulus by? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandmul-1 SET terminaltmenucommand, "f_mul " N: Cookie to multiply? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to multiply by? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandsub-1 SET terminaltmenucommand, "f_sub " N: Cookie to subtract from? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to subtract? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandface SET terminaltmenucommand, "face " N: Actor to change face direction of? ASK 240 1 SET terminaltmenucommand, "# #" N: New face direction (0-4)? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandfight @terminaltmenucommandfight2 @terminaltmenucommandflags SET terminaltmenucommand, "flags " N: Map flags to set for scene? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandfx SET terminaltmenucommand, "fx " N: Special Effects to use? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandgame SET terminaltmenucommand, "game " N: Game to offer? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandgetservervar SET terminaltmenucommand, "get_server_var " N: Cookie to write variable value to? ASK 240 1 SET terminaltmenucommand, "# #" N: Name of category? ASK 240 1 SET terminaltmenucommand, "#, #" N: Name of variable? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandgive SET terminaltmenucommand, "give " N: Object ID to give? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandgotoexit GOTO EXIT END @terminaltmenucommandgotolink SET terminaltmenucommand, "goto link " N: Map link is on? ASK 240 1 SET terminaltmenucommand, "# #" N: Link number on map #? ASK 240 1 SET terminaltmenucommand, "#, #" N: Drop in to link (0: No; 1: Yes)? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandgotoscene SET terminaltmenucommand, "goto scene " N: Scene number to go to? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandhostgive SET terminaltmenucommand, "host_give " N: Object ID to give only to host? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandhosttake SET terminaltmenucommand, "host_take " N: Object ID to take only from host? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandhtml SET terminaltmenucommand, "html " N: URL to load? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandmissions SET terminaltmenucommand, "missions " N: Mission to offer? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandmod-0 SET terminaltmenucommand, "mod " N: Cookie to modulus? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to modulus by? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandmove SET terminaltmenucommand, "move " N: Actor ID to move? ASK 240 1 SET terminaltmenucommand, "# #" N: New X coordinate? ASK 240 1 SET terminaltmenucommand, "#, #" N: New Y coordinate? ASK 240 1 SET terminaltmenucommand, "#, #" N: Move speed (0-5, default: 0)? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandmul-0 SET terminaltmenucommand, "mul " N: Cookie to multiply? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to multiply by? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandmusic SET terminaltmenucommand, "music " N: MIDI file to play? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandnot SET terminaltmenucommand, "not " N: Cookie to boolean not? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandoffer @terminaltmenucommandoffer2 @terminaltmenucommandor SET terminaltmenucommand, "or " N: Cookie to boolean or? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to or? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandparty SET terminaltmenucommand, "party " N: Condition to stay in party? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandpartygive SET terminaltmenucommand, "party_give " N: Object ID to give only to party? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandpartytake SET terminaltmenucommand, "party_take " N: Object ID to take only from party? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandpop SET terminaltmenucommand, "pop " N: Cookie to write stack value to? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandpose SET terminaltmenucommand, "pose " N: First pose? ASK 240 1 SET terminaltmenucommand, "# #" N: Second pose? ASK 240 1 SET terminaltmenucommand, "# #" N: Third pose? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandpush SET terminaltmenucommand, "push " N: Cookie to write stack value from? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandsel SET terminaltmenucommand, "sel " N: Actor ID to select? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandset SET terminaltmenucommand, "set " N: Cookie to write value of? ASK 240 1 SET terminaltmenucommand, "# #" N: New value? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandsetlen SET terminaltmenucommand, "set_len " N: Cookie to write length to? ASK 240 1 SET terminaltmenucommand, "# #" N: String to write length of? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandsetservervar SET terminaltmenucommand, "set_server_var " N: Name of category? ASK 240 1 SET terminaltmenucommand, "# #" N: Name of variable? ASK 240 1 SET terminaltmenucommand, "#, #" N: Value to write to variable value? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandsetservervar SET terminaltmenucommand, "set_server_var " N: Cookie to write substring to? ASK 240 1 SET terminaltmenucommand, "# #" N: Offset to read from? ASK 240 1 SET terminaltmenucommand, "#, #" N: Length to read? ASK 240 1 SET terminaltmenucommand, "#, #" N: String to read from? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandshuffle SET terminaltmenucommand, "shuffle " N: Cookie name to use? N: (numbers will be appended for each shuffled number) ASK 240 1 SET terminaltmenucommand, "# #" N: Number of cookies to shuffle? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandsound SET terminaltmenucommand, "sound " N: Wave file to play? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandsub-0 SET terminaltmenucommand, "sub " N: Cookie to subtract from? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to subtract? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminaltmenucommandtake SET terminaltmenucommand, "take " N: Object ID to take? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandtheme SET terminaltmenucommand, "theme " N: Theme to set? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandview N: Cookie to view value of? ASK 240 1 N: #: *# RETURN END @terminaltmenucommandwait SET terminaltmenucommand, "wait " N: Time to wait? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandweather SET terminaltmenucommand, "weather " N: Weather to set? ASK 240 1 SET terminaltmenucommand, "# #" GOTO @terminaltmenucommandEx @terminaltmenucommandxor SET terminaltmenucommand, "xor " N: Cookie to boolean xor? ASK 240 1 SET terminaltmenucommand, "# #" N: Value to xor? ASK 240 1 SET terminaltmenucommand, "#, #" GOTO @terminaltmenucommandEx @terminalterminalmenuafter ;Comment.