Programming IRC Easy Smogon Look-Up

Updated with BW stuff.

So if you know me, you probably know I love programming. I'm pretty good at scripting in MSL, but I have no idea how to use sockets, so I tried to make a Smogon script that could pull info from the site via sockets. Unfortunately, I suck at it so I did this my way and it actually turned out perfectly.

The point of this script is to easily look up virtually anything that is part of the Smogon site using IRC. Here are the features it includes:

  • Info for every generation. You can look up anything from RBY to DPPt (but not BW since Smogon doesn't have that yet).
  • Easy access to every Pokemon's Dex page. For example, I can easily look up Budew's strategy Pokedex with this script.
  • An extended ability to look up a Pokemon's Moves tab. If I want to know all of Budew's moves, I can look that up.
  • A feature allowing you to look up any move. For example, if I wanted to go to Thunder Wave's DPPt page, I can. Also, I've added a special feature that will translate moves with a space, such as Thunder Wave, into their correct look-up names (thunder_wave) so it can be searched properly!
  • You can look up any item, and spaces will be triggered and changed to underscores, just like in moves.
  • Look up any ability with a space trigger!
  • Go to the disambiguation page of any tier to find all Pokemon in that tier!
  • Lastly, the ability to visit any type's page.
Other cool features:

  • Find any thread via Google Custom Search!
  • Type in Ubers and you will still go to the Uber page (Uber is the tier name)
Finally, here is the script. It is in MSL, so other scripting languages, such as Pearl, will not be able to use it correctly. To use it, open up your Scripting Editor and paste it under "Remote" (You can also open Remote with alt+r)
How to use: Right click on the main window of a channel, query, etc. where the text is. A highlight menu saying "Smogon" should be there. Follow the arrows to whatever you want to look up and you're set!
Code:
menu * {
  -
  Smogon
  .Navigate
  ..Thread : run http://www.google.com/cse?cx=014605736416305442304%3Ae5byd3ca664&q= $+ $replace($$?="What is the name of the thread you are looking for?",$chr(32),$chr(45))
  .Lookup
  ..BW
  ...Pokemon : run http://www.smogon.com/bw/pokemon/ $+ $$?="What Pokemon would you like to look up?"
  ...Pokemon's Moves : run http://www.smogon.com/bw/pokemon/ $+ $$?="What Pokemon's moveset would you like to look up?" $+ /moves
  ...Move : run http://www.smogon.com/bw/moves/ $+ $replace($$?="What move would you like to look up?",$chr(32),_)
  ...Item : run http://www.smogon.com/bw/items/ $+ $replace($$?="What item would you like to look up?",$chr(32),_)
  ...Ability : run http://www.smogon.com/bw/abilities/ $+ $replace($$?="What item would you like to look up?",$chr(32),_)
  ...Tier : run http://www.smogon.com/bw/tiers/ $+ $replace($$?="What Tier would you like to look up?",ubers,uber)
  ...Type : run http://www.smogon.com/bw/types/ $+ $$?="What type would you like to look up?"
  ..DPPt
  ...Pokemon : run http://www.smogon.com/dp/pokemon/ $+ $$?="What Pokemon would you like to look up?"
  ...Pokemon's Moves : run http://www.smogon.com/dp/pokemon/ $+ $$?="What Pokemon's moveset would you like to look up?" $+ /moves
  ...Move : run http://www.smogon.com/dp/moves/ $+ $replace($$?="What move would you like to look up?",$chr(32),_)
  ...Item : run http://www.smogon.com/dp/items/ $+ $replace($$?="What item would you like to look up?",$chr(32),_)
  ...Ability : run http://www.smogon.com/dp/abilities/ $+ $replace($$?="What item would you like to look up?",$chr(32),_)
  ...Tier : run http://www.smogon.com/dp/tiers/ $+ $replace($$?="What Tier would you like to look up?",ubers,uber)
  ...Type : run http://www.smogon.com/dp/types/ $+ $$?="What type would you like to look up?"
  ..RSE
  ...Pokemon : run http://www.smogon.com/rs/pokemon/ $+ $$?="What Pokemon would you like to look up?"
  ...Pokemon's Moves : run http://www.smogon.com/rs/pokemon/ $+ $$?="What Pokemon's moveset would you like to look up?" $+ /moves
  ...Move : run http://www.smogon.com/rs/moves/ $+ $replace($$?="What move would you like to look up?",$chr(32),_)
  ...Item : run http://www.smogon.com/rs/items/ $+ $replace($$?="What item would you like to look up?",$chr(32),_)
  ...Ability : run http://www.smogon.com/rs/abilities/ $+ $replace($$?="What item would you like to look up?",$chr(32),_)
  ...Tier : run http://www.smogon.com/rs/tiers/ $+ $replace($$?="What Tier would you like to look up?",ubers,uber)
  ...Type : run http://www.smogon.com/rs/types/ $+ $$?="What type would you like to look up?"
  ..GSC
  ...Pokemon : run http://www.smogon.com/gs/pokemon/ $+ $$?="What Pokemon would you like to look up?"
  ...Pokemon's Moves : run http://www.smogon.com/gs/pokemon/ $+ $$?="What Pokemon's moveset would you like to look up?" $+ /moves
  ...Move : run http://www.smogon.com/gs/moves/ $+ $replace($$?="What move would you like to look up?",$chr(32),_)
  ...Item : run http://www.smogon.com/gs/items/ $+ $replace($$?="What item would you like to look up?",$chr(32),_)
  ...Tier : run http://www.smogon.com/gs/tiers/ $+ $replace($$?="What Tier would you like to look up?",ubers,uber)
  ...Type : run http://www.smogon.com/gs/types/ $+ $$?="What type would you like to look up?"
  ..RBY
  ...Pokemon : run http://www.smogon.com/rb/pokemon/ $+ $$?="What Pokemon would you like to look up?"
  ...Pokemon's Moves : run http://www.smogon.com/rb/pokemon/ $+ $$?="What Pokemon's moveset would you like to look up?" $+ /moves
  ...Move : run http://www.smogon.com/rb/moves/ $+ $replace($$?="What move would you like to look up?",$chr(32),_)
  ...Item : run http://www.smogon.com/rb/items/ $+ $replace($$?="What item would you like to look up?",$chr(32),_)
  ...Tier : run http://www.smogon.com/rb/tiers/ $+ $replace($$?="What Tier would you like to look up?",ubers,uber)
  ...Type : run http://www.smogon.com/rb/types/ $+ $$?="What type would you like to look up?"
}
Thanks!
 
Thanks! Yeah, I don't really visit PurpleSurge anymore. I'm always on Smogon IRC though. Nice to see you after a while and thanks for the complement!
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top