Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
L2j Server Datapack
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
L2j
L2j Server Datapack
Commits
2a55ef89
Commit
2a55ef89
authored
12 years ago
by
malyelfik
Browse files
Options
Downloads
Patches
Plain Diff
BETA: Updating quest '''Rumble in the Base (461)'''
parent
070982b0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00461_RumbleInTheBase/Q00461_RumbleInTheBase.java
+63
-89
63 additions, 89 deletions
...quests/Q00461_RumbleInTheBase/Q00461_RumbleInTheBase.java
with
63 additions
and
89 deletions
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00461_RumbleInTheBase/Q00461_RumbleInTheBase.java
+
63
−
89
View file @
2a55ef89
...
...
@@ -14,6 +14,9 @@
*/
package
quests.Q00461_RumbleInTheBase
;
import
java.util.HashMap
;
import
java.util.Map
;
import
quests.Q00252_ItSmellsDelicious.Q00252_ItSmellsDelicious
;
import
com.l2jserver.gameserver.model.actor.L2Npc
;
...
...
@@ -30,26 +33,30 @@ import com.l2jserver.gameserver.model.quest.State;
public
class
Q00461_RumbleInTheBase
extends
Quest
{
// NPC
public
static
final
int
Stan
=
30200
;
public
static
final
int
[]
Monsters
=
{
22780
,
22781
,
22782
,
2278
,
22784
,
22785
,
18908
};
private
static
final
int
STAN
=
30200
;
// Item
public
static
final
int
ShinySalmon
=
15503
;
public
static
final
int
ShoesStringOfSelMahum
=
16382
;
private
static
final
int
SHINY_SALMON
=
15503
;
private
static
final
int
SHOES_STRING_OF_SEL_MAHUM
=
16382
;
// Mobs
private
static
final
Map
<
Integer
,
Integer
>
MONSTERS
=
new
HashMap
<>();
static
{
MONSTERS
.
put
(
22780
,
581
);
MONSTERS
.
put
(
22781
,
772
);
MONSTERS
.
put
(
22782
,
581
);
MONSTERS
.
put
(
22783
,
563
);
MONSTERS
.
put
(
22784
,
581
);
MONSTERS
.
put
(
22785
,
271
);
MONSTERS
.
put
(
18908
,
782
);
}
@Override
public
String
onAdvEvent
(
String
event
,
L2Npc
npc
,
L2PcInstance
player
)
{
String
htmltext
=
event
;
String
htmltext
=
null
;
final
QuestState
st
=
player
.
getQuestState
(
getName
());
if
(
st
==
null
)
{
...
...
@@ -58,9 +65,12 @@ public class Q00461_RumbleInTheBase extends Quest
if
(
event
.
equalsIgnoreCase
(
"30200-05.htm"
))
{
st
.
set
(
"cond"
,
"1"
);
st
.
setState
(
State
.
STARTED
);
st
.
playSound
(
"ItemSound.quest_accept"
);
st
.
startQuest
();
htmltext
=
event
;
}
else
if
(
event
.
equalsIgnoreCase
(
"30200-04.htm"
))
{
htmltext
=
event
;
}
return
htmltext
;
}
...
...
@@ -82,17 +92,14 @@ public class Q00461_RumbleInTheBase extends Quest
htmltext
=
((
player
.
getLevel
()
>=
82
)
&&
(
prev
!=
null
)
&&
prev
.
isCompleted
())
?
"30200-01.htm"
:
"30200-02.htm"
;
break
;
case
State
.
STARTED
:
if
(
st
.
getInt
(
"cond"
)
==
1
)
if
(
st
.
isCond
(
1
)
)
{
htmltext
=
"30200-06.html"
;
}
else
{
st
.
takeItems
(
ShinySalmon
,
-
1
);
st
.
takeItems
(
ShoesStringOfSelMahum
,
-
1
);
st
.
addExpAndSp
(
224784
,
342528
);
st
.
playSound
(
"ItemSound.quest_finish"
);
st
.
exitQuest
(
QuestType
.
DAILY
);
st
.
exitQuest
(
QuestType
.
DAILY
,
true
);
htmltext
=
"30200-07.html"
;
}
break
;
...
...
@@ -114,88 +121,55 @@ public class Q00461_RumbleInTheBase extends Quest
@Override
public
String
onKill
(
L2Npc
npc
,
L2PcInstance
player
,
boolean
isPet
)
{
final
L2PcInstance
partyMember
=
getRandomPartyMember
(
player
,
"1"
)
;
if
(
partyMember
==
null
)
QuestState
st
=
null
;
if
(
getRandom
(
1000
)
>=
MONSTERS
.
get
(
npc
.
getNpcId
())
)
{
return
null
;
return
super
.
onKill
(
npc
,
player
,
isPet
)
;
}
final
QuestState
st
=
partyMember
.
getQuestState
(
getName
());
int
chance
=
getRandom
(
1000
);
boolean
giveItem
=
false
;
switch
(
npc
.
getNpcId
())
if
(
npc
.
getNpcId
()
==
18908
)
{
case
22780
:
if
(
chance
<
581
)
{
giveItem
=
true
;
}
break
;
case
22781
:
if
(
chance
<
772
)
{
giveItem
=
true
;
}
break
;
case
22782
:
if
(
chance
<
581
)
{
giveItem
=
true
;
}
break
;
case
22783
:
if
(
chance
<
563
)
st
=
player
.
getQuestState
(
getName
());
if
((
st
!=
null
)
&&
st
.
isCond
(
1
)
&&
(
st
.
getQuestItemsCount
(
SHINY_SALMON
)
<
5
))
{
st
.
giveItems
(
SHINY_SALMON
,
1
);
st
.
playSound
(
QuestSound
.
ITEMSOUND_QUEST_ITEMGET
);
if
((
st
.
getQuestItemsCount
(
SHINY_SALMON
)
>=
5
)
&&
(
st
.
getQuestItemsCount
(
SHOES_STRING_OF_SEL_MAHUM
)
>=
10
))
{
giveItem
=
true
;
st
.
setCond
(
2
,
true
)
;
}
break
;
case
22784
:
if
(
chance
<
581
)
{
giveItem
=
true
;
}
break
;
case
22785
:
if
(
chance
<
271
)
{
giveItem
=
true
;
}
break
;
case
18908
:
if
((
chance
<
271
)
&&
(
st
.
getQuestItemsCount
(
ShinySalmon
)
<
5
))
{
st
.
giveItems
(
ShinySalmon
,
1
);
st
.
playSound
(
"ItemSound.quest_itemget"
);
}
break
;
}
if
(
giveItem
&&
(
st
.
getQuestItemsCount
(
ShoesStringOfSelMahum
)
<
10
))
{
st
.
giveItems
(
ShoesStringOfSelMahum
,
1
);
st
.
playSound
(
"ItemSound.quest_itemget"
);
}
}
if
((
st
.
getQuestItemsCount
(
ShinySalmon
)
==
5
)
&&
(
st
.
getQuestItemsCount
(
ShoesStringOfSelMahum
)
==
10
))
else
{
st
.
set
(
"cond"
,
"2"
);
st
.
playSound
(
"ItemSound.quest_middle"
);
final
L2PcInstance
member
=
getRandomPartyMember
(
player
,
"1"
);
if
(
member
==
null
)
{
return
super
.
onKill
(
npc
,
player
,
isPet
);
}
st
=
member
.
getQuestState
(
getName
());
if
(
st
.
getQuestItemsCount
(
SHOES_STRING_OF_SEL_MAHUM
)
<
10
)
{
st
.
giveItems
(
SHOES_STRING_OF_SEL_MAHUM
,
1
);
st
.
playSound
(
QuestSound
.
ITEMSOUND_QUEST_ITEMGET
);
if
((
st
.
getQuestItemsCount
(
SHINY_SALMON
)
>=
5
)
&&
(
st
.
getQuestItemsCount
(
SHOES_STRING_OF_SEL_MAHUM
)
>=
10
))
{
st
.
setCond
(
2
,
true
);
}
}
}
return
null
;
return
super
.
onKill
(
npc
,
player
,
isPet
)
;
}
public
Q00461_RumbleInTheBase
(
int
questId
,
String
name
,
String
descr
)
{
super
(
questId
,
name
,
descr
);
addStartNpc
(
S
tan
);
addTalkId
(
S
tan
);
addKillId
(
M
onsters
);
addStartNpc
(
S
TAN
);
addTalkId
(
S
TAN
);
addKillId
(
M
ONSTERS
.
keySet
()
);
questItemIds
=
new
int
[]
{
ShinySalmon
,
ShoesStringOfSelMahum
};
registerQuestItems
(
SHINY_SALMON
,
SHOES_STRING_OF_SEL_MAHUM
);
}
public
static
void
main
(
String
[]
args
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment