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

    • just with this extender that I have shared it is not possible to start with c4 client, you have to make some changes to the extender and it works with c4 client perfectly. regarding the updates in this last revision   🔹dll is not packaged with vmprotect   New custom zone types have been added: 🔹 NO_NOBLESS begin MinX=84638 MaxX=92616 MinY=-87170 MaxY=-82018 MinZ=-6000 MaxZ=0 Type=NO_NOBLESS KickOutPos=83007/148057/-3464 end   ▶️ This zone checks if the character is noble. If it does not meet the condition, it will be automatically kicked to the indicated position (KickOutPos). 🔹 CUSTOM_SPAWN_ZONE begin MinX=77275 MaxX=85704 MinY=10122 MaxY=18066 MinZ=-8000 MaxZ=5000 Type=CUSTOM_SPAWN_ZONE OutPos=83007/148057/-3464 Spawns={{82984/18066/-5256}};{{79275/15147/-5248}};{{82922/14263/-5256}};{{83704/10122/-5288}} end ▶️ This zone allows characters, upon death, to respawn with full buff, CP, HP and MP if they press “Fixed”. They will only be able to revive in one of the positions defined in Spawns. 🔧 Both zones are fully configurable from territorydata.txt
    • Could you tell me what changed in this update?   more one question: Is it possible to log in through the c4 client instead of interlude? That would be great  
    • ➡ Discount for your purchase: JULY2025 (11% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: JULY2025 (11% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email 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