| 1 |
<?php
|
| 2 |
/**
|
| 3 |
* File functions:
|
| 4 |
* View other players, steal money, astral components from other players
|
| 5 |
*
|
| 6 |
* @name : view.php
|
| 7 |
* @copyright : (C) 2004,2005,2006,2007 Vallheru Team based on Gamers-Fusion ver 2.5
|
| 8 |
* @author : thindil <thindil@users.sourceforge.net>
|
| 9 |
* @author : eyescream <tduda@users.sourceforge.net>
|
| 10 |
* @version : 1.4
|
| 11 |
* @since : 18.04.2007
|
| 12 |
*
|
| 13 |
*/
|
| 14 |
|
| 15 |
//
|
| 16 |
//
|
| 17 |
// This program is free software; you can redistribute it and/or modify
|
| 18 |
// it under the terms of the GNU General Public License as published by
|
| 19 |
// the Free Software Foundation; either version 2 of the License, or
|
| 20 |
// (at your option) any later version.
|
| 21 |
//
|
| 22 |
// This program is distributed in the hope that it will be useful,
|
| 23 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 24 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 25 |
// GNU General Public License for more details.
|
| 26 |
//
|
| 27 |
// You should have received a copy of the GNU General Public License
|
| 28 |
// along with this program; if not, write to the Free Software
|
| 29 |
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| 30 |
//
|
| 31 |
// $Id$
|
| 32 |
|
| 33 |
$title = 'Zobacz';
|
| 34 |
require_once('includes/head.php');
|
| 35 |
require_once('includes/checkexp.php');
|
| 36 |
require_once('class/view_class.php');
|
| 37 |
|
| 38 |
if (!isset($_GET['view']))
|
| 39 |
{
|
| 40 |
error("<a href=\"\"></a>");
|
| 41 |
}
|
| 42 |
|
| 43 |
if (!ereg("^[1-9][0-9]*$", $_GET['view']))
|
| 44 |
{
|
| 45 |
error('<a href=""></a>');
|
| 46 |
}
|
| 47 |
|
| 48 |
$view = new ViewPlayer($_GET['view']);
|
| 49 |
|
| 50 |
/**
|
| 51 |
* Get the localization for game
|
| 52 |
*/
|
| 53 |
require_once('languages/'.$player -> lang.'/view.php');
|
| 54 |
|
| 55 |
if (empty ($view -> id))
|
| 56 |
{
|
| 57 |
error (NO_PLAYER);
|
| 58 |
}
|
| 59 |
$smarty -> assign (array('User' => getTaggedPlayerName ($view -> user, $view->tribe, $view->tribe_rank),
|
| 60 |
'Id' => $view -> id,
|
| 61 |
'ViewerAvatar' => '',
|
| 62 |
'GG' => '',
|
| 63 |
'JABBER' => '',
|
| 64 |
'TLEN' => '',
|
| 65 |
'SKYPE' => '',
|
| 66 |
'Immu' => '',
|
| 67 |
'Attack' => '',
|
| 68 |
'Mail' => '',
|
| 69 |
'Crime' => '',
|
| 70 |
'Crime2' => '',
|
| 71 |
'Gender' => '',
|
| 72 |
'Deity' => '',
|
| 73 |
'ViewerRank' => $player -> rank,
|
| 74 |
'Tseclang' => ''));
|
| 75 |
$plik = 'avatars/'.$view -> avatar;
|
| 76 |
if (is_file($plik))
|
| 77 |
{
|
| 78 |
$smarty -> assign ('ViewerAvatar', $plik);
|
| 79 |
}
|
| 80 |
|
| 81 |
|
| 82 |
if (!empty($view -> jabber))
|
| 83 |
{
|
| 84 |
$smarty -> assign ('JABBER', GG_NUMBER.$view -> jabber.'<br />');
|
| 85 |
}
|
| 86 |
|
| 87 |
if (!empty($view -> tlen))
|
| 88 |
{
|
| 89 |
$smarty -> assign ('TLEN', GG_NUMBER.$view -> tlen.'<br />');
|
| 90 |
}
|
| 91 |
|
| 92 |
if (!empty($view -> gg))
|
| 93 |
{
|
| 94 |
$smarty -> assign ('GG', GG_NUMBER.$view -> gg.'<br />');
|
| 95 |
}
|
| 96 |
|
| 97 |
if (!empty($view -> skype))
|
| 98 |
{
|
| 99 |
$smarty -> assign ('SKYPE', GG_NUMBER.$view -> skype.'<br />');
|
| 100 |
}
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
/**
|
| 105 |
* Select player rank
|
| 106 |
*/
|
| 107 |
require_once('includes/ranks.php');
|
| 108 |
$strRank = selectrank($view -> rank, $view -> gender);
|
| 109 |
|
| 110 |
if($view -> seclang)
|
| 111 |
{
|
| 112 |
$smarty -> assign('Tseclang', T_SEC_LANG.$view -> seclang.'<br />');
|
| 113 |
}
|
| 114 |
|
| 115 |
if ($view -> immunited == 'Y')
|
| 116 |
{
|
| 117 |
$smarty -> assign ('Immu', HAVE_IMMU.'<br />');
|
| 118 |
}
|
| 119 |
|
| 120 |
/**
|
| 121 |
* Name of player location
|
| 122 |
*/
|
| 123 |
$strLocation = $view -> location;
|
| 124 |
if ($view -> location == 'Altara')
|
| 125 |
{
|
| 126 |
$strLocation = $city1;
|
| 127 |
}
|
| 128 |
if ($view -> location == 'Ardulith')
|
| 129 |
{
|
| 130 |
$strLocation = $city2;
|
| 131 |
}
|
| 132 |
|
| 133 |
$smarty -> assign(array('Page' => $strViewpage,
|
| 134 |
'Age' => $view -> age,
|
| 135 |
'Race' => $view -> race,
|
| 136 |
'Clas' => $view -> clas,
|
| 137 |
'Rank' => $strRank,
|
| 138 |
'Location' => $strLocation,
|
| 139 |
'Level' => $view -> level,
|
| 140 |
'Maxhp' => $view -> max_hp,
|
| 141 |
'Wins' => $view -> wins,
|
| 142 |
'Losses' => $view -> losses,
|
| 143 |
'Lastkilled' => $view -> lastkilled,
|
| 144 |
'Lastkilledby' => $view -> lastkilledby,
|
| 145 |
'Profile' => $view -> profile,
|
| 146 |
'Lang' => $view -> lang));
|
| 147 |
|
| 148 |
if ($view -> wins || $view -> losses)
|
| 149 |
{
|
| 150 |
$intAllfight = $view -> wins + $view -> losses;
|
| 151 |
$fltRatio = round(($view -> wins / $intAllfight) * 100, 3);
|
| 152 |
$smarty -> assign('Fratio', '('.$fltRatio.' %)');
|
| 153 |
}
|
| 154 |
else
|
| 155 |
{
|
| 156 |
$smarty -> assign('Fratio', '');
|
| 157 |
}
|
| 158 |
|
| 159 |
if ($view -> gender)
|
| 160 |
{
|
| 161 |
if ($view -> gender == 'M')
|
| 162 |
{
|
| 163 |
$gender = G_MALE;
|
| 164 |
}
|
| 165 |
else
|
| 166 |
{
|
| 167 |
$gender = G_FEMALE;
|
| 168 |
}
|
| 169 |
$smarty -> assign ('Gender', T_GENDER.': '.$gender.'<br />');
|
| 170 |
}
|
| 171 |
if (!empty ($view -> deity))
|
| 172 |
{
|
| 173 |
$smarty -> assign ('Deity', T_DEITY.': '.$view -> deity.'<br />');
|
| 174 |
}
|
| 175 |
if ($view -> hp > 0)
|
| 176 |
{
|
| 177 |
$smarty -> assign ('Status', '<b>'.S_LIVE.'</b><br />');
|
| 178 |
}
|
| 179 |
else
|
| 180 |
{
|
| 181 |
$smarty -> assign ('Status', '<b>'.S_DEAD.'</b><br />');
|
| 182 |
}
|
| 183 |
|
| 184 |
$tribe = $db -> Execute('SELECT `name` FROM `tribes` WHERE `id`='.$view -> tribe);
|
| 185 |
if ($tribe -> fields['name'])
|
| 186 |
{
|
| 187 |
$smarty -> assign ('Clan', T_CLAN.': <a href="tribes.php?view=view&id='.$view -> tribe.'">'.$tribe -> fields['name'].'</a><br />'.T_CLAN_RANK.': '.$view -> tribe_rank.'<br />');
|
| 188 |
}
|
| 189 |
else
|
| 190 |
{
|
| 191 |
$smarty -> assign ('Clan', T_CLAN.': '.NOTHING.'<br />');
|
| 192 |
}
|
| 193 |
|
| 194 |
$ref = $db -> Execute("SELECT sum(points) as points FROM reputation WHERE `player_id`=".$view -> id); |
| 195 |
if ($ref -> fields['points'] == '') |
| 196 |
{ |
| 197 |
$ref -> fields['points'] = 0; |
| 198 |
}
|
| 199 |
$smarty -> assign ('Refs', $ref -> fields['points']);
|
| 200 |
|
| 201 |
$objFreeze = $db -> Execute('SELECT `freeze` FROM `players` WHERE `id`='.$_GET['view']);
|
| 202 |
|
| 203 |
if ($player -> location == $view -> location && $view -> immunited == 'N' && $player -> immunited == 'N' && $player -> id != $view -> id)
|
| 204 |
{
|
| 205 |
$smarty -> assign ('Attack', (!$objFreeze -> fields['freeze']) ? '<li><a href="battle.php?battle='.$view -> id.'">'.A_ATTACK.'</a></li>' : '');
|
| 206 |
}
|
| 207 |
|
| 208 |
if ($player -> id != $view -> id)
|
| 209 |
{
|
| 210 |
$smarty -> assign ('Mail', '<li><a href="mail.php?view=write&to='.$view -> id.'">'.A_WRITE_PM.'</a></li>');
|
| 211 |
}
|
| 212 |
|
| 213 |
$smarty -> assign('Tfreezed', ($objFreeze -> fields['freeze']) ? T_FREEZED.'<br />' : '');
|
| 214 |
|
| 215 |
if ($player -> clas == 'Złodziej' && $player -> crime > 0 && $player -> location == $view -> location && $player -> id != $view -> id)
|
| 216 |
{
|
| 217 |
$smarty -> assign('Crime', (!$objFreeze -> fields['freeze']) ? '<li><a href=view.php?view='.$view -> id.'&steal='.$view -> id.'>'.A_STEAL.'</a></li>' : '');
|
| 218 |
}
|
| 219 |
|
| 220 |
$blnCrime = false;
|
| 221 |
if ($player -> clas == 'Złodziej' && $player -> id != $view -> id)
|
| 222 |
{
|
| 223 |
$objAstralcrime = $db -> Execute("SELECT `astralcrime` FROM `players` WHERE `id`=".$player -> id);
|
| 224 |
if (!$objFreeze -> fields['freeze'] && $objAstralcrime -> fields['astralcrime'] == 'Y')
|
| 225 |
{
|
| 226 |
$smarty -> assign('Crime2', '<li><a href="view.php?view='.$view -> id.'&steal_astral='.$view -> id.'">'.A_STEAL2.'</a></li>');
|
| 227 |
$blnCrime = true;
|
| 228 |
}
|
| 229 |
else
|
| 230 |
{
|
| 231 |
$smarty -> assign('Crime2', '');
|
| 232 |
}
|
| 233 |
$objAstralcrime -> Close();
|
| 234 |
}
|
| 235 |
if ($player -> rank == 'Admin' || $player -> rank == 'Staff')
|
| 236 |
{
|
| 237 |
$objActivity = $db -> Execute('SELECT `lpv` FROM `players` WHERE `id`='.$_GET['view']);
|
| 238 |
$smarty -> assign(array('PlayerIP' => PLAYER_IP,
|
| 239 |
'SearchIP' => SEARCH_IP,
|
| 240 |
'Timeinfo' => TIME_INFO,'IP' => $view -> ip,
|
| 241 |
'Time' => date ("d-m-Y H:i:s",$objActivity -> fields['lpv'])));
|
| 242 |
}
|
| 243 |
/**
|
| 244 |
* Pickpocket
|
| 245 |
*/
|
| 246 |
if (isset ($_GET['steal']))
|
| 247 |
{
|
| 248 |
if (!ereg("^[1-9][0-9]*$", $_GET['steal']) || $player -> clas != 'Złodziej')
|
| 249 |
{
|
| 250 |
error(ERROR.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 251 |
}
|
| 252 |
if ($_GET['steal'] != $_GET['view'])
|
| 253 |
{
|
| 254 |
error (NO_PLAYER2.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 255 |
}
|
| 256 |
if ($player -> crime <= 0)
|
| 257 |
{
|
| 258 |
error (NO_CRIME.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 259 |
}
|
| 260 |
if ($player -> location != $view -> location)
|
| 261 |
{
|
| 262 |
error (BAD_LOCATION.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 263 |
}
|
| 264 |
if ($view -> hp <= 0)
|
| 265 |
{
|
| 266 |
error (IS_DEAD.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 267 |
}
|
| 268 |
if ($player -> hp <= 0)
|
| 269 |
{
|
| 270 |
error (YOU_DEAD.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 271 |
}
|
| 272 |
if ($player -> immunited == 'Y')
|
| 273 |
{
|
| 274 |
error(YOU_IMMU.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 275 |
}
|
| 276 |
if ($view -> immunited == 'Y')
|
| 277 |
{
|
| 278 |
error(HE_IMMU.' (<a href="view.php?view='.$_GET['view'].'\">'.BACK.'</a>)');
|
| 279 |
}
|
| 280 |
if ($objFreeze -> fields['freeze'])
|
| 281 |
{
|
| 282 |
error(ACCOUNT_FREEZED.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 283 |
}
|
| 284 |
if ($view -> tribe > 0 && $view -> tribe == $player -> tribe)
|
| 285 |
{
|
| 286 |
error(SAME_CLAN.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 287 |
}
|
| 288 |
if ($view -> age < 4)
|
| 289 |
{
|
| 290 |
error(TOO_YOUNG.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 291 |
}
|
| 292 |
$roll = rand (1, $view -> level);
|
| 293 |
/**
|
| 294 |
* Add bonus from bless
|
| 295 |
*/
|
| 296 |
$strBless = FALSE;
|
| 297 |
$objBless = $db -> Execute('SELECT `bless`, `blessval` FROM `players` WHERE `id`='.$player -> id);
|
| 298 |
if ($objBless -> fields['bless'] == 'inteli')
|
| 299 |
{
|
| 300 |
$player -> inteli = $player -> inteli + $objBless -> fields['blessval'];
|
| 301 |
$strBless = 'inteli';
|
| 302 |
}
|
| 303 |
if ($objBless -> fields['bless'] == 'agility')
|
| 304 |
{
|
| 305 |
$player -> agility = $player -> agility + $objBless -> fields['blessval'];
|
| 306 |
$strBless = 'agility';
|
| 307 |
}
|
| 308 |
$objBless -> Close();
|
| 309 |
if ($strBless)
|
| 310 |
{
|
| 311 |
$db -> Execute('UPDATE `players` SET `bless`=\'\', `blessval`=0 WHERE `id`='.$player -> id);
|
| 312 |
}
|
| 313 |
$objBless = $db -> Execute('SELECT `bless`, `blessval` FROM `players` WHERE `id`='.$view -> id);
|
| 314 |
if ($objBless -> fields['bless'] == 'inteli')
|
| 315 |
{
|
| 316 |
$view -> inteli = $view -> inteli + $objBless -> fields['blessval'];
|
| 317 |
}
|
| 318 |
if ($objBless -> fields['bless'] == 'agility')
|
| 319 |
{
|
| 320 |
$view -> agility = $view -> agility + $objBless -> fields['blessval'];
|
| 321 |
}
|
| 322 |
$objBless -> Close();
|
| 323 |
|
| 324 |
/**
|
| 325 |
* Add bonus from rings
|
| 326 |
*/
|
| 327 |
$arrEquip = $player -> equipment();
|
| 328 |
$arrRings = array(R_AGI, R_INT);
|
| 329 |
$arrStat = array('agility', 'inteli');
|
| 330 |
if ($arrEquip[9][0])
|
| 331 |
{
|
| 332 |
$arrRingtype = explode(" ", $arrEquip[9][1]);
|
| 333 |
$intAmount = count($arrRingtype) - 1;
|
| 334 |
$intKey = array_search($arrRingtype[$intAmount], $arrRings);
|
| 335 |
if ($intKey != NULL)
|
| 336 |
{
|
| 337 |
$strStat = $arrStat[$intKey];
|
| 338 |
$player -> $strStat = $player -> $strStat + $arrEquip[9][2];
|
| 339 |
}
|
| 340 |
}
|
| 341 |
if ($arrEquip[10][0])
|
| 342 |
{
|
| 343 |
$arrRingtype = explode(" ", $arrEquip[10][1]);
|
| 344 |
$intAmount = count($arrRingtype) - 1;
|
| 345 |
$intKey = array_search($arrRingtype[$intAmount], $arrRings);
|
| 346 |
if ($intKey != NULL)
|
| 347 |
{
|
| 348 |
$strStat = $arrStat[$intKey];
|
| 349 |
$player -> $strStat = $player -> $strStat + $arrEquip[10][2];
|
| 350 |
}
|
| 351 |
}
|
| 352 |
|
| 353 |
$chance = ($player -> agility + $player -> inteli) - ($view -> agility + $view -> inteli + $roll);
|
| 354 |
$strDate = $db -> DBDate($newdate);
|
| 355 |
if ($chance < 1)
|
| 356 |
{
|
| 357 |
$cost = 1000 * $player -> level;
|
| 358 |
$expgain = ceil($view -> level / 10);
|
| 359 |
checkexp($player -> exp,$expgain,$player -> level,$player -> race,$player -> user,$player -> id,0,0,$player -> id,'',0);
|
| 360 |
if ($player -> location != 'Lochy')
|
| 361 |
{
|
| 362 |
$db -> Execute('UPDATE `players` SET `miejsce`=\'Lochy\', `crime`=`crime`-1 WHERE `id`='.$player -> id);
|
| 363 |
$db -> Execute('INSERT INTO `jail` (`prisoner`, `verdict`, `duration`, `cost`, `data`) VALUES('.$player -> id.',\''.VERDICT.'\',7,'.$cost.',\''.$data.'\')');
|
| 364 |
$db -> Execute('INSERT INTO `log` (`owner`, `log`, `czas`) VALUES('.$player -> id.',\''.YOU_IN_JAIL.$cost.'.\', '.$strDate.')');
|
| 365 |
$db -> Execute('INSERT INTO `log` (`owner`, `log`, `czas`) VALUES('.$view -> id.',\''.YOU_CATCH.'<b><a href="view.php?view='.$player -> id.'">'.$player -> user.L_ID.$player -> id.YOU_CATCH2.'\', '.$strDate.')');
|
| 366 |
error ('<br />'.YOU_JAILED.' (<b><a href="view.php?view='.$_GET['view'].'">'.BACK.'</a></b>)');
|
| 367 |
}
|
| 368 |
else
|
| 369 |
{
|
| 370 |
$db -> Execute('INSERT INTO `log` (`owner`, `log`, `czas`) VALUES('.$view -> id.',\''.WHEN_YOU.'<b><a href="view.php?view='.$player -> id.'">'.$player -> user.L_ID.$player -> id.'.\', '.$strDate.')');
|
| 371 |
$db -> Execute('UPDATE `players` SET `crime`=`crime`-1 WHERE `id`='.$player-> id);
|
| 372 |
error ('<br />'.YOU_TRY_IN.' (<a href=\"view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 373 |
}
|
| 374 |
}
|
| 375 |
if ($chance > 0 && $chance < 50)
|
| 376 |
{
|
| 377 |
$db -> Execute('UPDATE `players` SET `crime`=`crime`-1 WHERE `id`='.$player -> id);
|
| 378 |
if ( $view -> credits > 0)
|
| 379 |
{
|
| 380 |
$lost = ceil($view -> credits / 10);
|
| 381 |
$expgain = $view -> level;
|
| 382 |
checkexp($player -> exp,$expgain,$player -> level,$player -> race,$player -> user,$player -> id,0,0,$player -> id,'',0);
|
| 383 |
$db -> Execute('UPDATE `players` SET `credits`=`credits`-'.$lost.' WHERE `id`='.$view -> id);
|
| 384 |
$db -> Execute('UPDATE `players` SET `credits`=`credits`+'.$lost.' WHERE `id`='.$player -> id);
|
| 385 |
$db -> Execute('INSERT INTO `log` (`owner`, `log`, `czas`) VALUES('.$view -> id.',\''.YOU_CATCH.'<b><a href="view.php?view='.$player -> id.'">'.$player -> user.L_ID.$player -> id.NOT_CATCH.$lost.GOLD_COINS.'\', '.$strDate.')');
|
| 386 |
error ('<br />'.WHEN_YOU2.$lost.WHEN_YOU21.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 387 |
}
|
| 388 |
else
|
| 389 |
{
|
| 390 |
$db -> Execute('INSERT INTO `log` (`owner`, `log`, `czas`) VALUES('.$view -> id.',\''.YOU_CATCH.'<b><a href="view.php?view='.$player -> id.'">'.$player -> user.L_ID.$player -> id.EMPTY_BAG.'\', '.$strDate.')');
|
| 391 |
error ('<br />'.EMPTY_BAG2.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 392 |
}
|
| 393 |
}
|
| 394 |
if ($chance > 49)
|
| 395 |
{
|
| 396 |
$db -> Execute('UPDATE `players` SET `crime`=`crime`-1 WHERE `id`='.$player -> id);
|
| 397 |
if ( $view -> credits > 0)
|
| 398 |
{
|
| 399 |
$lost = ceil($view -> credits / 10);
|
| 400 |
$expgain = ceil($view -> level * 10);
|
| 401 |
$db -> Execute('UPDATE `players` SET `credits`=`credits`-'.$lost.' WHERE `id`='.$view -> id);
|
| 402 |
$db -> Execute('UPDATE `players` SET `credits`=`credits`+'.$lost.' WHERE `id`='.$player -> id);
|
| 403 |
checkexp($player -> exp,$expgain,$player -> level,$player -> race,$player -> user,$player -> id,0,0,$player -> id,'',0);
|
| 404 |
$db -> Execute('INSERT INTO `log` (`owner`, `log`, `czas`) VALUES('.$view -> id.',\''.YOU_CRIME.$lost.YOU_CRIME2.'\', '.$strDate.')');
|
| 405 |
error ('<br />'.SUCCESS.$lost.GOLD_COINS2.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 406 |
}
|
| 407 |
else
|
| 408 |
{
|
| 409 |
$db -> Execute('INSERT INTO `log` (`owner`, `log`, `czas`) VALUES('.$view -> id.',\''.EMPTY_BAG3.'\', '.$strDate.')');
|
| 410 |
error ('<br />'.EMPTY_BAG4.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 411 |
}
|
| 412 |
}
|
| 413 |
}
|
| 414 |
|
| 415 |
/**
|
| 416 |
* Steal astral components
|
| 417 |
*/
|
| 418 |
if (isset($_GET['steal_astral']))
|
| 419 |
{
|
| 420 |
if (!ereg("^[1-9][0-9]*$", $_GET['steal_astral']) || $player -> clas != 'Złodziej' || $player -> location == 'Lochy')
|
| 421 |
{
|
| 422 |
error (ERROR.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 423 |
}
|
| 424 |
if ($_GET['steal_astral'] != $_GET['view'])
|
| 425 |
{
|
| 426 |
error (NO_PLAYER2.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 427 |
}
|
| 428 |
if (!$blnCrime)
|
| 429 |
{
|
| 430 |
error (NO_CRIME.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 431 |
}
|
| 432 |
if ($player -> hp <= 0)
|
| 433 |
{
|
| 434 |
error (YOU_DEAD.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 435 |
}
|
| 436 |
if ($view -> tribe > 0 && $view -> tribe == $player -> tribe)
|
| 437 |
{
|
| 438 |
error(SAME_CLAN.' (<a href="view.php?view='.$_GET['view'].'">'.BACK.'</a>)');
|
| 439 |
}
|
| 440 |
|
| 441 |
require_once('includes/astralsteal.php');
|
| 442 |
astralsteal($_GET['view'], 'V');
|
| 443 |
}
|
| 444 |
|
| 445 |
if ($objFreeze -> fields['freeze'])
|
| 446 |
{
|
| 447 |
$objFreeze -> Close();
|
| 448 |
}
|
| 449 |
|
| 450 |
/**
|
| 451 |
* Display page
|
| 452 |
*/
|
| 453 |
$smarty -> display ('view.tpl');
|
| 454 |
require_once('includes/foot.php');
|
| 455 |
?>
|