Jump to content

Recommended Posts

Area timer functions


This script provides functions to add (or remove) timers to every player in the area or map.

 

 

 

areatimer("<map>", <x1>, <y1>, <x2>, <y2>, <tick>, "<event>")
makes all players in the square area call <event> after <tick> ms
> returns the number of affected players

areatimer("prontera", 55, 60, 150, 180, 500, "MyNPC:MyEvent");
 

 

 

areatimer2("<map>", <x1>, <y1>, <x2>, <y2>, <tick>, "<event>")
identical to areatimer, but also removes any existing timer before adding the new one
> returns the number of affected players

areatimer2("prontera", 55, 60, 150, 180, 500, "MyNPC:MyEvent");
 

 

 

areadeltimer("<map>", <x1>, <y1>, <x2>, <y2>, "<event>")
makes all players in the square area remove their timers for <event>
> returns the number of affected players

areadeltimer("prontera", 55, 60, 150, 180, "MyNPC:MyEvent");
 

 

 

maptimer("<map>", <tick>, "<event>")
makes all players in the map call <event> after <tick> ms
> returns the number of affected players

maptimer("prontera", 500, "MyNPC:MyEvent");
 

 

 

maptimer2("<map>", <tick>, "<event>")
identical to maptimer() but also removes any existing timer before adding the new one
> returns the number of affected players

maptimer2("prontera", 500, "MyNPC:MyEvent");
 

 

 

mapdeltimer("<map>", "<event>")
makes all players on the map remove their timers for <event>
> returns the number of affected players

mapdeltimer("prontera", "MyNPC:MyEvent");
 
 
 
 
globaltimer(<tick>, "<event>")
makes all players everywhere call <event> after <tick> ms
> returns the number of affected players
globaltimer(500, "MyNPC:MyEvent");

 

 

 

 

Requires Hercules v2018.06.03 or newer version

 

 

--------------------------------------------------------------------------------------
This script was made by me, for The Mana World + Evol.
License: public domain (CC0)


 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.