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-nmm6 (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-nmm6 (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-nmm6 (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
a timer, pause or something in a Trigger?
Author Message
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #1
a timer, pause or something in a Trigger?
Hi!
I have this problem, i want have a pause in a trigger, i can't have any idea, because the @timer is the only way to do that i know...
help c:
08-10-2017 12:54 PM
Find all posts by this user Like Post Quote this message in a reply
Artyk
Journeyman
*

Posts: 75
Likes Given: 43
Likes Received: 9 in 9 posts
Joined: Sep 2014
Reputation: 0



Post: #2
RE: a timer, pause or something in a Trigger?
Put what you want to do inside a function, then use timerf inside the trigger.
"timerf N, function_name" will execute "function_name" after N seconds on the object (in this case who triggered the trigger)
(This post was last modified: 08-10-2017 03:07 PM by Artyk.)
08-10-2017 03:07 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Artyk's post
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #3
RE: a timer, pause or something in a Trigger?
Very useful the truth! But I can not solve my problem
I want to pause for 5 seconds when a player wants to cut a body
To replace the script "negotiate features" that does not work very well and gives lag and problems
I tried many combinations but I can not get it
Later I want to devise something so the players do not use "autoloot"

Do you have any idea?
08-11-2017 02:13 AM
Find all posts by this user Like Post Quote this message in a reply
Artyk
Journeyman
*

Posts: 75
Likes Given: 43
Likes Received: 9 in 9 posts
Joined: Sep 2014
Reputation: 0



Post: #4
RE: a timer, pause or something in a Trigger?
Do you want to "protect" the body for 5 sec after death or make the action of cutting the body take 5 sec?
For the autoloot i remember I've already read something time ago on the forum, take a look Smile
08-11-2017 03:17 AM
Find all posts by this user Like Post Quote this message in a reply
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #5
RE: a timer, pause or something in a Trigger?
make the action of cutting the body take 5 sec, the players love use a macro to cutting bodys haha!

I'll take a look at the forum, I hope I'm lucky ^^
08-11-2017 03:51 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

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



Post: #6
RE: a timer, pause or something in a Trigger?
A cool idea is to make a custom skill that handles carving:

Code:
[SKILL 58]
DEFNAME = Skill_carving
Key = Carving
FLAGS=SKF_GATHER|SKF_SCRIPTED
DELAY = 1.0
STAT_STR=0
STAT_DEX=0
STAT_INT=0
BONUS_STR=0
BONUS_DEX=0
BONUS_INT=0
BONUS_STATS=0
//This will prevent the skill advancement
ADV_RATE = 0

ON=@Start
//5 Strokes with 1.0 delay, around 5 seconds?
local.GatherStrokeCnt = 5
actdiff = 0

ON=@Stroke
//Play the bow animation
bow

ON=@Success
act = <tag.carveCorpse>
useitem <tag.carveWeapon>
last

Then add this trigger to a general player event

Code:
ON=@itemTargon_Item
if (<argo.type> == t_corpse) && (!<tag0.carveCorpse> ) //Start the custom carving skill -> Skill 58
    //Set Corpse Uid
    tag.carveCorpse = <argo>
    //Set the item used for carving
    tag.carveWeapon = <act>
    skill 58
    return 1
elseif (<argo.type> == t_corpse) && (<tag0.carveCorpse> ) //Proceeds with carving.
    tag.carveCorpse =
    tag.carveWeapon =
    return 0
endif

It seems to work for now
08-11-2017 05:48 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes darksun84's post
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #7
RE: a timer, pause or something in a Trigger?
Very grateful to both, I opened so many ideas Smile
08-11-2017 11:19 AM
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)