Area timer functions

Area timer functions v3

No permission to download
Content Author
The Mana World
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

Code:
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

Code:
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

Code:
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

Code:
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

Code:
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

Code:
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)

  • Upvote
Reactions: bWolfie
Author
meko
Downloads
38
Views
3,065
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from meko

Latest updates

  1. Version v3

    added freeloop to all commands added global timer commands
  2. Version v2.1

    fixed maptimer2()
  3. Version v2

    added areatimer2() added areadeltimer() added maptimer2() added mapdeltimer()
Back
Top