diff --git a/Form1.vb b/Form1.vb index a32bbd9..1705b99 100644 --- a/Form1.vb +++ b/Form1.vb @@ -1,5 +1,4 @@ Option Explicit On -Imports System.Data.OleDb Imports Microsoft.Win32.SafeHandles Imports SkylanderEditor.DeviceManagement @@ -7,6 +6,7 @@ Public Class Form1 Dim skylanderBytes(1023) As Byte Dim outRepoBytes(32) As Byte Dim inRepoBytes(32) As Byte + Dim skyInfo(2) As String Dim skylanderID As Integer Dim skylanderGold As Long Dim skylanderEXP As Long @@ -23,24 +23,15 @@ Public Class Form1 Dim portalHandle As SafeFileHandle - Dim SQLcnt As OleDbConnection - Dim SQLrst As OleDbDataReader - Dim SQLcmd As OleDbCommand - - Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'initialize file dialogs, database connection, hat combobox and CRC calculator table OpenFileDialog1.FileName = "" SaveFileDialog1.FileName = "" - SQLcnt = New OleDbConnection exepath = Application.StartupPath & "\" - SQLcnt.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & exepath & "SkylanderDB.accdb;Persist Security Info=False" - SQLcnt.Open() - - hatsimulator(SQLrst, SQLcnt, SQLcmd) + hatsimulator(exepath) ComboBox1.SelectedIndex = 0 CRCcalculator.inittable() lockControls() @@ -85,7 +76,7 @@ Public Class Form1 skylanderBytes = decryptSkylander(skylanderBytes) readskylandData(skylanderBytes, False) End If - + End Sub Private Sub SaveAsDecryptedSkylanderToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveAsDecryptedSkylanderToolStripMenuItem.Click @@ -518,10 +509,9 @@ Public Class Form1 'get skylander ID skylanderID = SwapEndianness(skylanderData(16), skylanderData(17)) - SQLcmd = New OleDbCommand("SELECT * FROM Skylanders WHERE ID = " & skylanderID, SQLcnt) - SQLrst = SQLcmd.ExecuteReader + skyInfo = Split(ReadIni(exepath & "SkylanderDB.ini", "Skylanders", skylanderID, ""), "_") - If Not SQLrst.HasRows Then + If skyInfo(0) = "" Then 'if figure ID is not in database Label7.Text = "Unknown ID: " & skylanderID Label8.Text = "- -" @@ -531,10 +521,9 @@ Public Class Form1 Exit Sub Else - SQLrst.Read() 'get figure name and element - Label7.Text = SQLrst("skyname") - Label8.Text = SQLrst("element") + Label7.Text = skyInfo(0) + Label8.Text = skyInfo(1) 'load skylander picture if available PictureBox1.ImageLocation = exepath & "images\" & Trim(Str(skylanderID)) & ".jpg" 'lock controls if a swapper bottom half, item or stage is opened @@ -575,9 +564,8 @@ Public Class Form1 indexValB = 2 End If - If SQLrst("special").ToString = "Vehicle" Then + If InStr(skyInfo(1), "Vehicle") Then skylanderGold = SwapEndianness(skylanderData(expC), skylanderData(expC + 1)) - Label8.Text = Label8.Text & " Vehicle" TextBox2.Text = skylanderGold TextBox1.Text = 0 ComboBox1.SelectedIndex = 0 @@ -610,7 +598,6 @@ Public Class Form1 End If autom = False unlockControls() - SQLrst.Close() ToolStripStatusLabel1.Text = "Finished Reading" End Sub @@ -637,20 +624,17 @@ Public Class Form1 skylanderData(hatB) = 0 skylanderData(hatC) = 0 skylanderData(hatD) = 0 - End If - If skylanderHat >= 46 And skylanderHat < 97 Then + ElseIf skylanderHat >= 46 And skylanderHat < 97 Then skylanderData(hatB) = skylanderHat skylanderData(hatC) = 0 skylanderData(hatA) = 0 skylanderData(hatD) = 0 - End If - If skylanderHat >= 97 And skylanderHat < 256 Then + ElseIf skylanderHat >= 97 And skylanderHat < 256 Then skylanderData(hatC) = skylanderHat skylanderData(hatB) = 0 skylanderData(hatA) = 0 skylanderData(hatD) = 0 - End If - If skylanderHat >= 256 Then + ElseIf skylanderHat >= 256 Then skylanderData(hatD) = skylanderHat - 255 skylanderData(hatC) = 0 skylanderData(hatB) = 0 @@ -765,65 +749,45 @@ vehicleSkip: If TextBox1.Text <> "" Then If Int(TextBox1.Text) > 197500 Then TextBox1.Text = 197500 - End If - If Int(TextBox1.Text) = 197500 Then + ElseIf Int(TextBox1.Text) = 197500 Then Label9.Text = "Level: 20" - End If - If Int(TextBox1.Text) >= 174300 And Int(TextBox1.Text) < 197500 Then + ElseIf Int(TextBox1.Text) >= 174300 And Int(TextBox1.Text) < 197500 Then Label9.Text = "Level: 19" - End If - If Int(TextBox1.Text) >= 152600 And Int(TextBox1.Text) < 174300 Then + ElseIf Int(TextBox1.Text) >= 152600 And Int(TextBox1.Text) < 174300 Then Label9.Text = "Level: 18" - End If - If Int(TextBox1.Text) >= 132400 And Int(TextBox1.Text) < 152600 Then + ElseIf Int(TextBox1.Text) >= 132400 And Int(TextBox1.Text) < 152600 Then Label9.Text = "Level: 17" - End If - If Int(TextBox1.Text) >= 113700 And Int(TextBox1.Text) < 132400 Then + ElseIf Int(TextBox1.Text) >= 113700 And Int(TextBox1.Text) < 132400 Then Label9.Text = "Level: 16" - End If - If Int(TextBox1.Text) >= 96500 And Int(TextBox1.Text) < 113700 Then + ElseIf Int(TextBox1.Text) >= 96500 And Int(TextBox1.Text) < 113700 Then Label9.Text = "Level: 15" - End If - If Int(TextBox1.Text) >= 85800 And Int(TextBox1.Text) < 96500 Then + ElseIf Int(TextBox1.Text) >= 85800 And Int(TextBox1.Text) < 96500 Then Label9.Text = "Level: 14" - End If - If Int(TextBox1.Text) >= 69200 And Int(TextBox1.Text) < 85800 Then + ElseIf Int(TextBox1.Text) >= 69200 And Int(TextBox1.Text) < 85800 Then Label9.Text = "Level: 13" - End If - If Int(TextBox1.Text) >= 55000 And Int(TextBox1.Text) < 69200 Then + ElseIf Int(TextBox1.Text) >= 55000 And Int(TextBox1.Text) < 69200 Then Label9.Text = "Level: 12" - End If - If Int(TextBox1.Text) >= 43000 And Int(TextBox1.Text) < 55000 Then + ElseIf Int(TextBox1.Text) >= 43000 And Int(TextBox1.Text) < 55000 Then Label9.Text = "Level: 11" - End If - If Int(TextBox1.Text) >= 33000 And Int(TextBox1.Text) < 43000 Then + ElseIf Int(TextBox1.Text) >= 33000 And Int(TextBox1.Text) < 43000 Then Label9.Text = "Level: 10" - End If - If Int(TextBox1.Text) >= 24800 And Int(TextBox1.Text) < 33000 Then + ElseIf Int(TextBox1.Text) >= 24800 And Int(TextBox1.Text) < 33000 Then Label9.Text = "Level: 9" - End If - If Int(TextBox1.Text) >= 18200 And Int(TextBox1.Text) < 24800 Then + ElseIf Int(TextBox1.Text) >= 18200 And Int(TextBox1.Text) < 24800 Then Label9.Text = "Level: 8" - End If - If Int(TextBox1.Text) >= 13000 And Int(TextBox1.Text) < 18200 Then + ElseIf Int(TextBox1.Text) >= 13000 And Int(TextBox1.Text) < 18200 Then Label9.Text = "Level: 7" - End If - If Int(TextBox1.Text) >= 9000 And Int(TextBox1.Text) < 13000 Then + ElseIf Int(TextBox1.Text) >= 9000 And Int(TextBox1.Text) < 13000 Then Label9.Text = "Level: 6" - End If - If Int(TextBox1.Text) >= 6000 And Int(TextBox1.Text) < 9000 Then + ElseIf Int(TextBox1.Text) >= 6000 And Int(TextBox1.Text) < 9000 Then Label9.Text = "Level: 5" - End If - If Int(TextBox1.Text) >= 3800 And Int(TextBox1.Text) < 6000 Then + ElseIf Int(TextBox1.Text) >= 3800 And Int(TextBox1.Text) < 6000 Then Label9.Text = "Level: 4" - End If - If Int(TextBox1.Text) >= 2200 And Int(TextBox1.Text) < 3800 Then + ElseIf Int(TextBox1.Text) >= 2200 And Int(TextBox1.Text) < 3800 Then Label9.Text = "Level: 3" - End If - If Int(TextBox1.Text) >= 1000 And Int(TextBox1.Text) < 2200 Then + ElseIf Int(TextBox1.Text) >= 1000 And Int(TextBox1.Text) < 2200 Then Label9.Text = "Level: 2" - End If - If Int(TextBox1.Text) >= 0 And Int(TextBox1.Text) < 1000 Then + ElseIf Int(TextBox1.Text) >= 0 And Int(TextBox1.Text) < 1000 Then Label9.Text = "Level: 1" End If End If @@ -916,7 +880,6 @@ vehicleSkip: 'cleanup by closing the database and closing the hid handles to the portal Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing - SQLcnt.Close() CloseCommunications(portalHandle) End Sub @@ -925,6 +888,4 @@ vehicleSkip: portalHandle = FindThePortal() End Sub - - End Class diff --git a/HatControl.vb b/HatControl.vb index 9a2d077..f035585 100644 --- a/HatControl.vb +++ b/HatControl.vb @@ -2,33 +2,34 @@ Imports System.Data.OleDb Module HatControl 'we get the hat IDs and names from the database - Public Sub hatsimulator(ByVal SQLrst As OleDbDataReader, ByVal SQLcnt As OleDbConnection, ByVal SQLcmd As OleDbCommand) - SQLcmd = New OleDbCommand("SELECT * FROM skyhats", SQLcnt) - SQLrst = SQLcmd.ExecuteReader - While SQLrst.Read - Form1.ComboBox1.Items.Insert(SQLrst("ID"), SQLrst("hatname")) - End While - SQLrst.Close() + Public Sub hatsimulator(ByVal exepath As String) + Dim buffer As String + Dim count As Integer + count = 0 + Do + buffer = ReadIni(exepath & "SkylanderDB.ini", "skyhats", count, "") + If buffer <> "" Then + Form1.ComboBox1.Items.Insert(count, buffer) + Else + Exit Do + End If + count = count + 1 + Loop + End Sub 'we get which hat is written in the figure Public Function gethat(ByVal hatid1 As Byte, ByVal hatid2 As Byte, ByVal hatid3 As Byte, ByVal hatid4 As Byte) As Integer If hatid1 <> 0 Then gethat = Int(hatid1) - Exit Function - End If - If hatid2 <> 0 Then + ElseIf hatid2 <> 0 Then gethat = Int(hatid2) - Exit Function - End If - If hatid3 <> 0 Then + ElseIf hatid3 <> 0 Then gethat = Int(hatid3) - Exit Function - End If - If hatid4 <> 0 Then + ElseIf hatid4 <> 0 Then gethat = Int(hatid4) + 255 - Exit Function + Else + Return 0 End If - Return 0 End Function End Module diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 35ad64a..0e3ba1e 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - - + + diff --git a/README.md b/README.md index c91607f..1d57159 100644 --- a/README.md +++ b/README.md @@ -125,4 +125,10 @@ added functions to dump without mapping figures added support to recognize new/blank skylanders Swapper reading is more reliable + +1.0.1 - + +replaced the MSAccess DB for a simple INI file containing the same data + +several bugfixes diff --git a/SkylanderDB.accdb b/SkylanderDB.accdb deleted file mode 100644 index 63947f8..0000000 Binary files a/SkylanderDB.accdb and /dev/null differ diff --git a/SkylanderDB.ini b/SkylanderDB.ini new file mode 100644 index 0000000..b41e376 --- /dev/null +++ b/SkylanderDB.ini @@ -0,0 +1,532 @@ +[Skylanders] +0=Whirlwind_Air +1=Sonic Boom_Air +2=Warnado_Air +3=Lightning Rod_Air +4=Bash_Earth +5=Terrafin_Earth +6=Dino-Rang_Earth +7=Prism Break_Earth +8=Sunburn_Fire +9=Eruptor_Fire +10=Ignitor_Fire +11=Flameslinger_Fire +12=Zap_Water +13=Wham-Shell_Water +14=Gill Grunt_Water +15=Slam Bam_Water +16=Spyro_Magic +17=Voodood_Magic +18=Double Trouble_Magic +19=Trigger Happy_Tech +20=Drobot_Tech +21=Drill Sergeant_Tech +22=Boomer_Tech +23=Wrecking Ball_Magic +24=Camo_Life +25=Zook_Life +26=Stealth Elf_Life +27=Stump Smash_Life +28=Dark Spyro_Magic +29=Hex_Undead +30=Chop Chop_Undead +31=Ghost Roaster_Undead +32=Cynder_Undead +100=Jet Vac_Air +101=Swarm_Air +102=Crusher_Earth +103=Flashwing_Earth +104=Hot Head_Fire +105=Hot Dog_Fire +106=Chill_Water +107=Thumpback_Water +108=Pop Fizz_Magic +109=Ninjini_Magic +110=Bouncer_Tech +111=Sprocket_Tech +112=Tree Rex_Life +113=Shroomboom_Life +114=Eye-Brawl_Undead +115=Fright Rider_Undead +200=Anvil Rain_Item +201=Hidden Treasure_Item +202=Healing Elixir_Item +203=Ghost Swords_Item +204=Time Twister_Item +205=Sky-Iron Shield_Item +206=Winged Boots_Item +207=Sparx Dragonfly_Item +208=Dragonfire Cannon_Item +230=Hand Of Fate_Item +231=Piggy Bank_Item +232=Rocket Ram_Item +233=Tiki Speaky_Item +300=Dragons Peak_Item +301=Empire of Ice_Item +302=Pirate Seas_Item +303=Darklight Crypt_Item +305=Mirror of Mystery_Item +306=Nightmare Express_Item +307=Sunscraper Spire_Item +308=Midnight Museum_Item +404=Legendary Bash_Earth +416=Legendary Spyro_Magic +419=Legendary Trigger Happy_Tech +430=Legendary Chop Chop_Undead +450=Gusto_Air +451=Thunderbolt_Air +452=Fling Kong_Air +453=Blades_Air +454=Wallop_Earth +455=Head Rush_Earth +456=Fist Bump_Earth +457=Rocky Roll_Earth +458=Wildfire_Fire +459=Ka-Boom_Fire +460=Trail Blazer_Fire +461=Torch_Fire +462=Snap Shot_Water +463=Lob-Star_Water +464=Flip Wreck_Water +465=Echo_Water +466=Blastermind_Magic +467=Enigma_Magic +468=Deja Vu_Magic +469=Cobra Cadabra_Magic +470=Jawbreaker_Tech +471=Gearshift_Tech +472=Chopper_Tech +473=Tread Head_Tech +474=Bushwhack_Life +475=Tuff Luck_Life +476=Food Fight_Life +477=High Five_Life +478=Krypt King_Undead +479=Shortcut_Undead +480=Bat Spin_Undead +481=Funny Bone_Undead +482=Knight Light_Light +483=Spotlight_Light +484=Knight Mare_Dark +485=Blackout_Dark +502=Bop_Earth +503=Spry_Magic +504=Hijinx_Undead +505=Terrabite_Earth +506=Breeze_Air +507=Weeruptor_Fire +508=Pet-Vac_Air +509=Small Fry_Fire +510=Drobit_Tech +514=Gill Runt_Water +519=Trigger Snappy_Tech +526=Whisper Elf_Life +540=Barkley_Life +541=Thumpling_Water +542=Mini-Jini_Magic +543=Eye-Small_Undead +601=King Pen_Water +602=Tri-Tip_Earth +603=Chopscotch_Undead +604=Boom Bloom_Life +605=Pit Boss_Undead +606=Barbella_Earth +607=Air Strike_Air +608=Ember_Fire +609=Ambush_Life +610=Dr. Krankcase_Tech +611=Hood Sickle_Dark +612=Tae Kwon Crow_Fire +613=Golden Queen_Earth +614=Wolfgang_Undead +616=Mysticat_Magic +617=Starcast_Dark +618=Buckshot_Magic +619=Aurora_Light +620=Flare Wolf_Fire +621=Chompy Mage_Life +622=Bad Juju_Air +626=Chain Reaction_Tech +627=Kaos_Kaos +628=Wild Storm_Air +630=Crash Bandicoot_Life +631=Dr. Neo Cortex_Tech +1000=Boom Jet_Air (Bottom) +1001=Free Ranger_Air (Bottom) +1002=Rubble Rouser_Earth (Bottom) +1003=Doom Stone_Earth (Bottom) +1004=Blast Zone_Fire (Bottom) +1005=Fire Kraken_Fire (Bottom) +1006=Stink Bomb_Life (Bottom) +1007=Grilla Drilla_Life (Bottom) +1008=Hoot Loop_Magic (Bottom) +1009=Trap Shadow_Magic (Bottom) +1010=Magna Charge_Tech (Bottom) +1011=Spy Rise_Tech (Bottom) +1012=Night Shift_Undead (Bottom) +1013=Rattle Shake_Undead (Bottom) +1014=Freeze Blade_Water (Bottom) +1015=Wash Buckler_Water (Bottom) +2000=Boom Jet_Air +2001=Free Ranger_Air +2002=Rubble Rouser_Earth +2003=Doom Stone_Earth +2004=Blast Zone_Fire +2005=Fire Kraken_Fire +2006=Stink Bomb_Life +2007=Grilla Drilla_Life +2008=Hoot Loop_Magic +2009=Trap Shadow_Magic +2010=Magna Charge_Tech +2011=Spy Rise_Tech +2012=Night Shift_Undead +2013=Rattle Shake_Undead +2014=Freeze Blade_Water +2015=Wash Buckler_Water +3000=Scratch_Air +3001=Pop Thorn_Air +3002=Slobber Tooth_Earth +3003=Scorp_Earth +3004=Fryno_Fire +3005=Smolderdash_Fire +3006=Bumble Blast_Life +3007=Zoo Lou_Life +3008=Dune Bug_Magic +3009=Star Strike_Magic +3010=Countdown_Tech +3011=Wind-Up_Tech +3012=Roller Brawl_Undead +3013=Grim Creeper_Undead +3014=Rip Tide_Water +3015=Punk Shock_Water +3220=Jet Stream_Air Vehicle +3221=Tomb Buggy_Undead Vehicle +3222=Reef Ripper_Water Vehicle +3223=Burn Cycle_Fire Vehicle +3224=Hot Streak_Fire Vehicle +3225=Shark Tank_Earth Vehicle +3226=Thump Truck_Earth Vehicle +3227=Crypt Crusher_Undead Vehicle +3228=Stealth Stinger_Life Vehicle +3231=Dive Bomber_Water Vehicle +3232=Sky Slicer_Air Vehicle +3233=Clown Cruiser_Air Vehicle +3234=Gold Rusher_Tech Vehicle +3235=Shield Striker_Tech Vehicle +3236=Sun Runner_Light Vehicle +3237=Sea Shadow_Dark Vehicle +3238=Splatter Splasher_Magic Vehicle +3239=Soda Skimmer_Magic Vehicle +3240=Barrel Blaster_Tech Vehicle +3241=Buzz Wing_Life Vehicle +3400=Fiesta_Undead +3401=High Volt_Tech +3402=Splat_Magic +3406=Stormblade_Air +3411=Smash Hit_Earth +3412=Spitfire_Fire +3413=Hurricane Jet Vac_Air +3414=Double Dare Trigger Happy_Tech +3415=Super Shot Stealth Elf_Life +3416=Shark Shooter Terrafin_Earth +3417=Bone Bash Roller Brawl_Undead +3420=Big Bubble Pop Fizz_Magic +3421=Lava Lance Eruptor_Fire +3422=Deep Dive Gill Grunt_Water +3423=Turbo Charge Donkey Kong_Life +3424=Hammer Slam Bowser_Fire +3425=Dive Clops_Water +3426=Astroblast_Light +3427=Nightfall_Dark +3428=Thrillipede_Life +3500=Sky Trophy_Item +3501=Land Trophy_Item +3502=Sea Trophy_Item +3503=Kaos Trophy_Item +624=Blaster-Tron_Light +615=Pain-Yatta_Magic +625=Ro-Bow_Tech +629=Tidepool_Water +623=Grave Clobber_Water + +[skyhats] +0=No Hat +1=Combat Hat +2=Napoleon Hat +3=Spy Gear +4=Miner Hat +5=General's Hat +6=Pirate Hat +7=Propeller Hat +8=Coonskin Cap +9=Straw Hat +10=Fancy Hat +11=Top Hat +12=Viking Helmet +13=Spiked Hat +14=Anvil Hat +15=Beret +16=Birthday Hat +17=Bone Head +18=Bowler Hat +19=Wabbit Ears +20=Tropical Turban +21=Chef Hat +22=Cowboy Hat +23=Rocker Hair +24=Royal Crown +25=Lil Devil +26=Eye Hat +27=Fez +28=Crown of Light +29=Jester Hat +30=Winged Hat +31=Moose Hat +32=Plunger Head +33=Pan Hat +34=Rocket Head +35=Santa Hat +36=Tiki Hat +37=Trojan Helmet +38=Unicorn Hat +39=Wizard Hat +40=Pumpkin Hat +41=Pirate Doo Rag +42=Cossack Hat +43=Flower Hat +44=Ballon Hat +45=Happy Birthday! +46=Vintage Baseball Cap +47=No Hat +48=Bowling Pin +49=Officer Hat +50=Firefighter Hat +51=Graduation Hat +52=Lampshade Hat +53=Mariachi Hat +54=No Hat +55=Paper Fast Food Hat +56=Pilgrim Hat +57=Police Siren Hat +58=Purple Fedora +59=Archer Hat +60=No Hat +61=Safari Hat +62=Sailor Hat +63=No Hat +64=Dancer Hat +65=Traffic Cone Hat +66=Turban +67=Battle Helmet +68=Bottle Cap Hat +69=No Hat +70=Carrot Hat +71=No Hat +72=Elf Hat +73=Fishing Hat +74=Future Hat +75=Nefertiti Hat +76=No Hat +77=Pants Hat +78=Princess Hat +79=Toy Soldier Hat +80=Trucker Hat +81=Umbrella Hat +82=Showtime Hat +83=Caesar Hat +84=Flower Fairy Hat +85=Funnel Hat +86=Scrumshanks Hat +87=Biter Hat +88=Atom Hat +89=Sombrero +90=Rasta Hat +91=Kufi Hat +92=Knight Helm +93=Dangling Carrot Hat +94=Bronze Top Hat +95=Silver Top Hat +96=Gold Top Hat +97=Rain Hat +98=The Outsider +99=Greeble Hat +100=Volcano Hat +101=Boater Hat +102=Stone Hat +103=Stovepipe Hat +104=Boonie Hat +105=Sawblade Hat +106=Zombeanie +107=Gaucho Hat +108=Roundlet +109=Capuchon +110=Tricorn Hat +111=Peacock Hat +112=Bearskin Hat +113=Fishbone Hat +114=Ski Cap +115=Crown of Frost +116=Four Winds Hat +117=Beacon Hat +118=Flower Garland +119=Tree Branch +120=Aviator's Cap +121=Asteroid Hat +122=Crystal Hat +123=Creepy Helm +124=Fancy Ribbon +125=Deeply Boppers +126=Beanie +127=Leprechaun Hat +128=Shark Hat +129=Lifesaver Hat +130=Glittering Tiara +131=Great Helm +132=Space Helmet +133=UFO Hat +134=Whirlwind Diadem +135=Obsidian Helm +136=Lilypad Hat +137=Crown of Flames +138=Runic Headband +139=Cloclwork Hat +140=Cactus Hat +141=Skullhelm +142=Gloop Hat +143=Puma Hat +144=Elephant Hat +145=Tiger Skin Cap +146=Teeth Top Hat +147=Turkey Hat +148=Eyefro +149=Bacon Bandana +150=Awesome Hat +151=Card Shark Hat +152=Jolly Hat +153=Kickoff Hat +154=Springtime Hat +155=Beetle Hat +156=Brain Hat +157=Brainiac Hat +158=Bucket Hat +159=Desert Crown +160=Ceiling Fan Hat +161=Imperial Hat +162=Clown Classic Hat +163=Clown Bowler Hat +164=Colander Hat +165=Kepi Hat +166=Cornucopia Hat +167=Cubano Hat +168=Cycling Hat +169=Daisy Crown +170=Dragon Skull +171=Outback Hat +172=Lil' Elf Hat +173=Generalissimo +174=Garrison Hat +175=Gondolier Hat +176=Hunting Hat +177=Juicer Hat +178=Kokoshnik +179=Medic Hat +180=Melon Hat +181=Mountie Hat +182=Nurse Hat +183=Palm Hat +184=Paperboy Hat +185=Parrot Nest +186=Old-Time Movie Hat +187=Classic Pot Hat +188=Radar Hat +189=Crazy Light Bulb Hat +190=Rubber Glove Hat +191=Rugby Hat +192=Metal Fin Hat +193=Sleuth Hat +194=Shower Cap +195=Bobby +196=Hedgehog Hat +197=Steampunk Hat +198=Flight Attendant Hat +199=Monday Hat +200=Sherpa Hat +201=Trash Lid +202=Turtle Hat +203=Extreme Viking Hat +204=Scooter Hat +205=Volcano Island Hat +206=Synchronized Swimming Cap +207=William Tell Hat +208=Tribal Hat +209=Rude Boy Hat +210=Pork Pie Hat +211=Alarm Clock Hat +212=Batter Up Hat +213=Horns Be With You Hat +214=Croissant Hat +215=Weather Vane Hat +216=Rainbow Hat +217=Eye of Kaos Hat +218=Bat Hat +219=Light Bulb Hat +220=Firefly Jar +221=Shadow Ghost Hat +222=Lighthouse Beacon Hat +223=Tin Foil Hat +224=Night Cap +225=Storm Hat +226=Gold Arkeyan Helm +227=Toucan Hat +228=Pyramid Hat +229=Miniature Skylands Hat +230=Wizard Hat +231=No Hat +232=Candy Cane Hat +233=Eggshell Hat +234=Candle Hat +235=Dark Helm +236=Planet Hat +237=Bellhop Hat +238=Bronze Arkeyan Helm +239=Silver Arkeyan Helm +240=Raver Hat +241=Shire Hat +242=Mongol Hat +243=Skipper Hat +244=Medieval Bard Hat +245=Wooden Hat +246=Carnival Hat +247=Coconut Hat +248=Model Home Hat +249=Ice Cream Hat +250=Molekin Mountain Hat +251=Sheepwrecked Hat +252=Core of Light Hat +253=Octavius Cloptimus Hat +254=No Hat +255=No Hat +256=No Hat +257=No Hat +258=No Hat +259=Dive Bomber Hat +260=Sea Shadow Hat +261=Burn-Cycle Header +262=Reef Ripper Helmet +263=Jet Stream Helmet +264=Soda Skimmer Shower Cap +265=Tomb Buggy Skullcap +266=Stealth Stinger Beanie +267=Shark Tank Topper +268=Gold Rusher Cog Cap +269=Splatter Splasher Spires +270=Thump TruckerÆs Hat +271=Buzz Wing Hat +272=Shield Striker Helmet +273=Sun Runner Spikes +274=Hot Streak Headpiece +275=Sky Slicer Hat +276=Crypt Crusher Cap +277=Mags Hat +278=Kaos Krown +279=Eon's Helm diff --git a/modINI.vb b/modINI.vb new file mode 100644 index 0000000..48fc186 --- /dev/null +++ b/modINI.vb @@ -0,0 +1,22 @@ +Module modINI + Private Declare Unicode Function WritePrivateProfileString Lib "kernel32" _ + Alias "WritePrivateProfileStringW" (ByVal lpApplicationName As String, _ + ByVal lpKeyName As String, ByVal lpString As String, _ + ByVal lpFileName As String) As Int32 + + Private Declare Unicode Function GetPrivateProfileString Lib "kernel32" _ + Alias "GetPrivateProfileStringW" (ByVal lpApplicationName As String, _ + ByVal lpKeyName As String, ByVal lpDefault As String, _ + ByVal lpReturnedString As String, ByVal nSize As Int32, _ + ByVal lpFileName As String) As Int32 + + Public Sub writeIni(ByVal iniFileName As String, ByVal Section As String, ByVal ParamName As String, ByVal ParamVal As String) + Dim Result As Integer = WritePrivateProfileString(Section, ParamName, ParamVal, iniFileName) + End Sub + + Public Function ReadIni(ByVal IniFileName As String, ByVal Section As String, ByVal ParamName As String, ByVal ParamDefault As String) As String + Dim ParamVal As String = Space$(1024) + Dim LenParamVal As Long = GetPrivateProfileString(Section, ParamName, ParamDefault, ParamVal, Len(ParamVal), IniFileName) + ReadIni = Left$(ParamVal, LenParamVal) + End Function +End Module diff --git a/skyDecrypter.vb b/skyDecrypter.vb index d3fa3d1..4c0edbb 100644 --- a/skyDecrypter.vb +++ b/skyDecrypter.vb @@ -116,7 +116,7 @@ Module skyDecrypter Exit Do End If h = h + 1 - Loop While h <= 16 + Loop While h <= 144 h = 576 Do @@ -125,7 +125,8 @@ Module skyDecrypter Exit Do End If h = h + 1 - Loop While h <= 16 + Loop While h <= 592 + If areaA And areaB Then Return False