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

    • Hi everyone, Since I’m no longer interested in L2 servers, if anyone is willing to continue the project, let me know. I’m currently selling the entire project. DM me for more information if you’re genuinely interested. I can offer limited free support for the first couple of months. It is not cheap. The sale includes the domain, the recently fully redesigned website, the updater, the interface, server files with Lucera ext source, and the database (excluding account passwords, emails, and other private information; character data can remain).   Server for test: https://lineage2.gold/download Server Info: https://lineage2.gold/info Over 110 videos YouTube playlist: https://www.youtube.com/watch?v=HO7BZaxUv2U&list=PLD9WZ0Nj-zstZaYeWxAxTKbX7ia2M_DUu&index=113  
    • You invent yourself a life - bad for you, one of the inner core dev, fernandopm, which worked hard over aCis quests from 2011 to 2016 is argentinian. I teached him back in time to work and make proper quests. My dev team comes from 10+ countries and I'm myself french. "Racist/nationalist" card ? Not working bro.   Not sure why I should thank you to send me questions, and regarding bug reports, so far, I got none of yours in either discord, gitlab, or forums. I'm sorry if you feel "ignored", but that's more a psychanalyst you need to speak with if you put emotions towards someones' appreciation over a forum. I never ignore a bug report, and if so (like skills reports), it's because I got a bigger plan (skills refactor, in that case). In any case, I delivered cookies for the bug report/fix, even if it dated of months, with proper credits over changesets. "Victim card" ? Not really working, but ok, maybe you're "emotional".   I barely make money out of aCis, for the spent time - simply selling my services, or even coding/administrating a minecraft/L2J server would make far more money. Breaking intentionally things would be stupid. If you don't understand I'm not the only one working on that pack, I can't help you. Also, the scale of edits is sometimes extreme - AI L2OFF ? 1800 files added. How do you want everything works in a single shot ? "Exploiting noobz for money" card ? Still not working, or I'm a terrible businessman.   Meanwhile - you shadow advertise your project, L2JOne (since 2017 btw) - you should maybe start by the beginning saying you're a competitor and aCis is actually a spike in your foot. That also explains why you act like that. RusAcis got the exact same strategy, speaking bad of me, saying they got unique fixes (you speak about I break things, they break and recode things 4 times sometimes, btw), but successfully reselling latest revision with poorly executed stuff. "aCis is good, Tryskell is ok, but I solve all issues in extreme low time so I can piss over him" card ? Mmmmhhhh.   Our conversation ends here if you want, I don't force ppl to speak with me if they don't want - hopefully, people would understand I'm not the arrogant one and the one who doesn't want to talk, or even collaborate. :). I understand you got your own project and got no will to improve aCis.   NOTE : I'm extremely happy for your call of ExShowServerPrimitive with getValidGeoLocation, extremely impressive. Arrogant, no. Sarcastic ? Maybe.   Good night everyone.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..

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