Paste #3487: Untitled Paste

Date: 2014/04/14 19:21:33 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"add-rep":
    type: task
    debug: false
    script:
    - FLAG rep-%1%:+:%2%
    - NARRATE "<green>You gain %2% reputation for %1%!<reset> You now have <player.flag[rep-%1%].as_int> reputation for %1%!"

"take-rep":
    type: task
    debug: false
    script:
    - FLAG rep-%1%:-:%2%
    - NARRATE "<green>You gain %2% reputation for %1%!<reset> You now have <player.flag[rep-%1%].as_int> reputation for %1%!"


"reputation-command":
    type: world
    events:
        on rep command:
          - DEFINE repname <context.args.get[1]>
          - IF %repname% == null {
            - NARRATE "<red>Must specify a group of people."
             }
            ELSE {
                - IF <player.flag[rep-%repname%]> == null {
                    - NARRATE "<red>You have no rep for those people."
                 }
              ELSE {
                - NARRATE "<green>You have <player.flag[rep-%repname%].as_int> reputation for %repname%"  } }
          - DETERMINE FULFILLED