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-nmm6 (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-nmm6 (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-nmm6 (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
Regeneration armor uhm uhm!
Author Message
Crusader
Master
**

Posts: 254
Likes Given: 7
Likes Received: 19 in 12 posts
Joined: Apr 2012
Reputation: 6

Erehwon New Hera

Post: #1
Regeneration armor uhm uhm!
What's the best way to do a regenerative armor (regen hits, or mana, or stam) ?

i mean, that every single piece of the armor can regenerate urself up to a certain hitpoints (like i have 100 hits,but i regen fast till 50)

the old way was to do add a timer on the items...and on timer (like 3 secs) it will gain 1-2 more hits if the healt was below 50.

But maybe there is a better way? i tried with life regen override tags, but i don't think i'm very good at using them....it ends up with a mess.

Suggestions?
03-01-2013 10:22 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

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



Post: #2
RE: Regeneration armor uhm uhm!
I think that using a timer/timerf is the only way if you don't want to use regen tags .
03-01-2013 11:44 PM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #3
RE: Regeneration armor uhm uhm!
TAG.OVERRIDE.REGEN_$statid This is used as a modifier for the REGEN rate from Sphere.ini. The value is subtracted from the normal REGEN rate.

[Edit]
Sorry, didnĀ“t read your post rightly Smile
(This post was last modified: 03-02-2013 12:31 AM by admin phoenix.)
03-02-2013 12:31 AM
Find all posts by this user Like Post Quote this message in a reply
Crusader
Master
**

Posts: 254
Likes Given: 7
Likes Received: 19 in 12 posts
Joined: Apr 2012
Reputation: 6

Erehwon New Hera

Post: #4
RE: Regeneration armor uhm uhm!
i had also a problem with armors that drains mana:

badly regen tags doesn't work properly, they always regen even if i put zero or -100 as a regen value.


i guess the only way to do this is modify the typedef of the armor and add a timer every 3 seconds that lower mana to 0.

I tryed also this:

EDIT: i just fixed this version and now seems to work properly

Code:
[TYPEDEF T_ARMOR_LEATHER]  // but also t_armor
ON=@EQUIP
IF !(<TAG0.ALLOWMANA>) && !(<SRC.ISGM>)
    IF (<SRC.ACTION> == skill_meditation)
        SRC.ACTION = -1
        SRC.SYSMESSAGE You can't meditate with armor.
    ENDIF
    SRC.MESSAGE Mana drained by the armor!
    SRC.MANA = 0
    SRC.MAXMANA = 1
    IF !(<SRC.TAG0.ARMORMANA>)
        SRC.TAG.ARMORMANA = 1
        SRC.EVENTS +e_nomedit
    ELSE
        SRC.TAG.ARMORMANA += 1
    ENDIF
ENDIF
RETURN 0

ON=@UNEQUIP
IF !(<TAG0.ALLOWMANA>) && !(<SRC.ISGM>)
    SRC.TAG.ARMORMANA -= 1
    IF !(<SRC.TAG0.ARMORMANA>) || (<EVAL <SRC.TAG0.ARMORMANA>> <= 0)
        SRC.MAXMANA =
        SRC.TAG0.ARMORMANA =
        SRC.EVENTS -e_nomedit
    ENDIF
ENDIF
RETURN 0

///////////////////////////////////////////////////////////
// armor events
///////////////////////////////////////////////////////////

[EVENTS e_nomedit]

ON=@SKILLPRESTART
IF (<ARGN1> == 46)
    SRC.SYSMESSAGE You can't meditate in this state
    RETURN 1
ENDIF
RETURN 0



Now i need to address the regen life problem.

For the moment, the best approach seems to be:

1) a typedef to add as tevents on all the pieces of the armor, with timer that every 3 second give +1 hitpoint, if hits are below 50.

2) like before, but instead of having every pieces of the armor with timer, use only one timer within a memory, to add to the player as the first item is equipped, and through the more1 value, raise his regen value
(every armor piece added will increase the more by one, so On timer the player will be healed for the <more1> value of the memory

Any other suggestions are more than appreciated!
(This post was last modified: 03-02-2013 02:50 AM by Crusader.)
03-02-2013 01:29 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

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



Post: #5
RE: Regeneration armor uhm uhm!
I made regen work using this technique... a TAG is added to the equipable item (armor or whatever)... then an event on all equipable items handles the triggers:

Code:
[EVENT e_equipitem]
ON=@ClientToolTip
IF (<TAG0.HitpointRegen>)
   SRC.ADDCLILOC 1060444,<dTAG.HitpointRegen>
ENDIF
IF (<TAG0.StaminaRegen>)
   SRC.ADDCLILOC 1060443,<dTAG.StaminaRegen>
ENDIF
IF (<TAG0.ManaRegen>)
   SRC.ADDCLILOC 1060440,<dTAG.ManaRegen>
ENDIF

ON=@Equip
IF (<TAG0.HitpointRegen>)
   SRC.TAG.OVERRIDE.REGEN_0=<EVAL <SRC.TAG0.OVERRIDE.REGEN_0> + <TAG0.HitpointRegen>>
ENDIF
IF (<TAG0.StaminaRegen>)
   SRC.TAG.OVERRIDE.REGEN_2=<EVAL <SRC.TAG0.OVERRIDE.REGEN_2> + <TAG0.StaminaRegen>>
ENDIF
IF (<TAG0.ManaRegen>)
   SRC.TAG.OVERRIDE.REGEN_1=<EVAL <SRC.TAG0.OVERRIDE.REGEN_1> + <TAG0.ManaRegen>>
ENDIF

ON=@UnEquip
IF (<TAG0.HitpointRegen>)
   SRC.TAG.OVERRIDE.REGEN_0=<EVAL <SRC.TAG0.OVERRIDE.REGEN_0> - <TAG0.HitpointRegen>>
   IF (<SRC.TAG0.HitpointRegen>==0)
      SRC.TAG.HitpointRegen=
      SRC.TAG.OVERRIDE.REGEN_0=
   ENDIF
ENDIF
IF (<TAG0.StaminaRegen>)
   SRC.TAG.OVERRIDE.REGEN_2=<EVAL <SRC.TAG0.OVERRIDE.REGEN_2> - <TAG0.StaminaRegen>>
   IF (<SRC.TAG0.StaminaRegen>==0)
      SRC.TAG.StaminaRegen=
      SRC.TAG.OVERRIDE.REGEN_2=
   ENDIF
ENDIF
IF (<TAG0.ManaRegen>)
   SRC.TAG.OVERRIDE.REGEN_1=<EVAL <SRC.TAG0.OVERRIDE.REGEN_1> - <TAG0.ManaRegen>>
   IF (<SRC.TAG0.ManaRegen>==0)
      SRC.TAG.ManaRegen=
      SRC.TAG.OVERRIDE.REGEN_1=
   ENDIF
ENDIF
03-02-2013 09:25 AM
Find all posts by this user Like Post Quote this message in a reply
UltimaAku
Journeyman
*

Posts: 125
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 1



Post: #6
RE: Regeneration armor uhm uhm!
how fast do you want the life regen?
04-16-2013 05:29 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)