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

    • My official facebook profile!: https://www.facebook.com/spectrumL2 Specifications: Revamped L2JACIS revision FROM the core Private project!!! Revision that has been receiving corrections for over 3 years!!! Events already installed in the revision: TVT CTF KTB PARTY FARM SPOIL EVENT CRAZY RATES TOURNAMENT TIME ZONE (INSTANCE) All working correctly!!! SIEGE ESSENTIAL FEATURES: Walls fix Gates fix Flags fix 100% functional: OLYMPIADS: Implemented settings Hero receives enchanted Weapons with equal status PvP Weapons Optional /true/false Hero can acquire all Hero Weapons Optional true/false OTHER IMPLEMENTATIONS: Teleport fixed (directly to Giran) Teleport effect classic Vip skins vip collor name Pack NPCs with effect already configured BOSES already configured Mobs already configured CLASS BALANCE SPECIAL SYSTEM We have a SPECIAL system developed for Class Balance with only 1 digit in XML %tage of configurable debuffs Player limitation system in BOSES or PvP zones BS blocking system in FLEG zones or events Among others dozens of improvements made in the review... price: 390 USD !  OBS: WE CAN CHANGE THE BANNER AND NAME OF THE SERVICE TO THE ONE OF YOUR PREFERENCE BUT THE SETTINGS MUST BE KEPT ANY CHANGES REQUIRE ADDITION        
    • Server is Online – 1,000+ Active Players! We’re excited to announce the addition of a Europe Proxy to improve connectivity for our EU players! Clans can now benefit from VIP Access to help you catch up faster. 🎯 If you're a clan leader with at least 9 active members, join our Discord and open a ticket to claim your VIP rewards!  
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
  • 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