Date: 2014/05/08 13:02:16 UTC-07:00
Type: Denizen 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
Fishing:
type: assignment
debug: false
interact scripts:
- 10 FishQuest
FishQuest:
type: interact
steps:
getQuest:
click trigger:
script:
# uncomment these next 2 lines to reset things
- flag player fishing:!
- ^listen cancel "id:Fishing Listener"
- if <player.flag[fishing]> == null
{
- chat "So, you like to fish?"
- wait 3
}
else
{
- if <player.flag[fishing].asint> == 0
{
- chat "<player.name>, it would appear that you have not caught any fish yet."
- if <player.inventory.contains[346]> || <player.item_in_hand.slot.contains[346]>
{
- chat "It looks like you have a fishing pole, and are all ready to catch some fish."
}
else
{
- chat "I see you do not have a fishing <red>pole<green> on you. Just ask if you need one."
}
}
else
{
- chat "You have caught a total of <player.flag[fishing].asint> fish! Well done!"
}
}
chat trigger:
1:
trigger: /Yes/, I love to fish.
script:
- flag player fishing:0
- listen item 'id:Fishing Listener' type:fish item:349 qty:1 'script:FishCheck'
- if <player.inventory.contains[346]>
{
- chat "It looks like you have a fishing pole, and are all ready to catch some fish."
}
else
{
- chat "I see you do not have a fishing <red>pole<green> on you. Just ask if you need one."
}
2:
trigger: /No/, I hate fishing.
script:
- chat "Fishing is such a waste of time, isn't it."
3:
trigger: Fishing /pole/.
script:
- if <player.inventory.contains[346]>
{
- chat "You already have a fishing pole."
}
else
{
- give item 346 qty 1
}
proximity trigger:
exit:
script:
- chat "You have left my docks. Any fishing you do elsewhere will not count."
FishCheck:
type: task
script:
- flag player fishing:++
- chat "Yay! You caught a fish!"
# Will have to see if we have to re-trigger listening again
- listen item 'id:Fishing Listener' type:fish item:349 qty:1 'script:FishCheck'