pmap does not actually contain the particle data, it just tells you which particle is in each position. pmap is a 2D array of unsigned integers, and each element of it stores the type and index of the particle in that position (if any). If the pmap value is r, then r&0xFF is the type of the particle, and r>>8 is the index in the parts array.
An example: unsigned r = pmap[posx-1][posy]; //Get the pmap value if (r&0xFF) //if there's a particle there { //Do stuff int photf = parts[r>>8].flags; }
@mniip(View Post) @humanoidbob(View Post) Mniip means that if you make a text file in TPTs archive, paste code in and change format to .lua it will be automatically run by TPT in startup.
You can exit a program using os.exit(), and make the password like this:
thepassword = "thepowdertoy" local pass = tpt.input("password", "Enter the password or \"quit\" to quit") while pass ~= thepassword do if pass == "quit" then os.exit() end pass = tpt.input("password", "Wrong password, try again or \"quit\" to quit") end
It does give you unlimited tries, and the password isn't secret at all, but it still should work good with a good password