ID:268810
 
Like, um...
mob
verb
download_host_files()
src << host_files

var/host_files

admin
verb
set_host_files(file/F as file)
host_files = F



:|
The "Download Host Files" verb just sends the person the file name... how would you go about downloading it?
look up browse()

You can browse something to a person and it will start their download. Note: some files will show up in the browser.
In response to Ter13
src << "file=[host_files]"
[Edit](Note, it doesn't work. XD)
<_<
I'm a little confused on this...
In response to Hell Ramen
No, more like this.

usr << browse([path to file],"display=0")
In response to Ter13
Ter13 wrote:
No, more like this.

usr << browse([path to file],"display=0")

Hmmm... I'll just figure this out later... 'tis mind-boggling.
In response to Hell Ramen
Hell Ramen wrote:
Ter13 wrote:
No, more like this.

usr << browse([path to file],"display=0")

Hmmm... I'll just figure this out later... 'tis mind-boggling.

An easier way would be to use the ftp() proc. It can send files to players.
You would use the extremely convienent ftp() proc.

So, in your situation

mob/verb/Download_Host_Files()
src << ftp(host_files)

I think it's worth mentioning that it would be much easier to do something like
mob/verb/Download_Host_Files()//Replace "My Game" with the correct name.
if(fexists("My Game.dmb")) src << ftp("My Game.dmb")
if(fexists("My Game.rsc")) src << ftp("My Game.rsc")


That way, if your game uses a .rsc file, it downloads both files (Your way only allowed the admin to specify one or the other). Of course, your game may not use an rsc, but either way, it's much better then having the admin have to specify the file. The only disadvantage is that if the hiost were to rename either file, the renamed file wouldn't be downloaded.
In response to Wizkidd0123
Thank you, Wizkid(>_> with sugar on top), and Jon.
In response to Wizkidd0123
Just asking on this as a comment..TO WIZ

When it says if(fexists) does that run like a search on the hosts computer or what? I would like to do this same technique.
In response to XxDohxX
fexists() is only capable of searching the same folder as the files that are being hosted on the host's computer. So, if MyGame.dmb is in the same folder as MyChar.sav, if(fexists("MyChar.sav")) will return true, but if MyChar.sav is in a different folder than MyGame.dmb, it will return null.