• 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!

Afs-cms

Status
Not open for further replies.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampplite\htdocs\tibia\info.php on line 502

And secound problem: Show that my server is offline, when its online at the same computer. xD 127.0.0.1, and local host tryed. Lol

~
Exept those bugs, its awesome ! :) Good job, I will use it for sure
 
When I start using the AAC I get this message and no layout, just a bunch of text fields and links

Code:
[B]Warning[/B]:  include(layouts/grayshades/PHP Files/gs_header.inc.php) [[URL="http://localhost/function.include"]function.include[/URL]]: failed to open stream: No such file or directory in [B]C:\xampp\htdocs\Includes\header_includes.PHP[/B] on line [B]26[/B]

[B]Warning[/B]:  include() [[URL="http://localhost/function.include"]function.include[/URL]]: Failed opening 'layouts/grayshades/PHP Files/gs_header.inc.php' for inclusion (include_path='.;C:\xampp\php\pear\') in [B]C:\xampp\htdocs\Includes\header_includes.PHP[/B] on line [B]26[/B]

doesn't matter which layout I use.
 
Yeah, had the same prob. You need to edit a file inside the folder Include

Include -> header_includes
Code:
Line 26:  include ('layouts/grayshades/PHP Files/gs_header.inc.php'); }

Replace with: include ('layouts/grayshades/PHP Files/gs_top.inc.php'); }
 
v1.7 contains bugs..I didn't test the new includes system well enough. I'll post an update soon.

Sorry :(
 
WWhen? Can't wait! :p Whats bugs does it contain? The Layout bug isnt that big that its need a new release! :p

IF the offline bug is something everyone gets and its hard to fix, then i can understand a new release! xD
 
v1.7a released (bug fix release) Everyone should download it and as always report any errors or vulnerabilities here.

@ Sagitta - The errors you have are because of xampplite, i've never used it all I know is that anyone who has gets errors. I don't know the difference between xampp and xampplite so I can't offer any help other then suggest switching. If you could give me more info on xammplite (like the differences) that'd be great.
 
Last edited:
Config.php:
PHP:
//No voc settings
$novoc['cap'] = '400';
$novoc['hp'] = '150';
$novoc['mag'] = '0';
$novoc['mana'] = '0';
//Starting EQ
$novoc_helm['helmet'] = ''; //This is the slot for a helmet.
$novoc_neck['necklace'] = ''; //This is the slot for a necklace.
$novoc_bag['bag'] = ''; //This is the slot for a bag or backpack.
$novoc_armor['armor'] = ''; //This is the slot for armor.
$novoc_lhand['lhand'] = ''; //This slot can hold a shield or weapon.
$novoc_rhand['rhand'] = '2382'; //This slot can hold a shield or weapon.
$novoc_legs['legs'] = ''; //This is the slot for legs.
$novoc_boots['boots'] = ''; //This is the slot for boots.
$novoc_ammo['ammo'] = '2050'; //This is the slot where you place arrows or other items.
$novoc_amount['novoc_amount'] = '1'; //How many of the item in the ammo slot should players get?
//Looks
$novoc['lookbody'] = '68';
$novoc['lookfeet'] = '76';
$novoc['lookhead'] = '78';
$novoc['looklegs'] = '39';
$novoc['looktype'] = '128';
$novoc['lookaddons'] = '0';

//Sorcerer settings
$sorc['cap'] = '470';
$sorc['hp'] = '185';
$sorc['mag'] = '0';
$sorc['mana'] = '35';
$sorc['soul'] = '100';
//Starting EQ
$sorc_helm['helmet'] = '2461'; //This is the slot for a helmet.
$sorc_neck['necklace'] = '2170'; //This is the slot for a necklace.
$sorc_bag['bag'] = '1988'; //This is the slot for a bag or backpack.
$sorc_armor['armor'] = '2467'; //This is the slot for armor.
$sorc_lhand['lhand'] = '2512'; //This slot can hold a shield or weapon.
$sorc_rhand['rhand'] = '2398'; //This slot can hold a shield or weapon.
$sorc_legs['legs'] = '2649'; //This is the slot for legs.
$sorc_boots['boots'] = '2643'; //This is the slot for boots.
$sorc_ammo['ammo'] = '2120'; //This is the slot where you place arrows or other items.
$sorc_amount['sorc_amount'] = '1'; //How many of the item in the ammo slot should players get?
//Looks
$sorc['lookbody'] = '68';
$sorc['lookfeet'] = '76';
$sorc['lookhead'] = '78';
$sorc['looklegs'] = '39';
$sorc['looktype'] = '128';
$sorc['lookaddons'] = '0';

//Druid settings
$druid['cap'] = '470';
$druid['hp'] = '185';
$druid['mag'] = '0';
$druid['mana'] = '35';
$druid['soul'] = '100';
//Starting EQ
$druid_helm['helmet'] = '2461'; //This is the slot for a helmet.
$druid_neck['necklace'] = '2170'; //This is the slot for a necklace.
$druid_bag['bag'] = '1988'; //This is the slot for a bag or backpack.
$druid_armor['armor'] = '2467'; //This is the slot for armor.
$druid_lhand['lhand'] = '2512'; //This slot can hold a shield or weapon.
$druid_rhand['rhand'] = '2398'; //This slot can hold a shield or weapon.
$druid_legs['legs'] = '2649'; //This is the slot for legs.
$druid_boots['boots'] = '2643'; //This is the slot for boots.
$druid_ammo['ammo'] = '2120'; //This is the slot where you place arrows or other items.
$druid_amount['druid_amount'] = '1'; //How many of the item in the ammo slot should players get?
//Looks
$druid['lookbody'] = '68';
$druid['lookfeet'] = '76';
$druid['lookhead'] = '78';
$druid['looklegs'] = '39';
$druid['looktype'] = '128';
$druid['lookaddons'] = '0';

//Paladin settings
$paladin['cap'] = '470';
$paladin['hp'] = '185';
$paladin['mag'] = '0';
$paladin['mana'] = '35';
$paladin['soul'] = '100';
//Starting EQ
$paladin_helm['helmet'] = '2461'; //This is the slot for a helmet.
$paladin_neck['necklace'] = '2170'; //This is the slot for a necklace.
$paladin_bag['bag'] = '1988'; //This is the slot for a bag or backpack.
$paladin_armor['armor'] = '2467'; //This is the slot for armor.
$paladin_lhand['lhand'] = '2512'; //This slot can hold a shield or weapon.
$paladin_rhand['rhand'] = '2398'; //This slot can hold a shield or weapon.
$paladin_legs['legs'] = '2649'; //This is the slot for legs.
$paladin_boots['boots'] = '2643'; //This is the slot for boots.
$paladin_ammo['ammo'] = '2120'; //This is the slot where you place arrows or other items.
$paladin_amount['paladin_amount'] = '1'; //How many of the item in the ammo slot should the player get?
//Looks
$paladin['lookbody'] = '68';
$paladin['lookfeet'] = '76';
$paladin['lookhead'] = '78';
$paladin['looklegs'] = '39';
$paladin['looktype'] = '128';
$paladin['lookaddons'] = '0';

//Knight settings
$knight['cap'] = '470';
$knight['hp'] = '185';
$knight['mag'] = '0';
$knight['mana'] = '35';
$knight['soul'] = '100';
//Starting EQ
$knight_helm['helmet'] = '2461'; //This is the slot for a helmet.
$knight_neck['necklace'] = '2170'; //This is the slot for a necklace.
$knight_bag['bag'] = '1988'; //This is the slot for a bag or backpack.
$knight_armor['armor'] = '2467'; //This is the slot for armor.
$knight_lhand['lhand'] = '2512'; //This slot can hold a shield or weapon.
$knight_rhand['rhand'] = '2398'; //This slot can hold a shield or weapon.
$knight_legs['legs'] = '2649'; //This is the slot for legs.
$knight_boots['boots'] = '2643'; //This is the slot for boots.
$knight_ammo['ammo'] = '2120'; //This is the slot where you place arrows or other items.
$knight_amount['knight_amount'] = '1'; //How many of the item in the ammo slot should the player get?
//Looks
$knight['lookbody'] = '68';
$knight['lookfeet'] = '76';
$knight['lookhead'] = '78';
$knight['looklegs'] = '39';
$knight['looktype'] = '128';
$knight['lookaddons'] = '0';
Account.php Line 761:
PHP:
			// No voc settings.
												if($vocin == 0) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '0', '" .$novoc['hp']. "', '" .$novoc['hp']. "', '$startexp', '" .$novoc['mag']. "', '" .$novoc['mana']. "', '" .$novoc['mana']. "', '$townin', '".$rook_spawn_x."', '".$rook_spawn_y."', '".$rook_spawn_z."', '0', '" .$novoc['cap']. "', '" .$novoc['lookbody']. "', '" .$novoc['lookfeet']. "', '" .$novoc['lookhead']. "', '" .$novoc['looklegs']. "', '" .$novoc['looktype']. "', '" .$novoc['lookaddons']. "', '" .$novoc['soul']. "', '$sexin')") or die(mysql_error());
				
													$query2 = mysql_query("SELECT * FROM `players` WHERE (`name` = '".$namein."') ") or die(mysql_error());
													while($sql2 = mysql_fetch_array($query2))
													{
														$playerid = $sql2['id'];
													}
													
													$item1 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','1','1','" .$novoc_helm['helmet']. "','1')";
													$item2 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','2','2','" .$novoc_neck['necklace']. "','1')";
													$item3 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','3','3','" .$novoc_bag['bag']. "','1')";
													$item4 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','4','4','" .$novoc_armor['armor']. "','1')";
													$item5 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','5','5','" .$novoc_lhand['lhand']. "','1')";
													$item6 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','6','6','" .$novoc_rhand['rhand']. "','1')";
													$item7 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','7','7','" .$novoc_legs['legs']. "','1')";
													$item8 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','8','8','" .$novoc_boots['boots']. "','1')";
													$item10 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','10','10','" .$novoc_ammo['ammo']. "','" .$novoc_amount['novoc_amount']. "')";

													mysql_query($item1) or die(mysql_error());
													mysql_query($item2) or die(mysql_error());
													mysql_query($item3) or die(mysql_error());
													mysql_query($item4) or die(mysql_error());
													mysql_query($item5) or die(mysql_error());
													mysql_query($item6) or die(mysql_error());
													mysql_query($item7) or die(mysql_error());
													mysql_query($item8) or die(mysql_error());
													mysql_query($item10) or die(mysql_error());

												}

												// Sorcerer settings.
												elseif($vocin == 1) {
													
													if($townin == 1) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '1', '" .$sorc['hp']. "', '" .$sorc['hp']. "', '$startexp', '" .$sorc['mag']. "', '" .$sorc['mana']. "', '" .$sorc['mana']. "', '$townin', '" .$town1_spawn_x. "', '" .$town1_spawn_y. "', '" .$town1_spawn_z. "', '0', '" .$sorc['cap']. "', '" .$sorc['lookbody']. "', '" .$sorc['lookfeet']. "', '" .$sorc['lookhead']. "', '" .$sorc['looklegs']. "', '" .$sorc['looktype']. "', '" .$sorc['lookaddons']. "', '" .$sorc['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 2) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '1', '" .$sorc['hp']. "', '" .$sorc['hp']. "', '$startexp', '" .$sorc['mag']. "', '" .$sorc['mana']. "', '" .$sorc['mana']. "', '$townin', '" .$town2_spawn_x. "', '" .$town2_spawn_y. "', '" .$town2_spawn_z. "', '0', '" .$sorc['cap']. "', '" .$sorc['lookbody']. "', '" .$sorc['lookfeet']. "', '" .$sorc['lookhead']. "', '" .$sorc['looklegs']. "', '" .$sorc['looktype']. "', '" .$sorc['lookaddons']. "', '" .$sorc['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 3) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '1', '" .$sorc['hp']. "', '" .$sorc['hp']. "', '$startexp', '" .$sorc['mag']. "', '" .$sorc['mana']. "', '" .$sorc['mana']. "', '$townin', '" .$town3_spawn_x. "', '" .$town3_spawn_y. "', '" .$town3_spawn_z. "', '0', '" .$sorc['cap']. "', '" .$sorc['lookbody']. "', '" .$sorc['lookfeet']. "', '" .$sorc['lookhead']. "', '" .$sorc['looklegs']. "', '" .$sorc['looktype']. "', '" .$sorc['lookaddons']. "', '" .$sorc['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 4) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '1', '" .$sorc['hp']. "', '" .$sorc['hp']. "', '$startexp', '" .$sorc['mag']. "', '" .$sorc['mana']. "', '" .$sorc['mana']. "', '$townin', '" .$town4_spawn_x. "', '" .$town4_spawn_y. "', '" .$town4_spawn_z. "', '0', '" .$sorc['cap']. "', '" .$sorc['lookbody']. "', '" .$sorc['lookfeet']. "', '" .$sorc['lookhead']. "', '" .$sorc['looklegs']. "', '" .$sorc['looktype']. "', '" .$sorc['lookaddons']. "', '" .$sorc['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 5) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '1', '" .$sorc['hp']. "', '" .$sorc['hp']. "', '$startexp', '" .$sorc['mag']. "', '" .$sorc['mana']. "', '" .$sorc['mana']. "', '$townin', '" .$town5_spawn_x. "', '" .$town5_spawn_y. "', '" .$town5_spawn_z. "', '0', '" .$sorc['cap']. "', '" .$sorc['lookbody']. "', '" .$sorc['lookfeet']. "', '" .$sorc['lookhead']. "', '" .$sorc['looklegs']. "', '" .$sorc['looktype']. "', '" .$sorc['lookaddons']. "', '" .$sorc['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 6) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '1', '" .$sorc['hp']. "', '" .$sorc['hp']. "', '$startexp', '" .$sorc['mag']. "', '" .$sorc['mana']. "', '" .$sorc['mana']. "', '$townin', '" .$town6_spawn_x. "', '" .$town6_spawn_y. "', '" .$town6_spawn_z. "', '0', '" .$sorc['cap']. "', '" .$sorc['lookbody']. "', '" .$sorc['lookfeet']. "', '" .$sorc['lookhead']. "', '" .$sorc['looklegs']. "', '" .$sorc['looktype']. "', '" .$sorc['lookaddons']. "', '" .$sorc['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 7) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '1', '" .$sorc['hp']. "', '" .$sorc['hp']. "', '$startexp', '" .$sorc['mag']. "', '" .$sorc['mana']. "', '" .$sorc['mana']. "', '$townin', '" .$town7_spawn_x. "', '" .$town7_spawn_y. "', '" .$town7_spawn_z. "', '0', '" .$sorc['cap']. "', '" .$sorc['lookbody']. "', '" .$sorc['lookfeet']. "', '" .$sorc['lookhead']. "', '" .$sorc['looklegs']. "', '" .$sorc['looktype']. "', '" .$sorc['lookaddons']. "', '" .$sorc['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 8) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '1', '" .$sorc['hp']. "', '" .$sorc['hp']. "', '$startexp', '" .$sorc['mag']. "', '" .$sorc['mana']. "', '" .$sorc['mana']. "', '$townin', '" .$town8_spawn_x. "', '" .$town8_spawn_y. "', '" .$town8_spawn_z. "', '0', '" .$sorc['cap']. "', '" .$sorc['lookbody']. "', '" .$sorc['lookfeet']. "', '" .$sorc['lookhead']. "', '" .$sorc['looklegs']. "', '" .$sorc['looktype']. "', '" .$sorc['lookaddons']. "', '" .$sorc['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 9) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '1', '" .$sorc['hp']. "', '" .$sorc['hp']. "', '$startexp', '" .$sorc['mag']. "', '" .$sorc['mana']. "', '" .$sorc['mana']. "', '$townin', '" .$town9_spawn_x. "', '" .$town9_spawn_y. "', '" .$town9_spawn_z. "', '0', '" .$sorc['cap']. "', '" .$sorc['lookbody']. "', '" .$sorc['lookfeet']. "', '" .$sorc['lookhead']. "', '" .$sorc['looklegs']. "', '" .$sorc['looktype']. "', '" .$sorc['lookaddons']. "', '" .$sorc['soul']. "', '$sexin')") or die(mysql_error());
													}
													$query2 = mysql_query("SELECT * FROM `players` WHERE (`name` = '".$namein."') ") or die(mysql_error());
													while($sql2 = mysql_fetch_array($query2))
													{
														$playerid = $sql2['id'];
													}

													$item1 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','1','1','" .$sorc_helm['helmet']. "','1')";
													$item2 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','2','2','" .$sorc_neck['necklace']. "','1')";
													$item3 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','3','3','" .$sorc_bag['bag']. "','1')";
													$item4 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','4','4','" .$sorc_armor['armor']. "','1')";
													$item5 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','5','5','" .$sorc_lhand['lhand']. "','1')";
													$item6 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','6','6','" .$sorc_rhand['rhand']. "','1')";
													$item7 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','7','7','" .$sorc_legs['legs']. "','1')";
													$item8 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','8','8','" .$sorc_boots['boots']. "','1')";
													$item10 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','10','10','" .$sorc_ammo['ammo']. "','" .$sorc_amount['sorc_amount']. "')";


													mysql_query($item1) or die(mysql_error());
													mysql_query($item2) or die(mysql_error());
													mysql_query($item3) or die(mysql_error());
													mysql_query($item4) or die(mysql_error());
													mysql_query($item5) or die(mysql_error());
													mysql_query($item6) or die(mysql_error());
													mysql_query($item7) or die(mysql_error());
													mysql_query($item8) or die(mysql_error());
													mysql_query($item10) or die(mysql_error());

												}
												// Druid settings.
												elseif($vocin == 2) {

													if($townin == 1) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '2', '" .$druid['hp']. "', '" .$druid['hp']. "', '$startexp', '" .$druid['mag']. "', '" .$druid['mana']. "', '" .$druid['mana']. "', '$townin', '" .$town1_spawn_x. "', '" .$town1_spawn_y. "', '" .$town1_spawn_z. "', '0', '" .$druid['cap']. "', '" .$druid['lookbody']. "', '" .$druid['lookfeet']. "', '" .$druid['lookhead']. "', '" .$druid['looklegs']. "', '" .$druid['looktype']. "', '" .$druid['lookaddons']. "', '" .$druid['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 2) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '2', '" .$druid['hp']. "', '" .$druid['hp']. "', '$startexp', '" .$druid['mag']. "', '" .$druid['mana']. "', '" .$druid['mana']. "', '$townin', '" .$town2_spawn_x. "', '" .$town2_spawn_y. "', '" .$town2_spawn_z. "', '0', '" .$druid['cap']. "', '" .$druid['lookbody']. "', '" .$druid['lookfeet']. "', '" .$druid['lookhead']. "', '" .$druid['looklegs']. "', '" .$druid['looktype']. "', '" .$druid['lookaddons']. "', '" .$druid['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 3) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '2', '" .$druid['hp']. "', '" .$druid['hp']. "', '$startexp', '" .$druid['mag']. "', '" .$druid['mana']. "', '" .$druid['mana']. "', '$townin', '" .$town3_spawn_x. "', '" .$town3_spawn_y. "', '" .$town3_spawn_z. "', '0', '" .$druid['cap']. "', '" .$druid['lookbody']. "', '" .$druid['lookfeet']. "', '" .$druid['lookhead']. "', '" .$druid['looklegs']. "', '" .$druid['looktype']. "', '" .$druid['lookaddons']. "', '" .$druid['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 4) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '2', '" .$druid['hp']. "', '" .$druid['hp']. "', '$startexp', '" .$druid['mag']. "', '" .$druid['mana']. "', '" .$druid['mana']. "', '$townin', '" .$town4_spawn_x. "', '" .$town4_spawn_y. "', '" .$town4_spawn_z. "', '0', '" .$druid['cap']. "', '" .$druid['lookbody']. "', '" .$druid['lookfeet']. "', '" .$druid['lookhead']. "', '" .$druid['looklegs']. "', '" .$druid['looktype']. "', '" .$druid['lookaddons']. "', '" .$druid['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 5) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '2', '" .$druid['hp']. "', '" .$druid['hp']. "', '$startexp', '" .$druid['mag']. "', '" .$druid['mana']. "', '" .$druid['mana']. "', '$townin', '" .$town5_spawn_x. "', '" .$town5_spawn_y. "', '" .$town5_spawn_z. "', '0', '" .$druid['cap']. "', '" .$druid['lookbody']. "', '" .$druid['lookfeet']. "', '" .$druid['lookhead']. "', '" .$druid['looklegs']. "', '" .$druid['looktype']. "', '" .$druid['lookaddons']. "', '" .$druid['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 6) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '2', '" .$druid['hp']. "', '" .$druid['hp']. "', '$startexp', '" .$druid['mag']. "', '" .$druid['mana']. "', '" .$druid['mana']. "', '$townin', '" .$town6_spawn_x. "', '" .$town6_spawn_y. "', '" .$town6_spawn_z. "', '0', '" .$druid['cap']. "', '" .$druid['lookbody']. "', '" .$druid['lookfeet']. "', '" .$druid['lookhead']. "', '" .$druid['looklegs']. "', '" .$druid['looktype']. "', '" .$druid['lookaddons']. "', '" .$druid['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 7) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '2', '" .$druid['hp']. "', '" .$druid['hp']. "', '$startexp', '" .$druid['mag']. "', '" .$druid['mana']. "', '" .$druid['mana']. "', '$townin', '" .$town7_spawn_x. "', '" .$town7_spawn_y. "', '" .$town7_spawn_z. "', '0', '" .$druid['cap']. "', '" .$druid['lookbody']. "', '" .$druid['lookfeet']. "', '" .$druid['lookhead']. "', '" .$druid['looklegs']. "', '" .$druid['looktype']. "', '" .$druid['lookaddons']. "', '" .$druid['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 8) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '2', '" .$druid['hp']. "', '" .$druid['hp']. "', '$startexp', '" .$druid['mag']. "', '" .$druid['mana']. "', '" .$druid['mana']. "', '$townin', '" .$town8_spawn_x. "', '" .$town8_spawn_y. "', '" .$town8_spawn_z. "', '0', '" .$druid['cap']. "', '" .$druid['lookbody']. "', '" .$druid['lookfeet']. "', '" .$druid['lookhead']. "', '" .$druid['looklegs']. "', '" .$druid['looktype']. "', '" .$druid['lookaddons']. "', '" .$druid['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 9) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '2', '" .$druid['hp']. "', '" .$druid['hp']. "', '$startexp', '" .$druid['mag']. "', '" .$druid['mana']. "', '" .$druid['mana']. "', '$townin', '" .$town9_spawn_x. "', '" .$town9_spawn_y. "', '" .$town9_spawn_z. "', '0', '" .$druid['cap']. "', '" .$druid['lookbody']. "', '" .$druid['lookfeet']. "', '" .$druid['lookhead']. "', '" .$druid['looklegs']. "', '" .$druid['looktype']. "', '" .$druid['lookaddons']. "', '" .$druid['soul']. "', '$sexin')") or die(mysql_error());
													}
													$query2 = mysql_query("SELECT * FROM `players` WHERE (`name` = '".$namein."') ") or die(mysql_error());
													while($sql2 = mysql_fetch_array($query2))
													{
														$playerid = $sql2['id'];
													}


													$item1 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','1','1','" .$druid_helm['helmet']. "','1')";
													$item2 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','2','2','" .$druid_neck['necklace']. "','1')";
													$item3 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','3','3','" .$druid_bag['bag']. "','1')";
													$item4 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','4','4','" .$druid_armor['armor']. "','1')";
													$item5 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','5','5','" .$druid_lhand['lhand']. "','1')";
													$item6 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','6','6','" .$druid_rhand['rhand']. "','1')";
													$item7 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','7','7','" .$druid_legs['legs']. "','1')";
													$item8 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','8','8','" .$druid_boots['boots']. "','1')";
													$item10 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','10','10','" .$druid_ammo['ammo']. "','" .$druid_amount['druid_amount']. "')";


													mysql_query($item1) or die(mysql_error());
													mysql_query($item2) or die(mysql_error());
													mysql_query($item3) or die(mysql_error());
													mysql_query($item4) or die(mysql_error());
													mysql_query($item5) or die(mysql_error());
													mysql_query($item6) or die(mysql_error());
													mysql_query($item7) or die(mysql_error());
													mysql_query($item8) or die(mysql_error());
													mysql_query($item10) or die(mysql_error());

												}
												// Paladin settings.
												elseif($vocin == 3) {

													if($townin == 1) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '3', '" .$paladin['hp']. "', '" .$paladin['hp']. "', '$startexp', '" .$paladin['mag']. "', '" .$paladin['mana']. "', '" .$paladin['mana']. "', '$townin', '" .$town1_spawn_x. "', '" .$town1_spawn_y. "', '" .$town1_spawn_z. "', '0', '" .$paladin['cap']. "', '" .$paladin['lookbody']. "', '" .$paladin['lookfeet']. "', '" .$paladin['lookhead']. "', '" .$paladin['looklegs']. "', '" .$paladin['looktype']. "', '" .$paladin['lookaddons']. "', '" .$paladin['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 2) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '3', '" .$paladin['hp']. "', '" .$paladin['hp']. "', '$startexp', '" .$paladin['mag']. "', '" .$paladin['mana']. "', '" .$paladin['mana']. "', '$townin', '" .$town2_spawn_x. "', '" .$town2_spawn_y. "', '" .$town2_spawn_z. "', '0', '" .$paladin['cap']. "', '" .$paladin['lookbody']. "', '" .$paladin['lookfeet']. "', '" .$paladin['lookhead']. "', '" .$paladin['looklegs']. "', '" .$paladin['looktype']. "', '" .$paladin['lookaddons']. "', '" .$paladin['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 3) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '3', '" .$paladin['hp']. "', '" .$paladin['hp']. "', '$startexp', '" .$paladin['mag']. "', '" .$paladin['mana']. "', '" .$paladin['mana']. "', '$townin', '" .$town3_spawn_x. "', '" .$town3_spawn_y. "', '" .$town3_spawn_z. "', '0', '" .$paladin['cap']. "', '" .$paladin['lookbody']. "', '" .$paladin['lookfeet']. "', '" .$paladin['lookhead']. "', '" .$paladin['looklegs']. "', '" .$paladin['looktype']. "', '" .$paladin['lookaddons']. "', '" .$paladin['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 4) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '3', '" .$paladin['hp']. "', '" .$paladin['hp']. "', '$startexp', '" .$paladin['mag']. "', '" .$paladin['mana']. "', '" .$paladin['mana']. "', '$townin', '" .$town4_spawn_x. "', '" .$town4_spawn_y. "', '" .$town4_spawn_z. "', '0', '" .$paladin['cap']. "', '" .$paladin['lookbody']. "', '" .$paladin['lookfeet']. "', '" .$paladin['lookhead']. "', '" .$paladin['looklegs']. "', '" .$paladin['looktype']. "', '" .$paladin['lookaddons']. "', '" .$paladin['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 5) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '3', '" .$paladin['hp']. "', '" .$paladin['hp']. "', '$startexp', '" .$paladin['mag']. "', '" .$paladin['mana']. "', '" .$paladin['mana']. "', '$townin', '" .$town5_spawn_x. "', '" .$town5_spawn_y. "', '" .$town5_spawn_z. "', '0', '" .$paladin['cap']. "', '" .$paladin['lookbody']. "', '" .$paladin['lookfeet']. "', '" .$paladin['lookhead']. "', '" .$paladin['looklegs']. "', '" .$paladin['looktype']. "', '" .$paladin['lookaddons']. "', '" .$paladin['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 6) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '3', '" .$paladin['hp']. "', '" .$paladin['hp']. "', '$startexp', '" .$paladin['mag']. "', '" .$paladin['mana']. "', '" .$paladin['mana']. "', '$townin', '" .$town6_spawn_x. "', '" .$town6_spawn_y. "', '" .$town6_spawn_z. "', '0', '" .$paladin['cap']. "', '" .$paladin['lookbody']. "', '" .$paladin['lookfeet']. "', '" .$paladin['lookhead']. "', '" .$paladin['looklegs']. "', '" .$paladin['looktype']. "', '" .$paladin['lookaddons']. "', '" .$paladin['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 7) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '3', '" .$paladin['hp']. "', '" .$paladin['hp']. "', '$startexp', '" .$paladin['mag']. "', '" .$paladin['mana']. "', '" .$paladin['mana']. "', '$townin', '" .$town7_spawn_x. "', '" .$town7_spawn_y. "', '" .$town7_spawn_z. "', '0', '" .$paladin['cap']. "', '" .$paladin['lookbody']. "', '" .$paladin['lookfeet']. "', '" .$paladin['lookhead']. "', '" .$paladin['looklegs']. "', '" .$paladin['looktype']. "', '" .$paladin['lookaddons']. "', '" .$paladin['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 8) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '3', '" .$paladin['hp']. "', '" .$paladin['hp']. "', '$startexp', '" .$paladin['mag']. "', '" .$paladin['mana']. "', '" .$paladin['mana']. "', '$townin', '" .$town8_spawn_x. "', '" .$town8_spawn_y. "', '" .$town8_spawn_z. "', '0', '" .$paladin['cap']. "', '" .$paladin['lookbody']. "', '" .$paladin['lookfeet']. "', '" .$paladin['lookhead']. "', '" .$paladin['looklegs']. "', '" .$paladin['looktype']. "', '" .$paladin['lookaddons']. "', '" .$paladin['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 9) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '3', '" .$paladin['hp']. "', '" .$paladin['hp']. "', '$startexp', '" .$paladin['mag']. "', '" .$paladin['mana']. "', '" .$paladin['mana']. "', '$townin', '" .$town9_spawn_x. "', '" .$town9_spawn_y. "', '" .$town9_spawn_z. "', '0', '" .$paladin['cap']. "', '" .$paladin['lookbody']. "', '" .$paladin['lookfeet']. "', '" .$paladin['lookhead']. "', '" .$paladin['looklegs']. "', '" .$paladin['looktype']. "', '" .$paladin['lookaddons']. "', '" .$paladin['soul']. "', '$sexin')") or die(mysql_error());
													}
													$query2 = mysql_query("SELECT * FROM `players` WHERE (`name` = '".$namein."') ") or die(mysql_error());
													while($sql2 = mysql_fetch_array($query2))
													{
														$playerid = $sql2['id'];
													}


													$item1 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','1','1','" .$paladin_helm['helmet']. "','1')";
													$item2 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','2','2','" .$paladin_neck['necklace']. "','1')";
													$item3 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','3','3','" .$paladin_bag['bag']. "','1')";
													$item4 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','4','4','" .$paladin_armor['armor']. "','1')";
													$item5 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','5','5','" .$paladin_lhand['lhand']. "','1')";
													$item6 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','6','6','" .$paladin_rhand['rhand']. "','1')";
													$item7 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','7','7','" .$paladin_legs['legs']. "','1')";
													$item8 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','8','8','" .$paladin_boots['boots']. "','1')";
													$item10 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','10','10','" .$paladin_ammo['ammo']. "','" .$paladin_amount['paladin_amount']. "')";


													mysql_query($item1) or die(mysql_error());
													mysql_query($item2) or die(mysql_error());
													mysql_query($item3) or die(mysql_error());
													mysql_query($item4) or die(mysql_error());
													mysql_query($item5) or die(mysql_error());
													mysql_query($item6) or die(mysql_error());
													mysql_query($item7) or die(mysql_error());
													mysql_query($item8) or die(mysql_error());
													mysql_query($item10) or die(mysql_error());


												}
												// Knight settings.
												elseif($vocin == 4) {

													if($townin == 1) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '4', '" .$knight['hp']. "', '" .$knight['hp']. "', '$startexp', '" .$knight['mag']. "', '" .$knight['mana']. "', '" .$knight['mana']. "', '$townin', '" .$town1_spawn_x. "', '" .$town1_spawn_y. "', '" .$town1_spawn_z. "', '0', '" .$knight['cap']. "', '" .$knight['lookbody']. "', '" .$knight['lookfeet']. "', '" .$knight['lookhead']. "', '" .$knight['looklegs']. "', '" .$knight['looktype']. "', '" .$knight['lookaddons']. "', '" .$knight['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 2) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '4', '" .$knight['hp']. "', '" .$knight['hp']. "', '$startexp', '" .$knight['mag']. "', '" .$knight['mana']. "', '" .$knight['mana']. "', '$townin', '" .$town2_spawn_x. "', '" .$town2_spawn_y. "', '" .$town2_spawn_z. "', '0', '" .$knight['cap']. "', '" .$knight['lookbody']. "', '" .$knight['lookfeet']. "', '" .$knight['lookhead']. "', '" .$knight['looklegs']. "', '" .$knight['looktype']. "', '" .$knight['lookaddons']. "', '" .$knight['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 3) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '4', '" .$knight['hp']. "', '" .$knight['hp']. "', '$startexp', '" .$knight['mag']. "', '" .$knight['mana']. "', '" .$knight['mana']. "', '$townin', '" .$town3_spawn_x. "', '" .$town3_spawn_y. "', '" .$town3_spawn_z. "', '0', '" .$knight['cap']. "', '" .$knight['lookbody']. "', '" .$knight['lookfeet']. "', '" .$knight['lookhead']. "', '" .$knight['looklegs']. "', '" .$knight['looktype']. "', '" .$knight['lookaddons']. "', '" .$knight['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 4) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '4', '" .$knight['hp']. "', '" .$knight['hp']. "', '$startexp', '" .$knight['mag']. "', '" .$knight['mana']. "', '" .$knight['mana']. "', '$townin', '" .$town4_spawn_x. "', '" .$town4_spawn_y. "', '" .$town4_spawn_z. "', '0', '" .$knight['cap']. "', '" .$knight['lookbody']. "', '" .$knight['lookfeet']. "', '" .$knight['lookhead']. "', '" .$knight['looklegs']. "', '" .$knight['looktype']. "', '" .$knight['lookaddons']. "', '" .$knight['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 5) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '4', '" .$knight['hp']. "', '" .$knight['hp']. "', '$startexp', '" .$knight['mag']. "', '" .$knight['mana']. "', '" .$knight['mana']. "', '$townin', '" .$town5_spawn_x. "', '" .$town5_spawn_y. "', '" .$town5_spawn_z. "', '0', '" .$knight['cap']. "', '" .$knight['lookbody']. "', '" .$knight['lookfeet']. "', '" .$knight['lookhead']. "', '" .$knight['looklegs']. "', '" .$knight['looktype']. "', '" .$knight['lookaddons']. "', '" .$knight['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 6) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '4', '" .$knight['hp']. "', '" .$knight['hp']. "', '$startexp', '" .$knight['mag']. "', '" .$knight['mana']. "', '" .$knight['mana']. "', '$townin', '" .$town6_spawn_x. "', '" .$town6_spawn_y. "', '" .$town6_spawn_z. "', '0', '" .$knight['cap']. "', '" .$knight['lookbody']. "', '" .$knight['lookfeet']. "', '" .$knight['lookhead']. "', '" .$knight['looklegs']. "', '" .$knight['looktype']. "', '" .$knight['lookaddons']. "', '" .$knight['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 7) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '4', '" .$knight['hp']. "', '" .$knight['hp']. "', '$startexp', '" .$knight['mag']. "', '" .$knight['mana']. "', '" .$knight['mana']. "', '$townin', '" .$town7_spawn_x. "', '" .$town7_spawn_y. "', '" .$town7_spawn_z. "', '0', '" .$knight['cap']. "', '" .$knight['lookbody']. "', '" .$knight['lookfeet']. "', '" .$knight['lookhead']. "', '" .$knight['looklegs']. "', '" .$knight['looktype']. "', '" .$knight['lookaddons']. "', '" .$knight['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 8) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '4', '" .$knight['hp']. "', '" .$knight['hp']. "', '$startexp', '" .$knight['mag']. "', '" .$knight['mana']. "', '" .$knight['mana']. "', '$townin', '" .$town8_spawn_x. "', '" .$town8_spawn_y. "', '" .$town8_spawn_z. "', '0', '" .$knight['cap']. "', '" .$knight['lookbody']. "', '" .$knight['lookfeet']. "', '" .$knight['lookhead']. "', '" .$knight['looklegs']. "', '" .$knight['looktype']. "', '" .$knight['lookaddons']. "', '" .$knight['soul']. "', '$sexin')") or die(mysql_error());
													}
													if($townin == 9) {
													mysql_query("INSERT INTO players(name, account_id, level, vocation, health, healthmax, experience, maglevel, mana, manamax, town_id, posx, posy, posz, conditions, cap, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, soul, sex) values('$namein', '$acc_logged', '$startlvl', '4', '" .$knight['hp']. "', '" .$knight['hp']. "', '$startexp', '" .$knight['mag']. "', '" .$knight['mana']. "', '" .$knight['mana']. "', '$townin', '" .$town9_spawn_x. "', '" .$town9_spawn_y. "', '" .$town9_spawn_z. "', '0', '" .$knight['cap']. "', '" .$knight['lookbody']. "', '" .$knight['lookfeet']. "', '" .$knight['lookhead']. "', '" .$knight['looklegs']. "', '" .$knight['looktype']. "', '" .$knight['lookaddons']. "', '" .$knight['soul']. "', '$sexin')") or die(mysql_error());
													}
													$query2 = mysql_query("SELECT * FROM `players` WHERE (`name` = '".$namein."') ") or die(mysql_error());
													while($sql2 = mysql_fetch_array($query2))
													{
														$playerid = $sql2['id'];
													}


													$item1 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','1','1','" .$knight_helm['helmet']. "','1')";
													$item2 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','2','2','" .$knight_neck['necklace']. "','1')";
													$item3 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','3','3','" .$knight_bag['bag']. "','1')";
													$item4 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','4','4','" .$knight_armor['armor']. "','1')";
													$item5 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','5','5','" .$knight_lhand['lhand']. "','1')";
													$item6 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','6','6','" .$knight_rhand['rhand']. "','1')";
													$item7 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','7','7','" .$knight_legs['legs']. "','1')";
													$item8 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','8','8','" .$knight_boots['boots']. "','1')";
													$item10 = "INSERT INTO player_items(player_id, pid, sid, itemtype, count) values('$playerid','10','10','" .$knight_ammo['ammo']. "','" .$knight_amount['knight_amount']. "')";


													mysql_query($item1) or die(mysql_error());
													mysql_query($item2) or die(mysql_error());
													mysql_query($item3) or die(mysql_error());
													mysql_query($item4) or die(mysql_error());
													mysql_query($item5) or die(mysql_error());
													mysql_query($item6) or die(mysql_error());
													mysql_query($item7) or die(mysql_error());
													mysql_query($item8) or die(mysql_error());
													mysql_query($item10) or die(mysql_error());
 
I already added configurable starting outfits back, they'll be in v1.8 (also you shouldn't use that script it's from v1.5)
 
Now everything is working EXEPT the server status and the online thing ;/
Configuration is correct and its linked to my IP, indeed.
 
I already added configurable starting outfits back, they'll be in v1.8 (also you shouldn't use that script it's from v1.5)

Im not using them or any others, I just got those files on my PC.
 
Avarian super mega turbo job! xP

Can You say someting more about sql injection? There is only this function needed (mysql_real_escape_string())? And it will be safe? And what with rest of code, wont be there any errors with using it?
 
# Added back configurable character start outfits. [Avarian]

ur so cool Xd
 
Status
Not open for further replies.
Back
Top