FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
scriptdev2-tbc/scripts/world/go_scripts.cpp at master · scriptdev2/scriptdev2-tbc · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
scriptdev2
/
scriptdev2-tbc
Public
Notifications
You must be signed in to change notification settings
Fork
26
Star
28
Code
Issues
11
Pull requests
1
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
scriptdev2-tbc
/
scripts
/
world
/
go_scripts.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
221 lines (187 loc) · 6.72 KB
Breadcrumbs
scriptdev2-tbc
/
scripts
/
world
/
go_scripts.cpp
Copy path
File metadata and controls
221 lines (187 loc) · 6.72 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
/*
This file is part of the ScriptDev2 Project. See AUTHORS file for Copyright information
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
ScriptData
SDName: GO_Scripts
SD%Complete: 100
SDComment: Quest support: 5097, 5098, Barov_journal->Teaches spell 26089
SDCategory: Game Objects
EndScriptData
*/
/*
ContentData
go_barov_journal
go_ethereum_prison
go_ethereum_stasis
go_andorhal_tower
EndContentData
*/
#
include
"
precompiled.h
"
/*
######
## go_barov_journal
######
*/
enum
{
SPELL_TAILOR_FELCLOTH_BAG
=
26086
,
SPELL_LEARN_FELCLOTH_BAG
=
26095
};
bool
GOUse_go_barov_journal
(Player* pPlayer, GameObject*
/*
pGo
*/
)
{
if
(pPlayer->
HasSkill
(
SKILL_TAILORING
) && pPlayer->
GetBaseSkillValue
(
SKILL_TAILORING
) >=
280
&& !pPlayer->
HasSpell
(
SPELL_TAILOR_FELCLOTH_BAG
))
{
pPlayer->
CastSpell
(pPlayer,
SPELL_LEARN_FELCLOTH_BAG
,
false
);
}
return
true
;
}
/*
######
## go_ethereum_prison
######
*/
enum
{
FACTION_LC
=
1011
,
FACTION_SHAT
=
935
,
FACTION_CE
=
942
,
FACTION_CON
=
933
,
FACTION_KT
=
989
,
FACTION_SPOR
=
970
,
SPELL_REP_LC
=
39456
,
SPELL_REP_SHAT
=
39457
,
SPELL_REP_CE
=
39460
,
SPELL_REP_CON
=
39474
,
SPELL_REP_KT
=
39475
,
SPELL_REP_SPOR
=
39476
};
const
uint32 uiNpcPrisonEntry[] =
{
22810
,
22811
,
22812
,
22813
,
22814
,
22815
,
//
good guys
20783
,
20784
,
20785
,
20786
,
20788
,
20789
,
20790
//
bad guys
};
bool
GOUse_go_ethereum_prison
(Player* pPlayer, GameObject* pGo)
{
uint8 uiRandom =
urand
(
0
,
countof
(uiNpcPrisonEntry) -
1
);
if
(Creature* pCreature = pPlayer->
SummonCreature
(uiNpcPrisonEntry[uiRandom],
pGo->
GetPositionX
(), pGo->
GetPositionY
(), pGo->
GetPositionZ
(), pGo->
GetAngle
(pPlayer),
TEMPSUMMON_TIMED_OOC_DESPAWN
,
30000
))
{
if
(!pCreature->
IsHostileTo
(pPlayer))
{
uint32 uiSpell =
0
;
if
(FactionTemplateEntry
const
* pFaction = pCreature->
getFactionTemplateEntry
())
{
switch
(pFaction->
faction
)
{
case
FACTION_LC
: uiSpell =
SPELL_REP_LC
;
break
;
case
FACTION_SHAT
: uiSpell =
SPELL_REP_SHAT
;
break
;
case
FACTION_CE
: uiSpell =
SPELL_REP_CE
;
break
;
case
FACTION_CON
: uiSpell =
SPELL_REP_CON
;
break
;
case
FACTION_KT
: uiSpell =
SPELL_REP_KT
;
break
;
case
FACTION_SPOR
: uiSpell =
SPELL_REP_SPOR
;
break
;
}
if
(uiSpell)
pCreature->
CastSpell
(pPlayer, uiSpell,
false
);
else
script_error_log
(
"
go_ethereum_prison summoned creature (entry %u) but faction (%u) are not expected by script.
"
, pCreature->
GetEntry
(), pCreature->
getFaction
());
}
}
}
return
false
;
}
/*
######
## go_ethereum_stasis
######
*/
const
uint32 uiNpcStasisEntry[] =
{
22825
,
20888
,
22827
,
22826
,
22828
};
bool
GOUse_go_ethereum_stasis
(Player* pPlayer, GameObject* pGo)
{
uint8 uiRandom =
urand
(
0
,
countof
(uiNpcStasisEntry) -
1
);
pPlayer->
SummonCreature
(uiNpcStasisEntry[uiRandom],
pGo->
GetPositionX
(), pGo->
GetPositionY
(), pGo->
GetPositionZ
(), pGo->
GetAngle
(pPlayer),
TEMPSUMMON_TIMED_OOC_DESPAWN
,
30000
);
return
false
;
}
/*
######
## go_jump_a_tron
######
*/
enum
{
SPELL_JUMP_A_TRON
=
33382
,
NPC_JUMP_A_TRON
=
19041
};
bool
GOUse_go_jump_a_tron
(Player* pPlayer, GameObject* pGo)
{
if
(Creature* pCreature =
GetClosestCreatureWithEntry
(pGo,
NPC_JUMP_A_TRON
,
INTERACTION_DISTANCE
))
pCreature->
CastSpell
(pPlayer,
SPELL_JUMP_A_TRON
,
false
);
return
false
;
}
/*
######
## go_andorhal_tower
######
*/
enum
{
QUEST_ALL_ALONG_THE_WATCHTOWERS_ALLIANCE
=
5097
,
QUEST_ALL_ALONG_THE_WATCHTOWERS_HORDE
=
5098
,
NPC_ANDORHAL_TOWER_1
=
10902
,
NPC_ANDORHAL_TOWER_2
=
10903
,
NPC_ANDORHAL_TOWER_3
=
10904
,
NPC_ANDORHAL_TOWER_4
=
10905
,
GO_ANDORHAL_TOWER_1
=
176094
,
GO_ANDORHAL_TOWER_2
=
176095
,
GO_ANDORHAL_TOWER_3
=
176096
,
GO_ANDORHAL_TOWER_4
=
176097
};
bool
GOUse_go_andorhal_tower
(Player* pPlayer, GameObject* pGo)
{
if
(pPlayer->
GetQuestStatus
(
QUEST_ALL_ALONG_THE_WATCHTOWERS_ALLIANCE
) ==
QUEST_STATUS_INCOMPLETE
|| pPlayer->
GetQuestStatus
(
QUEST_ALL_ALONG_THE_WATCHTOWERS_HORDE
) ==
QUEST_STATUS_INCOMPLETE
)
{
uint32 uiKillCredit =
0
;
switch
(pGo->
GetEntry
())
{
case
GO_ANDORHAL_TOWER_1
: uiKillCredit =
NPC_ANDORHAL_TOWER_1
;
break
;
case
GO_ANDORHAL_TOWER_2
: uiKillCredit =
NPC_ANDORHAL_TOWER_2
;
break
;
case
GO_ANDORHAL_TOWER_3
: uiKillCredit =
NPC_ANDORHAL_TOWER_3
;
break
;
case
GO_ANDORHAL_TOWER_4
: uiKillCredit =
NPC_ANDORHAL_TOWER_4
;
break
;
}
if
(uiKillCredit)
pPlayer->
KilledMonsterCredit
(uiKillCredit);
}
return
true
;
}
void
AddSC_go_scripts
()
{
Script* pNewScript;
pNewScript =
new
Script;
pNewScript->
Name
=
"
go_barov_journal
"
;
pNewScript->
pGOUse
= &GOUse_go_barov_journal;
pNewScript->
RegisterSelf
();
pNewScript =
new
Script;
pNewScript->
Name
=
"
go_ethereum_prison
"
;
pNewScript->
pGOUse
= &GOUse_go_ethereum_prison;
pNewScript->
RegisterSelf
();
pNewScript =
new
Script;
pNewScript->
Name
=
"
go_ethereum_stasis
"
;
pNewScript->
pGOUse
= &GOUse_go_ethereum_stasis;
pNewScript->
RegisterSelf
();
pNewScript =
new
Script;
pNewScript->
Name
=
"
go_jump_a_tron
"
;
pNewScript->
pGOUse
= &GOUse_go_jump_a_tron;
pNewScript->
RegisterSelf
();
pNewScript =
new
Script;
pNewScript->
Name
=
"
go_andorhal_tower
"
;
pNewScript->
pGOUse
= &GOUse_go_andorhal_tower;
pNewScript->
RegisterSelf
();
pNewScript =
new
Script;
pNewScript->
Name
=
"
go_andorhal_tower
"
;
pNewScript->
pGOUse
= &GOUse_go_andorhal_tower;
pNewScript->
RegisterSelf
();
}
Back
|
FazBrowse Home
|
New Git URL