Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-26-2009, 03:03 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
"Advanced" Graphic Uploader

I've decided to release the graphic uploader I made for Era. It's similar to this one by LoneAngelIbesu, but contains a queue, admin approval/denial, and more.

To use it, press F11 and click "Upload Graphic". Choose the graphic type, file name, and press "Browse". Select your graphic, and it will upload. It automatically checks the headers, checks to make sure the file does not already exists, and then moves it to a folder where it waits for an admin to approve it. You can view your pending, uploaded, and denied graphics as well by pressing F11.

Admins will see an extra option to moderate the queue, and they have a list of quick deny options, a custom deny reason button, an approve button, and a skip button (move on to the next item in the queue, do not approve or deny the current).

Screenshots:

Click image for larger version

Name:	graal_1256517882.png
Views:	2473
Size:	17.8 KB
ID:	49693Click image for larger version

Name:	graal_1256517894.png
Views:	2698
Size:	20.0 KB
ID:	49694Click image for larger version

Name:	graal_1256518013.png
Views:	2372
Size:	18.1 KB
ID:	49695Click image for larger version

Name:	graal_1256518033.png
Views:	2618
Size:	19.7 KB
ID:	49696Click image for larger version

Name:	graal_1256518049.png
Views:	2660
Size:	13.1 KB
ID:	49697

Installation

This isn't the easiest script to add, but it's not too bad if you follow these steps:
  1. Download the images attached to this post (at the bottom; there is a dark noob head, a body template, and a head template). Upload these files to your server.
  2. Upload the script to your server and add it to everyone on login.
  3. This script assumes that you use levels/heads, levels/bodies, and levels/shields. You can change these if you like, or create the folders if you don't use them. Normally it can be left as-is.
  4. At the top of the script, add a list of admins who should be able to moderate the uploaded graphics.
  5. Open the rights of (npcserver). Add the following lines:
    Quote:
    rw personaluploads/*/*/*
    rw levels/uploads/*
    rw levels/heads/*
    rw levels/bodies/*
    rw levels/shields/*
    rw uploads/*/*
  6. Add the following lines to your folder config:
    Quote:
    file uploads/*.png
    file uploads/*.gif
  7. This script requires the server to use a prefix. At default, it is taking the lowercase first word of the server (e.g. for "Era Dev", "era"), appending an underscore ("era_"), then letting the player choose the name. This can, of course, be changed to whatever you want.
  8. Add createTable(); to the onCreated function at the top of the script. Update the script, remove the line, then update it again. You only need to to this once to create the SQLite table.

The latest version can be found here (last updated 2012/01/20 by fowlplay4).
Attached Images
   
__________________

Last edited by Skyld; 01-21-2012 at 06:54 PM..
Reply With Quote
  #2  
Old 10-26-2009, 03:27 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Yay, totally using this if Stefan ever implements that server-side TDrawingPanel functionality that will let us set transparencies.
__________________
Quote:
Reply With Quote
  #3  
Old 10-26-2009, 03:27 AM
cyan3 cyan3 is offline
Registered User
cyan3's Avatar
Join Date: Nov 2005
Location: England
Posts: 2,919
cyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant future
Very nice work.
Reply With Quote
  #4  
Old 10-26-2009, 09:03 AM
Liberated Liberated is offline
not doing alot
Liberated's Avatar
Join Date: Feb 2008
Posts: 1,366
Liberated has a spectacular aura about
nice,
man i took a look in that script, and i was just happy i could make a spinning script lmao.
__________________
Quote:
Originally Posted by Tigairius View Post
I promise when I get rich I'll send you an iPhone. I'll send everyone an iPhone.
Reply With Quote
  #5  
Old 10-26-2009, 01:45 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
Looks impressive :o
Reply With Quote
  #6  
Old 10-26-2009, 01:48 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
Good job, you should get a GAT to skin a much nicer GUI though. :]
__________________
Reply With Quote
  #7  
Old 10-26-2009, 09:39 PM
Gothika Gothika is offline
Global News Team
Gothika's Avatar
Join Date: Mar 2006
Location: Newcastle, England
Posts: 2,425
Gothika is a splendid one to beholdGothika is a splendid one to beholdGothika is a splendid one to beholdGothika is a splendid one to beholdGothika is a splendid one to behold
Thats some good stuff. Nice job.
__________________


Reply With Quote
  #8  
Old 10-26-2009, 09:47 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Good job man. they should have this on every server :P
Does it get spammed with useless ****?
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #9  
Old 10-26-2009, 10:05 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Awesome idea- love it!
Reply With Quote
  #10  
Old 10-26-2009, 10:07 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by BlueMelon View Post
Good job man. they should have this on every server :P
Does it get spammed with useless ****?
We use it on Era, and we don't have any problems with spam. We can always threaten to jail/ban/suspend-use-of-this-tool-for them if needed, though.

It would be cool if Stefan added something like this to the login server so players could upload their graphics on all servers at once. This kind of functionality already exists with default files (/finddef in RC) I think, and could probably be extended to player appearance graphics.
__________________

Last edited by cbk1994; 10-26-2009 at 11:30 PM.. Reason: Finishing my sentence, oops
Reply With Quote
  #11  
Old 10-26-2009, 10:18 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by cbk1994 View Post
It would be kinda cool if something like this was added to the Login server, and Stefan made it possible for heads to be mirrored (much like they are now for default heads) across all servers.
???
Reply With Quote
  #12  
Old 10-26-2009, 10:29 PM
Jcs1919 Jcs1919 is offline
hi
Jcs1919's Avatar
Join Date: Feb 2008
Location: France
Posts: 387
Jcs1919 will become famous soon enough
Send a message via MSN to Jcs1919
;o whoa
__________________
ich bin
Reply With Quote
  #13  
Old 10-26-2009, 11:29 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by DustyPorViva View Post
???
Apparently I forgot to finish my sentence.

It would be cool if Stefan added something like this to the login server so players could upload their graphics on all servers at once. This kind of functionality already exists with default files (/finddef in RC) I think, and could probably be extended to player appearance graphics.
__________________
Reply With Quote
  #14  
Old 10-27-2009, 05:45 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by cbk1994 View Post
Apparently I forgot to finish my sentence.

It would be cool if Stefan added something like this to the login server so players could upload their graphics on all servers at once. This kind of functionality already exists with default files (/finddef in RC) I think, and could probably be extended to player appearance graphics.
That would be cool cause if an obscene upload got approved, then i could be graphically obscene on every non-gold server and you would have to wait for globals to undo it!
__________________
Quote:
Reply With Quote
  #15  
Old 10-27-2009, 05:56 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by fowlplay4 View Post
That would be cool cause if an obscene upload got approved, then i could be graphically obscene on every non-gold server and you would have to wait for globals to undo it!


EDIT: I find the copyright warning on Era's version hilarious considering the usage of copyrighted audio on the server.

Last edited by Mark Sir Link; 10-27-2009 at 06:08 AM..
Reply With Quote
  #16  
Old 10-27-2009, 12:56 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by fowlplay4 View Post
That would be cool cause if an obscene upload got approved, then i could be graphically obscene on every non-gold server and you would have to wait for globals to undo it!


Perhaps the GDT could handle those types of situations.
__________________
Reply With Quote
  #17  
Old 10-28-2009, 05:12 AM
Matt Matt is offline
iZone Administrator
Matt's Avatar
Join Date: Apr 2005
Location: United States
Posts: 2,690
Matt is a jewel in the roughMatt is a jewel in the rough
Very nice.
__________________
Need Playerworld or Account support?
GraalOnline/Toonslab Support Center
Reply With Quote
  #18  
Old 12-17-2009, 01:06 AM
darkcloud667 darkcloud667 is offline
That One Guy.
darkcloud667's Avatar
Join Date: Dec 2009
Location: Missouri
Posts: 40
darkcloud667 will become famous soon enough
nice script :o

and the only problem with it uploading to all servers at once is that some servers have different rules on what to upload and what not to.
certain images arent allowed on one server that are allowed on another
blah.
Reply With Quote
  #19  
Old 02-13-2011, 03:28 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
There is a problem in the original script that could potentially result in a loss of data in any of your data that is stored via SQL, although this is very unlikely because of the nature of the problem—generally, you should just see some errors in RC if it's being abused.

With that said, if you're using this script, please update it ASAP to a patched version here.
__________________
Reply With Quote
  #20  
Old 02-13-2011, 09:00 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
That pastebin is really nice.
__________________
Quote:
Reply With Quote
  #21  
Old 02-14-2011, 04:51 PM
Toxen Toxen is offline
A Toxic Fellow
Join Date: Jan 2008
Location: Georgia
Posts: 36
Toxen is on a distinguished road
@cbk1994, just curious, i didn't look at the script but I looked at the post and pictures and what i saw showed that you don't get to choose your extension, does that mean you can't upload .mngs with it?
__________________
UN NAT.
Reply With Quote
  #22  
Old 10-25-2011, 05:34 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Request: Add support for fixImageTransparency(file);

It sets the transparent color as the same color in the top left corner. When transing it also converts truecolor images down to 256 colors / 8 bit.
__________________
Quote:
Reply With Quote
  #23  
Old 01-20-2012, 10:16 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Updated by fowlplay4

1. Added work-around for downloading images.
No longer need to add anything to folder config.
See function getGraphic(img) for more notes on that.
2. Added support for setting transparencies via
fiximagetransparency(filepath)
3. Updated naming to be more user-friendly by changing
the getUploadFullName() function. Prevents players
from using periods in the name however.
4. Added support for hats.
5. Added support for using a different database.
6. Fixed to use V6's new uploadfile() function.

Link:
http://pastebin.graalcenter.org/read.php?id=43131936319
__________________
Quote:
Reply With Quote
  #24  
Old 01-21-2012, 06:48 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by fowlplay4 View Post
Updated by fowlplay4
Thanks, nice work .

edit: thanks Skyld for updating OP
__________________

Last edited by cbk1994; 01-21-2012 at 07:10 PM..
Reply With Quote
  #25  
Old 01-21-2012, 09:13 PM
MattKan MattKan is offline
the KattMan
Join Date: Aug 2010
Location: United States
Posts: 1,325
MattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to behold
Send a message via AIM to MattKan
Quote:
Originally Posted by fowlplay4 View Post
Update
__________________
Quote:
Originally Posted by Satoru Iwata
On the other hand, free-to-play games, if unbalanced, could result in some consumers paying extremely large amounts of money, and we can certainly not expect to build a good relationship with our consumers in this fashion. In order to have a favorable long-term relationship, we would like to offer free-to-play games that are balanced and reasonable.
Quote:
Originally Posted by Unximad
Eurocenter Games remains attached to the values of indies game developer and to the service our playerbase community.
Reply With Quote
  #26  
Old 03-25-2012, 02:12 AM
r3ckless r3ckless is offline
Owner of Corinthia
Join Date: Dec 2011
Location: MAssachusetts, USA
Posts: 131
r3ckless is an unknown quantity at this point
Send a message via AIM to r3ckless Send a message via MSN to r3ckless
I put this script on my server, followed all the directions correctly, but everytime I go to Manage Uploads, I get an error telling me it can't load the graphic, to check if im lagging etc etc

What's up with this?
__________________

Yep.

Reply With Quote
  #27  
Old 03-25-2012, 02:54 PM
Bam112 Bam112 is offline
◕ ◡ ◕
Bam112's Avatar
Join Date: Mar 2012
Posts: 41
Bam112 is on a distinguished road
Very nice.
__________________
Happy halloween!
Reply With Quote
  #28  
Old 07-31-2015, 10:54 PM
iGraalian iGraalian is offline
Registered User
Join Date: Jul 2015
Posts: 12
iGraalian is on a distinguished road
For some reason when someone uploads anything, it shows up black so I can't see the image they want to upload. What's the problem?
Reply With Quote
  #29  
Old 08-01-2015, 09:50 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Can you post a screenshot?
__________________
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 06:41 AM.


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