Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-26-2007, 03:23 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Uploading

Is there a way to upload files through the client? This would be useful for custom head and body uploads and would save time for staff and players.

I know theres a function for something like it but how does it work? Would it be like:
PHP Code:
//#CLIENTSIDE
function initUpload(platform){
   if (
platform == "win"){
       
requestfileupload("C:\randomfile.png");
     }

Reply With Quote
  #2  
Old 01-26-2007, 03:41 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
I think that is only allowing uploads for people logged into clientrc.

I do not believe there is one for non-staff.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #3  
Old 01-26-2007, 04:20 AM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
this is a guess, but you could join a class to a staff member then call findplayer('StaffAccount').uploadFile();

of course the staff member would have to be logged in.
__________________

Coming soon (Hopefully:P)
Reply With Quote
  #4  
Old 01-26-2007, 04:45 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by JkWhoSaysNi View Post
this is a guess, but you could join a class to a staff member then call findplayer('StaffAccount').uploadFile();

of course the staff member would have to be logged in.
NPC Server...? Maybe?
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #5  
Old 01-26-2007, 05:31 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by coreys View Post
NPC Server...? Maybe?
The problem is the file has to be sent by the client to the server.

Clientsided File -> Serversided File = true
Reply With Quote
  #6  
Old 01-26-2007, 09:29 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by JkWhoSaysNi View Post
this is a guess, but you could join a class to a staff member then call findplayer('StaffAccount').uploadFile();

of course the staff member would have to be logged in.
The staff member will not have the file to be uploaded though.

Plus, something like that has security issues written all over it.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #7  
Old 01-26-2007, 11:47 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by napo_p2p View Post
Plus, something like that has security issues written all over it.
Hmm, Well what I would do is make it work only for {.png,.gif,.mng} formats and a certain filesize, height, and width.
Reply With Quote
  #8  
Old 01-27-2007, 12:04 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Rapidwolve View Post
Hmm, Well what I would do is make it work only for {.png,.gif,.mng} formats and a certain filesize, height, and width.
Lol, do something like that with gscript...(think about it first before leaving any stupid comments -_- the image is not yet on the server...)
Reply With Quote
  #9  
Old 01-27-2007, 12:37 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
What are you talking about x.x, im saying after when it gets uploaded a function checks to see its file extention and dimensions then it gets moved to the heads folder if everything is ok z.z
Reply With Quote
  #10  
Old 01-27-2007, 03:14 AM
Chris Chris is offline
:pluffy:
Chris's Avatar
Join Date: Jan 2005
Location: im n ur comp, takn up pixelz
Posts: 1,867
Chris is on a distinguished road
Quote:
Originally Posted by Rapidwolve View Post
Hmm, Well what I would do is make it work only for {.png,.gif,.mng} formats and a certain filesize, height, and width.
Still not enough. A script can't discern porn from legitimate image, among other things.
__________________
Reply With Quote
  #11  
Old 01-27-2007, 04:48 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
It's exactly like someone sending it in through an email, someone reviews it before it gets to the main folder z.z
Reply With Quote
  #12  
Old 01-27-2007, 09:11 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
I have tried to find ways to do this and after researching it, found it is actaully illegal to try and you could get in SERIOUS trouble if you made something like this. There is a reason Stefan didn't add .gif, .png and .mng support to savestring/savelines.
__________________
Do it with a DON!
Reply With Quote
  #13  
Old 01-27-2007, 04:46 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Currently there is a script command selectFileForUpload() which opens the file-selection dialog and will upload the selected file to the folder you have currently opened with client-RC. To make it work for normal users we would need some way to define where people can upload files somehow.
Reply With Quote
  #14  
Old 01-27-2007, 05:47 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by Stefan View Post
Currently there is a script command selectFileForUpload() which opens the file-selection dialog and will upload the selected file to the folder you have currently opened with client-RC. To make it work for normal users we would need some way to define where people can upload files somehow.
Hmm, maybe make them put it somewhere in a special Graal folder something like: <graaldir>\special\uploads\, and make it save to levels\players\uploads\
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.