1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-05 23:22:47 +00:00

- Added Bloody Pixy template for issue https://github.com/l2jserver2/l2jserver2/issues/14 (unrelated to Interlude)

- More Interlude work
- Trying out admin commands.
This commit is contained in:
Modestas Goncarovas
2012-04-18 05:19:38 +01:00
parent 907495f623
commit df55c684a9
8 changed files with 77 additions and 10 deletions

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<template:npc
controller="com.l2jserver.model.world.npc.controller.impl.NotImplementedNPCController"
id="31845" xsi:schemaLocation="http://schemas.l2jserver2.com/npc ../../npc.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:template="http://schemas.l2jserver2.com/npc">
<info aggressive="false" targetable="true" attackable="true">
<name display="true" send="false">Bloody Pixy</name>
<level>80</level>
<race>FAIRIE</race>
<sex>FEMALE</sex>
<stats>
<hp regen="8.5" max="3290.11306877694"/>
<mp regen="3.0" max="1674.8"/>
<attack critical="4" evasion="0" range="40">
<physical speed="253.0" damage="970.53755"/>
<magical speed="333.0" damage="662.75133"/>
</attack>
<defense>
<physical value="341.375"/>
<magical value="249.80341"/>
</defense>
<move walk="80.0" run="120.0"/>
<base wit="20" dex="30" men="20" con="43" str="40" int="21"/>
</stats>
<experience>7680</experience>
<sp>226</sp>
<collision heigth="25.0" radius="5.0"/>
</info>
<talk default="default">
<chat id="default"><![CDATA[<html><body>Bloody Pixy:<br>
The weak spirits of darkness cannot protect the forest with their own powers and are receiving assistance from the Bloody Pixies. Wretched cowards they are, hiding in the ground, afraid of light!!<br>
Thanks to them, we deal with invaders and outlaws by our own hands. If you violate the laws here, You will know why we are called the Bloody Pixies. Better be careful!<br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>]]></chat>
</talk>
<skills>
<skill level="1" id="4408"/>
<skill level="1" id="4409"/>
<skill level="16" id="4410"/>
<skill level="16" id="4411"/>
<skill level="16" id="4412"/>
<skill level="16" id="4413"/>
<skill level="2" id="4414"/>
<skill level="3" id="4415"/>
<skill level="13" id="4416"/>
</skills>
</template:npc>

View File

@@ -29,5 +29,6 @@ public class L2JConstant {
* <p>
* This <b>MUST</b> be hard-coded!
*/
public static final ProtocolVersion SUPPORTED_PROTOCOL = ProtocolVersion.FREYA;
//public static final ProtocolVersion SUPPORTED_PROTOCOL = ProtocolVersion.FREYA;
public static final ProtocolVersion SUPPORTED_PROTOCOL = ProtocolVersion.INTERLUDE;
}

View File

@@ -48,8 +48,7 @@ public class TeleporterController extends BaseNPCController {
if (args.length >= 2) {
switch (args[0]) {
case "goto":
final TeleportationTemplate tele = teleportationIdProvider
.resolveID(Integer.parseInt(args[1])).getTemplate();
final TeleportationTemplate tele = teleportationIdProvider.resolveID(Integer.parseInt(args[1])).getTemplate();
if (tele == null) {
throw new NPCControllerException();
}

View File

@@ -23,9 +23,12 @@ import org.slf4j.LoggerFactory;
import com.google.inject.Inject;
import com.l2jserver.model.id.object.CharacterID;
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
import com.l2jserver.model.world.Actor;
import com.l2jserver.model.world.L2Character;
import com.l2jserver.service.AbstractService;
import com.l2jserver.service.ServiceException;
import com.l2jserver.service.game.item.ItemService;
import com.l2jserver.service.game.spawn.CharacterAlreadyTeleportingServiceException;
import com.l2jserver.service.game.spawn.NotSpawnedServiceException;
import com.l2jserver.service.game.spawn.SpawnService;
@@ -53,6 +56,12 @@ public class AdministratorServiceImpl extends AbstractService implements
*/
@SuppressWarnings("unused")
private List<CharacterID> online;
@Inject
private ItemService itemService;
@Inject
private ItemTemplateIDProvider itidProvider;
/**
* @param spawnService
@@ -66,7 +75,7 @@ public class AdministratorServiceImpl extends AbstractService implements
@Override
public void command(Lineage2Client conn, L2Character character,
String command, String... args) throws NotSpawnedServiceException,
CharacterAlreadyTeleportingServiceException {
CharacterAlreadyTeleportingServiceException, ServiceException {
log.debug("{} is opening admin control panel", character);
switch (command) {
case "tele":
@@ -79,8 +88,12 @@ public class AdministratorServiceImpl extends AbstractService implements
Integer.parseInt(args[1]),
Integer.parseInt(args[2])));
break;
default:
case "give":
// conn.sendMessage( "adding " + itidProvider.resolveID(57).getTemplate().getName() );
character.getInventory().add( itemService.create(itidProvider.resolveID(57).getTemplate(), 10000) );
break;
default:
throw new ServiceException();
}
}
}

View File

@@ -103,7 +103,7 @@ public class MapperPathingService extends AbstractService implements
@Override
protected void doStart() throws ServiceStartException {
try {
final java.nio.file.Path dbFile = vfsService.resolveDataFile(file);
final java.nio.file.Path dbFile = vfsService.resolveDataFile(file.toString());
this.channel = Files.newByteChannel(dbFile, CREATE, APPEND, WRITE);
} catch (IOException e) {
throw new ServiceStartException(

View File

@@ -28,9 +28,9 @@ public enum ProtocolVersion {
*/
RELEASE(0),
/**
* The Interlude(200) version
* The Interlude(746) version
*/
INTERLUDE(200, RELEASE),
INTERLUDE(746, RELEASE),
/**
* The Freya(216) version
*/
@@ -39,7 +39,7 @@ public enum ProtocolVersion {
* The High5(268) version
*/
HIGH5(268, FREYA);
/**
* The parent version
*/

View File

@@ -16,7 +16,8 @@
<modules>
<module>l2jserver2-gameserver-core</module>
<module>l2jserver2-gameserver-freya</module>
<!-- <module>l2jserver2-gameserver-freya</module> -->
<module>l2jserver2-gameserver-interlude</module>
</modules>
<build>