Paste #4394: Untitled Paste

Date: 2014/05/16 14:10:03 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


FishWarden:
  Type: Assignment
  Scripts:
  - 1 FishQuest
  - 2 FishContest

FishQuest:
  Type: Interact
  Steps:
    1:
      Click Trigger:
        Script:
        - if <player.flag[fishQuestStart]> {
          - narrate "Let's see what you have for me"

          } else {
          - chat "Fishing Contest is closed to noobs like you. You'll need to bring me 5 of each type of fish and have at least 50 Fishing to get in here!"
          - flag fishQuestStart
          }

FishingQuestCheck:
  Type: Task
  Script:
    - if <player.mcmmo.level[Fishing]> > 49 && !<player.flag[gotFishLevel]> {
      - flag gotFishLevel
      - narrate "I see that you're skilled enough... Good Work"
      }

    - if <player.inventory.qty[349]> > 4 && !<player.flag[gotFish]> {
      - take 349 qty:5
      - flag gotFish
      - narrate "I see you brought me the fish I needed"
      }

    - if <player.inventory.qty[349:1]> > 4 && !<player.flag[gotSalmon]> {
      - take 349:1 qty:5
      - flag gotSalmon
      - narrate "I see you brought me the salmon I needed"
      }

    - if <player.inventory.qty[349:2]> > 4 && !<player.flag[gotClown]> {
      - take 349:2 qty:5
      - flag gotClown
      - narrate "I see you've brought me the clown fish I needed"
      }

    - if <player.inventory.qty[349:3]> > 4 && !<player.flag[gotPuffer]> {
      - take 349:3 qty:5
      - flag gotPuffer
      - narrate "I see you've brought me the pufferfish I needed"
      }
    - run script:FishingQuestFinalCheck

FishingQuestFinalCheck:
  Type: Task
  Script:
    - if <player.flag[gotPuffer]> && <player.flag[gotFish]> && <player.flag[gotClown]> && <player.flag[gotSalmon]> && <player.flag[gotFishLevel]> {
      - chat "You've got everything required! Good work!"
      - run script:FishQuestEnd

      } else {

        - narrate "I still need..."

        if !<player.flag[gotFishLevel]> {
          - narrate "you to get your fishing skill up... You'll need at least 50"
          }

        if !<player.flag[gotFish]> {
          - narrate "5 regular fish"
          }

        if !<player.flag[gotSalmon]> {
          - narrate "5 salmon"
          }

        if !<player.flag[gotClown]> {
          - narrate "5 clownfish"
          }

        if !<player.flag[gotPuffer]> {
          - narrate "5 pufferfish"
          }

      }

FishQuestEnd:
  Type: Task
  Script:
    - flag gotSalmon:!
    - flag gotFish:!
    - flag gotClown:!
    - flag gotPuffer:!
    - flag gotFishLevel:!
    - flag fishQuestStart:!
    - flag fishQuestDone
    - narrate "<&a><&l>You've completed the fishing contest quest!"
    - give money qty:5000
    - narrate "<&a><&l>You've received $5,000 foodstamps!"
    - narrate "<&a><&l>You now have access to the fishing contest!"

FishContest:
  Type: Interact
  Requirements:
    Mode: All
    List:
    - flagged fishQuestDone
  Steps:
    1:
      - if <player.flag[fishingContestStart]> {
        - chat "What are you waiting for you only have <player.flag[fishingContestStart].expiration.formatted> left!"

        } else if <player.flag[fishingContestEnd]> {
        - chat "Let's weight that fish of yours!"
        - run script:FishWeigher

        } else {
        - chat "Welcome to the fishing contest! The rules are simple you have 60 seconds to catch a fish! Good luck"
        - flag fishingContestStart duration:60s
        }