That Card post idea got me thinking......... is there a way we could randomize the zip file somebody downloads?
Like, if I wanted to sell Card packs for a game, and I uploaded 40 zips of different packs, all with different cards. Could I make it so that it randomizes the download?
Could be useful for raffles, too.
ID:136585
![]() Jul 29 2002, 6:45 pm
|
|
![]() Jul 30 2002, 2:20 pm
|
|
Although I haven't seen anything of the sort, you might want to request this as a feature.
|
Sariat wrote:
That Card post idea got me thinking......... is there a way we could randomize the zip file somebody downloads? You can make BYOND act as the source through which things are downloaded -- basically, put your zip files up on a server somewhere, and then use HTTP GET and send them to the client. It's probably much safer not to use that functionality, though, since one person could just buy all of the zip files and then share copies with everyone. Unless you dynamically generate authorised cards each time, people will be capable of cheating. (Plus, I know squat about HTTP GET.) Perhaps BYOND could use a feature along these lines, though: var/file = zip("newfile.zip", list("this.txt", "that.txt", "foo.txt", "bar.txt")) usr << ftp(file) One could be soft-coded, but it would be platform dependent and require Trusted world security. So BYOND would have to provide us hooks for zip.dll in the code. Basically, you could make something like: var/savefile/card01 = new ("card0001.crd") var/savefile/card02 = new ("card0002.crd") var/savefile/card03 = new ("card0003.crd") var/savefile/card04 = new ("card0004.crd") var/savefile/card05 = new ("card0005.crd") var/savefile/card06 = new ("card0006.crd") var/savefile/card07 = new ("card0007.crd") var/savefile/card08 = new ("card0008.crd") var/savefile/card09 = new ("card0009.crd") var/savefile/card10 = new ("card0010.crd") card01[""] << new /obj/card/card0001 card02[""] << new /obj/card/card0002 card03[""] << new /obj/card/card0003 card04[""] << new /obj/card/card0004 card05[""] << new /obj/card/card0005 card06[""] << new /obj/card/card0006 card07[""] << new /obj/card/card0007 card08[""] << new /obj/card/card0008 card09[""] << new /obj/card/card0009 card10[""] << new /obj/card/card0010 var/zipfile = zip("pack01.zip", list("card0001.crd", "card0002.crd", "card0003.crd", "card0004.crd", "card0005.crd", "card0006.crd", "card0007.crd", "card0008.crd", "card0009.crd", "card0010.crd", "readme.txt")) usr << ftp(zipfile) |