-
Notifications
You must be signed in to change notification settings - Fork 4
/
GM_Menu_Players.lua
367 lines (289 loc) · 8.51 KB
/
GM_Menu_Players.lua
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
--[[
local enabled = false
local command = "gmmenu"
local function Hello(event, player)
local level = player:GetLevel()
player:GossipClearMenu()
player:GossipMenuAddItem(0, "Give Gold", 0, 1, true, "You want some gold?")
player:GossipMenuAddItem(0, "Spawn NPC (20 Seconds) (Zombie = 1501)", 0, 2, true, "What is the NPC ID?")
player:GossipMenuAddItem(0, "Add Item", 0, 22, true, "What is the Item ID?")
player:GossipMenuAddItem(0, "Set Level", 0, 3, true, "What level?")
if level < 80 then
player:GossipMenuAddItem(0, "Give XP", 0, 4, true, "How Much XP?")
end
player:GossipMenuAddItem(0, "Add Quest by ID", 0, 23, true, "Quest ID?")
player:GossipMenuAddItem(0, "Complete Quest by ID", 0, 90, true, "Quest ID?")
player:GossipMenuAddItem(0, "Summon your Class Trainer", 0, 5)
player:GossipMenuAddItem(0, "Learn Spell", 0, 26, true, "What is the Spell ID?")
player:GossipMenuAddItem(0, "Summon Taxi", 0, 20)
player:GossipMenuAddItem(0, "Max All Skills", 0, 24)
if player:HasAura( 15007 ) then
player:GossipMenuAddItem(0, "Remove Resurrection Sickness", 0, 25)
end
player:GossipMenuAddItem(0, "Teleport to Starting Areas", 0, 6)
player:GossipMenuAddItem(0, "Set Hearthstone", 0, 91)
player:GossipMenuAddItem(0, "Set movement speed", 0, 92, true, "How fast?")
if player:HasSpellCooldown( 8690 ) then
player:GossipMenuAddItem(0, "Reset Hearthstone Cooldown", 0, 93)
end
player:GossipMenuAddItem(0, "Reset ALL Cooldowns", 0, 21)
player:GossipMenuAddItem(0, "[Exit Menu]", 0, 99)
player:GossipSendMenu(1, player, 1979)
end
local function PlrOnSelect(event, player, _, sender, intid, code)
player:GossipClearMenu()
local map = player:GetMap()
local mapID = map:GetMapId()
local x = player:GetX()
local y = player:GetY()
local z = player:GetZ()
local o = player:GetO()
local areaId = map:GetAreaId( x, y, z )
local level = player:GetLevel()
local currentgold = player:GetCoinage()
local class = player:GetClass()
local faction = player:GetFaction()
local gold = 10000
local Target = player:GetSelectedPlayer()
local typeID
if Target == nil then
Target = player:GetSelection()
end
if Target ~= nil then
typeID = Target:GetTypeId()
end
if(intid== 1) then
if code ~= nil then
local isnum = tonumber(code)
if typeID == 4 then
if isnum then
if isnum >= -214748 and isnum <= 214748 then
Target:ModifyMoney( gold*isnum )
else
if isnum <= -214748 then
player:SendAreaTriggerMessage("Value must be greater than -214748")
end
if isnum >= 214748 then
player:SendAreaTriggerMessage("Value must be less than 214748")
end
end
player:GossipComplete()
else
player:SendAreaTriggerMessage(""..tostring(code).." is not a number.")
player:GossipComplete()
end
else
player:SendAreaTriggerMessage("Target is not a Player!!")
end
end
player:GossipComplete()
end
if(intid== 2) then
local spawnedCreature
local spawnedCreature2
local spawnedCreature3
local spawnedCreature4
local spawnlevel = level
spawnedCreature = player:SpawnCreature( code, x+1, y+1, z+0.5, o-3.5, 1, 20 )
spawnedCreature:SetLevel( spawnlevel )
spawnedCreature2 = player:SpawnCreature( code, x+2, y+2, z+0.5, o-3.5, 1, 20 )
spawnedCreature2:SetLevel( spawnlevel )
spawnedCreature3 = player:SpawnCreature( code, x+3, y+3, z+0.5, o-3.5, 1, 20 )
spawnedCreature3:SetLevel( spawnlevel )
spawnedCreature4 = player:SpawnCreature( code, x+4, y+4, z+0.5, o-3.5, 1, 20 )
spawnedCreature4:SetLevel( spawnlevel )
player:GossipComplete()
end
if (intid== 3) then
Target:SetLevel( code )
player:GossipComplete()
end
if (intid== 4) then
if typeID == 4 then
Target:GiveXP( code )
else
player:SendAreaTriggerMessage("Target is not a Player!!")
end
player:GossipComplete()
end
if(intid== 5) then
if class == 1 then
player:SpawnCreature( 26332, x+1, y+1, z+0.5, o-3.5, 1, 120 )
end
if class == 2 then
player:SpawnCreature( 26327, x+1, y+1, z+0.5, o-3.5, 1, 120 )
end
if class == 3 then
player:SpawnCreature( 26325, x+1, y+1, z+0.5, o-3.5, 1, 120 )
end
if class == 4 then
player:SpawnCreature( 26329, x+1, y+1, z+0.5, o-3.5, 1, 120 )
end
if class == 5 then
player:SpawnCreature( 26328, x+1, y+1, z+0.5, o-3.5, 1, 120 )
end
if class == 6 then
player:SpawnCreature( 33251, x+1, y+1, z+0.5, o-3.5, 1, 120 )
end
if class == 7 then
player:SpawnCreature( 26330, x+1, y+1, z+0.5, o-3.5, 1, 120 )
end
if class == 8 then
player:SpawnCreature( 26326, x+1, y+1, z+0.5, o-3.5, 1, 120 )
end
if class == 9 then
player:SpawnCreature( 26331, x+1, y+1, z+0.5, o-3.5, 1, 120 )
end
if class == 11 then
player:SpawnCreature( 26324, x+1, y+1, z+0.5, o-3.5, 1, 120 )
end
end
if(intid== 6) then
if player:IsHorde() then
player:GossipMenuAddItem(0, "Tauren Starting Area", 0, 7)
player:GossipMenuAddItem(0, "Undead Starting Area", 0, 8)
player:GossipMenuAddItem(0, "Bloode Elf Starting Area", 0, 9)
player:GossipMenuAddItem(0, "Orc/Troll Starting Area", 0, 10)
else
player:GossipMenuAddItem(0, "Gnome/Dwarf Starting Area", 0, 11)
player:GossipMenuAddItem(0, "Night Elf Starting Area", 0, 12)
player:GossipMenuAddItem(0, "Draenei Starting Area", 0, 13)
player:GossipMenuAddItem(0, "Human Starting Area", 0, 14)
end
player:GossipMenuAddItem(0, "Back", 0, 15)
player:GossipSendMenu(1, player, 1979)
end
if(intid == 7) then
player:Teleport( 1, -2921, -244, 53.33, 4.62 )
player:GossipComplete()
end
if(intid == 8) then
player:Teleport( 0, 1662, 1663, 141.89, 6.26 )
player:GossipComplete()
end
if(intid == 9) then
player:Teleport( 530, 10345, -6372, 35.89, 1.40 )
player:GossipComplete()
end
if(intid == 10) then
player:Teleport( 1, -601, -4266, 39, 1.79 )
player:GossipComplete()
end
if(intid == 11) then
player:Teleport( 0, -6240, 342, 383.22, 5.36 )
player:GossipComplete()
end
if(intid == 12) then
player:Teleport( 1, 10311.30, 831.46, 1326.41, 5.48 )
player:GossipComplete()
end
if(intid == 13) then
player:Teleport( 530, -3963, -13934, 100.26, 1.64 )
player:GossipComplete()
end
if(intid == 14) then
player:Teleport( 0, -8950, -132.50, 83.53, 0 )
player:GossipComplete()
end
if(intid == 15) then
Hello(event, player)
return false
end
if(intid == 20) then
player:SpawnCreature( 37888, x+1, y+1, z+0.5, o-3.5, 1, 20 )
player:GossipComplete()
end
if(intid == 21) then
player:ResetAllCooldowns()
player:GossipComplete()
end
if(intid == 22) then
if typeID == 4 then
Target:AddItem( code, 1 )
else
player:SendAreaTriggerMessage("Target is not a Player!!")
end
player:GossipComplete()
end
if(intid == 23) then
if typeID == 4 then
Target:AddQuest( code )
else
player:SendAreaTriggerMessage("Target is not a Player!!")
end
player:GossipComplete()
end
if(intid == 24) then
if typeID == 4 then
Target:AdvanceSkillsToMax()
else
player:SendAreaTriggerMessage("Target is not a Player!!")
end
player:GossipComplete()
end
if(intid == 25) then
if typeID == 4 then
Target:RemoveAura( 15007 )
else
player:SendAreaTriggerMessage("Target is not a Player!!")
end
player:GossipComplete()
end
if(intid == 26) then
if typeID == 4 then
Target:LearnSpell( code )
else
player:SendAreaTriggerMessage("Target is not a Player!!")
end
player:GossipComplete()
end
if(intid == 90) then
if typeID == 4 then
Target:CompleteQuest( code )
else
player:SendAreaTriggerMessage("Target is not a Player!!")
end
player:GossipComplete()
end
if(intid == 91) then
if typeID == 4 then
player:SetBindPoint( x, y, z, map:GetMapId(), areaId )
player:SendAreaTriggerMessage("This is your new home location!")
player:ResetSpellCooldown( 8690, true ) --Hearthstone return spell ID 8690
else
player:SendAreaTriggerMessage("Target is not a Player!!")
end
player:GossipComplete()
end
if(intid == 92) then
if typeID == 4 then
Target:SetSpeed( 1, code, true )
else
player:SendAreaTriggerMessage("Target is not a Player!!")
end
player:GossipComplete()
end
if(intid == 93) then
if typeID == 4 then
player:ResetSpellCooldown( 8690, true ) --Hearthstone return spell ID 8690
else
player:SendAreaTriggerMessage("Target is not a Player!!")
end
player:GossipComplete()
end
if(intid == 99) then
player:SendAreaTriggerMessage("Good Bye!")
player:GossipComplete()
end
end
local function PlrMenu(event, player, message)
if (message:lower() == command) then
if enabled or (player:GetGMRank() > 2) then
Hello(event, player)
return false
end
end
end
RegisterPlayerEvent(42, PlrMenu)
RegisterPlayerGossipEvent(1979, 2, PlrOnSelect)
]]