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
Stats (hits) change trigger
Author Message
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #4
RE: Stats (hits) change trigger
Not really, as long as the timer is triggered only if the player is logged in. Here's a little example I thought up of for you:
Code:
[function checkstat]
if (<isempty <tag.statchange_hits>>) || (<isempty <tag.statchange_mana>>) || (<isempty <tag.statchange_stam>>)
  tag.statchange_hits=<hits>
  tag.statchange_mana=<mana>
  tag.statchange_stam=<stam>
else
  if !(<dtag0.statchange_hits>==<hits>)
    trigger @statchange_hits
  endif
  if !(<dtag0.statchange_mana>==<mana>)
    trigger @statchange_mana
  endif
  if !(<dtag0.statchange_stam>==<stam>)
    trigger @statchange_stam
  endif
endif
if (<isonline>)
  timerf 1, checkstat
else
  tag.statchange_hits=
  tag.statchange_mana=
  tag.statchange_stam=
endif
Pass 'checkstat' upon every player that logs in to start the function, use @statchange_hits, @statchange_mana, and @statchange_stam as triggers in player events to code the things you need to.

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
01-25-2013 03:38 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Stats (hits) change trigger - tleilax - 01-24-2013, 06:45 AM
RE: Stats (hits) change trigger - Skul - 01-25-2013, 01:45 AM
RE: Stats (hits) change trigger - tleilax - 01-25-2013, 01:56 AM
RE: Stats (hits) change trigger - Skul - 01-25-2013 03:38 AM
RE: Stats (hits) change trigger - tleilax - 01-25-2013, 04:31 AM
RE: Stats (hits) change trigger - RanXerox - 01-25-2013, 05:38 AM
RE: Stats (hits) change trigger - Ben - 01-25-2013, 11:36 AM
RE: Stats (hits) change trigger - RanXerox - 01-25-2013, 02:07 PM
RE: Stats (hits) change trigger - Skul - 01-25-2013, 04:05 PM
RE: Stats (hits) change trigger - tleilax - 01-25-2013, 06:59 PM
RE: Stats (hits) change trigger - Ben - 01-25-2013, 09:53 PM
RE: Stats (hits) change trigger - tleilax - 01-25-2013, 09:54 PM

Forum Jump:


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