Jump to content

ILOVEPIE

Member
  • Posts

    43
  • Joined

  • Last visited

Everything posted by ILOVEPIE

  1. The Normal PRNG: class pkmgen4prng(object): def __init__(self,seed): self.seed =(seed * 0x41C64E6D + 0x6073) if self._bitLen(self.seed)>32: self.seed = self.seed>>self._bitLen(self.seed)-32 object.__init__(self) def prngenerate16(self): seed = self.seed self.seed = (self.seed * 0x41C64E6D + 0x6073) if self._bitLen(self.seed)>32: self.seed = self.seed>>self._bitLen(self.seed)-32 return seed>>self._bitLen(seed)-16 def prngenerate32(self): firstrandom16 = self.prngenerate16() secondrandom16 = self.prngenerate16() return ((firstrandom16<<16)|secondrandom16) def _bitLen(self,int_type): length = 0 while (int_type): int_type >>= 1 length += 1 return(length) The GTS PRNG: class pkmgen4gtsprng(object): def __init__(self,seed): self.seed =(seed * 0x45 + 0x1111) if self._bitLen(self.seed)>31: self.seed = self.seed>>self._bitLen(self.seed)-31 object.__init__(self) def prngenerate16(self): seed = self.seed self.seed = (self.seed * 0x41C64E6D + 0x6073) if self._bitLen(self.seed)>31: self.seed = self.seed>>self._bitLen(self.seed)-31 return seed>>self._bitLen(seed)-16 def prngenerate32(self): firstrandom16 = self.prngenerate16() secondrandom16 = self.prngenerate16() return ((firstrandom16<<16)|secondrandom16) def _bitLen(self,int_type): length = 0 while (int_type): int_type >>= 1 length += 1 return(length) Credits: LexyEvee/Evee (veekun.com) - for helping me fix my code and providing the gts prng constants
  2. ILOVEPIE

    IR-GTS problem!

    PEBKAC- problem exists between keyboard and chair in other words YOUR DOING IT WRONG.
  3. fine then write your own driver. I did not know that this is a no flashcard thread.
  4. A proxy that receives data over wifi and transmits it over NIFI
  5. It is possible, try a Wifi->NIFI proxy rom for the ds
  6. Indigo Plateau: The tweak location is debatable (the pink line may be wrong) because this is just an educated guess at the location of the vertical load line, hence the pink (I made this tweak map too).
  7. I am working on a wondercard injector rom for flashcarts that injects wondercards into your retail game cart... it will probably be working in a year.
  8. IN ALL MAPS TWEAKING LOCATIONS ARE MARKED BY WHERE THE BLUE LOAD LINES CROSS Azalea Town: map The Left tweaking location allows for access to the void, The right one lets you skip slowpoke well team rocket battles entirely. New Bark Town: Only reason to do this is to get HM waterfall early by walking to the dragon's den, you can't enter the void here. Violet City: [url="http://www.halloforigin.com/w/images/2/29/HGSS_Violet_City_Tweaking_Map.png'>map All tweaks here are blocked except the one in the water, and you can't ride your bike there, so no need to look for them. Cherrygrove City: map All tweaks here are blocked except the one in the water, and you can't ride your bike there, so no need to look for them. Saffron City: This tweak map I made myself. The unblocked tweak locations are highlighted in red. Both locations give access to the void. More to come! :biggrin:
  9. it seems to me someone should write a nifi library for the pc... if only there was good documentation of nifi... hmm I will look on the ds homebrew forums
  10. <p><p><p><p><p><p>as a response to your post on my profile no i have not been able too work on it due to schoolwork but i will be able to after December</p></p></p></p></p></p>

  11. <p><p><p><p><p><p>in response to your post on the closed signature thread take a look at the feature-list of pyegts (it is still a work in progress) <a href="<a href="<a href="<a href="<a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a>" rel="external nofollow"><a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a></a>" rel="external nofollow"><a href="<a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a>" rel="external nofollow"><a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a></a></a>" rel="external nofollow"><a href="<a href="<a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a>" rel="external nofollow"><a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a></a>" rel="external nofollow"><a href="<a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a>" rel="external nofollow"><a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a></a></a></a>" rel="external nofollow"><a href="<a href="<a href="<a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a>" rel="external nofollow"><a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a></a>" rel="external nofollow"><a href="<a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a>" rel="external nofollow"><a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a></a></a>" rel="external nofollow"><a href="<a href="<a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a>" rel="external nofollow"><a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a></a>" rel="external nofollow"><a href="<a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a>" rel="external nofollow"><a href="<a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a>" rel="external nofollow"><a href="http://code.google.com/p/pye-gts/" rel="external nofollow">http://code.google.com/p/pye-gts/</a></a></a></a></a></a></p></p></p></p></p></p>

  12. This program makes pokemon shiny! Download Here! BEWARE THIS CHANGES YOUR POKEMON'S IVS Simply start the program and type in the file that you want to make shiny and presto! instant shiny! Non IV changing version coming soon.
  13. ok... it is now writing to file... exept the filesize is now chainging :mad: import random import time import os import struct import binascii import array class bf(object): def __init__(self,value=0): self._d = value def __getitem__(self, index): return (self._d >> index) & 1 def __setitem__(self,index,value): value = (value&1L)<<index mask = (1L)<<index self._d = (self._d & ~mask) | value def __getslice__(self, start, end): mask = 2L**(end - start) -1 return (self._d >> start) & mask def __setslice__(self, start, end, value): mask = 2L**(end - start) -1 value = (value & mask) << start mask = mask << start self._d = (self._d & ~mask) | value return (self._d >> start) & mask def __int__(self): return self._d def _shinygen(pokemonid): """Returns Tuple of Shiny TID and SID for given PID""" shiny=False n=0 while shiny == False: tid=bf(random.getrandbits(16)) sid=bf(random.getrandbits(16)) pid=bf(pokemonid) n +=1 shiny = True for i in range(0,13): if int(pid[15-i]) + int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 3: shiny = False break elif int(pid[15-i])+ int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 1: shiny = False break if shiny: return (tid,sid) else: return False print "Please type in the file address of the pokemon" path = raw_input("-") path = os.path.normpath(path) file = open(path, "rb") pkm = array.array("i",file.read()) file.close() #TID,SID =_shinygen(int(pkm[0x00:0x04].tostring())) TID,SID =_shinygen(int(binascii.hexlify(pkm[0x00:0x04]),16)) print bin(int(TID)) pkm[0x0C:0x0E]=array.array("i",struct.pack("i",int(TID))) pkm[0x0E:0x10]=array.array("i",struct.pack("i",int(SID))) file = open(path,"wb") pkm.tofile(file) file.close() print "Your Pokemon is now Shiny!" time.sleep(20)
  14. No bad eggs occur with a national pokedex number higher than 494 so 495 and up 494 is just a plain old egg 493 is the end of the IV national pokedex with arcius
  15. I am having troubles converting a binary slice to an integer and then overwriting a binary slice in an array...
  16. """ is a special string designation used by pydoc for describing a function It's not an array it's a bitfield
  17. Thats because it was checking all values between position 0 and position 11 not between 0 and position 12
  18. one of those small banners the thread ones... with Groudon and kyogre and the text "PYE-GTS The most advanced public GTS Server"
  19. this is the code i am having problems with ... it won't work it just keeps giving errors about how you cant use bitwize operations on type slice with a mask of type int import random import time import os #import struct import array class bf(object): def __init__(self,value=0): self._d = value def __getitem__(self, index): return (self._d >> index) & 1 def __setitem__(self,index,value): value = (value&1L)<<index mask = (1L)<<index self._d = (self._d & ~mask) | value def __getslice__(self, start, end): mask = 2L**(end - start) -1 return (self._d >> start) & mask def __setslice__(self, start, end, value): mask = 2L**(end - start) -1 value = (value & mask) << start mask = mask << start self._d = (self._d & ~mask) | value return (self._d >> start) & mask def __int__(self): return self._d def _shinygen(pokemonid): """Returns Tuple of Shiny TID and SID for given PID""" shiny=False n=0 while shiny == False: tid=bf(random.getrandbits(16)) sid=bf(random.getrandbits(16)) pid=bf(pokemonid) n +=1 shiny = True for i in range(0,13): if int(pid[15-i]) + int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 3: shiny = False break elif int(pid[15-i])+ int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 1: shiny = False break if shiny: return (tid,sid) else: return False print "Please type in the file address of the pokemon" path = raw_input("-") path = os.path.normpath(path) file = open(path, "rb") pkm = array.array("i",file.read()) file.close() TID,SID =_shinygen(pkm[0x00:0x04]) pkm[0x0C:0x0E]=int(TID) pkm[0x0E:0x10]=int(SID) file = open(path,"wb") pkm.tofile(file) file.close() print "Your Pokemon is now Shiny!" time.sleep(20)
  20. yes i am aware of that but the way to determine shiny is through binary not hex... you can't just set the TID to the upper half and then have the SID set to the lower half... it will work more often than normal but it still fails if you have a PID like 9132715 which if you split it in half has on bits that overlap 3 times
  21. the answer to the random problem is simply: import random the answer to the other problem is to convert to an integer before you call the function
  22. ok what if your pid is 11229867 1010101101011|010 1010101101011|010 1010101101011|010 nope not shiny... or even 9132715 that will not work either... there are many times that algorithm will fail
  23. I don't know of any better way of generating Shiny TIDs & SIDs considering how shiny calculations are described here: http://www.smogon.com/ingame/rng/pid_iv_creation#how_shiny anyways the computor will go through over 3000 combinations in less than a second... it doesn't take long... and the program does work i checked it with pokegen...
  24. Requires this class: class bf(object): def __init__(self,value=0): self._d = value def __getitem__(self, index): return (self._d >> index) & 1 def __setitem__(self,index,value): value = (value&1L)<<index mask = (1L)<<index self._d = (self._d & ~mask) | value def __getslice__(self, start, end): mask = 2L**(end - start) -1 return (self._d >> start) & mask def __setslice__(self, start, end, value): mask = 2L**(end - start) -1 value = (value & mask) << start mask = mask << start self._d = (self._d & ~mask) | value return (self._d >> start) & mask def __int__(self): return self._d Function: def shinygen(pokemonid): """Returns Tuple of Shiny TID and SID for given PID""" shiny=False n=0 while shiny == False: tid=bf(random.getrandbits(16)) sid=bf(random.getrandbits(16)) pid=bf(pokemonid) n +=1 shiny = True for i in range(0,13): if int(pid[15-i]) + int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 3: shiny = False break elif int(pid[15-i])+ int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 1: shiny = False break if shiny: return (tid,sid) else: return False Demo Program that generates shiny TID/SIDs: (on dropbox because py2exe is too big to upload [barely]) http://dl.dropbox.com/u/20328726/MakeShiny.zip
×
×
  • Create New...