Jump to content

willaien

Member
  • Posts

    65
  • Joined

  • Last visited

Posts posted by willaien

  1. http://500mb.us/upload_file.php

    Here's how it goes, you create a pokemon with pokegen, or similar. Must be a 5th gen pokemon. You can then upload the .pkm file and then use 64.20.45.138 for your DNS.

    This does NO sanity checking on your pkm file, that's all up to you to make sure is correct.

    edit: If you get a magikarp instead of what you uploaded, try reuploading. If you still do not receive the correct pokemon, you're likely not on the same connection as your DS.

    http://500mb.us/upload_gen4.php

    Gen 4 version, by request.

  2. http://dl.dropbox.com/u/17115146/Pokehack.zip

    Here's what I have. It's in C#

    If you don't have Visual Studio Professional, you'll have to download C# express, compile it and then reference it in your project. Otherwise, you can reference it in.

    Sample usage:

    Dim pkm As Byte() = File.ReadAllBytes(pathtopoke)
    Dim poke As New PokeHack.Pokemon(pkm)
    poke.HeldItem = PokeHack.Pokemon.ConvertStringToItemID("Master Ball")
    poke.Level = 100

  3. $newIV = $row['AttIV'];
    $i = unpack("V", substr($q,0x38,4));
    $i &= 0xFFFFFC1F; // Clear Attack IV
    $i |= ($newIV & 0x1F) << 5; // Set new attack IV
    $q = substr($q,0,0x38).pack("V",$i).substr($q,0x3C);
    

    You only need GMP for 64 bit arithetic on 32 bit systems, for instance the PRNG (but you can use bcmath for that, although it's slow)

    I still have the same problem, only SPDEF gets set, and HP is set at 1? Odd.

    http://pastebin.com/wuk0471x

    Here is a resulting file with the GTS portion snipped out, you can load it in pokesav to see. For reference, I'm *not* running a 64-bit OS.

    http://dl.dropbox.com/u/17115146/result.bin

  4. I vaguely understand the bit shifting required to set IV's.

    Here's the C# code I use for, say, setting ATTIV:

    uint i = rawdata.GetUInt(0x38);
    i &= 0xFFFFFC1F;
    uint val = (uint)(value << 5);
    i |= val;
    rawdata.SetUInt(0x38, i);

    However, when I port the code to PHP, it gets mangled on most of them. Apparently, PHP's typing is rather awkward and numbers default to a signed integer, and all math is signed integers for the most part.

    Currently, I'm attempting to use GMP as seen below:

    $newIV = $row['AttIV'];
    $i = substr($q,0x38,8);
    $i = gmp_and($i , 0xFFFFFC1F);
    $val = gmp_mul($newIV,gmp_pow(2,5));
    $i = gmp_or($i, $val);
    $i = pack("V", $i);
    $q = substr($q,0,0x38).$i.substr($q,0x3C);

    For reference, $q is the loaded pokemon.

  5. That happens to be my pet project. I've considered this in the past, but couldn't figure out any decent way to do so, without undoing everything and starting over. Also, I put the project on the backburner due to lack of interest. Still, I might pick it back up and allow such, but, pokebox already allows that...

    Edit: By the by, I had troubles finding Goon's Scizor. If you can point me in the right direction, I can see about putting it up there.

×
×
  • Create New...