Paste #28977: Edit of P#28976 - Edit of P#28975 - Edit of P#28974 - Untitled Paste

Date: 2016/01/23 12:00:25 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


testing:
  type: world
  debug: false
  events:
    on server loads:
    - wait 5t
    - announce "Server Start" to_console

    on player enters plains:
    - announce "Player enters <context.old_biome>" to_console

    on player exits plains:
    - announce "Player exits <context.new_biome>" to_console

    on player places block:
    - announce "Placing <context.new_material> in <context.old_material>" to_console

    on item crafted in testing:
    - announce "<magenta><&co> <context.item>" to_console

    on item crafted:
    - announce "<red>ping<&co> <context.item>" to_console

    on snowball hits block:
    - announce "mat <context.location.material>" to_console

    on player right clicks pig:
    - announce "pig<&co> <context.entity>"
    - determine cancelled

    on player right clicks horse:
    - announce "horse<&co> <context.entity>"
    - determine cancelled

    on player chats:
    - if <context.message.starts_with[~].not> queue stop
    - define server <bungee.server.name>
    - define player <player.name.display>
    - define msg <context.message.replace[firstregex:^~]>
    - bungee all {
      - announce "<&rb><blue>%server%<white><&lb><&rb>%player%<&lb> %msg%"
      }

stone_boner:
  type: item
  material: i@stone
  display name: stone boner

test_sword:
  type: item
  material: i@diamond_sword
  display name: Pickle Sword
  lore:
  - "Sword of Pickles"

###################
Drwal:
    type:  assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - 3 zniszcz_drewno

cchat:
    type:  format
    format:  "<&5>[Ncraft.eu]<&9><npc.name><&6>=><&2><text>"

zniszcz_drewno:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if <player.has_flag[npc_engaged]> || queue clear
                - if <player.has_flag[zniszcz_drewno_quest_cooldown]> {
                    - narrate "<red>Mozesz powtorzyc ten quest za <player.flag[zniszcz_drewno_quest_cooldown].expiration.formatted>"
                    - queue clear
                    }
                - if <player.has_flag[zniszcz_drewno_quest]> {
                  - zap 2
                  - queue clear
                  }
                - flag player npc_engaged
                - engage
                - narrate format:cchat "Witaj chcialbys zaliczyc ten quest ?"
                - narrate "                <&5>[Odpisz <green>Tak <&5>lub <red>Nie]"
                - disengage
                - flag player npc_engaged:!
            chat trigger:
                1:
                    trigger: /Tak/. Co mam zrobic ?
                    script:
                    - if <player.has_flag[zniszcz_drewno_quest_cooldown]> {
                        - queue clear
                        }
                    - if <player.has_flag[zniszcz_drewno_quest]> {
                      - zap 2
                      - queue clear
                      }
                    - engage
                    - narrate format:cchat "Wiec tak wiesniacy nie maja czym palic."
                    - narrate format:cchat "Aby zaliczyc ten quest musisz sciac i przyniesc drewno dla wiesniakow"
                    - narrate "                <blue>[Zetnij i przynies 40 drewna]"
                    - flag player zniszcz_drewno_quest
                    - flag player zniszcz_drewno_quest_count:0
                    - disengage
                    - zap 2
                2:
                    trigger: /Nie/. Mam teraz wazniejsze sprawy.
                    script:
                    - if <player.has_flag[zniszcz_drewno_quest]> queue clear
                    - random {
                        - narrate format:cchat "Trudno"
                        - narrate format:cchat "Bywa"
                        - narrate format:cchat "Spodziewalem sie innej odpowiedzi"
                        - narrate format:cchat "Liczylem na ciebie"
                        - narrate format:cchat "Zawiodlem sie na tobie"
                        - narrate format:cchat "Nie spodziewalem sie tego po tobie"
                        - narrate format:cchat "szkoda"
                        - narrate format:cchat "Liczylem na inna odpowiedz"
                        - narrate format:cchat "myslalem ze znajdziesz dla mnie troche czasu"
                        }
        2:
            click trigger:
                script:
                - if <player.has_flag[npc_engaged]> || queue clear
                - if <player.has_flag[zniszcz_drewno_quest_cooldown]> {
                    - narrate "<red>Mozesz powtorzyc ten quest za <player.flag[zniszcz_drewno_quest_cooldown].expiration.formatted>"
                    - queue clear
                    }
                - if <player.has_flag[zniszcz_drewno_quest].not> {
                  - zap 1
                  - queue clear
                  }
                - flag player npc_engaged
                - engage
                - if <player.has_flag[zniszcz_drewno_quest_count]> >= 3 {
                    - narrate format:cchat "Dobra robota! Oto twoja nagroda!"
                    - give money qty:300
                    - flag player zniszcz_drewno_quest_count:!
                    - flag player zniszcz_drewno_quest:!
                    - flag player zniszcz_drewno_quest_cooldown duration:20s
                    - zap step:1
                    }
                    else {
                    - narrate format:cchat "Witaj chcialbys zaliczyc ten quest ?"
                    - narrate "                <&5>[Odpisz <green>Tak <&5>lub <red>Nie]"
                    }
                - disengage
                - flag player npc_engaged:!

drewnoquest_drewno_world:
    type: world
    events:
        on player breaks birch_log:
        - if !<player.has_flag[zniszcz_drewno_quest]> queue clear
        - flag player zniszcz_drewno_quest_count:++
        - if <player.has_flag[zniszcz_drewno_quest_count]> >= 3 {
            - narrate "                <&2>[Wroc z drewnem do Drwala]"
            - flag player zniszcz_drewno_quest:!
            }