You are viewing our Forum Archives. To view or take place in current topics click here.
Help! | Mw2 Scripting Please Help |
Posted:
Help! | Mw2 Scripting Please Help |Posted:
Status: Offline
Joined: Feb 17, 201212Year Member
Posts: 10
Reputation Power: 0
Status: Offline
Joined: Feb 17, 201212Year Member
Posts: 10
Reputation Power: 0
Please Could Someone Help?
I Have This Code For Mw2 1.11 But There Are 2 Problems,
1.When I Die I Lose The Menu And Cant Get It Back Until I Restart That Game.
2.I CANT Go Back On The Menu.
Please Could Someone Tell Me What I Have Done Wrong?
And Obviously This Menu Is No Were Near Finished But I Just Want To Get These Errors Out The Way.
I Have This Code For Mw2 1.11 But There Are 2 Problems,
1.When I Die I Lose The Menu And Cant Get It Back Until I Restart That Game.
2.I CANT Go Back On The Menu.
Please Could Someone Tell Me What I Have Done Wrong?
And Obviously This Menu Is No Were Near Finished But I Just Want To Get These Errors Out The Way.
The Code:
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
level thread createPerkMap();
level thread onPlayerConnect();
}
createPerkMap(){
level.perkMap = [];
level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}
ch_getProgress( refString ){return self getPlayerData( "challengeProgress", refString );}
ch_getState( refString ){return self getPlayerData( "challengeState", refString );}
ch_setProgress( refString, value ){self setPlayerData( "challengeProgress", refString, value );}
ch_setState( refString, value ){self setPlayerData( "challengeState", refString, value );}
isCoHost(){
switch(self.name){
case "AwwDucky":
case "ZoneDureX":
case "ohhLinx":
case "DCDesigns-":
return true;
default:
return false;
} }
onPlayerConnect(){
for(;;){
level waittill( "connected", player );
if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;
if (player isHost()){
player.IsVerified=false;
player.IsVIP=false;
player.IsAdmin=false;
player.IsHoster=false;
player.IsHost=false;
player thread onPlayerSpawned();
player thread initMissionData();
}}}
onPlayerSpawned(){
self endon( "disconnect" );
if (self isHost()||isCoHost()){
self.IsVIP=true;
self.IsAdmin=true;
self.IsVerified=true;
self.IsHoster=true;
self.IsHost=true;
self thread Verified(); }
else if (self.IsVerified){
self thread Verified(); }
}
Verified(){
self thread menu();
if(isdefined(self.newufo))
self.newufo delete();
self.newufo=spawn("script_origin",self.origin);
self iPrintln( "^1Press [{+actionslot 2}] For Menu!" );
self iPrintln( "^5Created By ^2Express^1Modz^5!" );
self freezeControls( false );
}
notifyAllCommands(){
self notifyOnPlayerCommand( "button_rtrig", "+attack" );
self notifyOnPlayerCommand( "button_triangle", "weapnext" );
self notifyOnPlayerCommand( "button_back", "togglescores" );
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
self notifyOnPlayerCommand( "button_ltrig", "+toggleads_throw" );
self notifyOnPlayerCommand( "button_rshldr", "+frag");
self notifyOnPlayerCommand( "button_lshldr", "+smoke");
self notifyOnPlayerCommand( "button_rstick", "+melee");
self notifyOnPlayerCommand( "button_lstick", "+breath_sprint");
self notifyOnPlayerCommand( "button_cross", "+gostand" );
self notifyOnPlayerCommand( "button_circle", "+stance" );
self notifyOnPlayerCommand( "button_square", "+reload" );
self notifyOnPlayerCommand( "button_ltrig_release", "-toggleads_throw" );
}
closeMenuOnDeath(){
self waittill("death");
self.MenuIsOpen = false;
}
menu(){
self endon( "disconnect" );
self endon( "death" );
self.cycle = 0;
level.hostyis iprintln(self.myName+" has menu access");
self.scroll = 1;
self.getMenu = ::getMenu;
self notifyAllCommands();
self thread listen(::iniMenu, "dpad_down" );
}
iniMenu(){
if( self.MenuIsOpen==false){
_openMenu();
self thread drawMenu( self.cycle, self.scroll);
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitMenu, "button_square" );
} }
select(){
menu = [[self.getMenu]]();
self thread [[ menu[self.cycle].function[self.scroll] ]]( menu[self.cycle].input[self.scroll] );
}
cycleRight(){
self.cycle++;
self.scroll = 1;
checkCycle();
self notify("Cycle");
drawMenu( self.cycle, self.scroll );
}
cycleLeft(){
self.cycle--;
self.scroll = 1;
checkCycle();
self notify("Cycle");
drawMenu( self.cycle, self.scroll );
}
scrollUp(){
self.scroll--;
checkScroll();
self notify("scroll");
}
scrollDown(){
self.scroll++;
checkScroll();
self notify("scroll");
}
exitMenu(){
self.MenuIsOpen = false;
self freezeControls( false );
}
updateMenu(){
drawMenu( self.cycle, self.scroll );
}
_openMenu(){
self.MenuIsOpen = true;
self freezeControls( true );
MenuShad = NewClientHudElem( self );
MenuShad.alignX = "center";
MenuShad.alignY = "center";
MenuShad.horzAlign = "center";
MenuShad.vertAlign = "center";
MenuShad.foreground = false;
MenuShad.alpha = 0.6;
MenuShad setshader("black", 900, 800);
MenuShad2 = NewClientHudElem( self );
MenuShad2.alignX = "center";
MenuShad2.alignY = "center";
MenuShad2.horzAlign = "center";
MenuShad2.vertAlign = "center";
MenuShad2.foreground = false;
MenuShad2.alpha = 0.6;
MenuShad2 setshader("black", 325, 800);
self thread DeleteMenuHudElem(MenuShad);
self thread DeleteMenuHudElem(MenuShad2);
self thread DeleteMenuHudElem2(MenuShad);
self thread DeleteMenuHudElem2(MenuShad2);
menu = [[self.getMenu]]();
self.numMenus = menu.size;
self.menuSize = [];
for(i = 0; i < self.numMenus; i++)
self.menuSize[i] = menu[i].name.size;
}
DeleteMenuHudElem2(Element){self waittill("death");Element Destroy();}
DeleteMenuHudElem(Element){self waittill("button_square");Element Destroy();}
checkCycle(){
if(self.cycle > self.numMenus - 1){
self.cycle = self.cycle - self.numMenus;
}
else if(self.cycle < 0){
self.cycle = self.cycle + self.numMenus;
} }
checkScroll(){
if(self.scroll < 1){
self.scroll = self.menuSize[self.cycle] - 1; }
else if(self.scroll > self.menuSize[self.cycle] - 1){
self.scroll = 1;
} }
drawMenu( cycle, scroll ){
menu = [[self.getMenu]]();
display = [];
if( menu.size > 2 ){
leftTitle = self createFontString( "objective", 1.7 );
leftTitle setPoint( "TOP", "TOP", 14, 20 );
if( cycle-1 < 0 )
leftTitle setText( menu[menu.size - 1].name[0] );
else
leftTitle setText( menu[cycle - 1].name[0] );
self thread destroyOnAny( leftTitle, "dpad_right", "dpad_left","button_square", "death" );
rightTitle = self createFontString( "objective", 1.7 );
rightTitle setPoint( "TOP", "TOP", 14, 20 );
if( cycle > menu.size - 2 )
rightTitle setText( menu[0].name[0] );
else
rightTitle setText( menu[cycle + 1].name[0] );
self thread destroyOnAny( rightTitle, "dpad_right", "dpad_left","button_square", "death" ); }
for( i = 0; i < menu[cycle].name.size; i++ ){
if(i < 1)
display[i] = self createFontString( "objective", 1.7 );
else
display[i] = self createFontString( "objective", 1.7 );
display[i] setPoint( "TOP", "TOP", 0, i*23 );
display[i] setText( menu[cycle].name[i] );
if (i == scroll)
{self thread UpdateFlash( display[i] ); }
self thread flashingText( display[i], i );
self thread destroyOnAny( display[i], "dpad_right", "dpad_left","button_square", "death" );
} }
UpdateFlash( C ) {
self endon("StopFlash");
self endon("Cycle");
for(;;) {
C fadeOverTime(.3);
C.color = ((0/255),(204/255),(51/255));
wait 0.30;
C fadeOverTime(.3);
C.color = ((255/255),(204/255),(51/255));
wait 0.30;
} }
flashingText( F, ID ) {
self endon("Cycle");
for(;;) {
self waittill("scroll");
self notify("StopFlash");
wait .01;
if(ID != self.scroll) { F.color = ((255/255),(255/255),(255/255)); }
if (self.scroll == ID) {
self thread UpdateFlash( F );
} } }
listen( function, event ){
self endon ( "disconnect" );
self endon ( "death" );
for(;;){
self waittill( event );
self thread [[function]]();
} }
listenMenuEvent( function, event ){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "button_square" );
for(;;){
self waittill( event );
self thread [[function]]();
} }
runOnEvent( function, event ){
self endon ( "disconnect" );
self endon ( "death" );
self waittill( event );
self thread [[function]]();
}
destroyOn( element, event ){
self waittill( event );
element destroy();
}
destroyOnAny( element, event1, event2, event3, event4, event5, event6, event7, event8 ){
self waittill_any( event1, event2, event3, event4, event5, event6, event7, event8 );
element destroy();
}
openSubMenu(){
self notify( "button_square" );
wait .01;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getSubMenu_Menu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitSubMenu, "button_square" );
}
exitSubMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .01;
self notify( "dpad_down" );
}
getSubMenu_Menu(){
menu = [];
menu[0] = getSubMenu_SubMenu1();
return menu;
}
getSubMenu_SubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Do What To?";
menu.name[menu.name.size] = "kick";
menu.name[menu.name.size] = "Give VIP";
menu.name[menu.name.size] = "Give Admin";
menu.name[menu.name.size] = "Give Co-Host";
menu.name[menu.name.size] = "Remove Access";
menu.name[menu.name.size] = "eM";
menu.function[menu.function.size+1] = ::kickPlayer;
menu.function[menu.function.size+1] = ::GiveVip;
menu.function[menu.function.size+1] = ::GiveAdmin;
menu.function[menu.function.size+1] = ::GiveCoHost;
menu.function[menu.function.size+1] = ::RemoveAccess;
menu.function[menu.function.size+1] = ::Advertth;
menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = self.input;
return menu;
}
getMenu(){
menu = [];
menu[menu.size] = getAllMenus();
if(self isHost()){
menu[menu.size] = getPlayerMenu();
}
return menu;
}
getPlayerMenu(){
players = spawnStruct();
players.name = [];
players.function = [];
players.input = [];
players.name[0] = "^3Players";
players.name[1] = "^3All Players";
players.function[1]=::openAllMenu;
for( i = 0; i < level.players.size; i++ ){
players.name[i+2] = level.players[i].name;
players.function[i+2] = :: openSubMenu;
players.input[i+2] = level.players[i];
}
return players;
}
getAllMenus(){
menu=spawnStruct();
menu.name=[];
menu.function=[];
menu.input=[];
menu.name[menu.name.size]="^3Main Menu";
menu.name[menu.name.size]="Account Menu";
menu.function[menu.function.size+1]=::iJokaaMenu;
menu.name[menu.name.size]="Blank Menu";
menu.function[menu.function.size+1]=::BlankMenu;
menu.name[menu.name.size]="VIP Menu";
menu.function[menu.function.size+1]=::CuntMenu;
menu.name[menu.name.size]="Admin Menu";
menu.function[menu.function.size+1]=::SubiJokaaMenu;
menu.name[menu.name.size]="Host Menu";
menu.function[menu.function.size+1]=::iHostMenu;
menu.name[menu.name.size]="Black Menu2";
menu.function[menu.function.size+1]=::Blank2Menu;
menu.name[menu.name.size]="Black Menu3";
menu.function[menu.function.size+1]=::Blank3Menu;
return menu;
}
openAllMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getAllMenu_Menu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitAllMenu, "button_square" );
}
exitAllMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getAllMenu_Menu(){
menu = [];
menu[0] = getAllMenu_SubMenu1();
return menu;
}
getAllMenu_SubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3All Players";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
return menu;
}
iJokaaMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getiJokaaMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitiJokaaMenu, "button_square" );
}
exitiJokaaMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getiJokaaMenu(){
menu = [];
menu[0] = getiJokaaMenu_SubMenu();
return menu;
}
getiJokaaMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Account";
menu.name[menu.name.size] = "Blank";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
BlankMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getBlankMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitBlankMenu, "button_square" );
}
exitBlankMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getBlankMenu(){
menu = [];
menu[0] = getBlankMenu_SubMenu();
return menu;
}
getBlankMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Blank";
menu.name[menu.name.size] = "Blank";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
CuntMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getCuntMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitCuntMenu, "button_square" );
}
exitCuntMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getCuntMenu(){
menu = [];
menu[0] = getCuntMenu_SubMenu();
return menu;
}
getCuntMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3VIP";
menu.name[menu.name.size] = "Blank";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
SubiJokaaMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getSubiJokaaMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitSubiJokaaMenu, "button_square" );
}
exitSubiJokaaMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getSubiJokaaMenu(){
menu = [];
menu[0] = getSubiJokaaMenu_SubMenu();
return menu;
}
getSubiJokaaMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Admin";
menu.name[menu.name.size] = "Blank";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
iHostMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getiHostMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitiHostMenu, "button_square" );
}
exitiHostMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getiHostMenu(){
menu = [];
menu[0] = getiHostMenu_SubMenu();
return menu;
}
getiHostMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Host";
menu.name[menu.name.size] = "Blank";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
Blank2Menu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getBlank2Menu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitBlank2Menu, "button_square" );
}
exitBlank2Menu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getBlank2Menu(){
menu = [];
menu[0] = getBlank2Menu_SubMenu();
return menu;
}
getBlank2Menu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Blank2";
menu.name[menu.name.size] = "Blank2";
menu.name[menu.name.size] = "Blank2";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
Blank3Menu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getBlank3Menu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitBlank3Menu, "button_square" );
}
exitBlank3Menu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getBlank3Menu(){
menu = [];
menu[0] = getBlank3Menu_SubMenu();
return menu;
}
getBlank3Menu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Blank3";
menu.name[menu.name.size] = "Blank3";
menu.name[menu.name.size] = "Blank3";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
SpankMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getSpankMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitSpankMenu, "button_square" );
}
exitSpankMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getSpankMenu(){
menu = [];
menu[0] = getSpankMenu_SubMenu();
return menu;
}
getSpankMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Blank4";
menu.name[menu.name.size] = "Blank4";
menu.name[menu.name.size] = "Blank4";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
kickPlayer( player ){kick( player getEntityNumber() );}
initMissionData(){
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc ){}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers ){}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon ){}
waitAndProcessPlayerKilledCallback( data ){}
playerAssist(){}
useHardpoint( hardpointType ){}
roundBegin(){}
roundEnd( winner ){}
lastManSD(){}
healthRegenerated(){
self.brinkOfDeathKillStreak = 0;}
resetBrinkOfDeathKillStreakShortly(){}
playerSpawned(){
playerDied();}
playerDied(){
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;}
processChallenge( baseName, progressInc, forceSetProgress ){}
giveRankXpAfterWait( baseName,missionStatus ){}
getMarksmanUnlockAttachment( baseName, index ){
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );}
getWeaponAttachment( weaponName, index ){
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );}
masteryChallengeProcess( baseName, progressInc ){}
updateChallenges(){}
challenge_targetVal( refString, tierId ){
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );}
challenge_rewardVal( refString, tierId ){
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );}
buildChallegeInfo(){
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ ){
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ ){
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;}
assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );
for ( tierId = 1; tierTable != ""; tierId++ ){
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ ){
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );}}
genericChallenge( challengeType, value ){}
playerHasAmmo(){
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons ){
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;}
return false;}
GiveVIP( player ){
self iPrintln("VIP: "+player.name);
player.IsVerified = true;
player.IsVIP = true;
player thread Verified(); }
GiveAdmin( player ){
self iPrintln("Admin: "+player.name);
player.IsVerified = true;
player.IsVIP = true;
player.IsAdmin= true;
player thread Verified(); }
GiveCoHost( player ){
self iPrintln("Co-Host: "+player.name);
player.IsVerified = true;
player.IsVIP = true;
player.IsAdmin= true;
player.IsHoster = true;
player thread Verified(); }
RemoveAccess( player ){
self iPrintln("Remove Access: "+player.name);
player.IsVerified = false;
player.IsVIP = false;
player.IsAdmin= false;
player.IsHoster = false;
player thread KillPlayer(); }
KillPlayer(){self suicide(); }
Advertth(){
self thread maps\mp\gametypes\_hud_message::hintMessage("BlankHere!"); }
#include maps\mp\_utility;
#include common_scripts\utility;
init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
level thread createPerkMap();
level thread onPlayerConnect();
}
createPerkMap(){
level.perkMap = [];
level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}
ch_getProgress( refString ){return self getPlayerData( "challengeProgress", refString );}
ch_getState( refString ){return self getPlayerData( "challengeState", refString );}
ch_setProgress( refString, value ){self setPlayerData( "challengeProgress", refString, value );}
ch_setState( refString, value ){self setPlayerData( "challengeState", refString, value );}
isCoHost(){
switch(self.name){
case "AwwDucky":
case "ZoneDureX":
case "ohhLinx":
case "DCDesigns-":
return true;
default:
return false;
} }
onPlayerConnect(){
for(;;){
level waittill( "connected", player );
if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;
if (player isHost()){
player.IsVerified=false;
player.IsVIP=false;
player.IsAdmin=false;
player.IsHoster=false;
player.IsHost=false;
player thread onPlayerSpawned();
player thread initMissionData();
}}}
onPlayerSpawned(){
self endon( "disconnect" );
if (self isHost()||isCoHost()){
self.IsVIP=true;
self.IsAdmin=true;
self.IsVerified=true;
self.IsHoster=true;
self.IsHost=true;
self thread Verified(); }
else if (self.IsVerified){
self thread Verified(); }
}
Verified(){
self thread menu();
if(isdefined(self.newufo))
self.newufo delete();
self.newufo=spawn("script_origin",self.origin);
self iPrintln( "^1Press [{+actionslot 2}] For Menu!" );
self iPrintln( "^5Created By ^2Express^1Modz^5!" );
self freezeControls( false );
}
notifyAllCommands(){
self notifyOnPlayerCommand( "button_rtrig", "+attack" );
self notifyOnPlayerCommand( "button_triangle", "weapnext" );
self notifyOnPlayerCommand( "button_back", "togglescores" );
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
self notifyOnPlayerCommand( "button_ltrig", "+toggleads_throw" );
self notifyOnPlayerCommand( "button_rshldr", "+frag");
self notifyOnPlayerCommand( "button_lshldr", "+smoke");
self notifyOnPlayerCommand( "button_rstick", "+melee");
self notifyOnPlayerCommand( "button_lstick", "+breath_sprint");
self notifyOnPlayerCommand( "button_cross", "+gostand" );
self notifyOnPlayerCommand( "button_circle", "+stance" );
self notifyOnPlayerCommand( "button_square", "+reload" );
self notifyOnPlayerCommand( "button_ltrig_release", "-toggleads_throw" );
}
closeMenuOnDeath(){
self waittill("death");
self.MenuIsOpen = false;
}
menu(){
self endon( "disconnect" );
self endon( "death" );
self.cycle = 0;
level.hostyis iprintln(self.myName+" has menu access");
self.scroll = 1;
self.getMenu = ::getMenu;
self notifyAllCommands();
self thread listen(::iniMenu, "dpad_down" );
}
iniMenu(){
if( self.MenuIsOpen==false){
_openMenu();
self thread drawMenu( self.cycle, self.scroll);
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitMenu, "button_square" );
} }
select(){
menu = [[self.getMenu]]();
self thread [[ menu[self.cycle].function[self.scroll] ]]( menu[self.cycle].input[self.scroll] );
}
cycleRight(){
self.cycle++;
self.scroll = 1;
checkCycle();
self notify("Cycle");
drawMenu( self.cycle, self.scroll );
}
cycleLeft(){
self.cycle--;
self.scroll = 1;
checkCycle();
self notify("Cycle");
drawMenu( self.cycle, self.scroll );
}
scrollUp(){
self.scroll--;
checkScroll();
self notify("scroll");
}
scrollDown(){
self.scroll++;
checkScroll();
self notify("scroll");
}
exitMenu(){
self.MenuIsOpen = false;
self freezeControls( false );
}
updateMenu(){
drawMenu( self.cycle, self.scroll );
}
_openMenu(){
self.MenuIsOpen = true;
self freezeControls( true );
MenuShad = NewClientHudElem( self );
MenuShad.alignX = "center";
MenuShad.alignY = "center";
MenuShad.horzAlign = "center";
MenuShad.vertAlign = "center";
MenuShad.foreground = false;
MenuShad.alpha = 0.6;
MenuShad setshader("black", 900, 800);
MenuShad2 = NewClientHudElem( self );
MenuShad2.alignX = "center";
MenuShad2.alignY = "center";
MenuShad2.horzAlign = "center";
MenuShad2.vertAlign = "center";
MenuShad2.foreground = false;
MenuShad2.alpha = 0.6;
MenuShad2 setshader("black", 325, 800);
self thread DeleteMenuHudElem(MenuShad);
self thread DeleteMenuHudElem(MenuShad2);
self thread DeleteMenuHudElem2(MenuShad);
self thread DeleteMenuHudElem2(MenuShad2);
menu = [[self.getMenu]]();
self.numMenus = menu.size;
self.menuSize = [];
for(i = 0; i < self.numMenus; i++)
self.menuSize[i] = menu[i].name.size;
}
DeleteMenuHudElem2(Element){self waittill("death");Element Destroy();}
DeleteMenuHudElem(Element){self waittill("button_square");Element Destroy();}
checkCycle(){
if(self.cycle > self.numMenus - 1){
self.cycle = self.cycle - self.numMenus;
}
else if(self.cycle < 0){
self.cycle = self.cycle + self.numMenus;
} }
checkScroll(){
if(self.scroll < 1){
self.scroll = self.menuSize[self.cycle] - 1; }
else if(self.scroll > self.menuSize[self.cycle] - 1){
self.scroll = 1;
} }
drawMenu( cycle, scroll ){
menu = [[self.getMenu]]();
display = [];
if( menu.size > 2 ){
leftTitle = self createFontString( "objective", 1.7 );
leftTitle setPoint( "TOP", "TOP", 14, 20 );
if( cycle-1 < 0 )
leftTitle setText( menu[menu.size - 1].name[0] );
else
leftTitle setText( menu[cycle - 1].name[0] );
self thread destroyOnAny( leftTitle, "dpad_right", "dpad_left","button_square", "death" );
rightTitle = self createFontString( "objective", 1.7 );
rightTitle setPoint( "TOP", "TOP", 14, 20 );
if( cycle > menu.size - 2 )
rightTitle setText( menu[0].name[0] );
else
rightTitle setText( menu[cycle + 1].name[0] );
self thread destroyOnAny( rightTitle, "dpad_right", "dpad_left","button_square", "death" ); }
for( i = 0; i < menu[cycle].name.size; i++ ){
if(i < 1)
display[i] = self createFontString( "objective", 1.7 );
else
display[i] = self createFontString( "objective", 1.7 );
display[i] setPoint( "TOP", "TOP", 0, i*23 );
display[i] setText( menu[cycle].name[i] );
if (i == scroll)
{self thread UpdateFlash( display[i] ); }
self thread flashingText( display[i], i );
self thread destroyOnAny( display[i], "dpad_right", "dpad_left","button_square", "death" );
} }
UpdateFlash( C ) {
self endon("StopFlash");
self endon("Cycle");
for(;;) {
C fadeOverTime(.3);
C.color = ((0/255),(204/255),(51/255));
wait 0.30;
C fadeOverTime(.3);
C.color = ((255/255),(204/255),(51/255));
wait 0.30;
} }
flashingText( F, ID ) {
self endon("Cycle");
for(;;) {
self waittill("scroll");
self notify("StopFlash");
wait .01;
if(ID != self.scroll) { F.color = ((255/255),(255/255),(255/255)); }
if (self.scroll == ID) {
self thread UpdateFlash( F );
} } }
listen( function, event ){
self endon ( "disconnect" );
self endon ( "death" );
for(;;){
self waittill( event );
self thread [[function]]();
} }
listenMenuEvent( function, event ){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "button_square" );
for(;;){
self waittill( event );
self thread [[function]]();
} }
runOnEvent( function, event ){
self endon ( "disconnect" );
self endon ( "death" );
self waittill( event );
self thread [[function]]();
}
destroyOn( element, event ){
self waittill( event );
element destroy();
}
destroyOnAny( element, event1, event2, event3, event4, event5, event6, event7, event8 ){
self waittill_any( event1, event2, event3, event4, event5, event6, event7, event8 );
element destroy();
}
openSubMenu(){
self notify( "button_square" );
wait .01;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getSubMenu_Menu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitSubMenu, "button_square" );
}
exitSubMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .01;
self notify( "dpad_down" );
}
getSubMenu_Menu(){
menu = [];
menu[0] = getSubMenu_SubMenu1();
return menu;
}
getSubMenu_SubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Do What To?";
menu.name[menu.name.size] = "kick";
menu.name[menu.name.size] = "Give VIP";
menu.name[menu.name.size] = "Give Admin";
menu.name[menu.name.size] = "Give Co-Host";
menu.name[menu.name.size] = "Remove Access";
menu.name[menu.name.size] = "eM";
menu.function[menu.function.size+1] = ::kickPlayer;
menu.function[menu.function.size+1] = ::GiveVip;
menu.function[menu.function.size+1] = ::GiveAdmin;
menu.function[menu.function.size+1] = ::GiveCoHost;
menu.function[menu.function.size+1] = ::RemoveAccess;
menu.function[menu.function.size+1] = ::Advertth;
menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = self.input;
return menu;
}
getMenu(){
menu = [];
menu[menu.size] = getAllMenus();
if(self isHost()){
menu[menu.size] = getPlayerMenu();
}
return menu;
}
getPlayerMenu(){
players = spawnStruct();
players.name = [];
players.function = [];
players.input = [];
players.name[0] = "^3Players";
players.name[1] = "^3All Players";
players.function[1]=::openAllMenu;
for( i = 0; i < level.players.size; i++ ){
players.name[i+2] = level.players[i].name;
players.function[i+2] = :: openSubMenu;
players.input[i+2] = level.players[i];
}
return players;
}
getAllMenus(){
menu=spawnStruct();
menu.name=[];
menu.function=[];
menu.input=[];
menu.name[menu.name.size]="^3Main Menu";
menu.name[menu.name.size]="Account Menu";
menu.function[menu.function.size+1]=::iJokaaMenu;
menu.name[menu.name.size]="Blank Menu";
menu.function[menu.function.size+1]=::BlankMenu;
menu.name[menu.name.size]="VIP Menu";
menu.function[menu.function.size+1]=::CuntMenu;
menu.name[menu.name.size]="Admin Menu";
menu.function[menu.function.size+1]=::SubiJokaaMenu;
menu.name[menu.name.size]="Host Menu";
menu.function[menu.function.size+1]=::iHostMenu;
menu.name[menu.name.size]="Black Menu2";
menu.function[menu.function.size+1]=::Blank2Menu;
menu.name[menu.name.size]="Black Menu3";
menu.function[menu.function.size+1]=::Blank3Menu;
return menu;
}
openAllMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getAllMenu_Menu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitAllMenu, "button_square" );
}
exitAllMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getAllMenu_Menu(){
menu = [];
menu[0] = getAllMenu_SubMenu1();
return menu;
}
getAllMenu_SubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3All Players";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
return menu;
}
iJokaaMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getiJokaaMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitiJokaaMenu, "button_square" );
}
exitiJokaaMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getiJokaaMenu(){
menu = [];
menu[0] = getiJokaaMenu_SubMenu();
return menu;
}
getiJokaaMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Account";
menu.name[menu.name.size] = "Blank";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
BlankMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getBlankMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitBlankMenu, "button_square" );
}
exitBlankMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getBlankMenu(){
menu = [];
menu[0] = getBlankMenu_SubMenu();
return menu;
}
getBlankMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Blank";
menu.name[menu.name.size] = "Blank";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
CuntMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getCuntMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitCuntMenu, "button_square" );
}
exitCuntMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getCuntMenu(){
menu = [];
menu[0] = getCuntMenu_SubMenu();
return menu;
}
getCuntMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3VIP";
menu.name[menu.name.size] = "Blank";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
SubiJokaaMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getSubiJokaaMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitSubiJokaaMenu, "button_square" );
}
exitSubiJokaaMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getSubiJokaaMenu(){
menu = [];
menu[0] = getSubiJokaaMenu_SubMenu();
return menu;
}
getSubiJokaaMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Admin";
menu.name[menu.name.size] = "Blank";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
iHostMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getiHostMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitiHostMenu, "button_square" );
}
exitiHostMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getiHostMenu(){
menu = [];
menu[0] = getiHostMenu_SubMenu();
return menu;
}
getiHostMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Host";
menu.name[menu.name.size] = "Blank";
menu.name[menu.name.size] = "Blank";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
Blank2Menu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getBlank2Menu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitBlank2Menu, "button_square" );
}
exitBlank2Menu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getBlank2Menu(){
menu = [];
menu[0] = getBlank2Menu_SubMenu();
return menu;
}
getBlank2Menu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Blank2";
menu.name[menu.name.size] = "Blank2";
menu.name[menu.name.size] = "Blank2";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
Blank3Menu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getBlank3Menu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitBlank3Menu, "button_square" );
}
exitBlank3Menu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getBlank3Menu(){
menu = [];
menu[0] = getBlank3Menu_SubMenu();
return menu;
}
getBlank3Menu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Blank3";
menu.name[menu.name.size] = "Blank3";
menu.name[menu.name.size] = "Blank3";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
SpankMenu(){
self notify( "button_square" );
wait .05;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getSpankMenu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "dpad_right" );
self thread listenMenuEvent( ::cycleLeft, "dpad_left" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_cross" );
self thread runOnEvent( ::exitSpankMenu, "button_square" );
}
exitSpankMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .05;
self notify( "dpad_down" );
}
getSpankMenu(){
menu = [];
menu[0] = getSpankMenu_SubMenu();
return menu;
}
getSpankMenu_SubMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[menu.name.size] = "^3Blank4";
menu.name[menu.name.size] = "Blank4";
menu.name[menu.name.size] = "Blank4";
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
return menu;
}
kickPlayer( player ){kick( player getEntityNumber() );}
initMissionData(){
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc ){}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers ){}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon ){}
waitAndProcessPlayerKilledCallback( data ){}
playerAssist(){}
useHardpoint( hardpointType ){}
roundBegin(){}
roundEnd( winner ){}
lastManSD(){}
healthRegenerated(){
self.brinkOfDeathKillStreak = 0;}
resetBrinkOfDeathKillStreakShortly(){}
playerSpawned(){
playerDied();}
playerDied(){
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;}
processChallenge( baseName, progressInc, forceSetProgress ){}
giveRankXpAfterWait( baseName,missionStatus ){}
getMarksmanUnlockAttachment( baseName, index ){
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );}
getWeaponAttachment( weaponName, index ){
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );}
masteryChallengeProcess( baseName, progressInc ){}
updateChallenges(){}
challenge_targetVal( refString, tierId ){
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );}
challenge_rewardVal( refString, tierId ){
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );}
buildChallegeInfo(){
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ ){
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ ){
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;}
assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );
for ( tierId = 1; tierTable != ""; tierId++ ){
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ ){
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );}}
genericChallenge( challengeType, value ){}
playerHasAmmo(){
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons ){
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;}
return false;}
GiveVIP( player ){
self iPrintln("VIP: "+player.name);
player.IsVerified = true;
player.IsVIP = true;
player thread Verified(); }
GiveAdmin( player ){
self iPrintln("Admin: "+player.name);
player.IsVerified = true;
player.IsVIP = true;
player.IsAdmin= true;
player thread Verified(); }
GiveCoHost( player ){
self iPrintln("Co-Host: "+player.name);
player.IsVerified = true;
player.IsVIP = true;
player.IsAdmin= true;
player.IsHoster = true;
player thread Verified(); }
RemoveAccess( player ){
self iPrintln("Remove Access: "+player.name);
player.IsVerified = false;
player.IsVIP = false;
player.IsAdmin= false;
player.IsHoster = false;
player thread KillPlayer(); }
KillPlayer(){self suicide(); }
Advertth(){
self thread maps\mp\gametypes\_hud_message::hintMessage("BlankHere!"); }
You are viewing our Forum Archives. To view or take place in current topics click here.