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
Skill delay
Author Message
Russian
Journeyman
*

Posts: 75
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 0



Post: #1
Skill delay
Hello all.
I want try to set skills delay if charter is gm:

Code:
ON=@SKILLSTART
IF <SRC.ISGM>
IF <SERV.SKILL.<ARGN1>.NAME>=Magery
SERV.SKILL.Magery.DELAY=1
ENDIF
ENDIF
But script set a delay for all server, for all charters. How i can set delay repsonally for gms?
11-20-2012 04:59 PM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

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



Post: #2
RE: Skill delay
Code:
on=@skillstart
if (<serv.skill.<action>.key>==magery)
  local.old_delay=<serv.skill.<action>.delay>
  if (<isgm>)
    serv.skill.<action>.delay=1
  else
    serv.skill.<action>.delay=<local.old_delay>
  endif
endif

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

Marchadium :: http://www.marchadium.ca/ :: Join us!
11-20-2012 05:53 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Russian
Journeyman
*

Posts: 75
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 0



Post: #3
RE: Skill delay
Thank you Skul.
I like March ^.^
11-20-2012 06:09 PM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

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



Post: #4
RE: Skill delay
Wait, looking at it now I don't think that code will work, it will reduce the delay to 1 anytime a GM uses magery and never restore it. Here, this code should do the trick:
Code:
on=@spellcast
if (<isgm>)
  if (<isempty <var.old_magery_delay>>)
    var.old_magery_delay=<serv.skill.<action>.delay>
  endif
  serv.skill.<action>.delay=1
endif

on=@skillstart
if !(<isempty <var.old_magery_delay>>)
  serv.skill.<action>.delay=<var0.old_magery_delay>
  var.old_magery_delay=
endif

Then again, maybe the above won't work either. This is the best I can think of, unless someone else has a better idea:
Code:
on=@skillstart
if (<serv.skill.<action>.key>==magery)
  if (<isgm>)
    if !(<var0.magery_delay>)
      var.magery_delay=1
      timerf 0, serv.skill.<action>.delay=<serv.skill.<action>.delay>
      timerf 0, var.magery_delay=
    endif
    serv.skill.<action>.delay=500
  endif
endif
It works but I fear it will probably effect other players if there is any heavy use of magery. Try it out, least u can do is remove it if it doesn't work.

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

Marchadium :: http://www.marchadium.ca/ :: Join us!
(This post was last modified: 11-20-2012 06:41 PM by Skul.)
11-20-2012 06:24 PM
Visit this user's website 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)