Hi, Friends!
I'm making modifications on the L2JRoboto.
Which I'm implementing a method where if the character dies I will revive him in a city.
Class : FakePlayerAI
protected void toVillageOnDeath() {
Location location = MapRegionTable.getInstance().getLocationToTeleport((Creature)this._fakePlayer, MapRegionTable.TeleportType.TOWN);
if (this._fakePlayer.isDead() && !this._fakePlayer.isInsideZone(ZoneId.FLAG) && !Config.FAKE_PLAYER_RETURNS_TO_FARM_ZONE)
this._fakePlayer.doRevive();
this._fakePlayer.getFakeAi().teleportToLocation(location.getX(), location.getY(), location.getZ(), 20);
}
protected void rebuffAfterDeathAndTeleportBack() {
switch (this._fakePlayer.getClassId()) {
case ARCHMAGE:
case SOULTAKER:
case HIEROPHANT:
case ARCANA_LORD:
case CARDINAL:
case MYSTIC_MUSE:
case ELEMENTAL_MASTER:
case EVAS_SAINT:
case STORM_SCREAMER:
case SPECTRAL_MASTER:
case SHILLIEN_SAINT:
case DOMINATOR:
case DOOMCRYER:
this._fakePlayer.getFakeAi().applyDefaultBuffs();
break;
case DUELIST:
case DREADNOUGHT:
case PHOENIX_KNIGHT:
case SWORD_MUSE:
case HELL_KNIGHT:
case SPECTRAL_DANCER:
case EVAS_TEMPLAR:
case SHILLIEN_TEMPLAR:
case TITAN:
case MAESTRO:
case SAGGITARIUS:
case ADVENTURER:
case WIND_RIDER:
case MOONLIGHT_SENTINEL:
case GHOST_HUNTER:
case GHOST_SENTINEL:
case FORTUNE_SEEKER:
case GRAND_KHAVATARI:
this._fakePlayer.getFakeAi().applyDefaultBuffs();
break;
}
teleportBackFarmzone();
}
static int[] spawnloc2 = Config.SPAWN_FAKE_LOC2;
static int[] spawnloc1 = Config.SPAWN_FAKE_LOC1;
static int radius = 10000;
protected void teleportBackFarmzone() {
if (spawnloc2[0] >= spawnloc1[0])
spawnloc2[0] = spawnloc1[0] - 100;
if (spawnloc2[1] >= spawnloc1[1])
spawnloc2[1] = spawnloc1[1] - 100;
if (spawnloc1[2] >= spawnloc2[2])
spawnloc1[2] = spawnloc2[2] - 100;
int x = Rnd.get(spawnloc2[0], spawnloc1[0]);
int y = Rnd.get(spawnloc2[1], spawnloc1[1]);
int z = Rnd.get(spawnloc1[2] + 20, spawnloc2[2] + 20);
this._fakePlayer.getFakeAi().teleportToLocation(x, y, z, 20);
}
Config.java
public static boolean FAKE_PLAYER_RETURNS_TO_FARM_ZONE;
public static int[] SPAWN_FAKE_LOC2;
public static int[] SPAWN_FAKE_LOC1;
FAKE_PLAYER_RETURNS_TO_FARM_ZONE = fakeplayer.getProperty("FakePlayerReturnFarmzone", true);
SPAWN_FAKE_LOC1 = fakeplayer.getProperty("FakeSpawnLocation1", new int[] { 148989, -168447, 2008 });
SPAWN_FAKE_LOC2 = fakeplayer.getProperty("FakeSpawnLocation2", new int[] { 147208, -171816, 2248 });
What happens to me is that the characters, when they die, come back to life all the time in the area but repeated as the image shows.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I am really glad that i chose stinky's services , this guy is definitely skilled !
I ordered a mod for my server and he delivered and exceeded my expectations .
I am definitely recommend him highly enough !
-He is pretty fast
-Cool and easy to communicate
-skilled
So, make me understand one thing, you consider your previous work a crap? Everyone who has payd for l2jmobius subscription since 2018 untill 2024 had access to a crap version of your server and the best is the latest you release in this very moment to your actual subscribers?
Question
Rumble
Hi, Friends!
I'm making modifications on the L2JRoboto.
Which I'm implementing a method where if the character dies I will revive him in a city.
Class : FakePlayerAI
protected void toVillageOnDeath() { Location location = MapRegionTable.getInstance().getLocationToTeleport((Creature)this._fakePlayer, MapRegionTable.TeleportType.TOWN); if (this._fakePlayer.isDead() && !this._fakePlayer.isInsideZone(ZoneId.FLAG) && !Config.FAKE_PLAYER_RETURNS_TO_FARM_ZONE) this._fakePlayer.doRevive(); this._fakePlayer.getFakeAi().teleportToLocation(location.getX(), location.getY(), location.getZ(), 20); } protected void rebuffAfterDeathAndTeleportBack() { switch (this._fakePlayer.getClassId()) { case ARCHMAGE: case SOULTAKER: case HIEROPHANT: case ARCANA_LORD: case CARDINAL: case MYSTIC_MUSE: case ELEMENTAL_MASTER: case EVAS_SAINT: case STORM_SCREAMER: case SPECTRAL_MASTER: case SHILLIEN_SAINT: case DOMINATOR: case DOOMCRYER: this._fakePlayer.getFakeAi().applyDefaultBuffs(); break; case DUELIST: case DREADNOUGHT: case PHOENIX_KNIGHT: case SWORD_MUSE: case HELL_KNIGHT: case SPECTRAL_DANCER: case EVAS_TEMPLAR: case SHILLIEN_TEMPLAR: case TITAN: case MAESTRO: case SAGGITARIUS: case ADVENTURER: case WIND_RIDER: case MOONLIGHT_SENTINEL: case GHOST_HUNTER: case GHOST_SENTINEL: case FORTUNE_SEEKER: case GRAND_KHAVATARI: this._fakePlayer.getFakeAi().applyDefaultBuffs(); break; } teleportBackFarmzone(); } static int[] spawnloc2 = Config.SPAWN_FAKE_LOC2; static int[] spawnloc1 = Config.SPAWN_FAKE_LOC1; static int radius = 10000; protected void teleportBackFarmzone() { if (spawnloc2[0] >= spawnloc1[0]) spawnloc2[0] = spawnloc1[0] - 100; if (spawnloc2[1] >= spawnloc1[1]) spawnloc2[1] = spawnloc1[1] - 100; if (spawnloc1[2] >= spawnloc2[2]) spawnloc1[2] = spawnloc2[2] - 100; int x = Rnd.get(spawnloc2[0], spawnloc1[0]); int y = Rnd.get(spawnloc2[1], spawnloc1[1]); int z = Rnd.get(spawnloc1[2] + 20, spawnloc2[2] + 20); this._fakePlayer.getFakeAi().teleportToLocation(x, y, z, 20); }
Config.java
public static boolean FAKE_PLAYER_RETURNS_TO_FARM_ZONE; public static int[] SPAWN_FAKE_LOC2; public static int[] SPAWN_FAKE_LOC1; FAKE_PLAYER_RETURNS_TO_FARM_ZONE = fakeplayer.getProperty("FakePlayerReturnFarmzone", true); SPAWN_FAKE_LOC1 = fakeplayer.getProperty("FakeSpawnLocation1", new int[] { 148989, -168447, 2008 }); SPAWN_FAKE_LOC2 = fakeplayer.getProperty("FakeSpawnLocation2", new int[] { 147208, -171816, 2248 });
What happens to me is that the characters, when they die, come back to life all the time in the area but repeated as the image shows.
http://prntscr.com/r5ploz
Could you help me to see the error?
Thank you.
not upload image error
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.