Date: 2014/09/14 04:28:04 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
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
on player right clicks with i@selling bag:
- announce "Right Click"
- define is_shopping false
- foreach <global.flag[playerstore].escape_contents> {
- if <player.location.is_within[<def[value].unescaped>]> {
- announce "Shopping is true!"
- define is_shopping true
- foreach stop
}
}
- if !%is_shopping% {
- Announce "Shopping Bag Clear"
- inventory clear d:in@<player.name>_selling_bag
- narrate '<dark_red>You are not in a shop right now!'
- take 'i@selling bag'
- determine cancelled
}
Walktrough:
################################################
STEP 1
What I did is:
- type sell
- selling bag dropped
- right click with selling bag.
- got narrated: "Right Click" and "Shopping is True!"
Conclusion:
- if <player.location.is_within[<def[value].unescaped>]> This is the cause.
###############################################
STEP 2
What I did is:
- right click with selling bag while debugging:
- Debug: http://mcmonkey.org/paste/9627
- moved outside shop
- found out this is not the issue.
Conclusion:
This is to determine that the player is in the shop as it seems.
Shopping bag clear is removal bag.
##############################################
STEP 3
What I did is:
- say sell while debugging, right click selling bag
- debug: http://mcmonkey.org/paste/9628
Conclusion:
Can't find any clear action?
#############################################
STEP 4
What I did is:
- click storekeeper with selling bag with item: Quartz Block ( 155:1 )
- Debug: http://mcmonkey.org/paste/9630
Conclusion: Found possibile Error! It seems to have saved a Diamond Pickaxe?
############################################
STEP 5
What I did is:
- reproduce step 4 with longer debug.
- click storekeeper with selling bag with item: Quartz Block ( 155:1 )
- debug: http://mcmonkey.org/paste/9632
Debug: ( I see alot of Null's, is it supposed to be this way? )
13:18:59 [INFO] +- Executing dCommand: IF/p@NLBlackEagle ---------+
13:18:59 [INFO] Filled definition %is_shopping% with 'true'.
13:18:59 [INFO] Filled definition %is_shopping% with 'true'.
13:18:59 [INFO] Filled definition %is_shopping% with 'true'.
13:18:59 [INFO] Filled tag <player.name> with 'NLBlackEagle'.
13:18:59 [INFO] Filled tag <in@NLBlackEagle_shopping_bag||null> with
'in@nlblackeagle_shopping_bag'.
13:18:59 [INFO] Comparable 1: Logic='NEGATIVE',
Comparable='Boolean(true)', Operator='EQUALS',
ComparedTo='Boolean(true)' --> OUTCOME='false'
13:18:59 [INFO] +- Executing dCommand: IF/p@NLBlackEagle ---------+
13:18:59 [INFO] Filled definition %is_shopping% with 'true'.
13:18:59 [INFO] Filled definition %is_shopping% with 'true'.
13:18:59 [INFO] Filled tag <player.name> with 'NLBlackEagle'.
13:18:59 [INFO] Filled tag <in@NLBlackEagle_shopping_bag||null> with
'in@nlblackeagle_shopping_bag'.
13:18:59 [INFO] Comparable 1:
Comparable='Element(in@nlblackeagle_shopping_bag)',
Operator='EQUALS', ComparedTo='Element(null)' -->
OUTCOME='false'
13:18:59 [INFO] Comparable 2: Comparable='Boolean(true)',
Operator='EQUALS', ComparedTo='Boolean(true)' -->
OUTCOME='true'
Conclusion:
else if <in@<player.name>_shopping_bag||null> == null && %is_shopping% {
Null?