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
Can anyone help create this function?
Author Message
RanXerox
Master
**

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



Post: #4
RE: Can anyone help create this function?
I am not sure if you realize, the code in this potion gives the person who drinks it a permanent +3 increase in intelligence... and while it is true that does also come with more mana, its not like it will ever "wear off".

On another topic...

If you intended to just modify mana (the by-product of intelligence) and not intelligence itself, that is possible too. However, since there is no "built-in" function for modifying mana (or hitpoints which are the by-product of strength or stamina which is the by-product of dexterity), you might want to use these functions (I left some logging entries in the script that are commented out so you can uncomment them and see how the functions work):

Code:
[FUNCTION MODMAXHITS]
LOCAL.Results=<EVAL <ARGS>>
IF (<ISEMPTY <ARGS>>)
//   SERV.LOG MODMAXHITS returns <dTAG0.MODMAXHITS> for <NAME>.
   RETURN <EVAL <TAG0.MODMAXHITS>>
ELSE
//   SERV.LOG MODMAXHITS changed from <dTAG0.MODMAXHITS> by <dLOCAL.Results> for <NAME> (<UID>).
   TAG.MODMAXHITS=<EVAL <TAG0.MODMAXHITS>+<LOCAL.Results>>
//   SERV.LOG - MAXHITS was <MAXHITS>
   IF !(<TAG0.MODMAXHITS>)
      TAG.MODMAXHITS=
      MAXHITS=
   ELSE
      MAXHITS=<EVAL <MAXHITS>+<LOCAL.Results>>
   ENDIF
//   SERV.LOG - MAXHITS is now <MAXHITS>
ENDIF

[FUNCTION MODMAXSTAM]
LOCAL.Results=<EVAL <ARGS>>
IF (<ISEMPTY <ARGS>>)
//   SERV.LOG MODMAXSTAM returns <dTAG0.MODMAXSTAM> for <NAME>.
   RETURN <EVAL <TAG0.MODMAXSTAM>>
ELSE
//   SERV.LOG MODMAXSTAM changed from <dTAG0.MODMAXSTAM> by <dLOCAL.Results> for <NAME> (<UID>).
   TAG.MODMAXSTAM=<EVAL <TAG0.MODMAXSTAM>+<LOCAL.Results>>
//   SERV.LOG - MAXSTAM was <MAXSTAM>
   IF !(<TAG0.MODMAXSTAM>)
      TAG.MODMAXSTAM=
      MAXSTAM=
   ELSE
      MAXSTAM=<EVAL <MAXSTAM>+<LOCAL.Results>>
   ENDIF
//   SERV.LOG - MAXSTAM is now <MAXSTAM>
ENDIF

[FUNCTION MODMAXMANA]
LOCAL.Results=<EVAL <ARGS>>
IF (<ISEMPTY <ARGS>>)
//   SERV.LOG MODMAXMANA returns <dTAG0.MODMAXMANA> for <NAME>.
   RETURN <EVAL <TAG0.MODMAXMANA>>
ELSE
//   SERV.LOG MODMAXMANA changed from <dTAG0.MODMAXMANA> by <dLOCAL.Results> for <NAME> (<UID>).
   TAG.MODMAXMANA=<EVAL <TAG0.MODMAXMANA>+<LOCAL.Results>>
//   SERV.LOG - MAXMANA was <MAXMANA>
   IF !(<TAG0.MODMAXMANA>)
      TAG.MODMAXMANA=
      MAXMANA=
   ELSE
      MAXMANA=<EVAL <MAXMANA>+<LOCAL.Results>>
   ENDIF
//   SERV.LOG - MAXMANA is now <MAXMANA>
ENDIF

If you want to try it out, change SRC.MODINT +=3 to SRC.MODMAXMANA += 3
09-08-2012 04:16 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Can anyone help create this function? - RanXerox - 09-08-2012 04:16 AM

Forum Jump:


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