blob: c0b55258968124b1b616b36340d9f4b8a5de8c0b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import net.mapserv as mapserv
from logicmanager import logic_manager
__all__ = ['is_shop', 'is_afk', 'is_idle']
is_shop = False
is_afk = False
is_idle = False
badge_ts = 0
def badge_logic(ts):
if mapserv.server is None:
return
global badge_ts
if ts > badge_ts + 30:
badge_ts = ts
emote = 0xC0
if is_shop:
emote += 1
if is_afk:
emote += 2
if is_idle:
emote += 4
if is_shop or is_afk or is_idle:
mapserv.cmsg_player_emote(emote)
logic_manager.add_logic(badge_logic)
|