Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Npc de Recomendacion

Iniciado por Swarlog, Ago 09, 2022, 01:17 AM

Tema anterior - Siguiente tema

Swarlog

### Eclipse Workspace Patch 1.0
#P L2J_DataPack_BETA
Index: dist/game/data/scripts/ai/npc/RecNpc/00001-03.html
===================================================================
--- dist/game/data/scripts/ai/npc/RecNpc/00001-03.html (revision 0)
+++ dist/game/data/scripts/ai/npc/RecNpc/00001-03.html (working copy)
@@ -0,0 +1,4 @@
+<html><body>Your NPC name:<br>
+In your bad I would do that ?<br>
+You didn't give me a chance!
+</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/RecNpc/00001-02.html
===================================================================
--- dist/game/data/scripts/ai/npc/RecNpc/00001-02.html (revision 0)
+++ dist/game/data/scripts/ai/npc/RecNpc/00001-02.html (working copy)
@@ -0,0 +1,4 @@
+<html><body>Your NPC name:<br>
+Here. Now give me the fucking money!!!<br>
+Or I'll call the cops.
+</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/ai/npc/RecNpc/RecNpc.java
===================================================================
--- dist/game/data/scripts/ai/npc/RecNpc/RecNpc.java (revision 0)
+++ dist/game/data/scripts/ai/npc/RecNpc/RecNpc.java (working copy)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack 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.
+ *
+ * L2J DataPack 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.npc.RecNpc;
+
+import ai.npc.AbstractNpcAI;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ * @author netvirus
+ */
+public class RecNpc extends AbstractNpcAI
+{
+
+ // NPC
+ private static final int NPC_NAME = 00001;
+
+ private RecNpc(String name, String descr)
+ {
+ super(name, descr);
+ addStartNpc(NPC_NAME);
+ addFirstTalkId(NPC_NAME);
+ addTalkId(NPC_NAME);
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ String htmltext = event;
+ switch (event)
+ {
+ case "get":
+ {
+ player.setRecomHave(255);
+ htmltext = "00001-02.html";
+ break;
+ }
+ case "quit":
+ {
+ htmltext = "00001-03.html";
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onFirstTalk(L2Npc npc, L2PcInstance player)
+ {
+ return "00001-01.html";
+ }
+
+ public static void main(String[] args)
+ {
+ new RecNpc(RecNpc.class.getSimpleName(), "ai/npc");
+ }
+}
Index: dist/game/data/scripts/ai/npc/RecNpc/00001-01.html
===================================================================
--- dist/game/data/scripts/ai/npc/RecNpc/00001-01.html (revision 0)
+++ dist/game/data/scripts/ai/npc/RecNpc/00001-01.html (working copy)
@@ -0,0 +1,5 @@
+<html><body>Your NPC name:<br>
+Hi, I can give you a full recommendation. If you need...<br>
+<a action="bypass -h Quest RecNpc get">Ok, give me.</a>
+<a action="bypass -h Quest RecNpc quit">No. Thanks.</a>
+</body></html>
\ No newline at end of file

--> Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate