Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Pokémon Editor

By: a guest on Dec 3rd, 2010  |  syntax: mIRC  |  size: 12.17 KB  |  views: 240  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. alias Pokemon {
  2.   if ( $dialog(TeamEditor) ) dialog -x TeamEditor TeamEditor
  3.   dialog -md TeamEditor TeamEditor
  4. }
  5. dialog -l TeamEditor {
  6.   title "Pokémon Editor"
  7.   size -1 -1 600 300
  8.   button "Send", 100, 520 265 70 25, ok
  9.   text "Team", 500, 10 270 30 20
  10.   edit "", 501, 40 267 230 20
  11.   text "Slot", 502, 320 270 30 20
  12.   combo 503, 345 267 30 20, drop
  13.   text "Species", 9, 10 10 280 20, center
  14.   edit "", 10, 10 30 280 20
  15.   text "Item", 11, 300 10 280 20, center
  16.   edit "Leftovers", 12, 300 30 280 20
  17.   text "IVs", 13, 10 50 280 20, center
  18.   text "HP", 49, 10 55 45 15, center
  19.   edit "31", 14, 10 70 45 20
  20.   text "Atk", 50, 57 55 45 15, center
  21.   edit "31", 15, 57 70 45 20
  22.   text "Def", 51, 109 55 30 15, left
  23.   edit "31", 16, 104 70 45 20
  24.   text "SpA", 52, 160 55 30 15, right
  25.   edit "31", 17, 151 70 45 20
  26.   text "SpD", 53, 198 55 45 15, center
  27.   edit "31", 18, 198 70 45 20
  28.   text "Spe", 54, 245 55 45 15, center
  29.   edit "31", 19, 245 70 45 20
  30.   text "EVs", 20, 300 50 280 20, center
  31.   text "HP", 55, 300 55 45 15, center
  32.   edit "0", 21, 300 70 45 20
  33.   text "Atk", 56, 347 55 45 15, center
  34.   edit "0", 22, 347 70 45 20
  35.   text "Def", 57, 399 55 30 15, left
  36.   edit "0", 23, 394 70 45 20
  37.   text "SpA", 58, 450 55 30 15, right
  38.   edit "0", 24, 441 70 45 20
  39.   text "SpD", 59, 488 55 45 15, center
  40.   edit "0", 25, 488 70 45 20
  41.   text "Spe", 60, 535 55 45 15, center
  42.   edit "0", 26, 535 70 45 20
  43.   button "All 31", 29, 10 100 139 20, center
  44.   combo 30, 151 100 139 20, drop
  45.   text "Nature", 27, 10 125 280 20, center
  46.   combo 28, 10 145 280 20, drop
  47.   text "Ability", 199, 10 170 280 20, center
  48.   edit "", 200, 10 190 280 20
  49.   button "0", 31, 300 90 22 20
  50.   button "4", 32, 323 90 22 20
  51.   button "252", 33, 300 110 45 20
  52.   button "0", 34, 347 90 22 20
  53.   button "4", 35, 370 90 22 20
  54.   button "252", 36, 347 110 45 20
  55.   button "0", 37, 394 90 22 20
  56.   button "4", 38, 417 90 22 20
  57.   button "252", 39, 394 110 45 20
  58.   button "0", 40, 441 90 22 20
  59.   button "4", 41, 464 90 22 20
  60.   button "252", 42, 441 110 45 20
  61.   button "0", 43, 488 90 22 20
  62.   button "4", 44, 511 90 22 20
  63.   button "252", 45, 488 110 45 20
  64.   button "0", 46, 535 90 22 20
  65.   button "4", 47, 558 90 22 20
  66.   button "252", 48, 535 110 45 20
  67.   text "Moves", 299, 300 135 280 20, center
  68.   edit "", 300, 300 155 240 20
  69.   button "Clear", 400, 545 155 40 20
  70.   edit "", 301, 300 175 240 20
  71.   button "Clear", 401, 545 175 40 20
  72.   edit "", 302, 300 195 240 20
  73.   button "Clear", 402, 545 195 40 20
  74.   edit "", 303, 300 215 240 20
  75.   button "Clear", 403, 545 215 40 20
  76.   button "Clear All", 404, 505 235 80 20
  77.   button "Load a Pokémon", 504, 70 223 160 30
  78.   radio "Hypno", 101, 430 258 85 20, group
  79.   radio "DragonKnight", 102, 430 275 85 20,
  80. }
  81. dialog -l LoadPoke {
  82.   title "Load a Pokémon"
  83.   size -1 -1 300 150
  84.   text "Team", 1, 10 10 280 20, center
  85.   edit "", 2, 10 30 280 20
  86.   text "Slot", 3, 10 60 280 20, center
  87.   edit "", 4, 10 80 280 20
  88.   button "Load", 5, 30 115 240 30, ok
  89. }
  90. on *:DIALOG:TeamEditor:init:0:{
  91.   did -a TeamEditor 28 Adamant
  92.   did -a TeamEditor 28 Bashful
  93.   did -a TeamEditor 28 Bold
  94.   did -a TeamEditor 28 Brave
  95.   did -a TeamEditor 28 Calm
  96.   did -a TeamEditor 28 Careful
  97.   did -a TeamEditor 28 Docile
  98.   did -a TeamEditor 28 Gentle
  99.   did -a TeamEditor 28 Hardy
  100.   did -a TeamEditor 28 Hasty
  101.   did -a TeamEditor 28 Impish
  102.   did -a TeamEditor 28 Jolly
  103.   did -a TeamEditor 28 Lax
  104.   did -a TeamEditor 28 Lonely
  105.   did -a TeamEditor 28 Mild
  106.   did -a TeamEditor 28 Modest
  107.   did -a TeamEditor 28 Naive
  108.   did -a TeamEditor 28 Naughty
  109.   did -a TeamEditor 28 Quiet
  110.   did -a TeamEditor 28 Quirky
  111.   did -a TeamEditor 28 Rash
  112.   did -a TeamEditor 28 Relaxed
  113.   did -a TeamEditor 28 Sassy
  114.   did -a TeamEditor 28 Serious
  115.   did -a TeamEditor 28 Timid
  116.  
  117.   did -a TeamEditor 30 Hidden Power Fighting
  118.   did -a TeamEditor 30 Hidden Power Flying
  119.   did -a TeamEditor 30 Hidden Power Poison
  120.   did -a TeamEditor 30 Hidden Power Ground
  121.   did -a TeamEditor 30 Hidden Power Rock
  122.   did -a TeamEditor 30 Hidden Power Bug
  123.   did -a TeamEditor 30 Hidden Power Ghost
  124.   did -a TeamEditor 30 Hidden Power Steel
  125.   did -a TeamEditor 30 Hidden Power Fire
  126.   did -a TeamEditor 30 Hidden Power Water
  127.   did -a TeamEditor 30 Hidden Power Grass
  128.   did -a TeamEditor 30 Hidden Power Electric
  129.   did -a TeamEditor 30 Hidden Power Psychic
  130.   did -a TeamEditor 30 Hidden Power Ice
  131.   did -a TeamEditor 30 Hidden Power Dragon
  132.   did -a TeamEditor 30 Hidden Power Dark
  133.  
  134.   did -a TeamEditor 503 1
  135.   did -a TeamEditor 503 2
  136.   did -a TeamEditor 503 3
  137.   did -a TeamEditor 503 4
  138.   did -a TeamEditor 503 5
  139.   did -a TeamEditor 503 6
  140.  
  141.   did -c TeamEditor 28 1
  142.  
  143.   did -c TeamEditor 30 16
  144.  
  145.   did -c TeamEditor 503 1
  146.  
  147.   did -c TeamEditor 101
  148.  
  149.   did -f TeamEditor 10
  150. }
  151. on *:DIALOG:TeamEditor:SCLICK:29:{
  152.   did -o TeamEditor 14 1 31
  153.   did -o TeamEditor 15 1 31
  154.   did -o TeamEditor 16 1 31
  155.   did -o TeamEditor 17 1 31
  156.   did -o TeamEditor 18 1 31
  157.   did -o TeamEditor 19 1 31
  158.   did -c TeamEditor 30 16
  159. }
  160. on *:DIALOG:TeamEditor:EDIT:14,15,16,17,18,19:{
  161.   if ( $did(14) == $null ) did -o TeamEditor 14 1 0
  162.   if ( $did(15) == $null ) did -o TeamEditor 15 1 0
  163.   if ( $did(16) == $null ) did -o TeamEditor 16 1 0
  164.   if ( $did(17) == $null ) did -o TeamEditor 17 1 0
  165.   if ( $did(18) == $null ) did -o TeamEditor 18 1 0
  166.   if ( $did(19) == $null ) did -o TeamEditor 19 1 0
  167.   did -c TeamEditor 30 $int($calc( ( ( ( $iif($calc( $did(14) % 2 ) == 1,1,0) + ( 2 * $iif($calc( $did(15) % 2 ) == 1,1,0) ) + $&
  168.     ( 4 * $iif($calc( $did(16) % 2 ) == 1,1,0) ) + ( 8 * $iif($calc( $did(19) % 2 ) == 1,1,0) ) + $&
  169.     ( 16 * $iif($calc( $did(17) % 2 ) == 1,1,0) ) + ( 32 * $iif($calc( $did(18) % 2 ) == 1,1,0) ) ) * 15 ) / 63 ) + 1 ))
  170. }
  171. on *:DIALOG:TeamEditor:SCLICK:31:did -o TeamEditor 21 1 0
  172. on *:DIALOG:TeamEditor:SCLICK:32:did -o TeamEditor 21 1 4
  173. on *:DIALOG:TeamEditor:SCLICK:33:did -o TeamEditor 21 1 252
  174. on *:DIALOG:TeamEditor:SCLICK:34:did -o TeamEditor 22 1 0
  175. on *:DIALOG:TeamEditor:SCLICK:35:did -o TeamEditor 22 1 4
  176. on *:DIALOG:TeamEditor:SCLICK:36:did -o TeamEditor 22 1 252
  177. on *:DIALOG:TeamEditor:SCLICK:37:did -o TeamEditor 23 1 0
  178. on *:DIALOG:TeamEditor:SCLICK:38:did -o TeamEditor 23 1 4
  179. on *:DIALOG:TeamEditor:SCLICK:39:did -o TeamEditor 23 1 252
  180. on *:DIALOG:TeamEditor:SCLICK:40:did -o TeamEditor 24 1 0
  181. on *:DIALOG:TeamEditor:SCLICK:41:did -o TeamEditor 24 1 4
  182. on *:DIALOG:TeamEditor:SCLICK:42:did -o TeamEditor 24 1 252
  183. on *:DIALOG:TeamEditor:SCLICK:43:did -o TeamEditor 25 1 0
  184. on *:DIALOG:TeamEditor:SCLICK:44:did -o TeamEditor 25 1 4
  185. on *:DIALOG:TeamEditor:SCLICK:45:did -o TeamEditor 25 1 252
  186. on *:DIALOG:TeamEditor:SCLICK:46:did -o TeamEditor 26 1 0
  187. on *:DIALOG:TeamEditor:SCLICK:47:did -o TeamEditor 26 1 4
  188. on *:DIALOG:TeamEditor:SCLICK:48:did -o TeamEditor 26 1 252
  189. on *:DIALOG:TeamEditor:SCLICK:400:{
  190.   did -r TeamEditor 300
  191.   did -f TeamEditor 300
  192. }
  193. on *:DIALOG:TeamEditor:SCLICK:401:{
  194.   did -r TeamEditor 301
  195.   did -f TeamEditor 301
  196. }
  197. on *:DIALOG:TeamEditor:SCLICK:402:{
  198.   did -r TeamEditor 302
  199.   did -f TeamEditor 302
  200. }
  201. on *:DIALOG:TeamEditor:SCLICK:403:{
  202.   did -r TeamEditor 303
  203.   did -f TeamEditor 303
  204. }
  205. on *:DIALOG:TeamEditor:SCLICK:404:{
  206.   did -r TeamEditor 300
  207.   did -r TeamEditor 301
  208.   did -r TeamEditor 302
  209.   did -r TeamEditor 303
  210.   did -f TeamEditor 300
  211. }
  212. on *:DIALOG:TeamEditor:SCLICK:30:{
  213.   did -o TeamEditor 14 1 $gettok($getIVs($gettok($did(30),3,32)),1,32)
  214.   did -o TeamEditor 15 1 $gettok($getIVs($gettok($did(30),3,32)),2,32)
  215.   did -o TeamEditor 16 1 $gettok($getIVs($gettok($did(30),3,32)),3,32)
  216.   did -o TeamEditor 17 1 $gettok($getIVs($gettok($did(30),3,32)),4,32)
  217.   did -o TeamEditor 18 1 $gettok($getIVs($gettok($did(30),3,32)),5,32)
  218.   did -o TeamEditor 19 1 $gettok($getIVs($gettok($did(30),3,32)),6,32)
  219. }
  220. alias -l getIVs {
  221.   if ( $1 == Fighting ) return 31 31 30 30 30 30
  222.   if ( $1 == Flying ) return 31 31 31 30 30 30
  223.   if ( $1 == Poison ) return 31 31 30 30 30 31
  224.   if ( $1 == Ground ) return 31 31 31 30 30 31
  225.   if ( $1 == Rock ) return 31 31 30 31 30 30
  226.   if ( $1 == Bug ) return 31 30 30 31 30 31
  227.   if ( $1 == Ghost ) return 31 30 31 31 30 31
  228.   if ( $1 == Steel ) return 31 31 31 31 30 31
  229.   if ( $1 == Fire ) return 31 30 31 30 31 30
  230.   if ( $1 == Water ) return 31 30 30 30 31 31
  231.   if ( $1 == Grass ) return 31 30 31 30 31 31
  232.   if ( $1 == Electric ) return 31 31 31 30 31 31
  233.   if ( $1 == Psychic ) return 31 30 31 31 31 30
  234.   if ( $1 == Ice ) return 31 30 30 31 31 31
  235.   if ( $1 == Dragon ) return 31 30 31 31 31 31
  236.   if ( $1 == Dark ) return 31 31 31 31 31 31
  237. }
  238. alias -l getNature {
  239.   if ( $1 == Adamant ) return 1
  240.   if ( $1 == Bashful ) return 2
  241.   if ( $1 == Bold ) return 3
  242.   if ( $1 == Brave ) return 4
  243.   if ( $1 == Calm ) return 5
  244.   if ( $1 == Careful ) return 6
  245.   if ( $1 == Docile ) return 7
  246.   if ( $1 == Gentle ) return 8
  247.   if ( $1 == Hardy ) return 9
  248.   if ( $1 == Hasty ) return 10
  249.   if ( $1 == Impish ) return 11
  250.   if ( $1 == Jolly ) return 12
  251.   if ( $1 == Lax ) return 13
  252.   if ( $1 == Lonely ) return 14
  253.   if ( $1 == Mild ) return 15
  254.   if ( $1 == Modest ) return 16
  255.   if ( $1 == Naive ) return 17
  256.   if ( $1 == Naughty ) return 18
  257.   if ( $1 == Quiet ) return 19
  258.   if ( $1 == Quirky ) return 20
  259.   if ( $1 == Rash ) return 21
  260.   if ( $1 == Relaxed ) return 22
  261.   if ( $1 == Sassy ) return 23
  262.   if ( $1 == Serious ) return 24
  263.   if ( $1 == Timid ) return 25
  264. }
  265. alias -l getMoveSlot {
  266.   if ( $1 == 1 ) return 300
  267.   if ( $1 == 2 ) return 301
  268.   if ( $1 == 3 ) return 302
  269.   if ( $1 == 4 ) return 303
  270. }
  271. on *:DIALOG:TeamEditor:SCLICK:504:{
  272.   if ( $dialog(LoadPoke) ) dialog -x LoadPoke LoadPoke
  273.   dialog -md LoadPoke LoadPoke
  274. }
  275. on *:DIALOG:TeamEditor:SCLICK:100:{
  276.   var %host = $iif($did(101).state,$did(101),$did(102))
  277.   var %team = $did(501)
  278.   var %slot = $did(503)
  279.   mesg %host MyTeam %team Pokémon %slot $did(10)
  280.   mesg %host MyTeam %team Item %slot $did(12)
  281.   mesg %host MyTeam %team Nature %slot $did(28)
  282.   mesg %host MyTeam %team Ability %slot $did(200)
  283.   mesg %host MyTeam %team IVs %slot $did(14) $did(15) $did(16) $did(17) $did(18) $did(19)
  284.   mesg %host MyTeam %team EVs %slot $did(21) $did(22) $did(23) $did(24) $did(25) $did(26)
  285.   mesg %host MyTeam %team Moves %slot $+($did(300),$chr(44),$chr(32),$did(301),$chr(44),$chr(32),$did(302),$chr(44),$chr(32),$did(303))
  286.   echo -ac info * Pokémon data sent to %host $+ .
  287. }
  288. on *:DIALOG:LoadPoke:SCLICK:5:{
  289.   did -o TeamEditor 501 1 $did(LoadPoke,2)
  290.   did -c TeamEditor 503 $did(LoadPoke,4)
  291.   set %host $iif($did(TeamEditor,101).state,$did(TeamEditor,101),$did(TeamEditor,102))
  292.   set %loadpokemon 1
  293.   .msg %host MyTeam $did(LoadPoke,2) View $did(LoadPoke,4)
  294. }
  295. on $*:NOTICE:*:?:{
  296.   if ( ( %loadpokemon ) && ( $nick == %host ) ) {
  297.     if ( $chr(64) isin $1- ) {
  298.       did -o TeamEditor 10 1 $3
  299.       did -o TeamEditor 12 1 $5-
  300.     }
  301.     if ( $chr(44) isin $1- ) {
  302.       did -o TeamEditor 200 1 $gettok($1-,1,44)
  303.       did -c TeamEditor 28 $getNature($right($gettok($1-,2,44),-1))
  304.     }
  305.     if ( $chr(47) isin $1- ) {
  306.       did -o TeamEditor 14 1 $1
  307.       did -o TeamEditor 15 1 $2
  308.       did -o TeamEditor 16 1 $3
  309.       did -o TeamEditor 17 1 $4
  310.       did -o TeamEditor 18 1 $5
  311.       did -o TeamEditor 19 1 $6
  312.       did -c TeamEditor 30 $int($calc( ( ( ( $iif($calc( $did(TeamEditor,14) % 2 ) == 1,1,0) + ( 2 * $iif($calc( $did(TeamEditor,15) % 2 ) == 1,1,0) ) + $&
  313.         ( 4 * $iif($calc( $did(TeamEditor,16) % 2 ) == 1,1,0) ) + ( 8 * $iif($calc( $did(TeamEditor,19) % 2 ) == 1,1,0) ) + $&
  314.         ( 16 * $iif($calc( $did(TeamEditor,17) % 2 ) == 1,1,0) ) + ( 32 * $iif($calc( $did(TeamEditor,18) % 2 ) == 1,1,0) ) ) * 15 ) / 63 ) + 1 ))
  315.       did -o TeamEditor 21 1 $8
  316.       did -o TeamEditor 22 1 $9
  317.       did -o TeamEditor 23 1 $10
  318.       did -o TeamEditor 24 1 $11
  319.       did -o TeamEditor 25 1 $12
  320.       did -o TeamEditor 26 1 $13
  321.     }
  322.     if ( $chr(126) isin $1- ) {
  323.       if ( %movenum == $null ) set %movenum 0
  324.       inc %movenum 1
  325.       did -o TeamEditor $getMoveSlot(%movenum) 1 $2-
  326.       if ( %movenum == 4 ) {
  327.         unset %host
  328.         unset %movenum
  329.         unset %loadpokemon
  330.       }
  331.     }
  332.   }
  333. }
  334. alias -l mesg {
  335.   if ( %timeramount == $null ) set %timeramount 0
  336.   .timerkilltimer off
  337.   .timerkilltimer 1 $calc( ( 5 * %timeramount ) + 1 ) unset %timeramount
  338.   .timer 1 $calc( 5 * %timeramount ) .msg $1 $$2-
  339.   inc %timeramount 1
  340. }