Well, it's been a long since I don't post something for you people. This time, I bring the achievements script in my hands.
You will need this: http://otland.net/f81/achievements-lib-talkaction-122039/
Credits:
Okay, here we go...
Open config/config.php and add this at the end of it:
Go to characters.php and search for '.$player->getLevel().'</TD></TR>';, once you've found this, add this after it.
Now, search for 'Premium Account' : 'Free Account';, and right after $main_content .= '</TABLE>';, add this:
Upload these images to your images/ directory:
Remember that adding this script without having this (http://otland.net/f81/achievements-lib-talkaction-122039/) will result in a very dumb act and you will end up here posting "IT DOESNT WORK!".
Enjoy.
You will need this: http://otland.net/f81/achievements-lib-talkaction-122039/
Credits:
- darkhaos (creator of the achievements in-game script)
- Chris (he made it possible)
- my fingers (made it possible too)
Okay, here we go...
Open config/config.php and add this at the end of it:
PHP:
$config['archez']['secret'] = array(2, 6, 7, 13, 16, 17, 18, 23, 24, 26, 29, 30, 31, 32, 34, 35, 37, 43, 44, 46, 51, 53, 54, 62, 63, 65, 66, 68, 73, 80, 81, 82, 83);
$config['archez']['achievements'] = array(
1 => 'Allow Cookies?',
2 => 'Backpack Tourist',
3 => 'Bearhugger',
4 => 'Bone Brother',
5 => 'Chorister',
6 => 'Fountain of Life',
7 => 'Here, Fishy Fishy!',
8 => 'Honorary Barbarian',
9 => 'Huntsman',
10 => 'Just in Time',
11 => 'Matchmaker',
12 => 'Nightmare Knight',
13 => 'Party Animal',
14 => 'Secret Agent',
15 => 'Talented Dancer',
16 => 'Territorial',
17 => 'Worm Whacker',
18 => 'Allowance Collector',
19 => 'Amateur Actor',
20 => 'Animal Activist',
21 => 'Beach Tamer',
22 => 'Blessed!',
23 => 'Exquisite Taste',
24 => 'Fireworks in the Sky',
25 => 'Greenhorn',
26 => 'Jinx',
27 => 'Lucid Dreamer',
28 => 'Mathemagician',
29 => 'Masquerader',
30 => 'Ministrel',
31 => 'Poet Laureate',
32 => 'Quick as a Turtle',
33 => 'Sea Scout',
34 => 'Steampunked',
35 => 'Superstitios',
36 => 'The Milkman',
37 => 'Turncoat',
38 => 'Vive la Resistance',
39 => 'Archpostman',
40 => 'Clay Fighter',
41 => 'Efreet Ally',
42 => 'Ghostwisperer',
43 => 'His True Face',
44 => 'Ice Sculptor',
45 => 'King Tibanus Fan',
46 => 'Marblelous',
47 => 'Marid Ally',
48 => 'Passionate Kisser',
49 => 'Perfect Fool',
50 => 'Recognised Trader',
51 => 'Rockstar',
52 => 'Scrapper',
53 => 'Vanity',
54 => 'Wayfarer',
55 => 'Champion of Chazorai',
56 => 'Culinary Master',
57 => 'Explorer',
58 => 'Follower of Azerus',
59 => 'Follower of Palimuth',
60 => 'Friend of the Apes',
61 => 'Golem in the Gears',
62 => 'High-Flyer',
63 => 'Interior Decorator',
64 => 'Master Thief',
65 => 'Polisher',
66 => 'Potion Addict',
67 => 'Ruthless',
68 => 'Ship\'s Kobold',
69 => 'Top AVIN Agent',
70 => 'Top CGB Agent',
71 => 'Top TBI Agent',
72 => 'Annihilator',
73 => 'Castlemania',
74 => 'Elite Hunter',
75 => 'High Inquisitor',
76 => 'Jamjam',
77 => 'Lord of the Elements',
78 => 'Warlord of Svargrond',
79 => 'Master of the Nexus',
80 => 'Razing!',
81 => 'Dread Lord',
82 => 'Lord Protector',
83 => 'Herbicide'
);
Go to characters.php and search for '.$player->getLevel().'</TD></TR>';, once you've found this, add this after it.
PHP:
/* Achievements Points */
$achievementPoints = $SQL->query('SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE "200%" AND `player_id` = ' . $player->getId())->fetch();
if(!$achievementPoints['sum']) { $achPoints = '0'; } else { $achPoints = $achievementPoints['sum']; }
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Achievement Points:</TD><TD>'.$achPoints.'</TD></TR>';
/* Achievements Points END*/
Now, search for 'Premium Account' : 'Free Account';, and right after $main_content .= '</TABLE>';, add this:
PHP:
/*
Achievements website script by Archez.
http://otland.net/members/archez/
Achievements in-game functions and script by darkhaos.
http://otland.net/members/darkhaos/
A person that made this script possible, Chris.
http://otland.net/members/chris/
------------------------------------------------------
Merely scripted for Gesior AAC.
------------------------------------------------------
*/
$achievements = $SQL->query('SELECT `key`, `player_id` FROM `player_storage` WHERE `key` LIKE "200%" AND `player_id` = ' . $player->getId())->fetchAll();
$main_content .= '<br /><table border=0 cellspacing="1" cellpadding="4" width=100%><tr bgcolor="'.$config['site']['vdarkborder'].'"><td colspan="2" class=white><b>Account Achievements</b></td></tr>';
if(!$achievements)
{
$main_content .= '<tr bgcolor="'.$config['site']['lightborder'].'"><td>There are no achievements set to be displayed for this character.</td></tr>';
}
else
{
$number_of_rows = 0;
foreach($achievements as $row)
{
if(!array_key_exists(($row['key'] - 19999 ), $achievements))
{
if($row['key'] - 20000 <= 54) { $grade = '<img src="http://img02.imgland.net/KN627j4lLN.gif" />'; }
elseif($row['key'] - 20000 >= 55) { $grade = '<img src="http://img02.imgland.net/KN627j4lLN.gif" /> <img src="http://img02.imgland.net/KN627j4lLN.gif" />'; }
$secret = false;
if(in_array(($row['key'] - 20000), $config['archez']['secret']))
{
$secret = '<img src="http://img04.imgland.net/PuMz0mVqSG.gif" />';
}
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; }
$main_content .= '<tr bgcolor="'.$bgcolor.'"><td width="20%">'.$grade.'</td><td>' . $config['archez']['achievements'][$row['key'] - 20000] . '<span style="float:right;">'.$secret.'</span></td></tr>';
$number_of_rows++;
}
}
}
$main_content .= '</table>';
/* END OF ACHIEVEMENTS */
Upload these images to your images/ directory:
Code:
http://img02.imgland.net/KN627j4lLN.gif
Code:
http://img04.imgland.net/PuMz0mVqSG.gif
Remember that adding this script without having this (http://otland.net/f81/achievements-lib-talkaction-122039/) will result in a very dumb act and you will end up here posting "IT DOESNT WORK!".
Enjoy.
Last edited: