Exemplo n.º 1
0
 public static function onASLShowPlayer(SR_Player $player, array $args)
 {
     $b = chr(2);
     if ($player->getBase('age') > 0) {
         return self::rply($player, '5012', array(Shadowfunc::displayASL($player), self::translate('asl')));
         // 			return self::reply($player, sprintf("Your asl: %s. Use #asl [<age|bmi|height>] for party sums.", Shadowfunc::displayASL($player)));
     } else {
         $player->msg('1011', array(self::translate('aslset')));
         // 			$player->message(sprintf("You did not setup your asl with {$b}#aslset{$b} yet. You need to do this to start moving in the game."));
         return false;
     }
 }
Exemplo n.º 2
0
 public static function onASLSetCustom(SR_Player $player, $age, $bmi, $height)
 {
     $age = abs((int) $age);
     $bmi = abs((int) $bmi);
     $height = abs((int) $height);
     if (false === $player->saveVars(array('sr4pl_age' => $age, 'sr4pl_bmi' => $bmi, 'sr4pl_height' => $height))) {
         self::reply($player, 'Database errror 12!');
         return false;
     }
     $player->modify();
     return self::rply($player, '5266', array(Shadowfunc::displayASL($player)));
     // 		return self::reply($player, sprintf('Your asl has been set to %s.', Shadowfunc::displayASL($player)));
 }