forked from ornfelt/azerothcore_lua_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgive_loom.lua
More file actions
96 lines (82 loc) · 2.58 KB
/
give_loom.lua
File metadata and controls
96 lines (82 loc) · 2.58 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
--[[
--Gives new players starting gear. Currently level 30 rdf gear.
local enabled = false
local T = {
-- [classId] = {item1, item2, item3m, ...}
[0] = {},
[1] = {42943, 48718, 42991, 48716, 42949, 48685, 50255, 51980, 51978, 51982, 51981}, -- Warrior
[2] = {44100, 48685, 44092, 42992, 50255, 48716, 51980, 51978, 51982, 51981}, -- Paladin
[3] = {42946, 50255, 48677, 42991, 42950, 42944, 51965, 51964, 51963, 51962}, -- Hunter
[4] = {42944, 48689, 42952, 42991, 50255, 51965, 51964, 51963, 51962}, -- Rogue
[5] = {42947, 48691, 44107, 42992, 50255, 51973, 51968, 51967, 51972}, -- Priest
[6] = {42943, 48685, 42949, 42991, 50255}, -- Death Knight
[7] = {48716, 48716, 42992, 48677, 42950, 42951, 48683, 50255, 51965, 51964, 51963, 51962}, -- Shaman
[8] = {42947, 48691, 44107, 42992, 50255, 51973, 51968, 51967, 51972}, -- Mage
[9] = {42947, 48691, 44107, 42992, 50255, 51973, 51968, 51967, 51972}, -- Warlock
[11] = {42947, 48718, 42952, 42991, 44107, 48691, 48689, 50255, 51965, 51964, 51963, 51962}, -- Druid
}
local function OnCharacterCreate(event, player)
local class = player:GetClass()
local level = player:GetLevel()
local bag1 = player:GetItemByPos(255, 19)
local bag2 = player:GetItemByPos(255, 20)
local bag3 = player:GetItemByPos(255, 21)
local bag4 = player:GetItemByPos(255, 22)
if level < 55 then
player:AddItem(51996, 1)
player:AddItem(51992, 1)
player:AddItem(51994, 1)
else
player:RemoveItem(38145, 4)
end
if class == 3 and bag1 ~= nil then
player:AddItem(41600, 1)
player:AddItem(2512, 1800)
end
player:LearnSpell(34091)
player:LearnSpell(73324)
if (class == 3) then
player:LearnSpell(5300)
player:LearnSpell(1579)
end
if bag1 == nil then
player:EquipItem( 41600, 19 )
else
player:AddItem(41600, 1)
end
if bag2 == nil then
player:EquipItem( 41600, 20 )
else
player:AddItem(41600, 1)
end
if bag3 == nil then
player:EquipItem( 41600, 21 )
else
player:AddItem(41600, 1)
end
if bag4 == nil then
player:EquipItem( 41600, 22 )
else
player:AddItem(41600, 1)
end
if level > 55 and player:HasItem( 41600 ) then
player:EquipItem( 41600, 19 )
player:EquipItem( 41600, 20 )
player:EquipItem( 41600, 21 )
player:EquipItem( 41600, 22 )
end
for _,v in ipairs(T[class]) do
player:RemoveItem(v, 9)
if v == 42992 or v == 42991 or v == 42944 then
player:AddItem(v, 2)
else
player:AddItem(v, 1)
end
end
end
if enabled then
--RegisterPlayerEvent(30, OnFirstLogin)
--RegisterPlayerEvent(1, OnCharacterCreate)
RegisterPlayerEvent(30, OnCharacterCreate)
end
]]