Jump to content
  • 0

Java Code To Village.


Question

Posted

Hello guys.. What i mean with Java Code to Village? I want a code that when i press to Village to teleport me to the main town and not to the nearest location..

 

if you didnt understand me tell me to explain it more.. thank kk bb qq

Recommended Posts

  • 0
Posted

Tessa if you look over, the 've changed.

i typed two times the same mistake, making copy/paste from the old.

 

default:

      if (activeChar.getKarma() > 0 && Config.ALT_KARMA_TELEPORT_TO_FLORAN)

      {

       loc = new Location(17836, 170178, -3507);// Floran Village

       break;

      }

-      loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);

+       loc = new Location(Config.LOCX, Config.LOCY, Config.LOCZ);// Respawn Village After Die

      break;

    }

 

Better with Config ( Enable / Disable ) ;)

 

Cuz dont need server restart / and replace .jar :D

  • 0
Posted (edited)

Tessa if you look over, the 've changed.

i typed two times the same mistake, making copy/paste from the old.

 

default:

      if (activeChar.getKarma() > 0 && Config.ALT_KARMA_TELEPORT_TO_FLORAN)

      {

       loc = new Location(17836, 170178, -3507);// Floran Village

       break;

      }

-      loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);

+       loc = new Location(Config.LOCX, Config.LOCY, Config.LOCZ);// Respawn Village After Die

      break;

    }

I'm talking about your last post, the previous was correct... (After the editing of course :))

Edited by Tessa
  • 0
Posted

I didn't readed all the replyes so im just telling u my point.

Do it from server files on Town just set the spawnpoint from all the towns to be only as one of them

For example, copy spawn point of giran and paste them to all the other towns.

In this way, they will all go to Giran locations ( and can have more spawn points not just 1)

  • 0
Posted (edited)

I'm talking about your last post, the previous was correct... (After the editing of course :))

Is not correct... i put the code on line with karma..

because i put the config line with karma line. (is the same config).

when i read the code (when the activechar member, has say the wrong), i find my shit.

 

The previous is this:

 

- default:

-      if (activeChar.getKarma() > 0 && Config.ALT_KARMA_TELEPORT_TO_FLORAN)

-      {

-       loc = new Location(17836, 170178, -3507);// Floran Village

-       break;

-      }

-      loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);

-      break;

-    }

 

+ default:

+      if (activeChar.getKarma() > 0 && Config.ALT_KARMA_TELEPORT_TO_FLORAN && Config.CUSTOM_RESPAWN) (is the same).

+      {

+       loc = new Location(17836, 170178, -3507);// Floran Village

+       loc = new Location(Config.LOCX, Config.LOCY, Config.LOCZ);// Respawn Village (this is wrong line).

+       break;

+      }

+    }

[/code]

 

But the correct i think is this:

default:
if (activeChar.getKarma() > 0 && Config.ALT_KARMA_TELEPORT_TO_FLORAN)
            {
             loc = new Location(17836, 170178, -3507);// Floran Village
             break;
            }
-      loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
-      break;
-    }
+            loc = new Location(Config.LOCX, Config.LOCY, Config.LOCZ);// Respawn Village           
+            break;
+          }

Edited by 'Baggos'
  • 0
Posted

srsly?

 

all these replies & 3 pages for one line of code?

 

 

are you serious?

Since none is giving a solution yea 3 pages

also i tested the code i shared works like a charm ... :s

  • 0
Posted

srsly?

 

all these replies & 3 pages for one line of code?

 

 

are you serious?

i only replay 3 times. or you say for all of us?

i try to help.. the code is work... yesterday i tested and is ok... Maybe author do something wrong...

  • 0
Posted

ayami's code for me didnt work.. when my character die's i press to village and goes me to the nearest town... the same and with configs... pfff i will test another svn because this i  a bit shitty...

  • 0
Posted

My suggestion: move to aCis.

i want to do this but im not so experienced to have a pack like this.. im a newbie and i want first to practise before i take a good pack like this.. thats why im doing all this shits now.. just to learn.. and to open a crappy server just to take some experience. then when i will learn something i will take acis and will do changes again :D ...

  • 0
Posted (edited)

ayami's code for me didnt work.. when my character die's i press to village and goes me to the nearest town... the same and with configs... pfff i will test another svn because this i  a bit shitty...

I have try on aCis and it's ok. Last night i give wrong code because i use acis and on RequestRestartPoint i don't have this check/config: if (activeChar.getKarma bla bla bla) and i confused on copy.

Now i put frozen svn and i'll try the night...

 

But give a try here.. maybe you have custom zones on gatekeeper(farm zones and etc).. Go find this teleport on data/zones and change the spawn location with main town. (if you want to respawn after die on main town).

I don't remember many from files on lineage, because i have to play/edit 2 years+

I try to help, in that i remember.. Forgive me if i spam, with many replays. (as say the Frank). That you're asking is too simply ... The l2jfrozen, has many codes! And that some will do edit, will not work them too easy. (Not always, of course ).

 

 

My opinion is to just change the many respawn having each town, to put only one, and there, in every place, to you have NPC's and gatekeeper.

in mass PVP, some prefer to be elsewhere by others. That is, they want to take their time and do not want to know the others when to leave or how many go roundtrips.

 

Anyway ... an example for the respawn in zones, as i say above:

 

<zone id='11030' type='Town' shape="NPoly" minZ="-2800" maxZ="-1500">

  <stat name='name' val='Hunter Village'/>

  <stat name='townId' val='11'/>

  <stat name='taxById' val='5'/>

  <spawn X='117163' Y='76511' Z='-2712'/>

  <spawn X='116580' Y='76179' Z='-2729'/>

  <spawn X='119644' Y='76609' Z='-2274'/>

  <spawn X='117009' Y='78935' Z='-2289'/>

  <spawn X='115091' Y='77740' Z='-2709'/>

  <spawn X='118270' Y='74494' Z='-2502'/>

  <spawn X='115663' Y='74995' Z='-2625'/>

</zone>

Edited by 'Baggos'
Guest
This topic is now closed to further replies.



  • Posts

    • 11-29-2025 - OUR TOPIC IS RELEVANT! CONTACT US BY THE CONTACTS BELOW
    • 🔥 Launch was a success! Over 500 players joined L2Elixir on opening day, and we are holding a steady 420–450 online! We faced extortion attempts and heavy DDoS attacks, but our protections held strong — even if the cost was far higher than expected. What matters is we fought back and kept the server online for you. ⚔️ 💙 Our priority is simple: Deliver a stable, fair, and growing server that will evolve for years to come. We continue to invest in protections, advertising, and development — and we won’t stop. All we ask from YOU is one thing: 👉 Keep playing. The more active the community is, the faster the server grows. 💠 Important Note: We have no paid clans or CPs, no “boosted” groups, no unfair benefits. Everyone has an equal chance to progress and compete. Thank you to everyone who joined, supported, and believed in this project. Let’s make L2Elixir great again — even in 2025–2026! 🚀   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs   @Atom Can you please move to Private Servers? Thanks!
    • https://jumpshare.com/share/kIdeKALOhgtMKpBKqxpg Test Equip Armors-> FullPlate, Gloves, Legs, Chest , Boots
    • 黑色星期五 — 为您的流量提供高级福利 仅在11月28日,我们的特别促销码可为您提供13%的商店折扣。 促销码: BLACKFRIDAY (13% 折扣) 您可以通过我们的网站或 Telegram 机器人在商店购物! 有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram Messenger 方便访问商店。 其他服务: 虚拟号码服务: 前往 用于购买 Telegram Stars 的机器人: 前往 – 快速且优惠地在 Telegram 中购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们向您呈现当前的 促销和特惠活动 列表,用于购买我们服务的产品和服务: 1. 您可以在首次购买时使用促销码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣 — 只需在我们网站注册后发送您的用户名,格式如下:“SEND ME BONUS, MY USERNAME IS...” — 您需要在我们的论坛帖子中写下这句话! 3. SMM 面板首次试用可获得 $1:只需在我们的网站(支持)提交主题为“Get Trial Bonus”的工单。 4. 我们的 Telegram 频道和 Stars 购买机器人每周都会举办 Telegram Stars 抽奖活动! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ 邮箱: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock