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
Meditation while fighting
Author Message
darksun84
Sir Spamalot
****

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



Post: #2
RE: Meditation while fighting
In last nightly sphere build (don't know/remember in previous builds) meditation actually starts even if you are in combat (i think it's a bug).

Example:
Enter War Mode
Start Meditation: the message "You attempt a meditative trance" will appear.
If Meditation is successfull you get no success message but instead the mana will start to rise, if you fail you get the "You lost concentration" message.
Try again to start meditation, you will get the "You are preoccupied with thoughts of battle" message.


Note:
When you succeed in meditation, the @success trigger is called until you cancel the Meditation action by using another skill or entering/leaving combat mode.

Note 2:
By applying the SKF_SCRIPTED flag the note above doesn't apply, remember to restart Sphere when you change a SKILL/SPELL flag.

Example:
Code:
[SKILL 46]
DEFNAME=Skill_Meditation
KEY=Meditation
TITLE=Stoic
FLAGS = SKF_SCRIPTED //Remember to restart Sphere after applying/removing a SKILL/SPELL flag
DELAY=2.0,1.0
STAT_STR=10
STAT_DEX=10
STAT_INT=100
BONUS_STR=5
BONUS_DEX=90
BONUS_INT=5
BONUS_STATS=20
ADV_RATE=10.0,200.0,800.0

ON=@Select
//serv.log  Selected meditation
//This should prevent you are in combat message when meditating.
if <ISTIMERF.f_resetMeditation>
      sysmessage @70 You are already Meditating.
      return 1
endif
ON=@Fail
    //SRC.f_meditation_setup
    SRC.SYSMESSAGE You lose your concentration.

ON=@Abort
    //SRC.f_meditation_setup
    SRC.SYSMESSAGE You stop concentrating.
    TIMERF STOP,f_resetMeditation
ON=@Start
    //SRC.f_meditation_setup
    sysmessage @70 You start Meditating.
    //Skill Check here
    
ON=@Success
    //SRC.f_meditation_setup
    
    sysmessage @70 You enter in a meditative trance.
    regenMana += 5
    regenValMana += 10
    serv.log <regenMana> / <regenValMana>
    timerf 20, f_resetMeditation
    
[FUNCTION f_resetMeditation]
regenMana -= 5
regenValMana -= 10
sysmessage @70 You leave the meditative trance.

Anyway, in the script above a lot of checks are missing, so it's just for giving you an idea.
(This post was last modified: 01-17-2017 11:43 PM by darksun84.)
01-17-2017 10:22 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Meditation while fighting - Leonidas - 01-17-2017, 10:36 AM
RE: Meditation while fighting - darksun84 - 01-17-2017 10:22 PM
RE: Meditation while fighting - Leonidas - 01-18-2017, 04:32 AM
RE: Meditation while fighting - darksun84 - 01-18-2017, 04:43 AM
RE: Meditation while fighting - Leonidas - 01-18-2017, 04:49 AM
RE: Meditation while fighting - darksun84 - 01-18-2017, 05:28 AM
RE: Meditation while fighting - Leonidas - 01-18-2017, 08:16 AM
RE: Meditation while fighting - zottolo - 01-18-2017, 03:55 PM
RE: Meditation while fighting - Leonidas - 01-18-2017, 04:50 PM
RE: Meditation while fighting - zottolo - 01-19-2017, 05:47 PM
RE: Meditation while fighting - Leonidas - 01-19-2017, 06:10 PM
RE: Meditation while fighting - darksun84 - 01-19-2017, 07:44 PM
RE: Meditation while fighting - Leonidas - 01-20-2017, 02:32 AM

Forum Jump:


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