View difference between Paste ID: dZMAN4hq and vYXUgQnt
SHOW: | | - or go back to the newest paste.
1
------------------------------------------------------------------
2
-- Name: No buffing                                             --
3
-- Description: It stops players from                           --
4
--              buffing friendly targets.                       --
5
-- Part of the Iron Man Challenge Scripts                       --
6-
-- Developed by Thunderofnl 2014                               --
6+
-- Copyright Thunderofnl 2014                               --
7
------------------------------------------------------------------
8
require "functions"
9
10
local function OnSpellCast(event, player, spell, skipCheck)
11
    local target = spell:GetTarget()
12
    local prohibitedSpells = {
13
                    -- Racials
14
15
16
                    -- Death Knight
17
                    57330, -- Horn of Winter R1
18
                    57623, -- Horn of Winter R2
19
                    61999, -- Raise Ally
20
                    12299, -- Toughness R1
21
                    12761, -- Toughness R2
22
                    12762, -- Toughness R3
23
                    12763, -- Toughness R4
24
                    12764, -- Toughness R5
25
26
                    -- Druid
27
                    8946, -- Cure Poison
28
                    2893, -- Abolish Poison
29
                    29166, -- Innervate
30
                    467, -- Thorns R1
31
                    782, -- Thorns R2
32
                    1075, -- Thorns R3
33
                    8914, -- Thorns R4
34
                    9756, -- Thorns R5
35
                    9910, -- Thorns R6
36
                    26992, -- Thorns R7
37
                    53307, -- Thorns R8
38
                    21849, -- Gift of the Wild R1
39
                    21850, -- Gift of the Wild R2
40
                    26991, -- Gift of the Wild R3
41
                    48470, -- Gift of the Wild R4
42
                    5185, -- Healing Touch R1
43
                    5186, -- Healing Touch R2
44
                    5187, -- Healing Touch R3
45
                    5188, -- Healing Touch R4
46
                    5189, -- Healing Touch R5
47
                    6778, -- Healing Touch R6
48
                    8903, -- Healing Touch R7
49
                    9758, -- Healing Touch R8
50
                    9888, -- Healing Touch R9
51
                    9889, -- Healing Touch R10
52
                    25297, -- Healing Touch R11
53
                    26978, -- Healing Touch R12
54
                    26979, -- Healing Touch R13
55
                    48377, -- Healing Touch R14
56
                    48378, -- Healing Touch R15
57
                    33763, -- Lifebloom R1
58
                    48450, -- Lifebloom R2
59
                    48451, -- Lifebloom R3
60
                    1126, -- Mark of the Wild R1
61
                    5232, -- Mark of the Wild R2
62
                    6756, -- Mark of the Wild R3
63
                    5234, -- Mark of the Wild R4
64
                    8907, -- Mark of the Wild R5
65
                    9884, -- Mark of the Wild R6
66
                    9885, -- Mark of the Wild R7
67
                    26990, -- Mark of the Wild R8
68
                    48469, -- Mark of the Wild R9
69
                    50464, -- Nourish
70
                    20484, -- Rebirth R1
71
                    20739, -- Rebirth R2
72
                    20742, -- Rebirth R3
73
                    20747, -- Rebirth R4
74
                    20748, -- Rebirth R5
75
                    26994, -- Rebirth R6
76
                    48477, -- Rebirth R7
77
                    8936, -- Regrowth R1
78
                    8938, -- Regrowth R2
79
                    8939, -- Regrowth R3
80
                    8940, -- Regrowth R4
81
                    8941, -- Regrowth R5
82
                    9750, -- Regrowth R6
83
                    9856, -- Regrowth R7
84
                    9857, -- Regrowth R8
85
                    9858, -- Regrowth R9
86
                    26980, -- Regrowth R10
87
                    48442, -- Regrowth R11
88
                    48443, -- Regrowth R12
89
                    774, -- Rejuvenation R1
90
                    1058, -- Rejuvenation R2
91
                    1430, -- Rejuvenation R3
92
                    2090, -- Rejuvenation R4
93
                    2091, -- Rejuvenation R5
94
                    3627, -- Rejuvenation R6
95
                    8910, -- Rejuvenation R7
96
                    9839, -- Rejuvenation R8
97
                    9840, -- Rejuvenation R9
98
                    9841, -- Rejuvenation R10
99
                    25299, -- Rejuvenation R11
100
                    26981, -- Rejuvenation R12
101
                    26982, -- Rejuvenation R13
102
                    48440, -- Rejuvenation R14
103
                    48441, -- Rejuvenation R15
104
                    2782, -- Remove Curse
105
                    50769, -- Revive R1
106
                    50768, -- Revive R2
107
                    50767, -- Revive R3
108
                    50766, -- Revive R4
109
                    50765, -- Revive R5
110
                    50764, -- Revive R6
111
                    50763, -- Revive R7
112
                    48438, -- Wild Growth R1
113
                    53248, -- Wild Growth R2
114
                    53249, -- Wild Growth R3
115
                    53251, -- Wild Growth R4
116
                    18562, -- Swiftmend
117
                    740, -- Tranquility R1
118
                    8918, -- Tranquility R2
119
                    9862, -- Tranquility R3
120
                    9863, -- Tranquility R4
121
                    26983, -- Tranquility R5
122
                    48446, -- Tranquility R6
123
                    48447, -- Tranquility R7
124
125
                    -- Hunter
126
                    -- None
127
128
                    -- Mage
129
                    1008, -- Amplify Magic R1
130
                    8455, -- Amplify Magic R2
131
                    10169, -- Amplify Magic R3
132
                    10170, -- Amplify Magic R4
133
                    27130, -- Amplify Magic R5
134
                    33946, -- Amplify Magic R6
135
                    43017, -- Amplify Magic R7
136
                    23028, -- Arcane Brilliance R1
137
                    27127, -- Arcane Brilliance R2
138
                    43002, -- Arcane Brilliance R3
139
                    1459, -- Arcane Intellect R1
140
                    1460, -- Arcane Intellect R2
141
                    1461, -- Arcane Intellect R3
142
                    10156, -- Arcane Intellect R4
143
                    10157, -- Arcane Intellect R5
144
                    28126, -- Arcane Intellect R6
145
                    42995, -- Arcane Intellect R7
146
                    61316, -- Dalaran Brilliance R3
147
                    61024, -- Dalaran Intellect
148
                    604, -- Dampen Magic R1
149
                    8450, -- Dampen Magic R2
150
                    8451, -- Dampen Magic R3
151
                    10173, -- Dampen Magic R4
152
                    10174, -- Dampen Magic R5
153
                    33944, -- Dampen Magic R6
154
                    43015, -- Dampen Magic R7
155
                    54646, -- Focus Magic
156
                    54628, -- Focus Magic
157
                    130, -- Slow Fall
158
                    475, -- Remove Curse
159
160
                    -- Paladin
161
                    19742, -- Blessing of Wisdom R1
162
                    19850, -- Blessing of Wisdom R2
163
                    19852, -- Blessing of Wisdom R3
164
                    19853, -- Blessing of Wisdom R4
165
                    19854, -- Blessing of Wisdom R5
166
                    25290, -- Blessing of Wisdom R6
167
                    27142, -- Blessing of Wisdom R7
168
                    48935, -- Blessing of Wisdom R8
169
                    48936, -- Blessing of Wisdom R9
170
                    53563, -- Beacon of Light
171
                    4987, -- Cleanse
172
                    19750, -- Flash of Light R1
173
                    19939, -- Flash of Light R2
174
                    19940, -- Flash of Light R3
175
                    19941, -- Flash of Light R4
176
                    19942, -- Flash of Light R5
177
                    19943, -- Flash of Light R6
178
                    27137, -- Flash of Light R7
179
                    48784, -- Flash of Light R8
180
                    48785, -- Flash of Light R9
181
                    635, -- Holy Light R1
182
                    639, -- Holy Light R2
183
                    647, -- Holy Light R3
184
                    1026, -- Holy Light R4
185
                    1042, -- Holy Light R5
186
                    3472, -- Holy Light R6
187
                    10328, -- Holy Light R7
188
                    10329, -- Holy Light R8
189
                    25292, -- Holy Light R9
190
                    27135, -- Holy Light R10
191
                    27136, -- Holy Light R11
192
                    48781, -- Holy Light R12
193
                    48782, -- Holy Light R13
194
                    64891, -- Holy Mending
195
                    25914, -- Holy Shock R1
196
                    25913, -- Holy Shock R2
197
                    25903, -- Holy Shock R3
198
                    27175, -- Holy Shock R4
199
                    33074, -- Holy Shock R5
200
                    48820, -- Holy Shock R6
201
                    48821, -- Holy Shock R7
202
                    53601, -- Sacred Shield
203
                    1152, -- Purify
204
                    20217, -- Blessing of Kings
205
                    633, -- Lay on Hands R1
206
                    2800, -- Lay on Hands R2
207
                    10310, -- Lay on Hands R3
208
                    27154, -- Lay on Hands R4
209
                    48788, -- Lay on Hands R5
210
                    1044, -- Hand of Freedom
211
                    31789, -- Righteous Defence
212
                    19740, -- Blessing of Might R1
213
                    19834, -- Blessing of Might R2
214
                    19835, -- Blessing of Might R3
215
                    19836, -- Blessing of Might R4
216
                    19837, -- Blessing of Might R5
217
                    19838, -- Blessing of Might R6
218
                    25291, -- Blessing of Might R7
219
                    27140, -- Blessing of Might R8
220
                    48931, -- Blessing of Might R9
221
                    48932, -- Blessing of Might R10
222
223
                    -- Priest
224
                    14752, -- Divine Spirit R1
225
                    14818, -- Divine Spirit R2
226
                    14819, -- Divine Spirit R3
227
                    27841, -- Divine Spirit R4
228
                    25312, -- Divine Spirit R5
229
                    48073, -- Divine Spirit R6
230
                    527, -- Dispel Magic R1
231
                    988, -- Dispel Magic R2
232
                    33206, -- Pain Suppression
233
                    47666, -- Penance R1
234
                    52998, -- Penance R2
235
                    52999, -- Penance R3
236
                    53000, -- Penance R4
237
                    10060, -- Power Infusion
238
                    1243, -- Power Word: Fortitude R1
239
                    1244, -- Power Word: Fortitude R2
240
                    1245, -- Power Word: Fortitude R3
241
                    2791, -- Power Word: Fortitude R4
242
                    10937, -- Power Word: Fortitude R5
243
                    10938, -- Power Word: Fortitude R6
244
                    25389, -- Power Word: Fortitude R7
245
                    48161, -- Power Word: Fortitude R8
246
                    17, -- Power Word: Shield R1
247
                    592, -- Power Word: Shield R2
248
                    600, -- Power Word: Shield R3
249
                    3743, -- Power Word: Shield R4
250
                    6065, -- Power Word: Shield R5
251-
                    10898 -- Power Word: Shield R7
251+
252
                    10898, -- Power Word: Shield R7
253
                    19899, -- Power Word: Shield R8
254
                    10900, -- Power Word: Shield R9
255
                    10901, -- Power Word: Shield R10
256
                    25217, -- Power Word: Shield R11
257
                    25218, -- Power Word: Shield R12
258
                    48065, -- Power Word: Shield R13
259
                    48066, -- Power Word: Shield R14
260
                    552, -- Abolish Disease
261
                    32546, -- Binding Heal R1
262
                    48119, -- Binding Heal R2
263
                    48120, -- Binding Heal R3
264
                    528, -- Cure Disease
265
                    2061, -- Flash Heal R1
266
                    9472, -- Flash Heal R2
267
                    9473, -- Flash Heal R3
268
                    9474, -- Flash Heal R4
269
                    10915, -- Flash Heal R5
270
                    10916, -- Flash Heal R6
271
                    10917, -- Flash Heal R7
272
                    25233, -- Flash Heal R8
273
                    25235, -- Flash Heal R9
274
                    48070, -- Flash Heal R10
275
                    48071, -- Flash Heal R11
276
                    2060, -- Greater Heal R1
277
                    10963, -- Greater Heal R2
278
                    10964, -- Greater Heal R3
279
                    10965, -- Greater Heal R4
280
                    25314, -- Greater Heal R5
281
                    25210, -- Greater Heal R6
282
                    25213, -- Greater Heal R7
283
                    48062, -- Greater Heal R8
284
                    48063, -- Greater Heal R9
285
                    47788, -- Guardian Spirit
286
                    2054, -- Heal R1
287
                    2055, -- Heal R2
288
                    6063, -- Heal R3
289
                    6064, -- Heal R4
290
                    2050, -- Lesser Heal R1
291
                    2052, -- Lesser Heal R2
292
                    2053, -- Lesser Heal R3
293
                    596, -- Prayer of Healing R1
294
                    996, -- Prayer of Healing R2
295
                    10960, -- Prayer of Healing R3
296
                    10961, -- Prayer of Healing R4
297
                    25316, -- Prayer of Healing R5
298
                    25308, -- Prayer of Healing R6
299
                    48072, -- Prayer of Healing R7
300
                    139, -- Renew R1
301
                    6074, -- Renew R2
302
                    6075, -- Renew R3
303
                    6076, -- Renew R4
304
                    6077, -- Renew R5
305
                    6078, -- Renew R6
306
                    10927, -- Renew R7
307
                    10928, -- Renew R8
308
                    10929, -- Renew R9
309
                    25315, -- Renew R10
310
                    25221, -- Renew R11
311
                    25222, -- Renew R12
312
                    48067, -- Renew R13
313
                    48068, -- Renew R14
314
                    2006, -- Resurrection R1
315
                    2010, -- Resurrection R2
316
                    10880, -- Resurrection R3
317
                    10881, -- Resurrection R4
318
                    20770, -- Resurrection R5
319
                    25435, -- Resurrection R6
320
                    48171, -- Resurrection R7
321
322
                    -- Rogue
323
324
                    -- Shaman
325
                    131, -- Water Breathing
326
                    546, -- Water Walking
327
                    2008, -- Ancestral Spirit R1
328
                    20609, -- Ancestral Spirit R2
329
                    20610, -- Ancestral Spirit R3
330
                    20776, -- Ancestral Spirit R4
331
                    20777, -- Ancestral Spirit R5
332
                    25590, -- Ancestral Spirit R6
333
                    49277, -- Ancestral Spirit R7
334
                    1064, -- Chain Heal R1
335
                    10622, -- Chain Heal R2
336
                    10623, -- Chain Heal R3
337
                    25422, -- Chain Heal R4
338
                    25423, -- Chain Heal R5
339
                    55458, -- Chain Heal R6
340
                    55459, -- Chain Heal R7
341
                    51886, -- Cleanse Spirit
342
                    526, -- Cure Toxins
343
                    974, -- Earth Shield R1
344
                    32593, -- Earth Shield R2
345
                    32594, -- Earth Shield R3
346
                    49283, -- Earth Shield R4
347
                    49284, -- Earth Shield R5
348
                    331, -- Healing Wave R1
349
                    332, -- Healing Wave R2
350
                    547, -- Healing Wave R3
351
                    913, -- Healing Wave R4
352
                    939, -- Healing Wave R5
353
                    959, -- Healing Wave R6
354
                    8005, -- Healing Wave R7
355
                    10395, -- Healing Wave R8
356
                    10396, -- Healing Wave R9
357
                    25357, -- Healing Wave R10
358
                    25391, -- Healing Wave R11
359
                    25396, -- Healing Wave R12
360
                    49272, -- Healing Wave R13
361
                    49273, -- Healing Wave R14
362
                    8004, -- Lesser Healing Wave R1
363
                    8008, -- Lesser Healing Wave R2
364
                    8010, -- Lesser Healing Wave R3
365
                    10466, -- Lesser Healing Wave R4
366
                    10467, -- Lesser Healing Wave R5
367
                    10468, -- Lesser Healing Wave R6
368
                    25420, -- Lesser Healing Wave R7
369
                    49275, -- Lesser Healing Wave R8
370
                    49276, -- Lesser Healing Wave R9
371
                    21169, -- Reincarnation
372
                    61295, -- Riptide R1
373
                    61299, -- Riptide R2
374
                    61300, -- Riptide R3
375
                    61301, -- Riptide R4
376
377
                    -- Warlock
378
                    -- Warrior
379
380
381
                    -- Items
382
                    746, -- First Aid Bandages
383
                    1159, -- First Aid Bandages
384
                    3267, -- First Aid Bandages
385
                    3268, -- First Aid Bandages
386
                    7926, -- First Aid Bandages
387
                    7927, -- First Aid Bandages
388
                    10838, -- First Aid Bandages
389
                    10839, -- First Aid Bandages
390
                    18608, -- First Aid Bandages
391
                    18610, -- First Aid Bandages
392
                    23696, -- First Aid Bandages
393
                    27030, -- First Aid Bandages
394
                    27031, -- First Aid Bandages
395
                    45543, -- First Aid Bandages
396
                    45544, -- First Aid Bandages
397
                    51803, -- First Aid Bandages
398
                    51827, -- First Aid Bandages
399
                }
400-
--Actual code begins here
400+
401
	--Actual code begins here
402
    if (target ~= nil) then
403
        if (in_table(spell:GetEntry(), prohibitedSpells)) then
404
            local message = "|cffFF0000[WARNING] |cffFFF200This is the Ironman Challenge. You may not help other players."
405
            if (player:IsAlliance()) then
406
                if (target:IsAlliance() and target:GetName() ~= player:GetName()) then
407
                    player:SendBroadcastMessage(message)
408
                    player:SendAreaTriggerMessage(message)
409
                    spell:Cancel()
410
                end
411
            end
412
            if (player:IsHorde()) then
413
                if (target:IsHorde() and target:GetName() ~= player:GetName() ) then
414
                    player:SendBroadcastMessage(message)
415
                    player:SendAreaTriggerMessage(message)
416
                    spell:Cancel()
417
                end
418
            end
419
        end
420
    end
421
end
422
423
424
function in_table(Var, Table)
425
    for _,v in pairs(Table) do
426
        if (v==Var) then
427
            return true 
428
        end
429
    end
430
return false
431
end
432
433
RegisterPlayerEvent(5, OnSpellCast)