- 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.





Staff Pick: Votifier Vote Simulator


By Anthony
Created: 2015/04/13 14:28:27 UTC-07:00 (9 years and 255 days ago)
Edited: 2015/07/17 21:16:51 UTC-07:00 (9 years and 160 days ago)
Likes: 1

Staff pick as of: 2015/04/13 14:45:21 UTC-07:00 (9 years and 255 days ago)
Denizen Version: 0.9.5-b1517
Script Version: 1.0
Description:

A system for testing your on votifier vote scripts. Intended for use with PerkPoints.
Use the command /fakevote [name]



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
5800

# ---------------------------------------------------------------------------- #
#                                                                              |
#                                                                              |
#                 V o t i f i e r   V o t e   S i m u l a t o r                |
#                                                                              |
#               A system for testing your on votifier vote scripts             |
#                                                                              |
#                    ! Requires Votifier and Depenizen !                       |
#                                                                              |
#                                                                              |
#                                                                              |
#                                                                              |
#   Author: |Anthony|                                                          |
#   Version: 0.1                                                               |
#   dScript Version: 0.9.5-b1517                                               |
#                                                                              |
# ---------------------------------------------------------------------------- #


VoteSimulator:
  type: world
  debug: false

  events:
    on fakevote command:
    - inject locally fakeVote instantly

  fakeVote:
    - if !<context.server> {
      - if !<player.has_permission[perkpoints.admin]> queue stop
      }
    - determine passively FULFILLED
    - define arg1 '<c.args.get[1].escaped||null>'
    - define service '<c.args.get[2].escaped||test>'
    - if <def[arg1].is[!=].to[null]> {
      - if <server.player_is_valid[%arg1%]> {
        - define username '%arg1%'
        - define player '<def[username].as_player>'
        }
        else {
        - narrate "<&b>PerkPoints<&co><&c> %arg1% is not a valid player name!"
        - queue stop
        }
      }
      else {
      - if <context.server> {
        - announce "<&b>PerkPoints<&co><&c> Must specify a username from console!" to_console
        - queue stop
        }
        else {
        - define player '<player>'
        - define username '<player.name>'
        }
      }
    - event "votifier vote" 'context:username|%username%|player|%player%|service|%service%' player:%player%
    - queue stop






View History