From 0d2a91b609199a42aac807064fd08e915402e006 Mon Sep 17 00:00:00 2001
From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Fri, 13 Dec 2019 09:18:42 +0000
Subject: [PATCH] Check faction level for Celestiel teleports. Thanks to Edoo.
---
.../EnchantedValley/Celestiel/34234-5.html | 5 +++++
.../EnchantedValley/Celestiel/Celestiel.java | 21 +++++++++++++++----
.../EnchantedValley/Celestiel/34234-5.html | 5 +++++
.../EnchantedValley/Celestiel/Celestiel.java | 21 +++++++++++++++----
.../EnchantedValley/Celestiel/34234-5.html | 5 +++++
.../EnchantedValley/Celestiel/Celestiel.java | 21 +++++++++++++++----
.../EnchantedValley/Celestiel/34234-5.html | 5 +++++
.../EnchantedValley/Celestiel/Celestiel.java | 21 +++++++++++++++----
.../EnchantedValley/Celestiel/34234-5.html | 5 +++++
.../EnchantedValley/Celestiel/Celestiel.java | 21 +++++++++++++++----
.../EnchantedValley/Celestiel/34234-5.html | 5 +++++
.../EnchantedValley/Celestiel/Celestiel.java | 21 +++++++++++++++----
12 files changed, 132 insertions(+), 24 deletions(-)
create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
new file mode 100644
index 0000000000..18d33363b7
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
@@ -0,0 +1,5 @@
+
Celestiel:
+I'm sorry, but I'm rather iffy about putting you on assignment.
+This is a dangerous place. Please take yourself some place safe.
+(This quest can only be undertaken by characters whose faction level with the Mother Tree Guardians is 2 or higher.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
index a14417723f..76cee599ea 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
@@ -16,6 +16,7 @@
*/
package ai.areas.EnchantedValley.Celestiel;
+import org.l2jmobius.gameserver.enums.Faction;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -64,12 +65,26 @@ public class Celestiel extends AbstractNpcAI
}
case "south":
{
- player.teleToLocation(SOUTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(SOUTH_LOCATION);
+ }
break;
}
case "north":
{
- player.teleToLocation(NORTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(NORTH_LOCATION);
+ }
break;
}
}
@@ -79,7 +94,6 @@ public class Celestiel extends AbstractNpcAI
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
-
player.sendPacket(new PlaySound(3, CELESTIEL_VOICE[getRandom(2)], 0, 0, 0, 0, 0));
return "34234.html";
}
@@ -88,5 +102,4 @@ public class Celestiel extends AbstractNpcAI
{
new Celestiel();
}
-
}
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
new file mode 100644
index 0000000000..18d33363b7
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
@@ -0,0 +1,5 @@
+Celestiel:
+I'm sorry, but I'm rather iffy about putting you on assignment.
+This is a dangerous place. Please take yourself some place safe.
+(This quest can only be undertaken by characters whose faction level with the Mother Tree Guardians is 2 or higher.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
index a14417723f..76cee599ea 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
@@ -16,6 +16,7 @@
*/
package ai.areas.EnchantedValley.Celestiel;
+import org.l2jmobius.gameserver.enums.Faction;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -64,12 +65,26 @@ public class Celestiel extends AbstractNpcAI
}
case "south":
{
- player.teleToLocation(SOUTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(SOUTH_LOCATION);
+ }
break;
}
case "north":
{
- player.teleToLocation(NORTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(NORTH_LOCATION);
+ }
break;
}
}
@@ -79,7 +94,6 @@ public class Celestiel extends AbstractNpcAI
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
-
player.sendPacket(new PlaySound(3, CELESTIEL_VOICE[getRandom(2)], 0, 0, 0, 0, 0));
return "34234.html";
}
@@ -88,5 +102,4 @@ public class Celestiel extends AbstractNpcAI
{
new Celestiel();
}
-
}
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
new file mode 100644
index 0000000000..18d33363b7
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
@@ -0,0 +1,5 @@
+Celestiel:
+I'm sorry, but I'm rather iffy about putting you on assignment.
+This is a dangerous place. Please take yourself some place safe.
+(This quest can only be undertaken by characters whose faction level with the Mother Tree Guardians is 2 or higher.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
index a14417723f..76cee599ea 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
@@ -16,6 +16,7 @@
*/
package ai.areas.EnchantedValley.Celestiel;
+import org.l2jmobius.gameserver.enums.Faction;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -64,12 +65,26 @@ public class Celestiel extends AbstractNpcAI
}
case "south":
{
- player.teleToLocation(SOUTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(SOUTH_LOCATION);
+ }
break;
}
case "north":
{
- player.teleToLocation(NORTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(NORTH_LOCATION);
+ }
break;
}
}
@@ -79,7 +94,6 @@ public class Celestiel extends AbstractNpcAI
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
-
player.sendPacket(new PlaySound(3, CELESTIEL_VOICE[getRandom(2)], 0, 0, 0, 0, 0));
return "34234.html";
}
@@ -88,5 +102,4 @@ public class Celestiel extends AbstractNpcAI
{
new Celestiel();
}
-
}
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
new file mode 100644
index 0000000000..18d33363b7
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
@@ -0,0 +1,5 @@
+Celestiel:
+I'm sorry, but I'm rather iffy about putting you on assignment.
+This is a dangerous place. Please take yourself some place safe.
+(This quest can only be undertaken by characters whose faction level with the Mother Tree Guardians is 2 or higher.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
index a14417723f..76cee599ea 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
@@ -16,6 +16,7 @@
*/
package ai.areas.EnchantedValley.Celestiel;
+import org.l2jmobius.gameserver.enums.Faction;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -64,12 +65,26 @@ public class Celestiel extends AbstractNpcAI
}
case "south":
{
- player.teleToLocation(SOUTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(SOUTH_LOCATION);
+ }
break;
}
case "north":
{
- player.teleToLocation(NORTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(NORTH_LOCATION);
+ }
break;
}
}
@@ -79,7 +94,6 @@ public class Celestiel extends AbstractNpcAI
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
-
player.sendPacket(new PlaySound(3, CELESTIEL_VOICE[getRandom(2)], 0, 0, 0, 0, 0));
return "34234.html";
}
@@ -88,5 +102,4 @@ public class Celestiel extends AbstractNpcAI
{
new Celestiel();
}
-
}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
new file mode 100644
index 0000000000..18d33363b7
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
@@ -0,0 +1,5 @@
+Celestiel:
+I'm sorry, but I'm rather iffy about putting you on assignment.
+This is a dangerous place. Please take yourself some place safe.
+(This quest can only be undertaken by characters whose faction level with the Mother Tree Guardians is 2 or higher.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
index a14417723f..76cee599ea 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
@@ -16,6 +16,7 @@
*/
package ai.areas.EnchantedValley.Celestiel;
+import org.l2jmobius.gameserver.enums.Faction;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -64,12 +65,26 @@ public class Celestiel extends AbstractNpcAI
}
case "south":
{
- player.teleToLocation(SOUTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(SOUTH_LOCATION);
+ }
break;
}
case "north":
{
- player.teleToLocation(NORTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(NORTH_LOCATION);
+ }
break;
}
}
@@ -79,7 +94,6 @@ public class Celestiel extends AbstractNpcAI
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
-
player.sendPacket(new PlaySound(3, CELESTIEL_VOICE[getRandom(2)], 0, 0, 0, 0, 0));
return "34234.html";
}
@@ -88,5 +102,4 @@ public class Celestiel extends AbstractNpcAI
{
new Celestiel();
}
-
}
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
new file mode 100644
index 0000000000..18d33363b7
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/34234-5.html
@@ -0,0 +1,5 @@
+Celestiel:
+I'm sorry, but I'm rather iffy about putting you on assignment.
+This is a dangerous place. Please take yourself some place safe.
+(This quest can only be undertaken by characters whose faction level with the Mother Tree Guardians is 2 or higher.)
+
\ No newline at end of file
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
index a14417723f..76cee599ea 100644
--- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/EnchantedValley/Celestiel/Celestiel.java
@@ -16,6 +16,7 @@
*/
package ai.areas.EnchantedValley.Celestiel;
+import org.l2jmobius.gameserver.enums.Faction;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -64,12 +65,26 @@ public class Celestiel extends AbstractNpcAI
}
case "south":
{
- player.teleToLocation(SOUTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(SOUTH_LOCATION);
+ }
break;
}
case "north":
{
- player.teleToLocation(NORTH_LOCATION);
+ if (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) < 2)
+ {
+ htmltext = "34234-5.html";
+ }
+ else
+ {
+ player.teleToLocation(NORTH_LOCATION);
+ }
break;
}
}
@@ -79,7 +94,6 @@ public class Celestiel extends AbstractNpcAI
@Override
public String onFirstTalk(Npc npc, PlayerInstance player)
{
-
player.sendPacket(new PlaySound(3, CELESTIEL_VOICE[getRandom(2)], 0, 0, 0, 0, 0));
return "34234.html";
}
@@ -88,5 +102,4 @@ public class Celestiel extends AbstractNpcAI
{
new Celestiel();
}
-
}