Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function rollDice($username, $userid, $otherUser)
- {
- $status = file_get_contents("status.txt");
- if (strpos($status, 'Game: Active') !== false) {
- if (!empty($otherUser) && ($this->isAuthorized($username))) {
- $username = $otherUser;
- echo "set user";
- }
- if (!$this->checkUserBet($username)) {
- $this->sendPM("There is currently an active game. Please try again later.", $userid);
- return;
- }
- // IMPORTANT SHIT HERE
- // IMPORTANT SHIT HERE
- // IMPORTANT SHIT HERE
- $roll = mt_rand(1, 100);
- // END IMPORTANT SHIT
- file_put_contents("rolls.txt", "$username:$roll\n", FILE_APPEND | LOCK_EX);
- $this->postShout("{$username} rolls a {$roll}");
- $this->postShout('/sticky [b][color=PaleGreen]' . $this->getLead() . ' is in the lead.[/color] Current players: [color=red]' . $this->getCurrentPlayers() . '[/color][/b]');
- $this->gameOver();
- } else {
- $this->sendPM($this->roll($username), $userid);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement