plit |
Wysłany: Wto 4:35, 10 Paź 2006 Temat postu: |
|
Najlepiej pod stol
Case 'lightbeer':
if ($Player['hpmodifier'] < 0 || $Player['agilitymodifier'] < 0 || $Player['strengthmodifier'] < 0) {
////
break;
}
$hp_mod = ceil( rand(5, 15) * ($Player['hpmax'] - $Player['hpmodifier']*2) ) / 100;
$Player['hpmodifier'] += $hp_mod;
$Player['hpmax'] += $hp_mod;
if ($Player['hp'] < $Player['hpmax'])
{
$Player['hp'] += ceil(rand(4, 13) * ($Player['hpmax'] - $Player['hpmodifier']) ) / 100;
if ($Player['hp'] > $Player['hpmax']) $Player['hp'] = $Player['hpmax'];
}
if ($Player['agility'] + $Player['strength'] < $Player['hpmodifier'] || rand(0,6)< 2 {
$Player['hp'] = 1;
$Player['mp'] = 1;
$Player['mpmodifier'] = -$Player['mpmax']/2;
$Player['hpmodifier'] = -$Player['hpmax']/rand(1,3);
$Player['agilitymodifier'] = -$Player['agility'];
$Player['strengthmodifier'] = -$Player['strength']/2;
$db->sql_query("INSERT INTO `galaxy_chat` (`from` , `message`) VALUES ('<font color=\"red\">Barman</font>', '<font color=\"yellow\">" . $Player['login'] . " lezy nieprzytomny pod barem w " . $Player['planet'] ."</font>')");
$db->sql_query("
UPDATE `${prefix}users`
SET
`hp`='".$Player['hp']."',
`hpmodifier`='".$Player['hpmodifier']."',
`mp`='".$Player['mp']."',
`mpmodifier`='".$Player['mpmodifier']."',
`strengthmodifier`='".$Player['strengthmodifier']."',
`agilitymodifier`='".$Player['agilitymodifier']."'
WHERE `login`='".$login."' LIMIT 1;");
}
else
{
$db->sql_query("UPDATE `${prefix}users` SET `hpmodifier`='".$Player['hpmodifier']."',`hp`='".$Player['hp']."' WHERE `login`='".$login."' LIMIT 1;");
}
if ( 0 >= (-- $Equipment[$id]['count']) )
{
$db->sql_query("DELETE FROM `${prefix}equipment` WHERE `id`='".$id."' AND `owner`='".$login."' LIMIT 1;");
}
else
{
$db->sql_query("UPDATE `${prefix}equipment` SET `count`='".$Equipment[$id]['count']."' WHERE `id`='".$id."' AND `owner`='".$login."' LIMIT 1;");
}
break; |
|