Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Colored Item Names
Author Message
Osirirs
Journeyman
*

Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2



Post: #1
Colored Item Names
Here just in case someone doesn't know, it kinda took me a while to figure it out but it's pretty simple. I think it's a lot more interesting for a server to have colors to your item names instead of having them all gray. All you have to do, when you get to the NAME= part of the script, just add
@(color #) before the item name, like this:

Ex:

[ITEMDEF i_new_sword]
ID=i_sword_long
NAME= @08f New Sword
TYPE=t_weapon_sword

Hope it helps Smile
03-01-2014 12:57 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Osirirs's post
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Colored Item Names
I didn't know that , +1 !
03-01-2014 02:05 AM
Find all posts by this user Like Post Quote this message in a reply
dabritmusic
Journeyman
*

Posts: 50
Likes Given: 8
Likes Received: 2 in 1 posts
Joined: Nov 2013
Reputation: 0



Post: #3
RE: Colored Item Names
(03-01-2014 12:57 AM)Osirirs Wrote:  Here just in case someone doesn't know, it kinda took me a while to figure it out but it's pretty simple. I think it's a lot more interesting for a server to have colors to your item names instead of having them all gray. All you have to do, when you get to the NAME= part of the script, just add
@(color #) before the item name, like this:

Ex:

[ITEMDEF i_new_sword]
ID=i_sword_long
NAME= @08f New Sword
TYPE=t_weapon_sword

Hope it helps Smile

You can also use

ON=@CLICK
MESSAGE @08F <name>
RETURN 1

its easier to copy past that into older scripts if your trying to update them.
03-01-2014 04:01 AM
Find all posts by this user Like Post Quote this message in a reply
Osirirs
Journeyman
*

Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2



Post: #4
RE: Colored Item Names
Indeed but when I did it this way it'd show me twice the item name when I'd click on it, one with the color and the other still in gray, that's why I figured it'd be better just adding it to the name Tongue
(This post was last modified: 03-01-2014 09:09 AM by Osirirs.)
03-01-2014 09:09 AM
Find all posts by this user Like Post Quote this message in a reply
JohnVeritas
Apprentice
*

Posts: 49
Likes Given: 0
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 2



Post: #5
RE: Colored Item Names
Osiris, if you don't put return 1 after click trigger, it happens. But if you do it like dabritmusic's way there is no problem when u click item. You see what you defined under click trigger.

@Dabricmusic

There's also a better way that copy paste click trigger under every single weapon. If you guys noticed, all thoose weapons got a type, like t_weapon_sword put a script like;

[typedef t_weapon_sword]
on=@click
message @<color> <name>
return 1

This script will contain all t_weapon_sword items.
03-01-2014 08:12 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes JohnVeritas's post
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: Colored Item Names
osiris's way is better !
03-01-2014 11:25 PM
Find all posts by this user Like Post Quote this message in a reply
Osirirs
Journeyman
*

Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2



Post: #7
RE: Colored Item Names
Wow.. that's smart xD thanks! and I tried with Return 1 I like it too! cause if we add it directly to the name, you'll always get the color number to the name when you create it, like.. add i_new_sword, it will always say:

Where would you like to put the @08f New Sword xD

looks kinda weird, so cause of that I'd say it's better with On=@click afterall Smile
03-02-2014 02:17 AM
Find all posts by this user Like Post Quote this message in a reply
JohnVeritas
Apprentice
*

Posts: 49
Likes Given: 0
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 2



Post: #8
RE: Colored Item Names
Well osirirs way is acceptable but anytime you disarm weapons sysmessage will contain letter of colors like; " you put @07a1 katana in your backpack. " Afterall defining def's much easier than change tons of item for some functions like colored names, equip requirements, wear bonuses etc.
03-02-2014 03:31 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes JohnVeritas's post
Osirirs
Journeyman
*

Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2



Post: #9
RE: Colored Item Names
Oooooh damn.... right! see I didn't think about that... that's why I love this forum! XD
heeey would it be possible to do something like Specific color for specific Item Rank???

cause I Got my little thing (pretty much like world of warcraft xD)
Common= Green
Rare= Blue
Epic= Purple
Legendary= Orange
Artifact= Red

It'd be cool if I could add a script to pre-fix the color for every item rank Shock
03-02-2014 03:37 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #10
RE: Colored Item Names
Define the colors in defnames like these:
Code:
[defname rarity_colors]
color_rarity_0=xx//common
color_rarity_1=//rare
color_rarity_2=//epic
color_rarity_3=//legendary
color_rarity_4=//artifact
And add this to any event related to all players.
Code:
ON=@ItemAfterClick
if (<act.tag0.rarity>) //asuming you store the rarity in a tag
local.clickmsghue=<def.color_rarity_<act.dtag.rarity>>
endif
03-02-2014 03:46 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)