Archive for July, 2010

31 views

Online highscores engine

Filed under: Editables, Scripts

  • GM Version: GM8 Pro
  • File Type: gmk
  • File Size: 1.6mb from the zip, and about 19mb from the GeoLite database
  • File Link: Zip fileGeoLiteCity database

Note: The zip includes an example hosted by me and all the required files to install it on your server!

Requirements before installing in your server:
_Your server must be able to handle php.
_A mysql database.
_All files linked above.
_A little knowledge on databases and (maybe) some php.

Getting started:
First, we need to set up a new MySql table in our database, it needs to be called “scores_0″ ( the name may vary, but to do that you need to edit all the php files from the example with the new name! )

Structure of the new table:
Scores_0
– ip > varchar (255)
– name > varchar (255)
– scorea > int(255)
– scoreb > int(255)
– date > datetime

After the database is succesfully created, decompress the zip file with the exe and the gmk files, go to the “Upload” directory and open the “Config.php” file. There, replace the variables with your database settings (username, password, database name and host)

Now we need to upload the files. the file inside the “Upload” directory are the ones you need to upload to your server, and they need to be together in the same folder (i reccomend creating a new folder to put the files in, too keep it organized).
After you uploaded those files, download the GeoLiteCity Database, this is vital to show the flags in the highscores table! Once downloaded, you will get a .gz file, extract it and upload the GeoLiteCity.dat file to the same folder you uploaded all the other files.

Its time to get started with the gmk file! As you can see, it has all the settings to connect to my test database (the one you see when you run the example), we are going to change this so you can connect to your server: Go to the scripts refresh_hs and submit_hs, there replace the urls of the php files for the new ones (the link to your server).
ie: if your files are hosted in ‘http://domain.com/somefolder/’, the new link in ‘refresh_hs’ will be:

site = 'http://domain.com/somefolder/singleline.php?line='+string(now);

and in ‘submit_hs’:

site = 'http://domain.com/somefolder/insert.php?name='+name+'&scorea='+scorea;

we also need to modify the ‘get_country’ script:

site = 'http://domain.com/somefolder/a.php?ip_a='+argument0;

Thats it! save the file, and check it by yourself!

have fun :)







VN:F [1.9.3_1094]
Rating: 4.0/5 (1 vote cast)

Tags: , , , , , ,

Permalink Comments (0) Manuel777 Jul 21, 2010
86 views

Clockworks

Filed under: Games


Clockworks is an extremely simple (and quickly made) game, that turns around a basic concept; then more you rotate to aim, more enemies are spawned. Do notice that this started just as a prototype of a full game, and im not planning on expand it any further ( not in the near future, at least).

Play now at YoYoGames!
Download (~2.7Mb)

VN:F [1.9.3_1094]
Rating: 4.5/5 (2 votes cast)

Tags: , ,

Permalink Comments (0) Manuel777 Jul 17, 2010
76 views

Password based encription script

Filed under: Scripts

This is a very nifty script i made up some time ago, what it does is to encript a given string (argument0) with a given password (argument1), it obviously returns the encripted string.

/*
Encription basic code:
-Arg0 = String
-Arg1 = Password
 
-Return = Cripted string
 
By Manuel Etchegaray
*/
var n,nn,ch,r,ok,chp;
r = ""
for (n=1; n < string_length(argument0)-1; n+=1)
 {
  ch = ord(string_char_at(argument0,n))
  ok = 0
  for (nn=1; nn < string_length(argument1)+1; nn+=1)
   {
    chp = round(ord(string_char_at(argument1,nn))/nn)
    if n/nn = ceil(n/nn) and ok = 0
     {
      r += chr(ch+chp)//To decript, just change this for: chr(ch-chp)
      ok = 1
     }
   }
  if ok = 0
   {
    chp = ord(string_char_at(argument1,nn))
    r += chr(ch+chp)//To decript, just change this for: chr(ch-chp)
   }
 }
return (r)

What it does exactly? it goes trough the whole string with a ‘for’ loop, changing the ASCII values of the characters based on the password ASCIII values (a simple password+character algorithm). This might sound simple, but i found it really hard to break ( if not impossible ), since you need to know the passoword to decript the text :)

Download GML file

VN:F [1.9.3_1094]
Rating: 5.0/5 (2 votes cast)

Tags:

Permalink Comments (0) Manuel777 Jul 4, 2010
 


page counter