The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Item to be identified
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #20
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
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Coruja's post
Post Reply 


Messages In This Thread
Item to be identified - Osirirs - 03-02-2014, 03:26 AM
RE: Item to be identified - JohnVeritas - 03-02-2014, 03:35 AM
RE: Item to be identified - Osirirs - 03-02-2014, 03:39 AM
RE: Item to be identified - Osirirs - 03-02-2014, 07:44 AM
RE: Item to be identified - JohnVeritas - 03-02-2014, 09:38 AM
RE: Item to be identified - Osirirs - 03-02-2014, 12:42 PM
RE: Item to be identified - Runcuks - 03-02-2014, 04:26 PM
RE: Item to be identified - XuN - 03-02-2014, 07:28 PM
RE: Item to be identified - Osirirs - 03-03-2014, 02:00 AM
RE: Item to be identified - JohnVeritas - 03-03-2014, 10:03 PM
RE: Item to be identified - Osirirs - 03-04-2014, 02:30 AM
RE: Item to be identified - JohnVeritas - 03-04-2014, 04:56 AM
RE: Item to be identified - Osirirs - 03-05-2014, 01:08 AM
RE: Item to be identified - Osirirs - 03-06-2014, 01:45 AM
RE: Item to be identified - JohnVeritas - 03-06-2014, 02:35 AM
RE: Item to be identified - Osirirs - 03-06-2014, 02:45 AM
RE: Item to be identified - JohnVeritas - 03-06-2014, 03:17 AM
RE: Item to be identified - Alaric - 03-06-2014, 03:25 AM
RE: Item to be identified - Osirirs - 03-06-2014, 04:41 AM
RE: Item to be identified - Coruja - 03-11-2014 08:48 AM
RE: Item to be identified - Osirirs - 03-14-2014, 07:11 AM
RE: Item to be identified - Alaric - 03-14-2014, 07:22 AM
RE: Item to be identified - Coruja - 03-14-2014, 01:02 PM
RE: Item to be identified - Osirirs - 03-15-2014, 03:05 AM

Forum Jump:


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