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

Accountmanagement-World-ID 1, Gesior ACC

ian12

Guardian OT
Joined
Aug 2, 2009
Messages
143
Reaction score
5
Location
[USA] PA
I have some problems with world id 1 in gesior acc.

i have 2 websites on my dedicated server, 2 dif ips. the 1 ot is up and running on world id 0, works 100% no problems. But my new ot's site is having some issues.

when i try to make a new char it gives me an error,

PHP:
Fatal error: Uncaught exception 'E_OTS_NotLoaded' in C:\xampp\htdocs\8.7\pot\OTS_Player.php:1866 Stack trace: #0 C:\xampp\htdocs\8.7\accountmanagement.php(1172): OTS_Player->getSkill(0) #1 C:\xampp\htdocs\8.7\index.php(186): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\8.7\pot\OTS_Player.php on line 1866 ]

When i change the World id in accountmanagement.php to 1. it does have ( pick player vocation or town ) and when i just pick name/sex, i get an error, need to pick town id.

Can anyone help me with this?
 
My guess would be that the vocation samples does not have any skills registered to them. Thus new players cannot copy their skills. Please post accountmanagement.php.
 
It wouldnt let me post the whole thing, so here is the create char part.
I checked the samples, they all have skills.

PHP:
	//## CREATE CHARACTER on account ###
	if($action == "createcharacter")
	{
		if(count($config['site']['worlds']) > 1)
		{
			if(isset($_REQUEST['world']))
				$world_id = (int) $_REQUEST['world'];
		}
		else
			$world_id = 0;
		if(!isset($world_id))
		{
			$main_content .= 'Before you can create character you must select world: ';
			foreach($config['site']['worlds'] as $id => $world_n)
				$main_content .= '<br /><a href="?subtopic=accountmanagement&action=createcharacter&world='.$id.'">- '.$world_n.'</a>';
			$main_content .= '<br /><h3><a href="?subtopic=accountmanagement">BACK</a></h3>';
		}
		else
		{
			$main_content .= '<script type="text/javascript">
				var nameHttp;
				function checkName()
				{
					if(document.getElementById("newcharname").value=="")
					{
						document.getElementById("name_check").innerHTML = \'<b><font color="red">Please enter new character name.</font></b>\';
						return;
					}
					nameHttp=GetXmlHttpObject();
					if (nameHttp==null)
					{
						return;
					}
					var newcharname = document.getElementById("newcharname").value;
					var url="ajax/check_name.php?name=" + newcharname + "&uid="+Math.random();
					nameHttp.onreadystatechange=NameStateChanged;
					nameHttp.open("GET",url,true);
					nameHttp.send(null);
				}
				function NameStateChanged()
				{
					if (nameHttp.readyState==4)
					{
						document.getElementById("name_check").innerHTML=nameHttp.responseText;
					}
				}
			</script>';
			$newchar_name = stripslashes(ucwords(strtolower(trim($_POST['newcharname']))));
			$newchar_sex = $_POST['newcharsex'];
			$newchar_vocation = $_POST['newcharvocation'];
			$newchar_town = $_POST['newchartown'];
			if($_POST['savecharacter'] != 1)
			{
				$main_content .= 'Please choose a name';
				if(count($config['site']['newchar_vocations'][$world_id]) > 1)
					$main_content .= ', vocation';
				$main_content .= ' and sex for your character. <br/>In any case the name must not violate the naming conventions stated in the <a href="?subtopic=tibiarules" target="_blank" >'.$config['server']['serverName'].' Rules</a>, or your character might get deleted or name locked.';
				if($account_logged->getPlayersList()->count() >= $config['site']['max_players_per_account'])
					$main_content .= '<b><font color="red"> You have maximum number of characters per account on your account. Delete one before you make new.</font></b>';
				$main_content .= '<br/><br/><form action="?subtopic=accountmanagement&action=createcharacter" method="post" ><input type="hidden" name="world" value="'.$world_id.'" ><input type="hidden" name=savecharacter value="1" ><div class="TableContainer" >  <table class="Table3" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Create Character</div>        <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div>    </div><tr>      <td>        <div class="InnerTableContainer" >          <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" >  <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >  <div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr class="LabelH" ><td style="width:50%;" ><span >Name</td><td><span >Sex</td></tr><tr class="Odd" ><td><input id="newcharname" name="newcharname" onkeyup="checkName();" value="'.$newchar_name.'" size="30" maxlength="29" ><BR><font size="1" face="verdana,arial,helvetica"><div id="name_check">Please enter your character name.</div></font></td><td>';
				$main_content .= '<input type="radio" name="newcharsex" value="1" ';
				if($newchar_sex == 1)
					$main_content .= 'checked="checked" ';
				$main_content .= '>male<br/>';
				$main_content .= '<input type="radio" name="newcharsex" value="0" ';
				if($newchar_sex == "0")
					$main_content .= 'checked="checked" ';
				$main_content .= '>female<br/></td></tr></table></div></div></table></div>';
				if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
					$main_content .= '<div class="InnerTableContainer" >          <table style="width:100%;" ><tr>';
				if(count($config['site']['newchar_vocations'][$world_id]) > 1)
				{
					$main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your vocation:</b></td><td><table class="TableContent" width="100%" >';
					foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char)
					{
						$main_content .= '<tr><td><input type="radio" name="newcharvocation" value="'.$char_vocation_key.'" ';
						if($newchar_vocation == $char_vocation_key)
							$main_content .= 'checked="checked" ';
						$main_content .= '>'.$vocation_name[$world_id][0][$char_vocation_key].'</td></tr>';
					}
					$main_content .= '</table></table></td>';
				}
				if(count($config['site']['newchar_towns'][$world_id]) > 1)
				{
					$main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your city:</b></td><td><table class="TableContent" width="100%" >';
					foreach($config['site']['newchar_towns'][$world_id] as $town_id)
					{
						$main_content .= '<tr><td><input type="radio" name="newchartown" value="'.$town_id.'" ';
						if($newchar_town == $town_id)
							$main_content .= 'checked="checked" ';
						$main_content .= '>'.$towns_list[$world_id][$town_id].'</td></tr>';
					}
					$main_content .= '</table></table></td>';
				}
				if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
					$main_content .= '</tr></table></div>';
				$main_content .= '</table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
			}
			else
			{      
				if(strlen($newchar_name > 20))
					$newchar_errors[] = 'Character name can not be logner then 20 characters.';
				if(empty($newchar_name))
					$newchar_errors[] = 'Please enter a name for your character!';
				if(empty($newchar_sex) && $newchar_sex != "0")
					$newchar_errors[] = 'Please select the sex for your character!';
				if(count($config['site']['newchar_vocations'][$world_id]) > 1)
				{
					if(empty($newchar_vocation))
						$newchar_errors[] = 'Please select a vocation for your character.';
				}
				else
					$newchar_vocation = $config['site']['newchar_vocations'][$world_id][0];
				if(count($config['site']['newchar_towns'][$world_id]) > 1)
				{
					if(empty($newchar_town))
						$newchar_errors[] = 'Please select a town for your character.';
				}
				else
					$newchar_town = $config['site']['newchar_towns'][$world_id][0];
				if(empty($newchar_errors))
				{
					if(!check_name_new_char($newchar_name))
						$newchar_errors[] = 'This name contains invalid letters, words or format. Please use only a-Z, - , \' and space.';
					if($newchar_sex != 1 && $newchar_sex != "0")
						$newchar_errors[] = 'Sex must be equal <b>0 (female)</b> or <b>1 (male)</b>.';
					if(!in_array($newchar_town, $config['site']['newchar_towns'][$world_id]))
						$newchar_errors[] = 'Please select valid town.';
					if(count($config['site']['newchar_vocations'][$world_id]) > 1)
					{
						$newchar_vocation_check = FALSE;
						foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char)
							if($newchar_vocation == $char_vocation_key)
								$newchar_vocation_check = TRUE;
						if(!$newchar_vocation_check)
							$newchar_errors[] = 'Unknown vocation. Please fill in form again.';
					}
					else
						$newchar_vocation = 0;
				}
				if(empty($newchar_errors))
				{
					$check_name_in_database = $ots->createObject('Player');
					$check_name_in_database->find($newchar_name);
					if($check_name_in_database->isLoaded())
						$newchar_errors[] .= 'This name is already used. Please choose another name!';
					$number_of_players_on_account = $account_logged->getPlayersList()->count();
					if($number_of_players_on_account >= $config['site']['max_players_per_account'])
						$newchar_errors[] .= 'You have too many characters on your account <b>('.$number_of_players_on_account.'/'.$config['site']['max_players_per_account'].')</b>!';
				}
				if(empty($newchar_errors))
				{
					$char_to_copy_name = $config['site']['newchar_vocations'][$world_id][$newchar_vocation];
					$char_to_copy = new OTS_Player();
					$char_to_copy->find($char_to_copy_name);
					if(!$char_to_copy->isLoaded())
						$newchar_errors[] .= 'Wrong characters configuration. Try again or contact with admin. ADMIN: Edit file config/config.php and set valid characters to copy names. Character to copy'.$char_to_copy_name.'</b> doesn\'t exist.';
				}
				if(empty($newchar_errors))
				{
					if($newchar_sex == "0")
						$char_to_copy->setLookType(136);
					$player = $ots->createObject('Player');
					$player->setName($newchar_name);
					$player->setAccount($account_logged);
					$player->setGroup($char_to_copy->getGroup());
					$player->setSex($newchar_sex);
					$player->setVocation($char_to_copy->getVocation());
					$player->setConditions($char_to_copy->getConditions());
					$player->setRank($char_to_copy->getRank());
					$player->setLookAddons($char_to_copy->getLookAddons());
					$player->setTownId($newchar_town);
					$player->setExperience($char_to_copy->getExperience());
					$player->setLevel($char_to_copy->getLevel());
					$player->setMagLevel($char_to_copy->getMagLevel());
					$player->setHealth($char_to_copy->getHealth());
					$player->setHealthMax($char_to_copy->getHealthMax());
					$player->setMana($char_to_copy->getMana());
					$player->setManaMax($char_to_copy->getManaMax());
					$player->setManaSpent($char_to_copy->getManaSpent());
					$player->setSoul($char_to_copy->getSoul());
					$player->setDirection($char_to_copy->getDirection());
					$player->setLookBody($char_to_copy->getLookBody());
					$player->setLookFeet($char_to_copy->getLookFeet());
					$player->setLookHead($char_to_copy->getLookHead());
					$player->setLookLegs($char_to_copy->getLookLegs());
					$player->setLookType($char_to_copy->getLookType());
					$player->setCap($char_to_copy->getCap());
					$player->setPosX(0);
					$player->setPosY(0);
					$player->setPosZ(0);
					$player->setLossExperience($char_to_copy->getLossExperience());
					$player->setLossMana($char_to_copy->getLossMana());
					$player->setLossSkills($char_to_copy->getLossSkills());
					$player->setLossItems($char_to_copy->getLossItems());
					$player->save();
					unset($player);
					$player = $ots->createObject('Player');
					$player->find($newchar_name);
					if($player->isLoaded())
					{
						$player->setCustomField('world_id', (int) $world_id);
						$player->setSkill(0,$char_to_copy->getSkill(0));
						$player->setSkill(1,$char_to_copy->getSkill(1));
						$player->setSkill(2,$char_to_copy->getSkill(2));
						$player->setSkill(3,$char_to_copy->getSkill(3));
						$player->setSkill(4,$char_to_copy->getSkill(4));
						$player->setSkill(5,$char_to_copy->getSkill(5));
						$player->setSkill(6,$char_to_copy->getSkill(6));
						$player->save();
						$loaded_items_to_copy = $SQL->query("SELECT * FROM player_items WHERE player_id = ".$char_to_copy->getId()."");
						foreach($loaded_items_to_copy as $save_item)
							$SQL->query("INSERT INTO `player_items` (`player_id` ,`pid` ,`sid` ,`itemtype`, `count`, `attributes`) VALUES ('".$player->getId()."', '".$save_item['pid']."', '".$save_item['sid']."', '".$save_item['itemtype']."', '".$save_item['count']."', '".$save_item['attributes']."');");
						$main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" >        <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <div class="Text" >Character Created</div>        <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td>        <div class="InnerTableContainer" >          <table style="width:100%;" ><tr><td>The character <b>'.$newchar_name.'</b> has been created.<br/>Please select the outfit when you log in for the first time.<br/><br/><b>See you on '.$config['server']['serverName'].'!</b></td></tr>          </table>        </div>  </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
					}
					else
					{
						echo "Error. Can\'t create character. Probably problem with database. Try again or contact with admin.";
						exit;
					}
				}
				else
				{
					$main_content .= '<div class="SmallBox" >  <div class="MessageContainer" >    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="ErrorMessage" >      <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
					foreach($newchar_errors as $newchar_error)
						$main_content .= '<li>'.$newchar_error;
					$main_content .= '</div>    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>  </div></div><br/>';
					$main_content .= 'Please choose a name';
					if(count($config['site']['newchar_vocations'][$world_id]) > 1)
						$main_content .= ', vocation';
					$main_content .= ' and sex for your character. <br/>In any case the name must not violate the naming conventions stated in the <a href="?subtopic=tibiarules" target="_blank" >'.$config['server']['serverName'].' Rules</a>, or your character might get deleted or name locked.<br/><br/><form action="?subtopic=accountmanagement&action=createcharacter" method="post" ><input type="hidden" name="world" value="'.$world_id.'" ><input type="hidden" name=savecharacter value="1" ><div class="TableContainer" >  <table class="Table3" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Create Character</div>        <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div>    </div><tr>      <td>        <div class="InnerTableContainer" >          <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" >  <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >  <div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr class="LabelH" ><td style="width:50%;" ><span >Name</td><td><span >Sex</td></tr><tr class="Odd" ><td><input id="newcharname" name="newcharname" onkeyup="checkName();" value="'.$newchar_name.'" size="30" maxlength="29" ><BR><font size="1" face="verdana,arial,helvetica"><div id="name_check">Please enter your character name.</div></font></td><td>';
					$main_content .= '<input type="radio" name="newcharsex" value="1" ';
					if($newchar_sex == 1)
						$main_content .= 'checked="checked" ';
					$main_content .= '>male<br/>';
					$main_content .= '<input type="radio" name="newcharsex" value="0" ';
					if($newchar_sex == "0")
						$main_content .= 'checked="checked" ';
					$main_content .= '>female<br/></td></tr></table></div></div></table></div>';
					if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
						$main_content .= '<div class="InnerTableContainer" >          <table style="width:100%;" ><tr>';
					if(count($config['site']['newchar_vocations'][$world_id]) > 1)
					{
						$main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your vocation:</b></td><td><table class="TableContent" width="100%" >';
						foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char)
						{
							$main_content .= '<tr><td><input type="radio" name="newcharvocation" value="'.$char_vocation_key.'" ';
							if($newchar_vocation == $char_vocation_key)
								$main_content .= 'checked="checked" ';
							$main_content .= '>'.$vocation_name[$world_id][0][$char_vocation_key].'</td></tr>';
						}
						$main_content .= '</table></table></td>';
					}
					if(count($config['site']['newchar_towns'][$world_id]) > 1)
					{
						$main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your city:</b></td><td><table class="TableContent" width="100%" >';
						foreach($config['site']['newchar_towns'][$world_id] as $town_id)
						{
							$main_content .= '<tr><td><input type="radio" name="newchartown" value="'.$town_id.'" ';
							if($newchar_town == $town_id)
								$main_content .= 'checked="checked" ';
								$main_content .= '>'.$towns_list[$world_id][$town_id].'</td></tr>';
						}
							$main_content .= '</table></table></td>';
					}
					if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
						$main_content .= '</tr></table></div>';
					$main_content .= '</table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
				}
			}
		}
	}
}
?>
 
Could you please post your $config['site']['newchar_vocations'] from your config/config.php (I guess) file?
 
PHP:
<?PHP
// Admin option
$config['site']['access_admin_panel'] = 6;

// World option
$config['site']['worlds'] = array(0 => 'world name');

// News option
$config['site']['access_tickers'] = 5;
$config['site']['access_news'] = 6;
$config['site']['langSystem'] = 0;
	// Limit show news on site
	$config['site']['news_ticks_limit'] = 5;
	$config['site']['news_big_limit'] = 10;
	$config['site']['chooseLang'] = 'pl';

// Create Account option
$config['site']['verify_code'] = 1;
$config['site']['one_email'] = 1;
$config['site']['choose_countr'] = 1;
$config['site']['referrer'] = 0;
$config['site']['newaccount_premdays'] = 999;
	// ReCapatha
	$config['site']['publickey'] = "6LfZAAoAAAAAALswKC2UCdCo_wf3ilh_C0qBhQJs "; // Public Key
	$config['site']['privkey'] = "6LfZAAoAAAAAAA7_sZX1ZPomaqqTKBka5t6so0Un";; // Private Key
	// Use only if configure emial sender
	$config['site']['send_register_email'] = 0; // send e-mail when register account
	$config['site']['create_account_verify_mail'] = 0; // when create account player must use right e-mail, he will receive random password to account like on RL tibia, 1 = yes, 0 = no
	$config['site']['send_mail_when_change_password'] = 0; // send e-mail with new password when change password to account, set 0 if someone abuse to send spam
	$config['site']['send_mail_when_generate_reckey'] = 0; // send e-mail with rec key (key is displayed on page anyway when generate), set 0 if someone abuse to send spam

// E-Mail option
$config['site']['send_emails'] = 0;
$config['site']['mail_address'] = "[email protected]";
$config['site']['smtp_enabled'] = "yes";
$config['site']['smtp_host'] = "smtp.poczta.onet.pl";
$config['site']['smtp_port'] = 465;
$config['site']['smtp_auth'] = "yes";
$config['site']['smtp_user'] = "[email protected]";
$config['site']['smtp_pass'] = "qwerty";
$config['site']['email_lai_sec_interval'] = 300;

// Acount option
$config['site']['max_players_per_account'] = 15;
$config['site']['email_days_to_change'] = 1;
	// Generate RecKey
	$config['site']['generate_new_reckey'] = 0; // let player generate new recovery key, he will receive e-mail with new rec key (not display on page, hacker can't generate rec key)
	$config['site']['generate_new_reckey_price'] = 5; // you can get some Premium Points for new rec key
	// New Character option
		// If rook only:	$config['site']['newchar_vocations'][getWorld]
		$config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
		$config['site']['newchar_vocations'][1] = array(0 => 'Rook Sample');
		// If you want choose many town 
		$config['site']['newchar_towns'][0] = array(1,2,4,11,13);

// character option
$config['site']['showStatistic'] = 1;
$config['site']['showQuests'] = 1;
$config['site']['showVipList'] = 0;
$config['site']['showVictims'] = 1;
	// Limit show
	$config['site']['limitDeath'] = 10;
	$config['site']['limitVictims'] = 10;
	
// Guilds option
$config['site']['guild_need_level'] = 50;
$config['site']['guild_need_pacc'] = 0;
$config['site']['guild_image_size_kb'] = 50;
$config['site']['guild_description_chars_limit'] = 1000;
$config['site']['guild_description_lines_limit'] = 6;
$config['site']['guild_motd_chars_limit'] = 150;

// Page option
	// Page
	$config['site']['download_page'] = 1;
	$config['site']['serverinfo_page'] = 1;
	$config['site']['gallery_page'] = 0;
	$config['site']['credits_page'] = 1;
//Forum
$config['site']['forum_sections'] = array(1 => 'News', 2 => 'Staff Complaints', 3 => 'Tutorials', 4 => 'Pictures', 5 => 'Bug Report', 6 => 'Miscellaneous', 7 => 'Trade');
$config['site']['forum_sections_desc'] = array(1 => 'Here you can comment on the news.', 2 => 'Here you can report complaints about Staff Members.', 3 => 'Here you will find tutorials on things.', 4 => 'This board is all about pictures!', 5 => 'Report bugs in this forum.', 6 => 'Anything that doesn\'t already have a designated forum.', 7 => 'Buy and sell things.');
$config['site']['forum_level_limit'] = 30; // minimum 1 character with 50 lvl on account to post
$config['site']['forum_post_interval'] = 20; // 30 seconds between posts
$config['site']['forum_group_not_blocked'] = 1; // group id of player that can always post, remove post, remove threads
$config['site']['forum_posts_per_page'] = 20;
$config['site']['forum_threads_per_page'] = 20;
	// Info
	$config['site']['quests'] = array('Demon Oak Quest' => 12900, 'Annihilator Quest' => 5000, 'Inquisition Quest' => 6076, 'The Pits of Inferno' => 10544, 'In Service of Yalahar' => 102504); // list of quests, 'questname' => storage-id,
	$config['site']['show_flag'] = 1;
	$config['site']['showMoreInfo'] = 0;
	$config['site']['show_creationdate'] = 1;
	$config['site']['players_group_id_block'] = 2;
		// Limit
		$config['site']['limit_show_death'] = 50;
		// Show name vocation world -- $vocation_name[getWorld][getPromotion]
		$vocation_name[0][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); 
		$vocation_name[0][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); 
		$vocation_name[1][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); 
		$vocation_name[1][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); 
		// Show name town in world -- $towns_list[getWorld][getTownId]
		$towns_list[0] = array(1 => 'Venore', 2 => 'Thais', 4 => 'Carlin', 11 => 'Edron', 13 => 'Yalahar');
		// Constant Mana -- $vocationConstantMana[getWorld][getVocation]
		$vocationConstantMana[0] = array(0 => 4.0, 1 => 1.1, 2 => 1.1, 3 => 1.4, 4 => 3.0);
		$vocationConstantMana[0] = array(0 => 4.0, 1 => 1.1, 2 => 1.1, 3 => 1.4, 4 => 3.0);

		// list of monsters on ots - names blocked, you can generate list of your monsters in acc. maker admin panel ( Reload Monsters )
$config['site']['monsters'] = array("amazon","valkyrie","Admin","carrion worm","rotworm","rotworm queen","cockroach","kongra","merlkin","sibang","crystal spider","giant spider","poison spider","scorpion","spider","tarantula","achad","axeitus headbanger","bloodpaw","bovinus","colerian the barbarian","cursed gladiator","frostfur","orcus the cruel","rocky","the hairy one","avalanche","drasilla","grimgor guteater","kreebosh the exile","slim","spirit of earth","spirit of fire","spirit of water","the dark dancer","the hag","darakan the executioner","deathbringer","fallen mooh'tah master ghar","gnorre chyllson","norgle glacierbeard","svoren the mad","the masked marauder","the obliverator","the pit lord","webster","barbarian bloodwalker","barbarian brutetamer","barbarian headsplitter","barbarian skullhunter","bear","panda","polar bear","braindeath","beholder","elder beholder","gazer","chicken","dire penguin","flamingo","parrot","penguin","seagull","terror bird","bazir","infernatil","thul","munster","son of verminor","xenia","zoralurk","big boss trolliver","foreman kneebiter","mad technomancer","man in the cave","lord of the elements","the count","the plasmother","dracola","the abomination","the handmaiden","mr. punish","the countess sorrow","the imperor","massacre","apocalypse","brutus bloodbeard","deadeye devious","demodras","dharalion","fernfang","ferumbras","general murius","ghazbaran","grorlam","lethal lissy","morgaroth","necropharus","orshabaal","ron the ripper","the evil eye","the horned fox","the old widow","tiquandas revenge","apprentice sheng","dog","hellhound","war wolf","winter wolf","wolf","chakoya toolshaper","chakoya tribewarden","chakoya windcaller","blood crab","crab","frost giant","frost giantess","ice golem","yeti","acolyte of the cult","adept of the cult","enlightened of the cult","novice of the cult","ungreez","dark torturer","demon","destroyer","diabolic imp","fire devil","fury","hand of cursed fate","juggernaut","nightmare","plaguesmith","blue djinn","efreet","green djinn","marid","frost dragon","wyrm","sea serpent","dragon lord","dragon","hydra","dragon hatchling","dragon lord hatchling","frost dragon hatchling","dwarf geomancer","dwarf guard","dwarf soldier","dwarf","dworc fleshhunter","dworc venomsniper","dworc voodoomaster","elephant","mammoth","elf arcanist","elf scout","elf","charged energy elemental","energy elemental","massive energy elemental","overcharged energy elemental","energy overlord","cat","lion","tiger","azure frog","coral frog","crimson frog","green frog","orchid frog","toad","jagged earth elemental","muddy earth elemental","earth elemental","massive earth elemental","earth overlord","gargoyle","stone golem","ghost","phantasm","phantasm","pirate ghost","spectre","cyclops smith","cyclops drone","behemoth","cyclops","slick water elemental","roaring water elemental","ice overlord","water elemental","massive water elemental","ancient scarab","butterfly","bug","centipede","exp bug","larva","scarab","wasp","lizard sentinel","lizard snakecharmer","lizard templar","minotaur archer","minotaur guard","minotaur mage","minotaur","squirrel","goblin demon","badger","bat","deer","the halloween hare","hyaena","pig","rabbit","silver rabbit","skunk","wisp","dark monk","monk","tha exp carrier","necromancer","priestess","orc berserker","orc leader","orc rider","orc shaman","orc spearman","orc warlord","orc warrior","orc","goblin leader","goblin scavenger","goblin","goblin assassin","assasin","bandit","black knight","hero","hunter","nomad","smuggler","stalker","poacher","wild warrior","ashmunrah","dipthrah","mahrdis","morguthis","omruc","rahemos","thalas","vashresamun","pirate buccaneer","pirate corsair","pirate cutthroat","pirate marauder","carniphila","spit nettle","fire overlord","massive fire elemental","blistering fire elemental","blazing fire elemental","fire elemental","hellfire fighter","quara constrictor scout","quara hydromancer scout","quara mantassin scout","quara pincher scout","quara predator scout","quara constrictor","quara hydromancer","quara mantassin","quara pincher","quara predator","cave rat","rat","cobra","crocodile","serpent spawn","snake","wyvern","black sheep","sheep","mimic","betrayed wraith","bonebeast","demon skeleton","lost soul","pirate skeleton","skeleton","skeleton warrior","undead dragon","defiler","slime2","slime","bog raider","ice witch","warlock","witch","bones","fluffy","grynch clan goblin","hacker","minishabaal","primitive","tibia bug","undead minion","annihilon","hellgorak","latrivan","madareth","zugurosh","ushuriel","golgordan","thornback tortoise","tortoise","eye of the seven","deathslicer","flamethrower","magicthrower","plaguethrower","poisonthrower","shredderthrower","troll champion","frost troll","island troll","swamp troll","troll","banshee","blightwalker","crypt shambler","ghoul","lich","mummy","vampire","grim reaper","trainer","forest dragon","knight","paladin","druid","sorcerer","guard","mercenary","thief","toxiros","pyramo","lazarus","zathroth","goshnar","durin","demora","orc champion","lumenia","dracula","alezzo","prince almirith","elf warlord","random noob","magebomb");
// list of NPCs on ots - names blocked
$config['site']['npc'] = array('alice', 'oarkhal', 'equer', 'parkhal', 'leoric', 'sarkhal', 'pallo', 'riona', 'her miona', 'varkhal', 'eura', 'blitz', 'markhal', 'wengo', 'larkhal');

		
// Shop option
$config['site']['shop_system'] = 1;
	// Option for buy points
	$config['site']['paypal_active'] = 1;
	$config['site']['zaypay_active'] = 0;
	$config['site']['dotpay_active'] = 0;
	$config['site']['daopay_active'] = 0;
	$config['site']['homepayActive'] = 0;
	
// Layout option
$config['site']['layout'] = "tibiacom";
?>
 
There's your error.
PHP:
$config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
$config['site']['newchar_vocations'][1] = array(0 => 'Rook Sample');

The first line is for the first world (id 0 as you can see in ['newchar_vocations'][0]). The second one is for the second world (id 1). In order to get rid of your error, you would have to do something like:
PHP:
$config['site']['newchar_vocations'][0] = array(0 => 'Rook Sample', 1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
$config['site']['newchar_vocations'][1] = array(0 => 'Rook Sample', 1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
 
Thanks for helping.. i got this error now,
PHP:
Fatal error: Uncaught exception 'E_OTS_NotLoaded' in C:\xampp\htdocs\8.7\pot\OTS_Player.php:1866 Stack trace: #0 C:\xampp\htdocs\8.7\accountmanagement.php(1172): OTS_Player->getSkill(0) #1 C:\xampp\htdocs\8.7\index.php(186): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\8.7\pot\OTS_Player.php on line 1866
 
Hm, that's the same error. Could you please show me which line is line 1172?
 
i changed "world id in accountmanagment.php" it works now.. i can now see and pick a vocation, but i cant pick a town. lol do you have a code for that? :)
 
In config/config.php, below:
PHP:
$config['site']['newchar_towns'][0] = array(1,2,4,11,13);
Add:
PHP:
$config['site']['newchar_towns'][1] = array(1,2,4,11,13);
 
i added that code didnt see the names of towns so i added
PHP:
$towns_list[1] = array(1 => 'Venore', 2 => 'Thais', 4 => 'Carlin', 11 => 'Edron', 13 => 'Yalahar');
Now everything looks okay, when i tried to make a char i got this error.
PHP:
Fatal error: Uncaught exception 'E_OTS_NotLoaded' in C:\xampp\htdocs\8.7\pot\OTS_Player.php:1866 Stack trace: #0 C:\xampp\htdocs\8.7\accountmanagement.php(1172): OTS_Player->getSkill(0) #1 C:\xampp\htdocs\8.7\index.php(186): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\8.7\pot\OTS_Player.php on line 1866

I think the sites not picking up that the would id is actually 1, it thinks its world id 0 so it cant check the db? Here is "index line 186,
PHP:
include("accountmanagement.php");
and OTS_Player.php line 1865-1867
PHP:
        { throw new E_OTS_NotLoaded(); }
 
All right, all right. If you would like, I could assist you through TeamViewer (it's a remote desktop software). It would save us both some time.
 
SOLVED! for anyone that has this same problem as i did heres your answer.. it turns out it WAS my sample voc skills. i over looked them.

Thank you so much Chris! You saved my life, and a lot of time :D
 
Back
Top