Jump to content

Admin

Administrators
  • Content Count

    1061
  • Joined

  • Last visited

  • Days Won

    51

Admin last won the day on December 4

Admin had the most liked content!

Community Reputation

1657 Distinguished

About Admin

Personal Information

  • xat Username
    xat

Recent Profile Visitors

28033 profile views
  1. Some improvements have been rolled out to html5: See :
  2. Admin

    Maverick's Checkers Game

    If a user wants Checkers on their group, simply ask Maverick to send the bot to your chat [ make sure to include your chat ID ] and he will send the bot there. Make sure to private message him that detail. Main owners are the ONLY ones that are able to approve the game since it's now on a server and accessible to the public. We don't want anyone spamming it. If you have any questions in regards to this, then let us know here. Commands: !approve - would approve the bot with the following message " Operations have been officially approved by a main owner! " !provoke - would disapprove of the bot with the following message " Operations have been officially provoked by a main owner! "
  3. Admin

    Maverick's Checkers Game

    If you ask Maverick nicely he may put the checkers game on your chat! Bot + Checkers !game session add id/username - Adds user to current user's session. !game session remove id/username - Removes user to current user's session. !game session unspectate gamename session - Stop spectating a session's game. !game session spectate gamename session - Start spectating a session's game. Note: session format are related to the users in the session when it started the game, so if there is Maverick and xat playing in a checkers game, you would do !game session spectate checkers 1070,42 The order of the ids for spectate session are irrelevant, 42,1070 should also work. !game session list - Lists users in current user's session. !game session start gamename - Starts game with current user's session. !game session unload gamename - Unloads game with current user's session. For bot owners: Note: roomid MUST BE ROOM ID, NOT NAME. !bot add roomid name avatar homepage - Loads a bot into the given room with the following info: room, name, avatar, and homepage. !bot remove roomid - Unloads a bot from the given room. !bot restart roomid - Reloads a bot in the given room. !bot info roomid [name|BLANK] [avatar|BLANK] [homepage|BLANK] - Edits info of bot at a given room. Note: | means OR, so name OR BLANK (Blank means extra space) Checkers: Bottom color is always first, whoever's name is posted first in a game, it means they are white and it's their turn. Top color is always second, if your name isn't posted first in a game, it means they are black and their turn is after the first. Multiple Jumps must always be completed, it will remain the persons turn until they complete their multiple jumps. Pieces act on force jump rules, which means if a piece can jump over another, it must jump that piece, or you will have to use another piece. A counter will be displayed next to your name on how many pieces you have captured as well. From here on, it's pretty standard American checker rules. Commands: !checker surrender - To surrender to your opponent.
  4. Admin

    Code tutorials

    Making your own command processor In this function: function Receive(u, j) { add: if(j.action == 'message') { doCommands(j.elements.t, u); return; } then add something like this: doCommands(u, m) { let i,id if(!m) return; // ignore blank messages if(m.charAt(0) != '@') return; // first character must be @ m = m.toLowerCase().substr(1).split(' '); // Split the command line into an array switch(m[0]) { case 'start' : main(); // call game main to restart break; case "add": case 'invite' : if(m[1] == 'off') { delete this.bot.invited; return; } // turn off invite mode if(!this.bot.invited) this.bot.invited = {}; // invited mode on id = this.xInt(m[1]); if(id && this.bot.users[id]) { this.bot.invited[id] = true; return; } id = m[1].toLowerCase(); for(i in this.bot.users) if(id == this.bot.users[i].regname) { this.bot.invited[i] = true; return; } this.bot.sendMessage(m[1].replace(/[^A-Za-z0-9_]/g, '')+' not in the chat'); break; case "remove": case "uninvite": if(!this.bot.invited) return; id = this.xInt(m[1]); if(id && this.bot.invited[id]) { delete this.bot.invited[id]; return; } id = m[1].toLowerCase(); for(i in this.bot.users) if(id == this.bot.users[i].regname) { delete this.bot.invited[i]; return; } break; case "list": let cMsg = ''; if(!this.bot.invited) cMsg = "Invites are off"; else { for(id in this.bot.invited) cMsg += (this.bot.users[id].regname ? this.bot.users[id].regname : id)+' '; if(cMsg) cMsg = "Invited users: "+cMsg; else cMsg = "No invited users"; } this.bot.sendMessage(cMsg); break; } } This is a basic command manager. You can add commands if you want or change the messages. You could also add if(u != 42) // Only allow 42 to control this game { bot.sendMessage("You need to know the answer to xat, the universe and everything to control this game!"); return; } Note do not use lib.Init({Commands:'on'}); or the library will handle commands for you
  5. Admin

    Code tutorials

    Put coding tutorials here This section is meant for coders
  6. Admin

    Tutorials

    Make your own game Fire up a codepen app eg: https://codepen.io/xatcom/pen/pQOWyZ?editors=0010 Find this line let sm = ['smile','biggrin','wink','eek','tongue','cool','mad','confused','redface','frown','crying','sleepy','rolleyes','d','vampire','pirate2']; in the JS window Change the name of the smilies to your fav xat smilies You should see the new smilies appear in the debug games (there may be a delay due to a bug in canvas) Then run the game on your chat with the "Run appbot on chat" button You can use the button to save your work on codepen
  7. Admin

    Tutorials

    Getting started Fire up a codepen app eg: https://codepen.io/xatcom/pen/pQOWyZ?editors=0010 mychat is the name of the chat where you want the appbot to run myname is a xat registered user name (probably needs to be different from your main ID) (In the future it may need the appbot power and days) a2bb8a73336665ba5 is the apikey for "myname". you can get that at xat.com/login under Security settings (Never share your api key, no one needs it. If you do you can change it at any time) Press the "Run appbot on chat" button Go to your group (mychat) and member your bot (MYBOT) Make sure anyone who wants to play use the html5 version of your chat eg xat.com/mychat?new And then they run the Canvas app, Click (in the chat, to the right of the smilie line): Then click: Then press "Run appbot on chat" button again to start the app/game on your chat.
  8. Admin

    Tutorials

    If you have a tutorial please put it here. I'll ask the wiki staff to put them on the wiki then where they can be kept up to date and translated.
  9. Admin

    Getting started Mk2

    What do you mean ?
  10. Hopefully the 502 connection errors are now fixed.
  11. Admin

    Getting started Mk2

    https://codepen.io/xatcom/pen/pQOWyZ?editors=0010 Canvas updated to: v2.19 (tween issue fixed) Bug in bot fixed
  12. Admin

    Getting started Mk2

    https://codepen.io/xatcom/pen/pQOWyZ?editors=0010 updated Adds commands @invite tom2 @list @remove tom2 There is of course not much point in this with the match game Not well tested
  13. Admin

    Getting started Mk2

    You don't think its tedious inviting ppl rather than all can play ?
  14. Admin

    Getting started Mk2

    Like invite etc ?
  15. Admin

    Getting started Mk2

    https://codepen.io/xatcom/pen/pQOWyZ?editors=0010 Updated to include an @start command to restart the game
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.