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
db3b2301
Commit
db3b2301
authored
12 years ago
by
Rumen Nikiforov
Browse files
Options
Downloads
Patches
Plain Diff
BETA: DP-Part for [L5641]
parent
5588f881
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
L2J_DataPack_BETA/dist/game/data/scripts.cfg
+1
-0
1 addition, 0 deletions
L2J_DataPack_BETA/dist/game/data/scripts.cfg
L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/NonLethalableNpcs.java
+63
-0
63 additions, 0 deletions
...ame/data/scripts/ai/group_template/NonLethalableNpcs.java
with
64 additions
and
0 deletions
L2J_DataPack_BETA/dist/game/data/scripts.cfg
+
1
−
0
View file @
db3b2301
...
...
@@ -55,6 +55,7 @@ ai/group_template/FairyTrees.java
ai/group_template/FeedableBeasts.java
ai/group_template/GiantScouts.java
ai/group_template/Monastery.java
ai/group_template/NonLethalableNpcs.java
ai/group_template/PavelArchaic.java
ai/group_template/PlainsOfLizardman.java
ai/group_template/PolymorphingAngel.java
...
...
This diff is collapsed.
Click to expand it.
L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/NonLethalableNpcs.java
0 → 100644
+
63
−
0
View file @
db3b2301
/*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
package
ai.group_template
;
import
ai.npc.AbstractNpcAI
;
import
com.l2jserver.gameserver.datatables.SpawnTable
;
import
com.l2jserver.gameserver.model.L2Spawn
;
import
com.l2jserver.gameserver.model.actor.L2Npc
;
import
com.l2jserver.gameserver.util.Util
;
/**
* @author UnAfraid
*/
public
class
NonLethalableNpcs
extends
AbstractNpcAI
{
private
static
final
int
[]
NPCS
=
new
int
[]
{
35062
,
// Headquarters
};
/**
* @param name
* @param descr
*/
public
NonLethalableNpcs
(
String
name
,
String
descr
)
{
super
(
name
,
descr
);
addSpawnId
(
NPCS
);
for
(
L2Spawn
spawn
:
SpawnTable
.
getInstance
().
getSpawnTable
())
{
if
(
Util
.
contains
(
NPCS
,
spawn
.
getNpcid
()))
{
onSpawn
(
spawn
.
getLastSpawn
());
}
}
}
@Override
public
String
onSpawn
(
L2Npc
npc
)
{
npc
.
setLethalable
(
false
);
return
super
.
onSpawn
(
npc
);
}
public
static
void
main
(
String
[]
args
)
{
new
NonLethalableNpcs
(
NonLethalableNpcs
.
class
.
getSimpleName
(),
"ai/group_template"
);
}
}
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