Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom meditation
Author Message
RanXerox
Master
**

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



Post: #4
RE: Custom meditation
To be clear, there is no difference between a VAR, a LOCAL, or CTAG, or a TAG when it comes to resources like memory etc.

Here is an alternate version of your @Start trigger that checks a CTAG (Character TAG) to decide if enough time has passed instead of creating a new memory object with a ticking timer (which does consume quite a bit of resources unnecesarily.) I also fixed some other issues:

* use two == in an IF statement, not just one = sign... in your case, just combine the greater than and the equals into one conditional test
* put the successful result (the addition of extra mana) in the @Success trigger instead instantly granting it when the skill is first attempted

Code:
ON=@start
  if (<mana> => <int> )
     SYSMESSAGE You already have full mana!
     return 1
  endif
  if (<EVAL <SERV.TIME>-<CTAG0.LastMeditationTime>> < 6)
    SYSMESSAGE You must wait before you can meditate!
    RETURN 1
  endif
ON=@Success
  SRC.MANA += <VAR0.MEDITATION>

Alternatively, instead of forcing it like this, you could instead temporarily alter the player's RATE of Mana regeneration (by adding/increasing TAG.OVERRIDE.REGEN_1 to them) or the AMOUNT of Mana regenerated (by adding/increasing TAG.OVERRIDE.REGENVAL_1 to them).
09-25-2013 09:00 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Custom meditation - Leonidas - 09-24-2013, 06:14 PM
RE: Custom meditation - XuN - 09-24-2013, 06:28 PM
RE: Custom meditation - Rattlehead - 09-24-2013, 07:56 PM
RE: Custom meditation - RanXerox - 09-25-2013 09:00 AM
RE: Custom meditation - Rattlehead - 09-25-2013, 03:44 PM

Forum Jump:


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