Jump to content

chain

Administrators
  • Posts

    5,964
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by chain

  1. Version 1.0.0

    0 downloads

    Respoon Automatic response manager addon for Hexchat Usage Add an automatic response : /RESPOON ADD <name> <server> <channel> "<trigger>" MSG|CMD <action> List every automatic responses : /RESPOON LIST Show properties of a specific response : /RESPOON SHOW <name> Edit an automatic reponse : /RESPOON EDIT <name> <server> <channel> "<trigger>" MSG|CMD <action> Remove an automatic reponses : /RESPOON DELETE <name> Property <trigger> is in regex format. Keep double-quote around if the regex contains spaces. You can use those escape sequences in the <action> property : {user} : the nick of the user {message} : the full message that has been sent {server} : the server where the message has been sent {channel} : the channel where the message has been sent {params[x]} : the match of your regex at index 'x' Examples /RESPOON ADD hello_resp *.worldnet.net #mychannel ^Hello.+$ MSG Welcome {user} ! /RESPOON ADD eat_muffin * * "^Who wants a muffin ?$" CMD ME eat the muffin ! /RESPOON EDIT eat_muffin * * "^Who wants a (.+) ?$" CMD ME eat the {params[0]} ! /RESPOON DELETE eat_muffin
  2. ━═★[̲̅̅H̲̅][̲̅̅A̲̅][̲̅̅P̲̅][̲̅̅P̲̅][̲̅̅Y̲̅] [̲̅̅B̲̅][̲̅̅I̲̅][̲̅̅R̲̅][̲̅̅T̲̅][̲̅̅H̲̅][̲̅̅D̲̅][̲̅̅A̲̅][̲̅̅Y̲̅]★═━ err0r To a Good friend that has always been there for me & others, I like to wish you all the best on your special day & wish you a Happy Birthday & many more to come my friend!!
  3. Version 1.0.0

    0 downloads

    Archived project This project was already merged into the Hexchat code, the main objective of it to exist, please go to the official repository to get support HexChat FiSHLiM Reloaded Adds FiSHLiM support to HexChat with with steroids! Based on FiSHLiM plugin of HexChat. Installation Dependencies gio openssl hexchat meson Conflicts You must deactivate the original FiSHLiM version of the HexChat core before using this version User install meson builddir -Dlocal_install=true ninja -C builddir test ninja -C builddir install System install meson builddir ninja -C builddir ninja -C builddir test sudo ninja -C builddir install AUR We offer AUR repo: https://aur.archlinux.org/packages/hexchat-fishlim-reloaded-git/ Features Backward compatibility with the database file addon_fishlim.conf from original HexChat module CBC mode on SETKEY and KEYX commands Store keys in CBC mode (addon_fishlim.conf) Detect context in DELKEY command Encrypted flag for incoming and outgoing messages Usage SETKEY command for CBC mode -> /setkey cbc:key for ECB mode -> /setkey ecb:key for ECB mode -> /setkey key Part of HexChat This project is intended to provide users with the new features until they are merged into the HexChat core: hexchat/hexchat#2347
  4. Version 1.0.0

    0 downloads

    XChat / HexChat plugin to post shortened URLs to a channel or an user. Avoids sharing long or complicated URLs! Usage: /uhcx http://your.long.url/
  5. chain

    Dj4x

    Version 1.0.0

    0 downloads

    tility bot for IRC. Runs on HexChat 2.10 and later versions. How to clone the bot First of all, make sure you have Python installed and Python Plugin installed with the HexChat your bot will use. Second, create an account on Freenode for your bot. Ask for a cloak to your name on the #Freenode channel. Finaly, set HexChat server configuration to autoconnect and autologin your bot. Use SSL to secure your connexion. After that, change the bot files to suite your needs: Copy the code and the json files into .config/hexchat/addons/ (Linux) or %appdata%\HexChat\addons\ (Windows). This will make HexChat run the code automatically on startup. Rename the files depending on your bot name and change settings in the files: _data.json file: _users.json file: .py file: Important Microsoft Translator has moved to Azure Microsoft recommands that beginning 2017-01-01, subscribers to Microsoft Translator Text move to Azure DataMarket to avoid service disrption. For more information, see Microsoft Translator has moved to Azure on UserVoice.
  6. Version 1.0.0

    0 downloads

    A cryptographic module for hexchat /crypt on begins encrypting all output and decrypting all input with . Uses mircryption (so it's CBC, horrah!) \ escapes a message so it isn't encrypted /crypt off stops encrypting/decrypting /crypt exchange uses Diffie-Hellman key exchange to create a shared key with All encrypted messages are displayed in green. irccrypt.py must be moved/copied into HexChat's folder. You also need pycryptodome or pycrypto (can both be installed through pip) Just tested this module at the time of commit and something no longer works. This was my pride and joy back when I wrote it in 2016, so I hope to get it running again.
  7. Version 1.0.0

    0 downloads

    NOTE: This Plugin can ONLY be used with a modified version of HexChat. The Patch File is included in this Repository at ./hex.patch. This is a Plugin for HexChat which aims to integrate some of the more advanced features of the Twitch Chat IRC bridge; Specifically, user Badges and channel events such as Subscriptions. This information is supplied via IRCv3 Tags. There are various IRC clients built specifically for Twitch, such as Chatty, but none seem to compare to HexChat in terms of performance. This is, therefore, an attempt to rework HexChat into a Twitch chat client, without altering its behavior on other IRC Networks. One problem, however, stands in the way: The HexChat Plugin interface does not provide Callbacks with the IRC Tags. Therefore we must modify HexChat to add this functionality, using the Patch File mentioned above (This could be submitted as a Pull Request, but currently, my C sucks and I would rather not waste their time). Regarding the Coming Update Twitch is deprecating several key IRC commands. They will be removed on or around 2023-02-18. This removal includes all of the most important moderation and channel editor capabilities. As a result, this plugin may see a great decrease in utility; At the very least, all installations of current and past versions will stop working for functions such as banning users and setting a channel to slow mode. I am going to try to implement access to the main API, and hopefully keep as much of the current functionality as possible, but updating the plugin will be required. Patching HexChat With Git and GNU Patch installed, the following commands should download and patch the latest HexChat source code: git clone https://github.com/hexchat/hexchat.git build/hexchat patch -p0 -d build/hexchat -i ../../hex.patch When the patch is applied, you can then build and install HexChat as normal from its directory at build/hexchat/. Building the Plugin You will need to have Cargo installed. Cargo can be installed and set up easily with RustUp. When this is done, run the following command in the Directory where you unpacked this Repository: cargo build --release After Cargo compiles the plugin, its Binary should be in target/release/, and should be named something like libhextwitch or libhextwitch.so. Move this File into the addons Directory in your HexChat config Directory; On Linux, this should be at $XDG_CONFIG_HOME/hexchat/addons/. If you have not patched HexChat, it will probably crash. Otherwise, you should now have Twitch features. Badge Icons It is not currently feasible to embed images inline in HexChat without creating a custom font. In lieu of that potential far-future solution, and to keep installation as simple as possible, Twitch user badges are mapped to Unicode codepoints, as detailed in the following lists. Badges without a codepoint specified will be rendered as ?. A list of all unknown badge names can be viewed with the /UNKNOWNS command. This information should be provided as an Issue in this repository, so that they can be added to the plugin. Note that some typefaces may render some of these characters in an Emoji style, which may clash somewhat with the rest of the interface. Global 🜨 (😞 Twitch staff. ⛨ (😞 Twitch administrator. ✓ (😞 Twitch partner. a (😞 Community "Ambassador", handpicked by Twitch. Δ (😞 This account is registered with Twitch as a game developer or publisher. + (😞 Twitch Turbo member. ± (😞 Twitch Prime member. ~ (😞 User has taken the "GLHF Pledge". g (😞 User has attended GlitchCon. c (😞 User has attended TwitchCon. w (😞 Overwatch League "Insider". G: This icon represents various game-specific badges. Channel-specific 🜲 (😞 User is the Broadcaster, the owner of the channel. 🗡 (😞 User is a Moderator of this channel with additional powers, handpicked by the Broadcaster. ⚑ (😞 User is a VIP of this channel, handpicked by the Broadcaster. ⲷ (😞 User was one of the first subscribers to this channel. α (😞 User has contributed art or media to this channel. m (,,,,😞 User was active in chat for a notable event, chosen by the Broadcaster. . (,😞 User has contributed to a Hype Train in this channel. Ⓐ (😞 User is watching the stream with no audio. Ⓥ (😞 User is listening to the stream with no video. Cheering/Bits * (😞 User is an anonymous cheerer. ❖ (,,😞 User is one of the top three cheerers in this channel. 🝔 (😞 User has given bits with the #charity tag. ▴ (😞 User has given at least 1 bit ($0.01). ⬧ (😞 User has given at least 100 bits ($1.00). ⬠ (😞 User has given at least 1,000 bits ($10.00). ⬡ (😞 User has given at least 5,000 bits ($50.00). 🟋 (😞 User has given at least 10,000 bits ($100.00). 🟎 (😞 User has given at least 100,000 bits ($1,000.00). Subscriptions () ⁘ (,,😞 User is one of the top three givers of gift subscriptions in this channel. : (😞 User has given gift subscriptions in this channel. Double-circled digits (⓵,⓷,⓺,⓽) are used to represent subscriptions below 1 year. Roman Numerals (ⅰ,ⅱ,ⅲ,ⅳ,ⅴ,ⅵ,ⅶ,ⅷ,ⅸ,ⅹ,ⅺ,ⅻ) are used to represent subscriptions of 1 year up to 12 years. Inverted circled numbers ⓭ through ⓴ are used to represent subscriptions longer than 12 years. ⁑: User is a subscriber of at least 21 years. This one should not show up for quite a while. Channel Points Predictions ❶–❿ (–😞 User has bet channel points on a blue prediction, with up to 10 possible outcomes. ❶/❷ (,😞 User has bet channel points on a blue/pink prediction, with only two possible outcomes. ⧲/⧳ (,😞 User has bet channel points on a gray prediction, with only two possible outcomes. p: This codepoint represents an unknown Prediction badge, likely because Twitch added a new one again. If this is seen, an Issue should be opened in this repository, including the output of running the /UNKNOWNS command. Breeze Icons used for HexChat GUI menu items © KDE, licensed under the GNU LGPL 3 or later.
  8. Version 1.0.0

    0 downloads

    List of Scripts Unhighlight Channels -- converts highlights from user-selected channels to regular non-highlighted text events Ignore Text Events -- allows a user to remove text events from a given channel, network, or global context Installation For installation: Window > Plugins and Scripts will allow you to load and unload them. See the official documentation on how to load scripts automatically at startup. Building Run make on the top level directory (where this README is located). Currently used by scripts which use modules to compress them into one flat file. This will take the modules in the ./script/src directory and output them to ./script/build.
  9. Version 1.0.0

    0 downloads

    Python script for X-Chat and HexChat IRC clients
  10. Version 1.0.0

    0 downloads

    An AppArmor profile to confine HexChat IRC. This profile is developed by the Whonix team. HexChat IRC is developed by xchat.org / hexchat.github.io. For better security. How to install apparmor-profile-hexchat using apt-get 1. Download the APT Signing Key. wget https://www.kicksecure.com/derivative.asc Users can check the Signing Key for better security. 2. Add the APT Signing Key.. sudo cp ~/derivative.asc /usr/share/keyrings/derivative.asc 3. Add the derivative repository. echo "deb [signed-by=/usr/share/keyrings/derivative.asc] https://deb.kicksecure.com bullseye main contrib non-free" | sudo tee /etc/apt/sources.list.d/derivative.list 4. Update your package lists. sudo apt-get update 5. Install apparmor-profile-hexchat. sudo apt-get install apparmor-profile-hexchat How to Build deb Package from Source Code Can be build using standard Debian package build tools such as: dpkg-buildpackage -b See instructions. NOTE: Replace generic-package with the actual name of this package apparmor-profile-hexchat. A) easy, OR B) including verifying software signatures
  11. Version 1.0.0

    0 downloads

    hakespearean Insult generator script for IRSSI IRC client. Based on this image from twitter Ported from my IRSSI script at the request of Reddit users. General Installation Notes Drop it into your "addons" directory in Hexchat, and load it with "/py load shakespeare.py" or add to autoload. Reasonably painless to make work, compared to the absolute motherfuckery that was configuring irssi-python. Usage Notes To use, just do /shakespeare to insult no one in particular (the open query window), or /shakespeare $nick to insult a specific user in the current channel.
  12. Version 1.0.0

    0 downloads

    Spotify Now Playing plugin for HexChat Project is compiled targeting Visual Studio 2015. I am using Visual Studio 2017 Community Edition as my IDE. This code makes use of an unsupported SpotifyLookUpLib to interact with Spotify.. As for the Spotify Library (.lib) file... There are no plans to release this to the public...
  13. Version 1.0.0

    0 downloads

    Twitch Tweaks, or TwTw for short, is a HexChat plugin for making Twitch IRC a lot more intelligent. Shows the status and game for Twitch channels as the topic, and set the tab name to the properly-capitalized channel's name with a little bullet indicating if that channel is live or not (here's a screenshot). This is an expanded version of a script called twitch-title.py by PDog, which you can find in Poorchop/hexchat-scripts. Installation Installation is no different than any other HexChat plugin. You need to have the Python interface installed on your HexChat for it to work (if you don't have it, you can just re-run the HexChat installer to get it -- it won't override your existing settings). I've only tested on Python 3 but maybe it'll work with Python 2, who knows. Anyway, assuming you have the Python interface plugin for HexChat, you can just drop twitch-tweaks.py into the addons folder inside your HexChat config folder. Don't know where your HexChat config folder is? No worries bro, I got you covered. Usage You can probably use this script without having to do any tweaking whatsoever, but if you want, there are some commands and configuration options available. Commands TWTWSET <value...> - Sets/gets the value of a twitch-tweaks configuration option TWTWREFRESH - Forces twitch-tweaks to refresh the statuses of all Twitch channels TWTWLIST - Lists all preferences set for twitch-tweaks Configuration/Preferences Here are all the settings that can be modified with the TWTWSET command, their default values, and brief descriptions of their purpose twitch_api_root = https://api.twitch.tv/kraken (where is Twitch's API server located? shouldn't ever need to change this) twitch_base_domain = twitch.tv (host name used to determine whether or not any given server is a Twitch server. shouldn't ever need to change this) bullet_offline = □ (string displayed beside the names of channels that are currently offline) bullet_online = ■ (string displayed beside the names of channels that are currently online) modify_topic = 1 (should TwTw change the topic of Twitch channels? 0 or 1) modify_tab = 1 (should TwTw change the tab name of Twitch channels? 0 or 1) lookup_offline_names = 0 (should TwTw look up the proper capitalization of channels which are offline? takes longer, especially if you're joined to a lot of channels. 0 or 1) refresh_rate = 600 (how often, in seconds, should TwTw refresh the Twitch data?)
  14. Version 1.0.0

    0 downloads

    Emoji addon for HexChat About hexchat-emoji allows you to use Slack-like emoji notation in HexChat. This input: This is a message with emojis 😄 🐍 Becomes this message: This is a message with emojis 😄 🐍 Installation Python 3 plugin Ensure you have Python 3 plugin installed in HexChat, check in Window > Plugins and Scripts. Ubuntu: apt install hexchat-python3 Fedora: Present in hexchat package, no dependencies needed openSUSE: zypper in hexchat-plugins-python3 Emojis library Ensure you have emojis library installed in your system, check with pip3 freeze | grep emojis. pip3 install -U emojis HexChat emoji addon Copy emoji.py to ~/.config/hexchat/addons. Restart HexChat. Settings Emoji addon has a few settings you can change. They are located and documented in the top of emoji.py as constants.
  15. Version 1.0.0

    0 downloads

    Javascript interface using Spidermonkey. This plugin is no longer actively developed though bugs may be fixed. I suggest using the Lua plugin shipping with modern HexChat as an alternative. For more information check out the wiki. Features Load/unload/reload/autoloading scripts Interpreter via /js Runtime per script Full coverage of hexchat api Windows and Unix support Requirements HexChat 2.9.6+ JS 1.8.5 Installation Windows: Place the javascript.dll in the addons folder within your config dir. Install Javascript, instructions are on the wiki. Fedora: Download a repo file from here into /etc/yum.repos.d/ yum install hexchat-javascript Arch: Download package from hexchat-javascript-git on the AUR. Follow the wiki to install. Building Linux: Install the hexchat and js dev package from your distro of choice. (e.g. js-devel, libmozjs185-dev, js185) make && sudo make install Windows: Install my build of Javascript as mentioned on the wiki and update its path in hexchat-javascript.props. Open in Visual Studio and build.
  16. Version 1.0.0

    0 downloads

    This is Re Crono theme by lassekongo83. There's minor tweaks to suit HexChat better, and removes all the unused files for simplicity. How to install: Download archive Extract to your HexChat install directory (in Program Files folder on Windows) Restart HexChat
  17. Version 1.0.0

    0 downloads

    Adds off-the-record (OTR) support to HexChat. Originally forked from irssi-otr and still a work in progress. Installation Dependencies glib gcrypt libotr4 hexchat meson User install meson builddir -Dlocal_install=true ninja -C builddir install System install meson builddir ninja -C builddir sudo ninja -C builddir install Usage Start a session with a user: /query nick /otr start If this is your first time it may take a while to generate a key. Authenticate this user: At this point you need to verify this is the person you think it is. If you know their fingerprint and it is correct: /otr trust If you have previously agreed on a shared secret: /otr auth <shared secret> If you have neither of these: /otr authq <question> <answer> Start chatting: Everything should be secure at this point. When you are done: /otr finish
  18. Version 1.0.0

    0 downloads

    Color scheme for Sublime Text and HexChat Admittedly, this is a totally personal color scheme and I don't expect it to perfectly fit the needs of others, but just in case, enjoy!
  19. I will be adding some addons and themes for various windows for hex chat client. I will look around and see what i can find for it and other sources for hex chat.
  20. Version 1.0.0

    0 downloads

    Note that the Windows installers automatically download other dependencies and may require rebooting for scripting interfaces to work.
  21. Version 1.0.0

    2 downloads

    Note that the Windows installers automatically download other dependencies and may require rebooting for scripting interfaces to work.
  22. This version of InspIRCd was released on 2022-12-30. Release InspIRCd 3.15.0 · inspircd/inspircd · GitHub inspircd-3.15.0-1.el7.x86_64.rpm
  23. chain

    Java Snake

    meh just a snake game....i made this like a year ago when i was just learning java 😜 i was bored and saw no one has posted one so i figure i'll post the first one. 🙂 *known bugs: can't restart without refreshing page rapid movement causes snake to turn back into self URL: http://picklecodes.co.cc/Games/Snake/ import java.awt.*; import java.applet.*; import java.awt.event.*; import java.util.*; public class Snake extends Applet implements KeyListener, Runnable { // The object we will use to write with instead of the standard screen graphics Graphics bufferGraphics; // The image that will contain everything that has been drawn on // bufferGraphics. Image offscreen; // To get the width and height of the applet. Dimension dim; Random r=new Random(); Level level=new Level(); boolean playedLastGame=false; int bodies=2; int lives=3; int countApple=0; Wall[] w = new Wall[500]; Section[] s=new Section[300]; Apple[] a=new Apple[10]; MovePoint[] mp=new MovePoint[100]; //credits String version = "1.0"; boolean game,puase; boolean gameOver; int GameOverTimer=0; int x,y; //timer Thread t,t1; public void start(){ t = new Thread(this); t.start(); } public void run(){ t1 = Thread.currentThread(); while(t1 == t){ updateSpace(); try{ t1.sleep(100); }catch(InterruptedException e){} } } public void init() { // We'll ask the width and height by this dim = getSize(); setBackground(Color.black); // Create an offscreen image to draw on // Make it the size of the applet, this is just perfect larger // size could slow it down unnecessary. offscreen = createImage(dim.width,dim.height); // by doing this everything that is drawn by bufferGraphics // will be written on the offscreen image. bufferGraphics = offscreen.getGraphics(); for (int i=0; i < s.length; i++) { s[i]=null; } for (int i=0; i < w.length; i++) { w[i]=null; } for (int i=0; i < a.length; i++) { a[i]=null; } for (int i=0; i < mp.length; i++) { mp[i]=null; } level.setLevel(0); this.setFocusable(true); this.requestFocus(); addKeyListener(this); game=false; } public void reinit() { int tempGoal = level.getGoal(); level.reset(); level.setGoal(tempGoal + 5); bodies=2; countApple=0; for (int i=0; i < s.length; i++) { s[i]=null; } for (int i=0; i < w.length; i++) { w[i]=null; } for (int i=0; i < a.length; i++) { a[i]=new Apple(); a[i].init(); for (int ii=0; ii < w.length; ii++) { if (w[ii] != null) { while (w[ii].x == a[i].x && w[ii].y == a[i].y) { a[i].init(); ii=0; } } } } for (int i=0; i < mp.length; i++) { mp[i]=null; } s[0]=new Section(); s[1]=new Section(); s[2]=new Section(); s[0].init(250,250,"right"); s[1].init(245,250,"right"); s[2].init(240,250,"right"); s[0].setHead(true); puase=true; } public boolean updateSpace() { // Wipe off everything that has been drawn before // Otherwise previous drawings would also be displayed. bufferGraphics.clearRect(0,0,dim.width,dim.height); if (game == false) { if (gameOver == true) { bufferGraphics.setColor(Color.green); bufferGraphics.drawString("Game Over!",dim.width / 2 - 100,dim.height / 2); GameOverTimer++; if (GameOverTimer >= 10) { gameOver=false; GameOverTimer=0; } } else { bufferGraphics.setColor(Color.green); bufferGraphics.drawString("Pickled Snake",dim.width / 2 - 100,dim.height / 2); bufferGraphics.drawString("Press Space to Start ",dim.width / 2 - 100,dim.height / 2 + 15); } } else { if (puase != true) { level.time+=0.1; level.time=Round(level.time,1); } for (int i=0; i < s.length; i++) { if (s[i] != null) { if (puase != true) { s[i].move(); } //check collsion with apples if (bodies <= s.length) { for (int ii=0; ii < a.length; ii++) { if (a[ii] != null) { if (s[0].x == a[ii].x && s[0].y == a[ii].y) { int X=s[bodies].x; int Y=s[bodies].y; String D=s[bodies].direction; bodies++; if (D == "up") { s[bodies]=new Section(); s[bodies].init(X, Y+5, D); } if (D == "down") { s[bodies]=new Section(); s[bodies].init(X, Y-5, D); } if (D == "right") { s[bodies]=new Section(); s[bodies].init(X-5, Y, D); } if (D == "left") { s[bodies]=new Section(); s[bodies].init(X+5, Y, D); } a[ii].init(); for (int iii=0; iii < w.length; iii++) { if (w[iii] != null) { while (w[iii].x == a[ii].x && w[iii].y == a[ii].y) { a[ii].init(); iii=0; } } } countApple++; break; } } } } //check if snake section collides with self if (i != 0 && s[0].x == s[i].x && s[0].y == s[i].y || s[0].x < 0 || s[0].y < 0 || s[0].x > dim.width || s[0].y > dim.height) { LoseLive(); return false; } //check if snake section is over move point if so then move in the direction told by move point for (int ii=0; ii < mp.length; ii++) { if (mp[ii] != null) { if (s[i].x == mp[ii].x && s[i].y == mp[ii].y) { s[i].direction=mp[ii].direction; if (bodies == i) { mp[ii]=null; } } } } s[i].Paint(bufferGraphics); } } //paint walls for (int i=0; i < w.length; i++) { if (w[i] != null) { //check if snake section collides with a wall if (s[0].x == w[i].x && s[0].y == w[i].y) { LoseLive(); return false; } w[i].Paint(bufferGraphics); } } for (int i=0; i < a.length; i++) { a[i].Paint(bufferGraphics); } //check the level goal if (countApple >= level.getGoal()) { level.setLevel(level.getLevel() + 1); reinit(); } bufferGraphics.setColor(Color.orange); bufferGraphics.drawString("Time: "+ level.time,10,15); bufferGraphics.drawString("Lives: "+ lives,80,15); bufferGraphics.drawString("Level: "+ level.getLevel(),(dim.width / 2) - 75,15); bufferGraphics.drawString("Goal: "+ level.getGoal(),dim.width - 100,15); bufferGraphics.drawString("Apples: "+ countApple,dim.width - 100,30); if (puase == true) { bufferGraphics.setColor(Color.green); bufferGraphics.drawString("Puase ",dim.width / 2 ,dim.height / 2); } } repaint(); return true; } /** this controls the lives */ public void LoseLive() { lives--; if (lives <= 0) { EndGame(); } reinit(); } /** this ends the game */ public void EndGame() { resetGame(); gameOver=true; game=false; } /** this resets the game and destroys everything not being used */ public void resetGame() { level.reset(); lives=3; for (int i=0; i < s.length; i++) { s[i]=null; } for (int i=0; i < w.length; i++) { w[i]=null; } for (int i=0; i < a.length; i++) { a[i]=null; } for (int i=0; i < mp.length; i++) { mp[i]=null; } } //paint public void paint(Graphics g) { //credits bufferGraphics.setColor(Color.orange); bufferGraphics.drawString("Java Snake game "+ version,10,470); bufferGraphics.drawString("By: Pickle",10,480); // draw the offscreen image to the screen like a normal image. // Since offscreen is the screen width we start at 0,0. g.drawImage(offscreen,0,0,this); } public void update(Graphics g) { paint(g); } //key events public void keyPressed(KeyEvent e ) { if (puase != true) { switch (e.getKeyCode()) { case KeyEvent.VK_LEFT: if (s[0].direction == "left" || s[0].direction == "right") {} else { s[0].direction="left"; for (int i=0; i < mp.length; i++) { if (mp[i] == null) { mp[i]=new MovePoint(); mp[i].init(s[0].x,s[0].y,"left"); break; } } } break; case KeyEvent.VK_RIGHT: if (s[0].direction == "left" || s[0].direction == "right") {} else { s[0].direction="right"; for (int i=0; i < mp.length; i++) { if (mp[i] == null) { mp[i]=new MovePoint(); mp[i].init(s[0].x,s[0].y,"right"); break; } } } break; case KeyEvent.VK_UP: if (s[0].direction == "up" || s[0].direction == "down") {} else { s[0].direction="up"; for (int i=0; i < mp.length; i++) { if (mp[i] == null) { mp[i]=new MovePoint(); mp[i].init(s[0].x,s[0].y,"up"); break; } } } break; case KeyEvent.VK_DOWN: if (s[0].direction == "up" || s[0].direction == "down") {} else { s[0].direction="down"; for (int i=0; i < mp.length; i++) { if (mp[i] == null) { mp[i]=new MovePoint(); mp[i].init(s[0].x,s[0].y,"down"); break; } } } break; case KeyEvent.VK_SPACE: if (game == false) { game=true; reinit(); } break; } } if (e.getKeyChar() == 'p') { if (puase == true) { puase=false; } else { puase=true; } } } public void keyReleased( KeyEvent e ) { } public void keyTyped( KeyEvent e ) {} //for my rounding needs public static float Round(float Rval, int Rpl) { float p = (float)Math.pow(10,Rpl); Rval = Rval * p; float tmp = Math.round(Rval); return (float)tmp/p; } /** * records Level Info */ private class Level { int level = 0; int goal=0; float time = 0.0f; public Level() { } public void reset() { goal=0; time = 0.0f; } public void setLevel(int l) { level=l; } public void setGoal(int g) { goal=g; } public int getLevel() { return level; } public int getGoal() { return goal; } } /** * record snake sections */ private class Section { int x,y; String direction=null; boolean head=false; public Section() { } public void init(int X, int Y, String B) { direction=B; x=X; y=Y; } public void setHead(boolean h) { head=h; } public void move() { if (direction == "up") { y-=5; } if (direction == "down") { y+=5; } if (direction == "right") { x+=5; } if (direction == "left") { x-=5; } } public void Paint(Graphics g) { g.setColor(Color.green); g.fillOval(x,y,5,5); if (head == true) { g.setColor(Color.black); g.fillOval(x - 2,y - 2,2,2); g.fillOval(x - 4,y - 2,2,2); } } //end class section } /** * record Move point */ private class MovePoint { int x,y; String direction; public MovePoint() { } public void init(int X, int Y, String B) { direction=B; x=X; y=Y; } //end class section } /** *Draw Wall Randomly */ private class Wall { int x,y; public Wall() { } public void init(int X, int Y) { x=X - (X % 5); y=Y - (Y % 5); } public void Paint(Graphics g) { g.setColor(Color.gray); g.fillOval(x,y,5,5); } //end class Wall } /** *Draw Apple Randomly */ private class Apple { int x,y; public Apple() { } public void init() { int rand=r.nextInt(dim.width); x=rand - (rand % 5); rand=r.nextInt(dim.height); y=rand - (rand % 5); } public void Paint(Graphics g) { g.setColor(Color.red); g.fillOval(x,y,5,5); } //end class apple } //end }
  24. This is a fun little script I made a while back. It fits perfectly with truth or dare games. (I dare you to type !kickme) It was a completely random idea me and my brother came up with. Commands: !kickme !banme !kickbanme Bans for 30 seconds. on *:Text:*:#:{ if ($1 == !kickme) { kick # $nick Kicked on request } elseif ($1 == !kickbanme) { ban -ku30 # $nick 2 Kick + 30 second ban by request } elseif ($1 == !banme) { ban -u30 # $nick 2 | msg # $nick activated a 30 second ban by request. } } on *:Text:*:#:{ if ($1 == !kickme) { kick # $nick Kicked on request } elseif ($1 == !kickbanme) { ban -ku30 # $nick 2 Kick + 30 second ban by request } elseif ($1 == !banme) { ban -u30 # $nick 2 | msg # $nick activated a 30 second ban by request. } } on *:Text:*:#:{ if ($1 == !kickme) { kick # $nick Kicked on request } elseif ($1 == !kickbanme) { ban -ku30 # $nick 2 Kick + 30 second ban by request } elseif ($1 == !banme) { ban -u30 # $nick 2 | msg # $nick activated a 30 second ban by request. } On *:Text:!kickbanme:#: { /kick $chan $nick Kick + 30 second ban by request mode $chan +b $nick .timer 1 30 mode $chan -b $nick } can be also rewritten as on *:text:!kickbanme:#: { !ban -ku30 # $nick Kick + 30 second ban by request }The -k switch means to 'kick', and the u30 switch means to (unban or unset, either one works) in N seconds. The 2 after the $nick is the ban mask. The kind of ban mask you supplied wasn't a real one as it was a nick ban. I prefer using mask 2 as it is the most "unique" ban mask out of all of them. In this situation where you're "playing around", almost any ban mask is fine, unless you share a channel with a few dozen New Yorkers with the same ISP. You can use the same concept that I used, but with the "ban me". If you noticed, I put /!ban instead of /ban . Using ! before a command means taking the original one (very useful when dealing with common mIRC default aliases such as /kick and /ban). This means it won't take any modified aliases that a person who might use this script has; it's safer this way, and can prevent errors.
  25. This is one of the scripts I found that I made a few months ago on my cute bot. I originally took the idea from FunBots on Quakenet and decided to script one of their games just for kicks. It's just a small, but fun, bomb game where you can leash a bomb on yourself or another person, and that person has only 30 seconds to defuse the bomb by choosing one of the following: RED YELLOW GREEN FEARTo start the game, type .bomb . The bot also counts how many times someone has defused or exploded the bomb, which you can check through .stats. Don't choose wire FEAR though! 🙂 🙂 🙂 15 seconds until next game Put this into your bot's remotes, not yours! Updates: Mon Mar 2, 9:10 PM - Made the script multi-channel + bomb stats. Here's a picture: alias -l bomb { set %bombs $reptok(%bombs,$gettok(%bombs,2,58),$calc($gettok(%bombs,2,58) + 1),1,58) | .msg $1 *BOOM* Fear. You're dead $+(,$gettok(%b. [ $+ [ $1 ] $+ ] .info,3,32),,!) $chr(91) You have been bombed by $+(,$gettok(%b. [ $+ [ $1 ] $+ ] .info,2,32),) on $+(,$gettok(%b. [ $+ [ $1 ] $+ ] .info,1,32),) $chr(93) | .msg $1 (10 seconds till next bomb) | set -u15 %bomb. [ $+ [ $1 ] ] disabled | unset %b. [ $+ [ $1 ] $+ ] .* } on *:text:.bomb*:#: { if (!%bombs) { set %bombs 0:0 } if (!%bomb. [ $+ [ $chan ] ]) { if (!$2) { .notice $nick You must select a nick. | halt } if ($2 ison $chan) && ($2 != $me) { set %b. [ $+ [ $chan ] $+ ] .wires RED YELLOW GREEN FEAR | set %b. [ $+ [ $chan ] $+ ] .nick $2 | set %bomb. [ $+ [ $chan ] ] on | set %b. [ $+ [ $chan ] $+ ] .info $chan $nick $2 | var %x RED|YELLOW|GREEN | set %b. [ $+ [ $chan ] $+ ] .wire $gettok(%x,$r(1,3),124) | .timer 1 1 .msg $chan INCOMING!: Bomb has been planted!!! You have 30sec to defuse the Bomb! Engi: $2 $+ . | .timer 1 2 .msg $chan Wires Are: 4RED - 8YELLOW - 9GREEN - 1FEAR | .timer 1 3 .msg $chan Use: ".wire <color here>" | .timer 1 4 .notice $2 YOU have been bombed by $+(,$nick,) on $+(,$chan,,!!!) | .timerbwarn. [ $+ [ $chan ] ] 1 20 .msg $chan 10 Seconds Remaining... Come on $+(,$2,,!) It's gonna BLOW!!! | .timerbomb. [ $+ [ $chan ] ] 1 30 bomb $chan } elseif ($2 == $me) { .notice $nick You can NOT bomb me! } else { .notice $nick $2 is NOT on $+(,$chan,,.) } } } on *:text:.wire*:#: { if (%bomb. [ $+ [ $chan ] ]) && ($nick == %b. [ $+ [ $chan ] $+ ] .nick) { if (!$2) { .notice $nick You must select a wire. } elseif (!$istok(%b. [ $+ [ $chan ] $+ ] .wires,$2,32)) { .notice $nick Wires Are: 4RED - 8YELLOW - 9GREEN - 1FEAR } else { if ($2 == fear) { set %bombs $reptok(%bombs,$gettok(%bombs,2,58),$calc($gettok(%bombs,2,58) + 1),1,58) | .msg $chan $nick *BOOM* Don't be afraid... It's only a virtual bomb $+(,$chr(91),$gettok(%bombs,2,58),$chr(93)) - (15 seconds till next bomb) | set -u15 %bomb. [ $+ [ $chan ] ] disabled | unset %b. [ $+ [ $chan ] $+ ] .* | .timerbwarn. [ $+ [ $chan ] ] off | .timerbomb. [ $+ [ $chan ] ] off } elseif ($istok(%b. [ $+ [ $chan ] $+ ] .wires,$2,32)) { if ($2 == %b. [ $+ [ $chan ] $+ ] .wire) { set %bombs $reptok(%bombs,$gettok(%bombs,1,58),$calc($gettok(%bombs,1,58) + 1),1,58) | .msg $chan WP $+(,$nick,) you got it right! \o/ $+(,$chr(91),$chan,$chr(93),) $+($chr(91),$gettok(%bombs,1,58),$chr(93)) - (15 seconds till next bomb) | set -u15 %bomb. [ $+ [ $chan ] ] disabled | unset %b. [ $+ [ $chan ] $+ ] .* | .timerbwarn. [ $+ [ $chan ] ] off | .timerbomb. [ $+ [ $chan ] ] off } else { set %bombs $reptok(%bombs,$gettok(%bombs,2,58),$calc($gettok(%bombs,2,58) + 1),1,58) | .msg $chan *BOOM* You chose the false wire $+($nick,...) The correct wire was: $+(,%b. [ $+ [ $chan ] $+ ] .wire,) $+($chr(91),$gettok(%bombs,2,58),$chr(93)) - (15 seconds till next bomb) | set -u15 %bomb. [ $+ [ $chan ] ] disabled | unset %b. [ $+ [ $chan ] $+ ] .* | .timerbwarn. [ $+ [ $chan ] ] off | .timerbomb. [ $+ [ $chan ] ] off } } } } } on *:text:.stats:#: { var %x $gettok(%bombs,1,58), %y $gettok(%bombs,2,58), %z $calc($gettok(%bombs,1,58) + $gettok(%bombs,2,58)) | .msg $chan Total number of defusions: $+(,%x,) rounds.. $+($chr(40),$round($calc(%x / %z),2),$chr(37),$chr(41)) $chr(124) Total number of explosions: $+(,%y,) rounds.. $+($chr(40),$round($calc(%y / %z),2),$chr(37),$chr(41)) }
×
×
  • Create New...