Author Topic: DeepBot API Requests!  (Read 1538 times)

0 Members and 1 Guest are viewing this topic.

TexxhornTV

  • Youngling
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
  • Twitch Name: TexxhornTV
DeepBot API Requests!
« on: May 24, 2016, 06:56:31 PM »
I would ask if you can create a api for

- SetMod

Thanks... Code in PHP are ready!

Quote
<?php

if (isset($_GET['server']) && isset($_GET['secret'])) {
   $server = $_GET['server'];
   $secret = $_GET['secret'];
   
   // Load depedencies
   require dirname(__FILE__) . '/config/config_inc.php';
   require dirname(__FILE__) . '/vendor/autoload.php';

   $bot = Deepbot\API::instance(array(
      'server'    => $config['server'],
      'port'      => $config['port'],
      'secret'   => $config['secret']
   ));

} else {
   echo 'Not Set Up';
}

if (isset($_GET['user'])) {
   $user = $_GET['user'];
   $mod = $_GET['mod'];
   $bot->setUserVip($user, $mod);
   if ($mod == '1') {
      $mod = 'Level 1';
   } else if ($mod == '2') {
      $mod = 'Level 2';
   } else {
      $mod = 'None';
   }
   echo 'Set ' . $user . ' ' . $mod;
} else {
   echo 'UnSet';
}

?>