Advertisement
IHATEMICROWAVEOVEN

movedex better

Apr 15th, 2023 (edited)
762
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.44 KB | None | 0 0
  1. local x = "Hyper Beam   150 100 Superpower  140 100 Close Combat    120 100 Judgement   120 100 Rock Bottom 120 100 Shadow Force    120 100 Sky Attack  120 100 Solar Beam  120 100 Volt Tackle 120 100 Psystrike   110 100 Aeroblast   100 100 Dark Void   100 100 Draco Meteor    100 100 Sacred Fire 100 100 Foul Play   95  100 Dragon Pulse    90  100 Earthquake  90  100 Flamethrower    90  100 Moonblast   90  100 Psychic 90  100 Sludge Bomb 90  100 Surf    90  100 Thunderbolt 90  100 Aura Sphere 80  100 Dark Pulse  80  100 Drill Peck  80  100 Flash Cannon    80  100 Hyper Fang  80  100 Shadow Ball 80  100 Air Slash   75  100 Aurora Beam 75  100 Bubblebeam  75  100 Magic Leaf  75  100 Psybeam 75  100 Rock Blast  75  100 Signal Beam 75  100 Thunderpunch    75  100 Body Slam   70  100 Dazzling Gleam  70  100 Draining KIss   70  100 Extreme Speed   70  100 Night Slash 70  100 Shadow Claw 70  100 Slash   70  100 X-Scissor   70  100 Ancient Power   65  100 Feigned Slash   65  100 Double Kick     60  100 Acid    60  100 Bite    60  100 Bullet Punch    60  100 Dragonbreath    60  100 Fury Cutter 60  100 Horn Attack 60  100 Icy Wind    60  100 Mega Drain  60  100 Metal Claw  60  100 Rock Throw  60  100 Gust    55  100 Razor Leaf  55  100 Spatial Rend    55  100 Confusion   50  100 Ember   50  100 Karate Chop 50  100 Quick Attack    50  100 Bubble  40  100 Fairy Wind  40  100 Pound   40  100 Scratch 40  100 Tackle  40  100 Thundershock    40  100 Water Gun   40  100 Poison Sting    35  100 Absorb  30  100 Leech Life  30  100 Lick    30  100 Blast Burn  140 95 Frenzy Plant 140 95 Hydro Cannon 140 95 Roar Of Time     140 95 Rock Wrecker 140 95 Psycho Boost 130 95 Play Rough   70  95 Leaf Storm   130 90 Overheat 130 90 High Jump Kick   100 90 Meteor Mash  85  90 Seed Flare   120 85 Blizzard 120 80 Fire Blast   120 80 Hydro Pump   110 80 Thunder  110 80 Dragon Rush  100 80 Iron Tail    100 80 Focus Blast  120 70 Zap Cannon   140 60"
  2.  
  3. print("local movedex = {")
  4. --for i = 1, 3 do
  5. while string.len(x)>1 do
  6.     io.write("\t")
  7.     local i = 1
  8.     while string.sub(x, i+1, i+1)~="\t" do i=i+1 end
  9.     local myMove = string.sub(x, 1, i)
  10.     for n = string.len(myMove), 1, -1 do
  11.         if string.sub(myMove, n, n) == " " then myMove = string.sub(myMove, 1, n-1)..string.sub(myMove, n+1) end
  12.     end
  13.     io.write("{\""..myMove.."\", ")
  14.    
  15.     x = string.sub(x, i+2)
  16.     i = 1
  17.     while string.sub(x, i+1, i+1)~="\t" do i=i+1 end
  18.     io.write(string.sub(x, 1, i)..", ")
  19.     x = string.sub(x, i+2)
  20.     i = 1
  21.     while string.sub(x, i+1, i+1)~=" " and string.len(x)>=i+1 do i=i+1 end
  22.     io.write(string.sub(x, 1, i)..", type},\n")
  23.     x = string.sub(x, i+2)
  24. end
  25. io.write("}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement