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.



×
×
  • Create New...