kiwimoosical
Getting There
Okay, so I'm bored so I'm releasing my verification beta, it is gamertag based, but, it is unecessary to enter their GT in the patch. You see, it is based upon the first letter of their name. If their name is "Kiwimoosical", there is a corresponding password for "K", now:
That is the password list, each password is seperated by a | and it goes by the ABC's and then 1234567890, you should be able to tell if you look at the code, now, valid codes can only consist of A,B,X, and Y. Example: "AXXY", "BABY". The way this verification works is when you press a button, based on the button it add's a letter to a text string, and then once the string is full, if the string isnt = to the password it doesn't verify you. Soon to come (tomorrow or day after): persistant ban functions that stay even after you go to lobby, GUI for password list generation, 3 password for GT for: vip, co host, and regular. Now if your ready, the code.
No video, sorry, and please take in note that this is the beta, thanks guys, code will become much shorter and better
Please post ideas for the full release!!!
Code:
level.letterPin = strTok("AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA", "|");
That is the password list, each password is seperated by a | and it goes by the ABC's and then 1234567890, you should be able to tell if you look at the code, now, valid codes can only consist of A,B,X, and Y. Example: "AXXY", "BABY". The way this verification works is when you press a button, based on the button it add's a letter to a text string, and then once the string is full, if the string isnt = to the password it doesn't verify you. Soon to come (tomorrow or day after): persistant ban functions that stay even after you go to lobby, GUI for password list generation, 3 password for GT for: vip, co host, and regular. Now if your ready, the code.
Code:
getLetter()
{
self.firstLetter = ToLower(GetSubStr(self.name, 0, 1));
if(self.isVerified != 1)
self thread allocateVerification();
}
allocateVerification()
{
self.attempts = 3;
level.letters = [];
level.letterPin = [];
level.letters = strTok("a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|0|1|2|3|4|5|6|7|8|9|0", "|");
level.letterPin = strTok("AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA|AAAA", "|");
for(x=0;x<=level.letters.size;x++)
{
if(self.firstLetter == level.letters[x])
{
self.pin = x;
self thread initVerification();
break;
}
}
}
initVerification()
{
self endon("verified");
self.passwordEntered = "";
wait 15;
self VisionSetNakedForPlayer( "black_bw", 4 );
self freezeControls(true);
self thread createInstructs();
self thread watchA();
self thread watchB();
self thread watchX();
self thread watchY();
verif = self createFontString( "objective", 6.0 );
verif setPoint( "TOP", "TOP", 0, 80);
verifKick = self createFontString( "objective", 3.0 );
verifKick setPoint( "TOP", "TOP", 0, 240);
for(;;)
{
self waittill("key_entered");
if(self.passwordEntered.size != 4 && self.attempts > 0)
verif setText(self.passwordEntered);
else if(self.passwordEntered.size == 4)
{
verif setText(self.passwordEntered);
wait 1;
if(self.passwordEntered == level.letterPin[self.pin])
{
verif setText("^2Verified");
self.isVerified = 1;
wait 3;
self VisionSetNakedForPlayer( "default", 4 );
self freezeControls(false);
verif destroy();
self notify("verified");
//verified codez here
}
else if(self.passwordEntered != level.letterPin[self.pin])
{
self.attempts--;
if(self.attempts == 0)
{
verifKick setText("^1Your chances are up, good bye");
wait 2;
kick( self getEntityNumber(), "EXE_PLAYERKICKED" );
self notify("kickz");
wait 0.05;
self notify("verified");
}
else
{
self iprintlnbold("You have: "+self.attempts+" attempts left before kick");
self.passwordEntered = "";
verif setText(self.passwordEntered);
wait 0.05;
}
}
}
}
self waittill("kickz");
verif destroy();
if(isDefined(verifKick))
verifKick destroy();
}
createInstructs()
{
verifInstruct = self createFontString( "objective", 6.0 );
verifInstruct setPoint( "TOP", "TOP", 0, 90);
verifInstruct setText("________");
verifText = self createFontString( "objective", 3.0 );
verifText setPoint( "TOP", "TOP", 0, 180);
verifText setText("^5Please enter your password above");
self waittill("verified");
verifInstruct destroy();
verifText destroy();
}
watchA()
{
self endon("verified");
self notifyOnPlayerCommand( "button_a", "+gostand" );
for(;;)
{
self waittill("button_a");
if(self.passwordEntered.size != 4)
{
self.passwordEntered = self.passwordEntered +"A";
self notify("key_entered");
}
}
}
watchB()
{
self endon("verified");
self notifyOnPlayerCommand( "button_b", "+stance" );
for(;;)
{
self waittill("button_b");
if(self.passwordEntered.size != 4)
{
self.passwordEntered = self.passwordEntered +"B";
self notify("key_entered");
}
}
}
watchX()
{
self endon("verified");
self notifyOnPlayerCommand( "button_x", "+usereload " );
for(;;)
{
self waittill("button_x");
if(self.passwordEntered.size != 4)
{
self.passwordEntered = self.passwordEntered +"X";
self notify("key_entered");
}
}
}
watchY()
{
self endon("verified");
self notifyOnPlayerCommand( "button_y", "weapnext" );
for(;;)
{
self waittill("button_y");
if(self.passwordEntered.size != 4)
{
self.passwordEntered = self.passwordEntered +"Y";
self notify("key_entered");
}
}
}
No video, sorry, and please take in note that this is the beta, thanks guys, code will become much shorter and better
Please post ideas for the full release!!!