-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnewToon.lua
More file actions
402 lines (368 loc) · 19 KB
/
newToon.lua
File metadata and controls
402 lines (368 loc) · 19 KB
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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
local MODULE_NAME = "Eluna newToon"
local MODULE_VERSION = '1.5.4'
local MODULE_AUTHOR = "Mpromptu Gaming"
print("["..MODULE_NAME.."]: Loaded, Version "..MODULE_VERSION.." Active")
local Skills = {
-- Warrior (1)
{class = 1, entry = 264}, -- Bows
{class = 1, entry = 5011}, -- Crossbow
{class = 1, entry = 15590}, -- Fists
{class = 1, entry = 266}, -- Guns
{class = 1, entry = 200}, -- Polearms
{class = 1, entry = 199}, -- 2H Mace
{class = 1, entry = 227}, -- Staves
-- Paladin (2)
{class = 2, entry = 196}, -- Axes
{class = 2, entry = 200}, -- Polearms
{class = 2, entry = 197}, -- 2H Axe
{class = 2, entry = 199}, -- 2H Mace
-- Hunter (3)
{class = 3, entry = 15590}, -- Fists
{class = 3, entry = 264}, -- Bows
{class = 3, entry = 266}, -- Guns
{class = 3, entry = 200}, -- Polearms
{class = 3, entry = 227}, -- Staves
{class = 3, entry = 202}, -- 2H Swords
-- Rogue (4)
{class = 4, entry = 264}, -- Bows
{class = 4, entry = 5011}, -- Crossbow
{class = 4, entry = 15590}, -- Fists
{class = 4, entry = 266}, -- Guns
{class = 4, entry = 196}, -- Axes
{class = 4, entry = 198}, -- Maces
{class = 4, entry = 201}, -- Swords
-- Priest (5)
{class = 5, entry = 1180}, -- Daggers
-- Death Knight (6)
{class = 6, entry = 198}, -- Maces
-- Shaman (7)
{class = 7, entry = 15590}, -- Fists
{class = 7, entry = 196}, -- Axes
{class = 7, entry = 197}, -- 2H Axe
{class = 7, entry = 199}, -- 2H Mace
-- Mage (8)
{class = 8, entry = 201}, -- Swords
-- Warlock (9)
{class = 9, entry = 201}, -- Swords
{class = 9, entry = 5784}, -- Felsteed
{class = 9, entry = 23161}, -- Dreadsteed
-- Druid (11)
{class = 11, entry = 1180}, -- Daggers
{class = 11, entry = 15590}, -- Fists
{class = 11, entry = 198}, -- Guns
{class = 11, entry = 200}, -- Axes
{class = 11, entry = 227}, -- Maces
{class = 11, entry = 199}, -- Swords
}
local Mounts = {
{race = 1, entry = 63232}, -- (Human) Stormwind Steed
{race = 2, entry = 63640}, -- (Orc) Orgrimmar Wolf
{race = 3, entry = 63636}, -- (Dwarf) Ironforge Ram
{race = 4, entry = 63637}, -- (Night Elf) Darnassian Nightsaber
{race = 5, entry = 63643}, -- (Undead) Forsaken Warhorse
{race = 6, entry = 63641}, -- (Tauren) Thunder Bluff Kodo
{race = 7, entry = 63638}, -- (Gnome) Gnomeregan Mechanostrider
{race = 8, entry = 63635}, -- (Troll) Darkspear Raptor
{race = 10, entry = 63642}, -- (Blood Elf) Silvermoon Hawkstrider
{race = 11, entry = 63639}, -- (Draenei) Exodar Elekk
}
local Gear = {
-- Warrior (1)
{class = 1, item = 1, team = -1, entry = 42949}, -- Polished Spaulders of Valor
{class = 1, item = 2, team = -1, entry = 48685}, -- Polished Breastplate of Valor
{class = 1, item = 3, team = 0, entry = 2381}, -- Tarnished Chain Leggings
{class = 1, item = 4, team = 0, entry = 2380}, -- Tarnished Chain Belt
{class = 1, item = 5, team = 0, entry = 2385}, -- Tarnished Chain Gloves
{class = 1, item = 6, team = 0, entry = 2383}, -- Tarnished Chain Boots
{class = 1, item = 7, team = 0, entry = 2384}, -- Tarnished Chain Bracers
{class = 1, item = 3, team = 1, entry = 20918}, -- Unadorned Chain Leggings
{class = 1, item = 4, team = 1, entry = 20914}, -- Unadorned Chain Belt
{class = 1, item = 5, team = 1, entry = 20917}, -- Unadorned Chain Gloves
{class = 1, item = 6, team = 1, entry = 20915}, -- Unadorned Chain Boots
{class = 1, item = 7, team = 1, entry = 20916}, -- Unadorned Chain Bracers
{class = 1, item = 8, team = -1, entry = 14385}, -- Durability Cloak
{class = 1, item = 9, team = -1, entry = 44092}, -- Reforged Truesilver Champion
{class = 1, item = 10, team = -1, entry = 42945}, -- Venerable Dal'Rend's Sacred Charge
{class = 1, item = 11, team = -1, entry = 50255}, -- Dread Pirate Ring
{class = 1, item = 12, team = -1, entry = 42991}, -- Swift Hand of Justice
{class = 1, item = 13, team = 0, entry = 44098}, -- Inherited Insignia of the Alliance
{class = 1, item = 13, team = 1, entry = 44097}, -- Inherited Insignia of the Horde
-- Paladin (2)
{class = 2, item = 1, team = -1, entry = 42949}, -- Polished Spaulders of Valor
{class = 2, item = 2, team = -1, entry = 48685}, -- Polished Breastplate of Valor
{class = 2, item = 3, team = 0, entry = 2381}, -- Tarnished Chain Leggings
{class = 2, item = 4, team = 0, entry = 2380}, -- Tarnished Chain Belt
{class = 2, item = 5, team = 0, entry = 2385}, -- Tarnished Chain Gloves
{class = 2, item = 6, team = 0, entry = 2383}, -- Tarnished Chain Boots
{class = 2, item = 7, team = 0, entry = 2384}, -- Tarnished Chain Bracers
{class = 2, item = 3, team = 1, entry = 20918}, -- Unadorned Chain Leggings
{class = 2, item = 4, team = 1, entry = 20914}, -- Unadorned Chain Belt
{class = 2, item = 5, team = 1, entry = 20917}, -- Unadorned Chain Gloves
{class = 2, item = 6, team = 1, entry = 20915}, -- Unadorned Chain Boots
{class = 2, item = 7, team = 1, entry = 20916}, -- Unadorned Chain Bracers
{class = 2, item = 8, team = -1, entry = 14385}, -- Durability Cloak
{class = 2, item = 9, team = -1, entry = 48718}, -- Repurposed Lava Dredger
{class = 2, item = 10, team = -1, entry = 42948}, -- Devout Aurastone Hammer
{class = 2, item = 11, team = -1, entry = 50255}, -- Dread Pirate Ring
{class = 2, item = 12, team = -1, entry = 42991}, -- Swift Hand of Justice
{class = 2, item = 13, team = -1, entry = 42992}, -- Discerning Eye of the Beast
-- Hunter (3)
{class = 3, item = 1, team = -1, entry = 42950}, -- Champion Herod's Shoulder
{class = 3, item = 2, team = -1, entry = 48677}, -- Champion's Deathdealer Breastplate
{class = 3, item = 3, team = 0, entry = 2126}, -- Cracked Leather Pants
{class = 3, item = 4, team = 0, entry = 2122}, -- Cracked Leather Belt
{class = 3, item = 5, team = 0, entry = 2125}, -- Cracked Leather Gloves
{class = 3, item = 6, team = 0, entry = 2123}, -- Cracked Leather Boots
{class = 3, item = 7, team = 0, entry = 2124}, -- Cracked Leather Bracers
{class = 3, item = 3, team = 1, entry = 20924}, -- Sun Cured Pants
{class = 3, item = 4, team = 1, entry = 20920}, -- Sun Cured Belt
{class = 3, item = 5, team = 1, entry = 20923}, -- Sun Cured Gloves
{class = 3, item = 6, team = 1, entry = 20921}, -- Sun Cured Boots
{class = 3, item = 7, team = 1, entry = 20922}, -- Sun Cured Bracers
{class = 3, item = 8, team = -1, entry = 14385}, -- Durability Cloak
{class = 3, item = 9, team = -1, entry = 42943}, -- Bloodied Arcanite Reaper
{class = 3, item = 10, team = -1, entry = 42946}, -- Charmed Ancient Bone Bow
{class = 3, item = 11, team = -1, entry = 50255}, -- Dread Pirate Ring
{class = 3, item = 12, team = -1, entry = 42991}, -- Swift Hand of Justice
{class = 3, item = 13, team = -1, entry = 42992}, -- Discerning Eye of the Beast
-- Rogue (4)
{class = 4, item = 1, team = -1, entry = 42952}, -- Stained Shadowcraft Shoulders
{class = 4, item = 2, team = -1, entry = 48689}, -- Stained Shadowcraft Tunic
{class = 4, item = 3, team = 0, entry = 2126}, -- Cracked Leather Pants
{class = 4, item = 4, team = 0, entry = 2122}, -- Cracked Leather Belt
{class = 4, item = 5, team = 0, entry = 2125}, -- Cracked Leather Gloves
{class = 4, item = 6, team = 0, entry = 2123}, -- Cracked Leather Boots
{class = 4, item = 7, team = 0, entry = 2124}, -- Cracked Leather Bracers
{class = 4, item = 3, team = 1, entry = 20924}, -- Sun Cured Pants
{class = 4, item = 4, team = 1, entry = 20920}, -- Sun Cured Belt
{class = 4, item = 5, team = 1, entry = 20923}, -- Sun Cured Gloves
{class = 4, item = 6, team = 1, entry = 20921}, -- Sun Cured Boots
{class = 4, item = 7, team = 1, entry = 20922}, -- Sun Cured Bracers
{class = 4, item = 8, team = -1, entry = 14385}, -- Durability Cloak
{class = 4, item = 9, team = -1, entry = 42944}, -- Balanced Heartseeker
{class = 4, item = 10, team = -1, entry = 42944}, -- Balanced Heartseeker
{class = 4, item = 11, team = -1, entry = 50255}, -- Dread Pirate Ring
{class = 4, item = 12, team = -1, entry = 42991}, -- Swift Hand of Justice
{class = 4, item = 13, team = 0, entry = 44098}, -- Inherited Insignia of the Alliance
{class = 4, item = 13, team = 1, entry = 44097}, -- Inherited Insignia of the Horde
-- Priest (5)
{class = 5, item = 1, team = -1, entry = 42985}, -- Tattered Dreadmist Mantle
{class = 5, item = 2, team = -1, entry = 48691}, -- Tattered Dreadmist Robe
{class = 5, item = 3, team = 0, entry = 2120}, -- Thin Cloth Pants
{class = 5, item = 4, team = 0, entry = 3599}, -- Thin Cloth Belt
{class = 5, item = 5, team = 0, entry = 2119}, -- Thin Cloth Gloves
{class = 5, item = 6, team = 0, entry = 2117}, -- Thin Cloth Shoes
{class = 5, item = 7, team = 0, entry = 3600}, -- Thin Cloth Bracers
{class = 5, item = 3, team = 1, entry = 20986}, -- Light Cloth Pants
{class = 5, item = 4, team = 1, entry = 20989}, -- Light Cloth Belt
{class = 5, item = 5, team = 1, entry = 20987}, -- Light Cloth Gloves
{class = 5, item = 6, team = 1, entry = 20985}, -- Light Cloth Shoes
{class = 5, item = 7, team = 1, entry = 20988}, -- Light Cloth Bracers
{class = 5, item = 8, team = -1, entry = 14385}, -- Durability Cloak
{class = 5, item = 9, team = -1, entry = 42947}, -- Dignified Headmaster's Charge
{class = 5, item = 10, team = -1, entry = 27403}, -- Stillpine Stinger
{class = 5, item = 11, team = -1, entry = 50255}, -- Dread Pirate Ring
{class = 5, item = 12, team = -1, entry = 42991}, -- Swift Hand of Justice
{class = 5, item = 13, team = -1, entry = 42992}, -- Discerning Eye of the Beast
-- Shaman (7)
{class = 7, item = 1, team = -1, entry = 42951}, -- Mystical Pauldrons of the Elements
{class = 7, item = 2, team = -1, entry = 48683}, -- Mystical Vest of the Elements
{class = 7, item = 3, team = 0, entry = 2126}, -- Cracked Leather Pants
{class = 7, item = 4, team = 0, entry = 2122}, -- Cracked Leather Belt
{class = 7, item = 5, team = 0, entry = 2125}, -- Cracked Leather Gloves
{class = 7, item = 6, team = 0, entry = 2123}, -- Cracked Leather Boots
{class = 7, item = 7, team = 0, entry = 2124}, -- Cracked Leather Bracers
{class = 7, item = 3, team = 1, entry = 20924}, -- Sun Cured Pants
{class = 7, item = 4, team = 1, entry = 20920}, -- Sun Cured Belt
{class = 7, item = 5, team = 1, entry = 20923}, -- Sun Cured Gloves
{class = 7, item = 6, team = 1, entry = 20921}, -- Sun Cured Boots
{class = 7, item = 7, team = 1, entry = 20922}, -- Sun Cured Bracers
{class = 7, item = 8, team = -1, entry = 14385}, -- Durability Cloak
{class = 7, item = 9, team = -1, entry = 48718}, -- Repurposed Lava Dredger
{class = 7, item = 10, team = -1, entry = 42948}, -- Devout Aurastone Hammer
{class = 7, item = 11, team = -1, entry = 50255}, -- Dread Pirate Ring
{class = 7, item = 12, team = -1, entry = 42991}, -- Swift Hand of Justice
{class = 7, item = 13, team = -1, entry = 42992}, -- Discerning Eye of the Beast
-- Mage (8)
{class = 8, item = 1, team = -1, entry = 42985}, -- Tattered Dreadmist Mantle
{class = 8, item = 2, team = -1, entry = 48691}, -- Tattered Dreadmist Robe
{class = 8, item = 3, team = 0, entry = 2120}, -- Thin Cloth Pants
{class = 8, item = 4, team = 0, entry = 3599}, -- Thin Cloth Belt
{class = 8, item = 5, team = 0, entry = 2119}, -- Thin Cloth Gloves
{class = 8, item = 6, team = 0, entry = 2117}, -- Thin Cloth Shoes
{class = 8, item = 7, team = 0, entry = 3600}, -- Thin Cloth Bracers
{class = 8, item = 3, team = 1, entry = 20986}, -- Light Cloth Pants
{class = 8, item = 4, team = 1, entry = 20989}, -- Light Cloth Belt
{class = 8, item = 5, team = 1, entry = 20987}, -- Light Cloth Gloves
{class = 8, item = 6, team = 1, entry = 20985}, -- Light Cloth Shoes
{class = 8, item = 7, team = 1, entry = 20988}, -- Light Cloth Bracers
{class = 8, item = 8, team = -1, entry = 14385}, -- Durability Cloak
{class = 8, item = 9, team = -1, entry = 42947}, -- Dignified Headmaster's Charge
{class = 8, item = 10, team = -1, entry = 27403}, -- Stillpine Stinger
{class = 8, item = 11, team = -1, entry = 50255}, -- Dread Pirate Ring
{class = 8, item = 12, team = -1, entry = 42991}, -- Swift Hand of Justice
{class = 8, item = 13, team = -1, entry = 42992}, -- Discerning Eye of the Beast
-- Warlock (9)
{class = 9, item = 1, team = -1, entry = 42985}, -- Tattered Dreadmist Mantle
{class = 9, item = 2, team = -1, entry = 48691}, -- Tattered Dreadmist Robe
{class = 9, item = 3, team = 0, entry = 2120}, -- Thin Cloth Pants
{class = 9, item = 4, team = 0, entry = 3599}, -- Thin Cloth Belt
{class = 9, item = 5, team = 0, entry = 2119}, -- Thin Cloth Gloves
{class = 9, item = 6, team = 0, entry = 2117}, -- Thin Cloth Shoes
{class = 9, item = 7, team = 0, entry = 3600}, -- Thin Cloth Bracers
{class = 9, item = 3, team = 1, entry = 20986}, -- Light Cloth Pants
{class = 9, item = 4, team = 1, entry = 20989}, -- Light Cloth Belt
{class = 9, item = 5, team = 1, entry = 20987}, -- Light Cloth Gloves
{class = 9, item = 6, team = 1, entry = 20985}, -- Light Cloth Shoes
{class = 9, item = 7, team = 1, entry = 20988}, -- Light Cloth Bracers
{class = 9, item = 8, team = -1, entry = 14385}, -- Durability Cloak
{class = 9, item = 9, team = -1, entry = 42947}, -- Dignified Headmaster's Charge
{class = 9, item = 10, team = -1, entry = 27403}, -- Stillpine Stinger
{class = 9, item = 11, team = -1, entry = 50255}, -- Dread Pirate Ring
{class = 9, item = 12, team = -1, entry = 42991}, -- Swift Hand of Justice
{class = 9, item = 13, team = -1, entry = 42992}, -- Discerning Eye of the Beast
-- Druid (11)
{class = 11, item = 1, team = -1, entry = 42984}, -- Preened Ironfeather Shoulders
{class = 11, item = 2, team = -1, entry = 48687}, -- Preened Ironfeather Breastplate
{class = 11, item = 3, team = 0, entry = 2126}, -- Cracked Leather Pants
{class = 11, item = 4, team = 0, entry = 2122}, -- Cracked Leather Belt
{class = 11, item = 5, team = 0, entry = 2125}, -- Cracked Leather Gloves
{class = 11, item = 6, team = 0, entry = 2123}, -- Cracked Leather Boots
{class = 11, item = 7, team = 0, entry = 2124}, -- Cracked Leather Bracers
{class = 11, item = 3, team = 1, entry = 20924}, -- Sun Cured Pants
{class = 11, item = 4, team = 1, entry = 20920}, -- Sun Cured Belt
{class = 11, item = 5, team = 1, entry = 20923}, -- Sun Cured Gloves
{class = 11, item = 6, team = 1, entry = 20921}, -- Sun Cured Boots
{class = 11, item = 7, team = 1, entry = 20922}, -- Sun Cured Bracers
{class = 11, item = 8, team = -1, entry = 14385}, -- Durability Cloak
{class = 11, item = 9, team = -1, entry = 48716}, -- Venerable Mass of McGowan
{class = 11, item = 10, team = -1, entry = 42947}, -- Dignified Headmaster's Charge
{class = 11, item = 11, team = -1, entry = 50255}, -- Dread Pirate Ring
{class = 11, item = 12, team = -1, entry = 42991}, -- Swift Hand of Justice
{class = 11, item = 13, team = -1, entry = 42992}, -- Discerning Eye of the Beast
}
local function findGear(class, item, team)
for i, v in ipairs(Gear) do
if v.class==class and v.item==item and (v.team == team or v.team == -1) then
return v.entry
end
end
end
local function grantSkills(player, class)
for i, v in ipairs(Skills) do
if v.class==class or v.class==0 then
if not player:HasSpell(v.entry) then
player:LearnSpell(v.entry)
end
end
end
end
local function grantMounts(player, race)
-- Riding Skills
player:CastSpell(player, 33389, true) -- Apprentice Riding
player:CastSpell(player, 33392, true) -- Journeyman Riding
player:CastSpell(player, 34092, true) -- Expert Riding
player:CastSpell(player, 34093, true) -- Artisan Riding
player:LearnSpell(54197) -- Cold Weather Flying
-- Mounts
for i, v in ipairs(Mounts) do
if v.race==race or v.race==0 then
if not player:HasSpell(v.entry) then
player:LearnSpell(v.entry)
end
end
end
end
local function firstLogin(event, player)
class = player:GetClass()
level = player:GetLevel()
race = player:GetRace()
team = player:GetTeam()
print("["..MODULE_NAME.."]: "..player:GetName().." created by "..player:GetAccountName().." on team "..team)
player:SetKnownTitle(1)
grantSkills(player, class)
grantMounts(player, race)
emailTo = player:GetGUIDLow()
emailStationery = 61
emailFrom = 0
bagEntry = 41599
foodEntry = 23364
local gold
if class == 6 then
gold = 100000000
player:CastSpell(player, 3279, true) -- Apprentice First Aid
player:CastSpell(player, 3280, true) -- Journeyman First Aid
player:CastSpell(player, 54254, true) -- Expert First Aid
player:LearnSpell(54729) -- Winged Steed of the Ebon Blade
player:SetKnownTitle(158) -- Death's Demise
player:SetSkill(129, 300, 300, 300)
else
gold = 100000
end
SendMail(
"Bags and more!",
"Here's a few things to make your adventuring a little easier.",
emailTo,
emailFrom,
emailStationery,
0, -- Delay
gold,
0, -- COD
bagEntry,
1,
bagEntry,
1,
bagEntry,
1,
bagEntry,
1,
32618, -- Mind Releaser
1,
41605, -- Instastone!
1,
25750, -- Magic Slate
1,
foodEntry,
1000
)
if class ~= 6 then
SendMail(
"Welcome!",
"Congratulations on your new character! Here are some tokens of our appreciation!",
emailTo,
emailFrom,
emailStationery,
0, -- Delay
0,
0, -- COD
findGear(class,1, team),
1,
findGear(class,2, team),
1,
findGear(class,3, team),
1,
findGear(class,4, team),
1,
findGear(class,5, team),
1,
findGear(class,6, team),
1,
findGear(class,7, team),
1,
findGear(class,8, team),
1,
findGear(class,9, team),
1,
findGear(class,10, team),
1,
findGear(class,11, team),
1,
findGear(class,12, team),
1,
findGear(class,13, team),
1
)
player:CastSpell(player, 54710, true) -- Moll-E
end
end
RegisterPlayerEvent(30, firstLogin)