Coruja 
Sphere Developer
    
Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7
Dimension Shard
![]()
|
RE: Item to be identified
to remove "Magic" from name just enable this line on sphere_msgs.scp and set a empty text
Code:
//itemtitle_magic "Magic "
and then just use your code on item
Code:
[ITEMDEF i_magic_katana]
ID=i_katana
...
ON=@Create
ATTR=attr_magic
HITPOINTS={500 600}
//COLOR=0 //this doesn't need to be set, all items are already created without color
ON=@AfterClick
LOCAL.ClickMsgHue=<COLOR>
IF (<ATTR> & attr_identified)
COLOR=02cb
SRC.SYSMESSAGE @041 Item Category: Common
SRC.SYSMESSAGE @041 Rarity: 60
SRC.SYSMESSAGE @041 Weapon Speed: <SPEED>
ENDIF
but to make it even better, here's a improved code
Code:
[ITEMDEF i_magic_katana]
ID=i_katana
...
TEVENTS=e_magic_item
TAG.Category=Common
TAG.Rarity=60
TAG.SkillBonus.0=Blacksmithing,1000
TAG.SkillBonus.1=Tactics,1000
ON=@Create
ATTR=attr_magic
HITPOINTS={500 600}
[EVENTS e_magic_item]
ON=@AfterClick
LOCAL.ClickMsgHue=<COLOR>
IF (<ATTR> & attr_identified)
COLOR=02cb
SRC.SYSMESSAGE @041 Item Category: <TAG.Category>
SRC.SYSMESSAGE @041 Rarity: <TAG0.Rarity>
SRC.SYSMESSAGE @041 Weapon Speed: <SPEED>
WHILE !(<isempty <TAG.SkillBonus.<dLOCAL._WHILE>>>)
ARGS=<TAG.SkillBonus.<dLOCAL._WHILE>>
SRC.SYSMESSAGE @041 Skill Bonus: +<FVAL <ARGV1>> <ARGV0>
ENDWHILE
ENDIF
ON=@Equip
WHILE !(<isempty <TAG.SkillBonus.<dLOCAL._WHILE>>>)
ARGS=<TAG.SkillBonus.<dLOCAL._WHILE>>
SRC.<ARGV0> += <ARGV1>
ENDWHILE
ON=@Unequip
WHILE !(<isempty <TAG.SkillBonus.<dLOCAL._WHILE>>>)
ARGS=<TAG.SkillBonus.<dLOCAL._WHILE>>
SRC.<ARGV0> -= <ARGV1>
ENDWHILE
using this code you doesnt need to copy/paste the same thing on every item, all you need to do is set the TEVENT=e_magic_item and use tags to control the magic properties
(This post was last modified: 03-11-2014 08:52 AM by Coruja.)
|
|
03-11-2014 08:48 AM |
|
The following 1 user Likes Coruja's post:1 user Likes Coruja's post
Staff_Stanic (03-11-2014)
|