ID:154996
 
i am trying to create a custom race verbs which will allow player to upload icons to game as well as save them in directory any help?
Edit:* I even tried using fcopy but no luck
mob
verb
Upload(F as file)


The rest is a variation of how you want to go about getting it to this directory.

Custom race verbs are just a matter of controlling mob type (Or hiding them as procs)

mob
Human
verb
Hate_Alien()

mob
Alien
verb
Eat_Brain()


mob
Human
proc
Hate_Alien()

mob.verbs += typesof(/mob/Human/proc)
Some more information would be nice. Do you mean to ask how to upload an icon to use in your own custom race, or upload it to a database so others can download it themselves?

Here's an example of using a custom icon in a race:

mob/verb/Custom_Race()
usr.race=input("What name should the race have?","Race Name")as text
usr.raceicon=input("","Race Icon")as icon


Really basic example, but it works.
In response to Shaoni
i know basics but i want to know how to get a file from usr pc to server machine and save it in a folder
In response to Hassanjalil
Hassanjalil wrote:
i know basics but i want to know how to get a file from usr pc to server machine and save it in a folder

The only way i think that possible is using fcopy. The following code seemed to work for me, so im not sure where it was going wrong for you:

mob
verb
Send_File(F as file)
fcopy(F,"[F]")

That will stick the file in the main code directory.

Applying it to what you want would be simple enough.
mob/verb/Custom_Race()
racename=input("Enter a name for the race")
raceicon=input("pick an icon for your race")as icon
//save the file
fcopy(raceicon,"[raceicon]")