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





theDadmin


By thedadmin
Created: 2016/11/20 05:17:33 UTC-08:00 (8 years and 34 days ago)
Edited: 2016/11/20 05:27:33 UTC-08:00 (8 years and 34 days ago)
Likes: 0

Denizen Version: 1.15 (Build 75)
Script Version: Script Version
Description:

An improved quest journal system designed to work with the Quests plugin! This does NOT require the Quests plugin and the instructions within the script will show you how to change it (literally edit two lines).

The purpose of this system is to provide better, more detailed information about quests that players can access via a GUI menu system that is unique to each player. It also allows players to track their overall progress.

This system is also highly compatible with the Quest Reputation system found here:
http://one.denizenscript.com/denizen/repo/entry/119
Instructional Video:
https://www.youtube.com/watch?v=MWgeukJGv7c&feature=youtu.be


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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
12600

#######################################
#Quest Log System
#Author: theDadmin
#Version 1.0
#Instructions: A detailed video can be found here. Players access their quest log using /questlog https://www.youtube.com/watch?v=MWgeukJGv7c&feature=youtu.be 
#Using this system is fairly easy and can be applied to existing quests. It was also designed to work with the Quests Plugin. If you do not use the quests plugin, simply change line 11 from 
#    - narrate "Completed Quests: <player.quests.completed.add[<player.flag.completedquests>].round> Quest Points: <player.quests.points>"
#To:
#    - narrate "Completed Quests: <player.flag[completedquests].round> Quest Points: <player.flag[questpoints].round>"
#
#This script is stand alone and only requires certain commands be added to quests. You will need to, at the completion of a quest flag a player with the completedquests flag +1. You will need to do this as well for quest points. You will also need to make books and bookitem scripts and include an event in worldscripts to allow the books to be read. Below are examples of these scripts for copy and paste purposes.
#Start of quest:
#  - inventory add d:<player>questjournal o:examplebookitem
#
#At end of quest:
#  - inventory add d:<player>completedquests o:examplebookitem
#  - inventory remove d:<player>questjournal o:examplebookitem
#  - flag player completedquests:+:1 (This is only needed if this is a scripted quest)
#  - flag player questpoints:+:(number awarded) (This is only needed if this is a scripted quest)
#
#Example Book
#rolandreagentsb:
#  type: book
#  author: Active Quest
#  title: Roland's Reagents
#  signed: yes
#  text:
#  - "I have been asked by Roland to retrieve the following items:<n>10 Blaze Rods<n>32 Glowstone Dust<n>64 Netherwart."
#Example Book Item 
#
#rolandreagentsbi:
#  type: item
#  material: book
#  display name: Roland's Reagents
#  lore:
#  - "Click here to bring up quest information"
#
#You may wish to have two different books for when a quest is active and completed. In this case you will also need a second book item for the completed quest book with a cooresponding event.
#
#Example Event: (This can be added to ANY existing world script)
#    on player clicks examplebookitem in inventory:
#    - inventory close
#    - define held <player.item_in_hand>
#    - adjust <player> item_in_hand:examplebook
#    - adjust <player> open_book
#    - adjust <player> item_in_hand:<def[held]>
#    - queue clear
#
#IF YOU ARE USING THE QUESTS PLUGIN: You will need to create task scripts and a standing world script for the quests plugin to call. I detailed explanation of this can be found in the video posted above.
#######################################
questlogworld:
  type: world
  events:
    on player left clicks queststatsi in inventory:
    - inventory close
    - narrate "Completed Quests<player.quests.completed.add[<player.flag[completedquests]>].round> Quest Points<player.quests.points>"
    - wait 3
    - inventory open d:in@<player>completedquests
    - queue clear
    on player left clicks completedquestsi in inventory:
      - inventory close
      - inventory open d:in@<player>completedquests
    on player left clicks activequestsi in inventory:
      - inventory close
      - inventory open d:in@<player>questjournal
    on player logs in:
      - if <player.has_flag[questjournal]> == false {
        - note in@QuestJournalMenu as:<player>questjournal
        - note in@questcompletemenu as:<player>completedquests
        - flag player questjournal
        }
questlog:
  type: command
  name: questlog
  usage: /questlog
  script:
  - if <player.has_flag[questjournal]> == false {
    - note in@QuestJournalMenu as:<player>questjournal
    - note in@questcompletemenu as:<player>completedquests
    - flag player questjournal
    }
  - inventory open d:in@<player>questjournal
QuestCompleteMenu:
  type: inventory
  title: Completed Quests
  size: 45
  slots:
  - "[] [] [] [] [] [] [] [] []"
  - "[] [] [] [] [] [] [] [] []"
  - "[] [] [] [] [] [] [] [] []"
  - "[] [] [] [] [] [] [] [] []"
  - "[] [] [] [] [] [] [] [i@queststatsi] [i@activequestsi]"
QuestJournalMenu:
  type: inventory
  title: Active Quests
  size: 45
  slots:
  - "[] [] [] [] [] [] [] [] []"
  - "[] [] [] [] [] [] [] [] []"
  - "[] [] [] [] [] [] [] [] []"
  - "[] [] [] [] [] [] [] [] []"
  - "[] [] [] [] [] [] [] [] [i@completedquestsi]"

completedquestsi:
  type: item
  material: book
  display name: Quest Stats
  lore:
  - "Click here to view your completed quests."
queststatsi:
  type: item
  material: book
  display name: Quest Stats
  lore:
  - "Click here to view your quest stats."

activequestsi:
  type: item
  material: book
  display name: Active Quests.
  lore:
  - "Click here to access information."
  - "about your active quests."







View History