• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

GESIOR 2012 - ideas, bug reports

Added geolocation script. When people register it geolocates their IP and save in table `accounts`, column 'flag' [2 letters country code]. Geolocation takes around 0.0002 second [uses 38 files with information about IPs location, all together got 4MB, it loads one file for one geolocation]. No more stupid question 'where are you from?' and list of 200 countries.
Added 'flag' (image) to highscores.php, characters.php, whoisonline.php (method that doesn't use any extra query, not like popular old version.. [400 SQL queries per 1 highscore page])
Geolocation is in class 'Website', code:
PHP:
	public static function getCountryCode($IP)
	{
		$a = explode(".",$IP);
		if($a[0] == 10) // IPs 10.0.0.0 - 10.255.255.255 = private network, so can't geolocate
			return '';
		if($a[0] == 127) // IPs 127.0.0.0 - 127.255.255.255 = local network, so can't geolocate
			return '';
		if($a[0] == 172 && ($a[1] >= 16 && $a[1] <= 31)) // IPs 172.16.0.0 - 172.31.255.255 = private network, so can't geolocate
			return '';
		if($a[0] == 192 && $a[1] == 168) // IPs 192.168.0.0 - 192.168.255.255 = private network, so can't geolocate
			return '';
		if($a[0] >= 224) // IPs over 224.0.0.0 are not assigned, so can't geolocate
			return '';
		$longIP = $a[0] * 256 * 256 * 256 + $a[1] * 256 * 256 + $a[2] * 256 + $a[3]; // we need unsigned value
		$countries = unserialize(file_get_contents('cache/flags/flag' . bcdiv($longIP, 100000000, 0))); // load file
		$lastCountryCode = '';
		foreach($countries as $fromLong => $countryCode)
		{
			if($fromLong > $longIP)
				break;
			$lastCountryCode = $countryCode;
		}
		return $lastCountryCode;
	}
Data (IPs location) prepared by script:
PHP:
$lines = file('GeoIPCountryWhois.csv');
$lastIP = 0;
$lastCountry = '';
$fileC = -1;
$data = array();
foreach ($lines as $line_num => $line)
{
	$info = explode(",", $line, 6);
	$iIP = trim($info[2], '"');
	$iC = trim($info[4], '"');
	if(bcdiv($iIP, 100000000, 0) != $fileC)
	{
		$fileC = bcdiv($iIP, 100000000, 0);
		$data[$fileC][$lastIP] = $lastCountry;
	}
	$data[$fileC][$iIP] = strtolower($iC);
	$lastIP = $iIP;
	$lastCountry = strtolower($iC);

}
foreach($data as $i => $dat)
{
	file_put_contents('flags/flag' . $i, serialize($dat));
}
Newest list of IPs location (that you must parse by script above and add to folder /cache/flags/ in acc. maker) you can get free:
MaxMind - GeoLite Databases | Free IP Geolocation Database
Get 'GeoLite Country' [not city] in '.csv' format (in .zip, unzip before you run PHP script).

Files updated!
.zip
http://ots.me/gesior/Gesior_2012_beta_0.3.6_2012_10_07.zip
file viewer
GESIOR 2012 ver. 1.0.0 BETA for 0.3.6
 
I made new 'signatures' script, loads fast, refresh signature after 30 seconds, uses cache. I fixed all SQL queries (should work with mysql, sqlite, pgsql) in acc. Maker except forum.php, I'll fix it today and then acc. Maker will be ready for release.

Until now I made only tibiacom layout, would be nice if you post links to some cool layouts I should add to acc. Maker before release.
 
I made new 'signatures' script, loads fast, refresh signature after 30 seconds, uses cache. I fixed all SQL queries (should work with mysql, sqlite, pgsql) in acc. Maker except forum.php, I'll fix it today and then acc. Maker will be ready for release.

Until now I made only tibiacom layout, would be nice if you post links to some cool layouts I should add to acc. Maker before release.

Thank you Gesior.PL, for make this community Bigger :)
 
At Latestnews - Anderion you can check how looks/works new acc. maker, new ZayPay script (looks, not works).
You can also make test account+character and check on highscores if you got right country flag near name.

You can also check how looks new paypal script (I will check paypal documentation and do few tests with my friend and my paypal account to make sure it's safe and works fine):
Paypal - Anderion

Example config of new paypal script:
PHP:
<?php
$paypal_report_url = 'http://anderion.net/paypal_report.php';
$paypal_return_url = 'http://anderion.net/?subtopic=shopsystem';
$paypal_image = 'https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif';
$paypal_payment_type = '_xclick'; // '_xclick' (Buy Now) or '_donations'

$paypals[0]['mail'] = '[email protected]'; // your paypal login
$paypals[0]['name'] = '100 premium points on server anderion.net for 10 EURO';
$paypals[0]['money_amount'] = '10.0';
$paypals[0]['money_currency'] = 'EUR'; // USD, EUR, more codes: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes
$paypals[0]['premium_points'] = 100;

'item images' are not uploaded to dedic, so on 'characters.php' you can't see items of players :(

Files updated on:
GESIOR 2012 ver. 1.0.0 BETA for 0.3.6
 
Powergammers e most online scripts are cool features that can be added
 
Bug found:

Bug found:

In character deaths list there is always a double dot ".." at the end of every death.

Example: "20 Sep 2012, 16:46 Died at level 351 by demon.." <---
Instead of: "20 Sep 2012, 16:46 Died at level 351 by demon."

Check it here: Characters - Anderion

I know it is a very minor bug, but it makes the system look a bit dirty :$

Hope I helped and hope you can fix it easily :rolleyes:
 
Code:
    $dead_add_content .= "[COLOR=#ff0000][SIZE=5].[/SIZE][/COLOR]</td></tr>";

If it disturbs you, then just remove that dot? :p
 
Found another bug :blink:

When you go to: Community -> Houses, and select for example:
Town: Thais
Owner: All
Sort by: Name

Then you click Submit and you see the list of houses: Houses - Anderion
__________________________________________________

screenshot1010201212030.png

__________________________________________________

If you click the name of any owner, you will get into an error page, not into the character page (for example, click on Tester and you will see):
__________________________________________________

screenshot1010201212010.png

__________________________________________________

I will post here if I find more bugs. Meanwhile, keep the good work, by now this is the only Acc Maker that works in my server, so ty for your work ^_^


Edit: The bug is that the houses.php page redirects to character.php instead of characters.php
Simply go to line 126 and correct the missing "s" :)
 
Last edited:
It's not a bug, just a typo mistake.

Code:
http://anderion.net/?subtopic=character[COLOR=#ff0000][B][SIZE=2]s[/SIZE][/B][/COLOR]&name=Test
 
Code:
    $dead_add_content .= "[COLOR=#ff0000][SIZE=5].[/SIZE][/COLOR]</td></tr>";

If it disturbs you, then just remove that dot? :p

Thanks Ninja, I didn't actually see the code, but I knew it couldn't be a hard bug :p

Btw 99% of servers haven't removed that dot from their characters.php xD

- - - Updated - - -

It's not a bug, just a typo mistake.

Code:
http://anderion.net/?subtopic=character[COLOR=#ff0000][B][SIZE=2]s[/SIZE][/B][/COLOR]&name=Test

Lawl... That's why I was going crazy thinking that it was the correct url :(

Anyway it should be corrected before release..

Ty again, you got a thousand eyes! :ninja: (This, and I am kinda asleep :huh: xD)
 
Hello maybe it's better having the real tibia website layout really like rl tibia.
When u are using Mozilla firefox the design is the same like rl tibia.
But using internet explorer or google chrome makes it looks different and not good.

Internet Explorer / google chrome :

Mozilla:

I hope u understand what I mean, I have tryed a few things on the basic.css file. But nop
couldnt fix this..
 
What have you tried exactly?

- - - Updated - - -

Replace

Code:
<div id="Bodycontainer">

with

Code:
<div style="width:1200px;" id="Bodycontainer">

Problem solved :p
 
Last edited:
Double dot at end of killers list changed to single in killstatistics.php and characters.php
Layout fixed (if that change from post above works).
houses.php link to player page fixed.
 
Another thing in killstatistics.php I would change would be this.

PHP:
$players_rows .= "killed at level <b>".$death['level']."</b>";
$players_rows .= " by ";
$players_rows .= "died at level <b>".$death['level']."</b>";
$players_rows .= " by ".$killer['monster_name'];


You may ask why? Because it shows "by" before each monster name for example.

Code:
died at level 208 [COLOR=#ff0000]by[/COLOR] a serpent spawn, [COLOR=#ff0000]by[/COLOR] a medusa, [COLOR=#ff0000]by[/COLOR] a green djinn, [COLOR=#ff0000]by[/COLOR] a eternal guardian and [COLOR=#ff0000]by[/COLOR] a souleater.

Correct way would be like this.

PHP:
$players_rows .= "killed at level <b>".$death['level']."</b> by ";
$players_rows .= " ";
$players_rows .= "died at level <b>".$death['level']."</b> by ";
$players_rows .= " ".$killer['monster_name'];

Code:
died at level 208 [COLOR=#ff0000]by[/COLOR] a serpent spawn, a medusa, a green djinn, a eternal guardian and a souleater.

- - - Updated - - -

This could be added aswell since it shows if the character either were slain, crushed, eliminated or annihilated.

PHP:
            if($i == 1)             
                { 
            if ($count <= 4){ 
                    $players_rows .= "killed at level <b>".$death['level']."</b> by "; 
                } 
            elseif ($count > 4 and $count < 10){ 
                    $players_rows .= "slain at level <b>".$death['level']."</b> by "; 
                } 
            elseif ($count > 9 and $count < 15){ 
                    $players_rows .= "crushed at level <b>".$death['level']."</b> by "; 
                } 
            elseif ($count > 14 and $count < 20){ 
                    $players_rows .= "eliminated at level <b>".$death['level']."</b> by "; 
                }
            elseif ($count > 19) {
                    $players_rows .= "annihilated at level <b>".$death['level']."</b> by ";
                }
            }
 
Last edited:
should be like this
Code:
died at level 208 by a serpent spawn, a medusa, a green djinn, a[B]n[/B] eternal guardian, a[B]n[/B] ancient scarab and a souleater.
 
Why would it?

You can check it out in TFS subversion :)

Code:
<monster name="Eternal Guardian" nameDescription="[COLOR=#ff0000]a[/COLOR] eternal guardian" race="blood" experience="1800" speed="420" manacost="0">
<monster name="Ancient Scarab" nameDescription="[COLOR=#ff0000]a[/COLOR] ancient scarab" race="venom" experience="720" speed="330" manacost="0">
 
Back
Top