Forum is shutting down, join us on Discord.

- No new threads can be created
- Shoutbox has been disabled
- All chat/support/market will be on Discord
- if you have a special status on forum (ie: staff, legendary user, etc), then PM Phoenix on forum with your Discord name to reclaim your status on Discord
See you all on Discord!


  
Go Back   Twilight MU Online Forum > Community > Programming Section

Programming Section All programming related stuff goes here.


Welcome to the Twilight MU Online Forum forums.

You are currently viewing our boards as a guest which gives you limited access. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

After registering you will receive an email with a confirmation link that you will need to click in order to activate your forum account.

NOTE: It's recommanded that you use on forum a different username and password than the game username and password.

If you have any problems with the registration process or your account login, please contact contact us.

 
 
Thread Tools Display Modes

Judobreakers dynamic signature script - 1.4
Old 27-12-2009   #1
Judobreaker
GFX Master

 
Judobreaker's Avatar
 
InGame Character:
My Mood:
Judobreaker is offline
Points: 23,555, Level: 67
Points: 23,555, Level: 67 Points: 23,555, Level: 67 Points: 23,555, Level: 67
Level up: 8%, 645 Points needed
Level up: 8% Level up: 8% Level up: 8%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2006
Location: Holland
Age: 35
Rep: Judobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond repute
Rep Power: 341
Casino Cash: 10394
Default Judobreakers dynamic signature script - 1.4

Okay guys, after a lot of people asking me to do so I am going to help you guys out a bit with making dynamic signatures.

Before I start let me make one thing clear:
This tutorial will NOT teach you how to create a dynamic signature from scratch!
In this tutorial I will supply you with a set of files which you can use to make a dynamic signature out of your image.

If you would like to create your own files then don't bother reading this tutorial.
Quest has made a tutorial in which he goes into the coding of such files so that would help you a lot more.
I have not read his tutorial but it does work so... :P
It probably works mostly the same way as my script.

Oh, and one other thing for you php freaks that start digging through my code:
Yes, I know there are some things that could've been done better.
This is a script I made quite a while ago, I just dug it up and modified it slightly to make it work with the current website.
I will probably fix the other stuff in future updates, it's not like it won't work this way... :P


Anyways, let's get on with this and start the tutorial.
First of all, here are the files you need for this tutorial:

http://www.van-antwerpen.net/Reinier...yn_sig_1.4.zip

Note: Do not change the file structure!


Now, I will post this tutorial in several parts so I can easily make an index with links to the correct post.
If a part seems to be missing: Don't worry, it'll come.

Index
- Hosting
- The image(s) and font files
- The config file
- Finishing the signature
- Version history



Any questions are welcome, I'll be glad to answer them.
Future updates:
- Dynamic guild signatures
- Signature switchers
- Code updates
__________________
[CENTER]
Thank you Jessie!

Visit my portfolio at http://www.rvantwerpen.com

FireStorm: tht i could be your bitch
FireStorm: you are and have done so much for us
Judobreaker: I dont feel very useful a lot though lol
 
The Following 2 Users Like Judobreaker's Post:
anas17 (27-12-2009), Sam007 (28-12-2009)

Old 27-12-2009   #2
Judobreaker
GFX Master

 
Judobreaker's Avatar
 
InGame Character:
My Mood:
Judobreaker is offline
Points: 23,555, Level: 67
Points: 23,555, Level: 67 Points: 23,555, Level: 67 Points: 23,555, Level: 67
Level up: 8%, 645 Points needed
Level up: 8% Level up: 8% Level up: 8%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2006
Location: Holland
Age: 35
Rep: Judobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond repute
Rep Power: 341
Casino Cash: 10394
Default

Hosting

To be able to use the scripts and create a dynamic signature you should first make sure you have a hosting service which can actually host the signature and run the scripts.
A simple image host like Imageshack or Photobucket won't do because you will need to upload the php scripts as well.

You will need to find a host on which you can run php scripts, and it should have the imageGD functions enabled.
Most hosts that have php enabled have the imageGD functions enabled by standard so I don't think you'll have to worry about that, just make sure you find a host which supports php so it can run your scripts.

Since I have a few paid hosts myself and a server at home I'm afraid I do not have the need for any free hosts and therefor I don't know any free hosts supporting php either.
If anyone knows any or finds any please be so kind as to tell me so I can list them here.


Hosts
-------
www.dhost.info
- 100MB space
- easy FTP connection
- supports all the codes needed for dynamic signatures

Downside: They need to approve your request which can take about a week.
__________________
[CENTER]
Thank you Jessie!

Visit my portfolio at http://www.rvantwerpen.com

FireStorm: tht i could be your bitch
FireStorm: you are and have done so much for us
Judobreaker: I dont feel very useful a lot though lol
 
The Following 2 Users Like Judobreaker's Post:
anas17 (27-12-2009), Sam007 (28-12-2009)

Old 27-12-2009   #3
Judobreaker
GFX Master

 
Judobreaker's Avatar
 
InGame Character:
My Mood:
Judobreaker is offline
Points: 23,555, Level: 67
Points: 23,555, Level: 67 Points: 23,555, Level: 67 Points: 23,555, Level: 67
Level up: 8%, 645 Points needed
Level up: 8% Level up: 8% Level up: 8%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2006
Location: Holland
Age: 35
Rep: Judobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond repute
Rep Power: 341
Casino Cash: 10394
Default

The image(s) and font files

Important: This script works with jpg files only!

To create a dynamic signature you need one or more images.
The most basic dynamic signature simply needs the signature image with all the text on it (apart from the actual stats of course).
Make sure that on the image you have the following texts:

In case of normal dynamic signature have at least:
- Level
- Resets
- Elite resets
- Strength
- Agility
- Vitality
- Energy
- Game status
- Guild name

In case of Dark Lord make sure to add:
- Command

In case of forum online status enabled without using a different image for online/offline statuses add:
- Forum status


It is also possible to create a dynamic signature which only shows the forum online status and has no character dynamics in it.
In that case all you need is either the online/offline images or the text:
- Forum status


For this tutorial I will use a very basic signature which uses all of the text options:




If you are using separate images for the forum online/offline statuses make sure they both have everything they need in it.
Once you have the images you should place them in the images folder.

Important: This script works with jpg files only!


For the font you will just have to choose a nice True Type Font (.ttf, no other types can be used) and place it in the fonts folder.
__________________
[CENTER]
Thank you Jessie!

Visit my portfolio at http://www.rvantwerpen.com

FireStorm: tht i could be your bitch
FireStorm: you are and have done so much for us
Judobreaker: I dont feel very useful a lot though lol
 
The Following 2 Users Like Judobreaker's Post:
anas17 (27-12-2009), Sam007 (28-12-2009)

Old 27-12-2009   #4
Judobreaker
GFX Master

 
Judobreaker's Avatar
 
InGame Character:
My Mood:
Judobreaker is offline
Points: 23,555, Level: 67
Points: 23,555, Level: 67 Points: 23,555, Level: 67 Points: 23,555, Level: 67
Level up: 8%, 645 Points needed
Level up: 8% Level up: 8% Level up: 8%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2006
Location: Holland
Age: 35
Rep: Judobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond repute
Rep Power: 341
Casino Cash: 10394
Default

The config file

This file is everything you need to create and edit your dynamics.
It has all the settings in it, you only need to change these to make it work.
All of the other files will use the settings from the config file.
The settings are commented in php so it should be quite easy to get around in this file.

I'll start at the top:
Code:
// General settings (true || false)
$showcharacterdata = true; // Show character data
$showforumonlinestatus = true; // Show forum online status
These 2 settings determine the type of your dynamic signature.
Here you can enable and/or disable the game character data dynamics and the forum online status dynamics.

Setting them to true will enable them, setting them to false will disable them.


Next are the user settings.
These will determine which user the dynamics will come from.
Code:
// User settings
$character = "JudoB"; // Character name
$forumuserid = "55"; // Forum user id
$forumusername = "Judobreaker"; // Forum username
The character name is the users in game character name.
The other 2 settings are forum settings.
You can find the user ID by going to the users profile and checking the link.
For example, when I go to my own profile this will be the link:

Code:
http://forum.twilightmuonline.com/member.php?u=55
My ID is 55.

At the moment the script needs the username too because else I could not find the online status, this might change in following updates as I have the feeling it is not really needed when I code it right.


Then come the image settings:
Code:
// Image settings
$imagename = "sample_sig.jpg"; // Image name
$offlineimagename = false; // Offline image name ("Image name" || false)
These are the image names you use for the signature images you placed in the images map.
If you are not using an image for the forum offline status set it to false.
If you are set it to the image name (make sure to add the " at the front and end of the name).


Then the font settings:
Code:
// Font settings
$font_name = "Serious-2.ttf"; // Font name
$font_size = 6; // Font size
The font name is the name of the font file you placed in the fonts map.
The font size defines the size of your text.


Next, the color settings:
Code:
//Color settings (1 - 255)
$color_level =          array( "red" => 1, "green" => 1, "blue" => 1 ); // Level
$color_resets =         array( "red" => 1, "green" => 1, "blue" => 1 ); // Resets
$color_elite =          array( "red" => 1, "green" => 1, "blue" => 1 ); // Elite resets
$color_strength =       array( "red" => 1, "green" => 1, "blue" => 1 ); // Strength
$color_agility =        array( "red" => 1, "green" => 1, "blue" => 1 ); // Agility
$color_vitality =       array( "red" => 1, "green" => 1, "blue" => 1 ); // Vitality
$color_energy =         array( "red" => 1, "green" => 1, "blue" => 1 ); // Energy
$color_command =        array( "red" => 1, "green" => 1, "blue" => 1 ); // Command
$color_guild =          array( "red" => 1, "green" => 1, "blue" => 1 ); // Guild name
$color_game_online =    array( "red" => 1, "green" => 1, "blue" => 1 ); // Game online status - online
$color_game_offline =   array( "red" => 1, "green" => 1, "blue" => 1 ); // Game online status - offline
$color_forum_online =   array( "red" => 1, "green" => 1, "blue" => 1 ); // Forum online status - online
$color_forum_offline =  array( "red" => 1, "green" => 1, "blue" => 1 ); // Forum online status - offline
These settings define the text color for each of the stats.
Changing the numbers like this will change the color:
Code:
$color_level =          array( "red" => 255, "green" => 164, "blue" => 71 ); // Level
Make sure the numbers are in the 1-255 range or else the script wil crash.


Then we come the text positions:
Code:
// Text positions
$positions_level = 			array( "left" => 230, "top" => 17 ); // Level
$positions_resets = 			array( "left" => 230, "top" => 37 ); // Resets
$positions_elite = 			array( "left" => 230, "top" => 57 ); // Elite resets
$positions_strength = 			array( "left" => 90, "top" => 17 ); // Strength
$positions_agility = 			array( "left" => 90, "top" => 37 ); // Agility
$positions_vitality = 			array( "left" => 90, "top" => 57 ); // Vitality
$positions_energy = 			array( "left" => 90, "top" => 77 ); // Energy
$positions_command = 			array( "left" => 90, "top" => 97 ); // Command
$positions_guild = 			array( "left" => 230, "top" => 77 ); // Guild name
$positions_game_onlinestatus = 		array( "left" => 355, "top" => 17 ); // Game online status
$positions_forum_onlinestatus = 	array( "left" => 355, "top" => 37 ); // Forum online status
Each of these positions consists of a left and a top position.
This is the amount of pixels from the left or top of the image.
For example, if I want to set the level at 36 pixels from the left and 10 pixels from the top I would get the following line:
Code:
$positions_level = 			array( "left" => 36, "top" => 10 ); // Level
It takes a little practice to get it right, it's mostly trial-and-error.
You'll get faster after you do it a few times though. ^^


Lastly we have the constants:
Code:
// Constants (Do not edit!)
define( "WEBSITE_CHARACTER_LINK", "http://www.twilightmuonline.com/index.php?page=search&chara=" );
define( "FORUM_USER_LINK", "http://forum.twilightmuonline.com/member.php?u=" );
Do not edit these... EVER!!!
These links are always the same, no matter what.
If these links appear to be incorrect then the website has changed and the script will not work anyway.
In that case it simply means it will be fixed in the next update.
__________________
[CENTER]
Thank you Jessie!

Visit my portfolio at http://www.rvantwerpen.com

FireStorm: tht i could be your bitch
FireStorm: you are and have done so much for us
Judobreaker: I dont feel very useful a lot though lol
 
The Following 2 Users Like Judobreaker's Post:
anas17 (27-12-2009), Sam007 (28-12-2009)

Old 27-12-2009   #5
Judobreaker
GFX Master

 
Judobreaker's Avatar
 
InGame Character:
My Mood:
Judobreaker is offline
Points: 23,555, Level: 67
Points: 23,555, Level: 67 Points: 23,555, Level: 67 Points: 23,555, Level: 67
Level up: 8%, 645 Points needed
Level up: 8% Level up: 8% Level up: 8%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2006
Location: Holland
Age: 35
Rep: Judobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond repute
Rep Power: 341
Casino Cash: 10394
Default

Finishing the signature

Basically all there is left to do is to upload the image.
You should upload the entire file structure to your host, and then it is ready to be used.
Just enter the path to the signature folder between [img] tags and you're set to go:

Code:
http://www.van-antwerpen.net/Reinier/extra/dyn_sig_tut/sample_dyn/



And there we go, a dynamic signature ready for usage.
If there are any questions, I'll be glad to answer them.
Future updates will most probably include: Dynamic guild signatures, signature switchers and code updates.
__________________
[CENTER]
Thank you Jessie!

Visit my portfolio at http://www.rvantwerpen.com

FireStorm: tht i could be your bitch
FireStorm: you are and have done so much for us
Judobreaker: I dont feel very useful a lot though lol
 
The Following 2 Users Like Judobreaker's Post:
anas17 (27-12-2009), Sam007 (28-12-2009)

Old 27-12-2009   #6
Judobreaker
GFX Master

 
Judobreaker's Avatar
 
InGame Character:
My Mood:
Judobreaker is offline
Points: 23,555, Level: 67
Points: 23,555, Level: 67 Points: 23,555, Level: 67 Points: 23,555, Level: 67
Level up: 8%, 645 Points needed
Level up: 8% Level up: 8% Level up: 8%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2006
Location: Holland
Age: 35
Rep: Judobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond repute
Rep Power: 341
Casino Cash: 10394
Default

Version history

1.0
----
Scripts created.

1.1
----
Fixed elite resets stats.

1.2
----
Fixed stats:
- Strength
- Agility
- Vitality
- Energy
- Command

1.3
----
New option: Game online/offline images.

1.4
----
Added True Type Font support which enables custom fonts and font sizes.
__________________
[CENTER]
Thank you Jessie!

Visit my portfolio at http://www.rvantwerpen.com

FireStorm: tht i could be your bitch
FireStorm: you are and have done so much for us
Judobreaker: I dont feel very useful a lot though lol
 

Old 29-12-2009   #7
RanitaRene
Mister Twilight 2008

 
RanitaRene's Avatar
 
InGame Character:
My Mood:
RanitaRene is offline
Points: 24,945, Level: 69
Points: 24,945, Level: 69 Points: 24,945, Level: 69 Points: 24,945, Level: 69
Level up: 7%, 655 Points needed
Level up: 7% Level up: 7% Level up: 7%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2007
Location: Buenos Aires, Argentina
Rep: RanitaRene has a reputation beyond reputeRanitaRene has a reputation beyond reputeRanitaRene has a reputation beyond reputeRanitaRene has a reputation beyond reputeRanitaRene has a reputation beyond reputeRanitaRene has a reputation beyond reputeRanitaRene has a reputation beyond reputeRanitaRene has a reputation beyond reputeRanitaRene has a reputation beyond reputeRanitaRene has a reputation beyond reputeRanitaRene has a reputation beyond repute
Rep Power: 305
Casino Cash: 15933
Default

F+ck!!!!!!!!!! Amazing thread Judo, i ll make a new sexy script now :) ty i love u
__________________
 

Old 29-12-2009   #8
Judobreaker
GFX Master

 
Judobreaker's Avatar
 
InGame Character:
My Mood:
Judobreaker is offline
Points: 23,555, Level: 67
Points: 23,555, Level: 67 Points: 23,555, Level: 67 Points: 23,555, Level: 67
Level up: 8%, 645 Points needed
Level up: 8% Level up: 8% Level up: 8%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2006
Location: Holland
Age: 35
Rep: Judobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond repute
Rep Power: 341
Casino Cash: 10394
Default

Don't get too exited...
That would be scary... :P
__________________
[CENTER]
Thank you Jessie!

Visit my portfolio at http://www.rvantwerpen.com

FireStorm: tht i could be your bitch
FireStorm: you are and have done so much for us
Judobreaker: I dont feel very useful a lot though lol
 

Old 30-12-2009   #9
Judobreaker
GFX Master

 
Judobreaker's Avatar
 
InGame Character:
My Mood:
Judobreaker is offline
Points: 23,555, Level: 67
Points: 23,555, Level: 67 Points: 23,555, Level: 67 Points: 23,555, Level: 67
Level up: 8%, 645 Points needed
Level up: 8% Level up: 8% Level up: 8%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2006
Location: Holland
Age: 35
Rep: Judobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond reputeJudobreaker has a reputation beyond repute
Rep Power: 341
Casino Cash: 10394
Default

Update to version 1.2

Stats were showing incorrect after I fixed the elite reset stat last time.
__________________
[CENTER]
Thank you Jessie!

Visit my portfolio at http://www.rvantwerpen.com

FireStorm: tht i could be your bitch
FireStorm: you are and have done so much for us
Judobreaker: I dont feel very useful a lot though lol
 
The Following 2 Users Like Judobreaker's Post:
albsky (30-12-2009), burnsy (30-12-2009)

Old 30-12-2009   #10
albsky
I'm speshul x_X

 
albsky's Avatar
 
InGame Character:
My Mood:
albsky is offline
Points: 9,407, Level: 41
Points: 9,407, Level: 41 Points: 9,407, Level: 41 Points: 9,407, Level: 41
Level up: 80%, 93 Points needed
Level up: 80% Level up: 80% Level up: 80%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Rank: Platinum Member
Join Date: Jun 2008
Rep: albsky has much to be proud ofalbsky has much to be proud ofalbsky has much to be proud ofalbsky has much to be proud ofalbsky has much to be proud ofalbsky has much to be proud ofalbsky has much to be proud ofalbsky has much to be proud ofalbsky has much to be proud of
Rep Power: 221
Casino Cash: 5538
Default

Lemme dig through the code and try to discover some problems after I've said this:
dhost.info is a very good free host! 100MB space, easy FTP connection and supports all the codes needed for dynamic signatures!
Downside: They need to approve your request and that can take a week orso..

EDIT:
Nice set-up of the code, but, for PHP newbs it is sometimes a bit hard to understand. For example, you could try to set it up without all the arrays, since you ain't going to use it multiple times.
__________________
-----


Last edited by albsky; 30-12-2009 at 08:05 AM..
 
 

Bookmarks

Tags
dynamic, dynamic signature, imagegd, judobreaker, php, signature, tutorial


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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




All times are GMT -5. The time now is 04:02 AM.



vBulletin skin developed by: eXtremepixels
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2006 - 2019 Twilight MU. All Rights Reserved