Hey, everyone. I've finally decided to release this script. This is basically a client script game of pass the bomb which is actually a potato. The objective of this game is to make sure you're not the person holding the potato when it explodes or you get kicked from the channel. Installing & Setting Up the Script The instructions on how to install and setup the script are found in the code in the links below. Download: v1.02 Raw Code: http://pastebin.com/raw.php?i=Qr0y68Ls Server Version found here: http://pokemon-online.eu/threads/hot-potato-game-server-version.30966/ Updates: v1.01 Added missing JSLint "use strict" lines. Changed command symbol from - to ? for the time being by request. (Change the ? symbol on the line with var vgCommandSymbol = "?"; to change it to another symbol.) /me messages removed. (Can be re-added by entering "/me[space]" in the double qoutes on the line var vgBotMsgPrefix = "";.) Spoiler: Previous Updates v1.00 First release. Questions and Answers: Q: What is this script? A: A client script game of pass the bomb which is actually a potato.. Q: Where are the instructions to install and setup the script? A: They are found at the top of the script's code itself, with the settings you can edit under it. Saves users having to rapidly find this page. Q: Can I use samples of your code? A: Of course. I be happy if you can make something good with it. Q: The script isn't working. A: There are many reasons for this, here's the main ones: - Make sure you had copied all the raw code given from the link, even the instructions part. - If you had opened 2 server tabs on PC, try closing and opening Pokemon Online. - Make sure you pasted the code in the client script window and not the battle one by mistake. - Make sure Safe Scripts is off and Show Warnings is on, in the plugin script window, since Safe Scripts can disable functionality I think. - The script is set by default not to work in Pokemon Online's official channels. Also, it doesn't work in PM. - Are you getting a code line error? If so check that line of the code. You may had deleted something you shouldn't had. Q: Do you have a server version of this script? A: Yes, it can be found here, http://pokemon-online.eu/threads/hot-potato-game-server-version.30966/, but maybe more difficult to set up
Just curious, why do you have Code (text): vChannelId = channel, and Code (text): vZero = 0; The first one is just defining a variable longer than an already defined variable, the other just completely blows my mind and I don't have a vocabulary large enough to articulate my feelings about this.
The first one is just a habit I got when I was learning how to script here from using Crystal's script. To be honest, I need to change that some point. The second one is an issue with JSLint error check plug-in thinking it's an error. Even I think it's just a waste. It likes a variable containing 0 but doesn't like the integer 0 itself. I'm trying to improve my way of coding. http://i.imgur.com/pvOtN22.jpg The script wasn't really my idea. But anyone, with coding knowledge, should be able to re-word the messages in the script if they wanted. I think a Voltorb or Electrode sounds fun too.
I think it would be better if the /me before the messages were removed. Some colors can be annoying, and even without /me, it will be fine. Edit: And something other than -, because some people had said it was confusing for them, and they would much rather prefer ? (like the original).
The /me messages is to help reduce flashes in channel. I could try add something so the user can choose to use them or not. As for the command symbol. I see if I can set it to allow either - and ? same time. If I can't, I set it to just ?. Thanks for your feedback. Edit: Script updated. Read update logs for info on changes. May add better methods if this script does well.
It probably doesn't like you using 0 pointlessly... Any why add 'Use Strict'? PO doesn't support it. JSlint isn't perfect, especially if you're not using it for web JS, which it's mainly defined for. JSHint is better. I use /*jshint "laxbreak":true,"shadow":true,"undef":true,"evil":true,"trailing":true,"proto":true,"withstmt":true*/ as my settings for JSHint. JSLint plugin has an option for switching between the two.
I've done some research on those code comment JSHint settings effects, on http://jshint.com/docs/options/, but... laxbreak is to be removed in the next release and trailing isn't listed at all. I've found it been removed from a previous update. I didn't know about the "use strict" part but I thought I add it just in case for future proof. Since I thought it would get updated. I've switched between JSLint and JSHint but I thought JSLint was better since it picked up more errors. I always appreciate your coding advice.