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
Decay timer
Author Message
larmc20
Journeyman
*

Posts: 67
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: May 2013
Reputation: 0



Post: #1
Decay timer
PHP Code:
[Events e_decay]
On=@ItemDropOn_Ground
src
.sysmessage @0abc O item sera removido em 1 minuto
argo
.timer,60
argo
.attr |= attr_decay 

It's not working. Don't know why
01-28-2014 09:49 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: Decay timer
Go to sphere.ini and set the decay timer.
I'm sorry for that, the item is not ARGO, its ACT.
Something going wrong, after the timer, the item is getting the decay timer set on sphere.ini.

And its a thread with the same question.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
01-28-2014 11:55 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #3
RE: Decay timer
Wich part is not working? you have to be more descriptive so we can give you back a clear anwser.

At first: reading the wiki solves almost all of these problems: http://wiki.sphere.torfo.org/index.php/@...pOn_Ground , look at references and also argn1/args and you will have your problem solved.

If you want to know why is this happening: Sphere is doing its work after this trigger takes proccess, setting the timer to de value from sphere.ini, so if you want it to stop this proccess you must use return 1 (wich will prevent too the item for being placed on the ground, so you will have to place it in the script too using <args> to retrieve the drop point), otherwise you can use argn1 wich is faster and easier Smile
01-28-2014 06:28 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: Decay timer
Thanks XuN for the explanation.

Don't know if it is a real problem...
What happen is:
- You drop the item on ground;
- @ItemDropOn_Ground is fired and set attr_decay and timer 60.
- After the timer (60), the item don't decay, it gets another timer (set on sphere.ini).

In my opinion, the decay timer is overriding the behaviour at @itemdropon_ground.

I can't test NOW, maybe next week hahaha
But the argn1 thing SHOULD work, if not, if happen the same thing with the timer, its broken.

So here is the script to test:

PHP Code:
ON=@ItemDropOn_Drop
ARGN1 600 
// TENTHS OF SECOND, 60s = 600 

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 01-28-2014 10:23 PM by Extreme.)
01-28-2014 10:22 PM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: Decay timer
This might sound like a silly thing to suggest....

But have you tried to set the attr first and then the timer?

If the item is not set to decay when the timer is put on it does it stick with the value you place or does it become -1?

@ItemDropOn_Ground
ref1 <argo>
ref1.attr (<ref1.attr>&attr_decay)
ref1.timer 600

Also as I pointed out in the trashcan thread...
Without further checks this event will delete all items you drop, including those inside your house.

[Image: 2nis46r.jpg]
(This post was last modified: 01-29-2014 12:54 AM by Mordaunt.)
01-29-2014 12:54 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
larmc20
Journeyman
*

Posts: 67
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: May 2013
Reputation: 0



Post: #6
RE: Decay timer
Well...


[EVENT e_decay]
on=@ItemDropOn_Ground
src.sysmessage @0abc O item sumira em 1 minuto!
argn1 600

Worked Very Well...
For a War Shard the anywhere decay its acceptable.

Thanks mates.
01-29-2014 10:42 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes larmc20's post
victorstelzer
Journeyman
*

Posts: 80
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jun 2012
Reputation: 0



Post: #7
RE: Decay timer
Heim me ajuda a fazer isso abri um topico pra isto mas nao consegui resolver este problema
01-31-2014 09:36 AM
Find all posts by this user Like Post Quote this message in a reply
danielmuller
Apprentice
*

Posts: 18
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: May 2016
Reputation: 0



Post: #8
RE: Decay timer
(01-31-2014 09:36 AM)victorstelzer Wrote:  Heim me ajuda a fazer isso abri um topico pra isto mas nao consegui resolver este problema

ON=@itemDROPON_GROUND
if (<isgm>)
sysmessage Este item esta travado!
act.attr=08010
return 0
ELSE
ACT.Timer = 180
SYSMESSAGE Tempo de decay de <aCT.NAME> 3 minutos
ENDIF


Poe num evento pra todos os players no skillclass abraços!
06-17-2016 03:34 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)