- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register








The script repo is an archive of historical scripts. For modern scripts, or to post your own, please use the Scripts forum section.





HashTag


By Mwthorn
Created: 2016/02/22 04:55:10 UTC-08:00 (3 years and 144 days ago)
Edited: 2016/09/15 02:31:02 UTC-07:00 (2 years and 303 days ago)
Likes: 0

Denizen Version: Denizen Build 460
Script Version: 2
Description:

Ever wanted to trend something? Well this is the script!

Commands:
/ht set (something)
/ht close
/ht reset
/ht help

Get your players together by # something.
Get your players hyped up for # something
Get your players to beat highscored # something
Get your players to spam # something
Get your players to cooperate # something
Get your players to be something

Satisfied customers:
http://i.imgur.com/drIQ7Xa.png
http://i.imgur.com/kcPUi0Z.png


Download script | View raw script
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
6600

HashTag_Version:
    type: version
    name: HashTag
    id: 89
    description: Trend something.
    version: 2

HashTag_Event: 
    type: world 
    events:
        on system time hourly: 
        - webget "http://stats.denizenscript.com/tracker?script=<s@HashTag_Version.yaml_key[id]>&version=<s@HashTag_Version.yaml_key[version]>" 
    
        on player chats: 
        - if <server.has_flag[HashTag_Word]> { 
            - if <context.message.contains[#<server.flag[HashTag_Word]>]> { 
                - flag server HashTag:++ 
                - define action "<&6>#<server.flag[HashTag_Word]> <&8>(<&a><server.flag[HashTag].as_int><&8>)" 
                - adjust <server.list_online_players> action_bar:<def[action]> 
            } 
        } 

HashTag_Command: 
    type: command 
    name: hashtag 
    description: hashtag a thing 
    usage: /ht 
    aliases: 
    - ht 
    script: 
    - if <player.is_op> { 
        - if <context.args.size> > 0 { 
            - if <context.args.get[1]> == "reset" { 
                - flag server HashTag:0 
            } 
            else if <context.args.get[1]> == "set" { 
                - if <context.args.size> != 2 { 
                    - narrate "Set a word to trend" 
                    - queue clear 
                } 
                - flag server HashTag:0 
                - flag server HashTag_Word:<context.args.get[2]> 
                - announce "<&b>#<server.flag[HashTag_Word]> can now be trend! Write <&a>#<server.flag[HashTag_Word]>" 
            } 
            else if <context.args.get[1]> == "close" { 
                - flag server HashTag:! 
                - flag server HashTag_Word:! 
                - narrate "<&b>Hashtag closed." 
                - narrate "<&e>Set a new word to trend again." 
            } 
            else { 
                - narrate "<&c>Unknown command" 
                - narrate "<&b>/hastag set (something)" 
                - narrate "<&b>/hastag close" 
                - narrate "<&b>/hastag reset" 
            } 
        } 
        else { 
            - narrate "<&c>Help" 
            - narrate "<&b>/hastag set (something)" 
            - narrate "<&b>/hastag close" 
            - narrate "<&b>/hastag reset" 
        } 
    } 






View History