Can someone edit this lua?
What I need is;
No Pickup for Items ( inv_np= {xx,xx,xx,xx} ??? )
Save System --OPTIONAL--
CODE:
Spoiler
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
------------------------------------------------------------------ ------------ Inventory script by Joni And Friends ---------------- ------------------------------------------------------------------ ------------------------------------------------------------------ function initArray(m) local array = {} for i = 1, m do array[i]=0 end return array end c="\169" inv_wpn=initArray(32) inv_wpn_many=initArray(32) inv_item=initArray(32) inv_item_many=initArray(32) max_inv=20 ----- maximum item on inventory function inv_reset(id) inv_wpn[id]={} inv_wpn_many[id]={} inv_item[id]={} inv_item_many[id]={} for g=1,max_inv do inv_wpn[id][g]=0 inv_wpn_many[id][g]=0 inv_item[id][g]=0 inv_item_many[id][g]=0 end end moreitem={ {name="food", effect=function(id) parse("sethealth "..id.." "..player(id,"health")+10) end}; } function wpn_refresh(id) z={} b={} for g=1,max_inv do if inv_wpn_many[id][g]>0 then z[g]=inv_wpn[id][g] b[g]=inv_wpn_many[id][g] inv_wpn[id][g]=0 inv_wpn_many[id][g]=0 set_wpn_inv(id,z[g],b[g]) end end end function item_refresh(id) z={} b={} for g=1,max_inv do if inv_item_many[id][g]>0 then z[g]=inv_item[id][g] b[g]=inv_item_many[id][g] inv_item[id][g]=0 inv_item_many[id][g]=0 set_item_inv(id,z[g],b[g]) end end end function InvMenu(id,page) for g=1,max_inv do if inv_wpn_many[id][g]<1 then inv_wpn[id][g]=0 end if inv_item_many[id][g]<1 then inv_item[id][g]=0 end end item_refresh(id) wpn_refresh(id) local page=page or 1 local pages=math.ceil(max_inv/7) if page<1 then page=pages end if page>pages then page=1 end local m='Inventory | Page '..page for i=7*page-6, 7*page do if inv_wpn[id][i] and inv_wpn[id][i]>0 then m=m..','..itemtype(inv_wpn[id][i],'name')..'|'..inv_wpn_many[id][i]..' item(s)' elseif inv_item[id][i] and inv_item[id][i]>0 then m=m..','..moreitem[inv_item[id][i]].name..'|'..inv_item_many[id][i]..' item(s)' else m=m..',' end end if page == pages then m = m ..',First page|Page 1' else m = m ..',Next|Page '..(page+1)..'' end if page == 1 then m = m ..',Last page|Page '..pages..'' else m = m ..',Previous|Page '..(page-1)..'' end menu(id, m) end function set_wpn_inv(id,a,b) for g=1,max_inv do if inv_wpn[id][g]<1 and inv_item[id][g]<1 then inv_wpn[id][g]=a inv_wpn_many[id][g]=b return 1 end if inv_wpn[id][g]==a then inv_wpn_many[id][g]=inv_wpn_many[id][g]+b return 1 end end end function set_item_inv(id,a,b) for g=1,max_inv do if inv_item[id][g]<1 and inv_wpn[id][g]<1 then inv_item[id][g]=a inv_item_many[id][g]=b return 1 end if inv_item[id][g]==a then inv_item_many[id][g]=inv_item_many[id][g]+b return 1 end end end addhook("join","_join") function _join(id) inv_reset(id) end addhook("menu", "_menu") function _menu(id, title, button) if title:sub(1,17)=="Inventory | Page " then local page=tonumber(title:sub(18)) if button==8 then InvMenu(id,page+1,code) end if button==9 then InvMenu(id,page-1,code) end if button==0 then return 1 end if button<=7 then if inv_wpn[id][(page-1)*7+ button]>0 then parse("equip "..id.." "..inv_wpn[id][(page-1)*7+ button]) inv_wpn_many[id][(page-1)*7+ button]=inv_wpn_many[id][(page-1)*7+ button]-1 msg2(id,"[Server] "..c.."000555000You has taking "..itemtype(inv_wpn[id][(page-1)*7+ button],'name')) elseif inv_item[id][(page-1)*7+ button]>0 then moreitem[inv_item[id][(page-1)*7+ button]].effect(id) inv_item_many[id][(page-1)*7+ button]=inv_item_many[id][(page-1)*7+ button]-1 msg2(id,"[Server] "..c.."000555000You has taking "..moreitem[inv_item[id][(page-1)*7+ button]].name) end end end end addhook("serveraction","_serveraction") function _serveraction(id,a) if a==3 then InvMenu(id,1) end end addhook("walkover","_walkover") function _walkover(id, od, a) if od>0 then parse("removeitem "..a) set_wpn_inv(id,od,1) return 1 end 	 end
THANKS!