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
Skillcap issues
Author Message
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #5
RE: Skillcap issues
I think you should ditch the entire memory item idea and implement it as TAGs (one per skill) on the items that need them, for example:

TAG.ModAlchemy=10.0

Implement the equip and unequip side effects of those tags in an EVENT that all equipable items have... Something like:

Code:
[EVENT e_equipitem]
ON=@Equip
   IF (<TAG0.ModAlchemy>)
      IF (<TAG0.ModAlchemy> < 0)
         SRC.SYSMESSAGE @032,,You equipped a cursed item that lowered your Alchemy
      ENDIF
      SRC.TAG.ModAlchemy=<EVAL <SRC.TAG0.ModAlchemy> + <TAG0.ModAlchemy>>
      TRY SRC.Alchemy=<EVAL <SRC.Alchemy>+<TAG0.ModAlchemy>>
   ENDIF

ON=@UnEquip
   IF (<TAG0.ModAlchemy>)
      SRC.TAG.ModAlchemy=<EVAL <SRC.TAG0.ModAlchemy> - <TAG0.ModAlchemy>>
      TRY SRC.Alchemy=<EVAL <SRC.Alchemy>-<TAG0.ModAlchemy>>
      IF (<SRC.TAG0.ModAlchemy>==0)
         SRC.TAG.ModAlchemy=
         SRC.SYSMESSAGE @032,,Your Alchemy has returned to normal
      ENDIF
   ENDIF

In your skillgain overrides, to check if someone is wearing an item that has affected their skill, just look for a TAG.ModAlchemy with a non zero value directly on the player.

You could try and get crafty and write some kind of FOR loop to go through all the skill KEYs so you dont need an IF structure for each skill... but try to get it working without that first.

PS... I am not sure what happens when you set a skill to a negative value... so maybe setting the TAG on an item to a negative number is a bad idea.
(This post was last modified: 03-01-2013 02:05 PM by RanXerox.)
03-01-2013 02:03 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Skillcap issues - Crusader - 02-26-2013, 12:40 PM
RE: Skillcap issues - RanXerox - 02-26-2013, 01:33 PM
RE: Skillcap issues - Crusader - 02-26-2013, 09:22 PM
RE: Skillcap issues - Norlack - 02-27-2013, 10:54 PM
RE: Skillcap issues - RanXerox - 03-01-2013 02:03 PM

Forum Jump:


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