Jump to content
  • 0

Question

13 answers to this question

Recommended Posts

  • 0
Posted (edited)

hello there can you give me code for make my server when someone death and when they press to vilage to go my location where i set.

Give a try here...

 

network/clientpackets/RequestRestartPoint.java

                            loc = new Location(17836, 170178, -3507);// Floran Village
                            break;
                        }
-                        loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
-                            break;
-                        }
+                        if (Config.CUSTOM_RESPAWN)
+                            loc = new Location(Config.CSPAWN_X, Config.CSPAWN_Y, Config.CSPAWN_Z);
+                        else
+                            loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
+                        break;
+                }

Config.java

    public static boolean CUSTOM_RESPAWN;
    public static int CSPAWN_X;
    public static int CSPAWN_Y;
    public static int CSPAWN_Z;
 
        CUSTOM_RESPAWN = Boolean.parseBoolean(altSettings.getProperty("RespawnAfterDeath", "false"));
        CSPAWN_X = Double.parseDouble(altSettings.getProperty("SpawnX", "your choose"));
        CSPAWN_Y = Double.parseDouble(altSettings.getProperty("SpawnY", "your choose"));
        CSPAWN_Z = Double.parseDouble(altSettings.getProperty("SpawnZ", "your choose"));

config.property

# Custom Respawn When You Die.
RespawnAfterDeath = false
SpawnX = your choose
SpawnY = your choose
SpawnZ = your choose
Edited by 'Baggos'
  • 0
Posted (edited)

clientpackets/requestrestartpoint.java

 

check the 'default' value, in _requestedpointtype switch method.

Edited by Klay
  • 0
Posted

i dont understand you can you give me code to add or remove 

i try this http://www.maxcheaters.com/topic/180110-respawn-location-after-death/ butits not working

that's what i'm talking about..

 

you probably put that in different case,because it seems fine to me.

  • 0
Posted

 

Give a try here...

 

network/clientpackets/RequestRestartPoint.java

                            loc = new Location(17836, 170178, -3507);// Floran Village
                            break;
                        }
-                        loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
-                            break;
-                        }
+                        if (Config.CUSTOM_RESPAWN)
+                        {
+                            loc = new Location(Config.CSPAWN_X, Config.CSPAWN_Y, Config.CSPAWN_Z);
+                            break;
+                        }
+                }

Config.java

    public static boolean CUSTOM_RESPAWN;
    public static int CSPAWN_X;
    public static int CSPAWN_Y;
    public static int CSPAWN_Z;
 
        CUSTOM_RESPAWN = Boolean.parseBoolean(altSettings.getProperty("RespawnAfterDeath", "false"));
        CSPAWN_X = Double.parseDouble(altSettings.getProperty("SpawnX", "your choose"));
        CSPAWN_Y = Double.parseDouble(altSettings.getProperty("SpawnY", "your choose"));
        CSPAWN_Z = Double.parseDouble(altSettings.getProperty("SpawnZ", "your choose"));

config.property

# Custom Respawn When You Die.
RespawnAfterDeath = false
SpawnX = your choose
SpawnY = your choose
SpawnZ = your choose

that's totally wrong,

what if someone set this config as false?

 

NPE.

 

it needs to be like

 

if (Config.CUSTOM_RESPAWN)
+                            loc = new Location(Config.CSPAWN_X, Config.CSPAWN_Y, Config.CSPAWN_Z);
+else
+                             loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
+
+       break;

 

plus,the code author posted above its correct,but he probably put it in another case,as I said.

  • 0
Posted (edited)

well thank you but i dont understand where to put this where is this files Config.java and config.property

 public static boolean CUSTOM_RESPAWN;
    public static int CSPAWN_X;
    public static int CSPAWN_Y;
    public static int CSPAWN_Z;
 
        CUSTOM_RESPAWN = Boolean.parseBoolean(altSettings.getProperty("RespawnAfterDeath", "false"));
        CSPAWN_X = Double.parseDouble(altSettings.getProperty("SpawnX", "your choose"));
        CSPAWN_Y = Double.parseDouble(altSettings.getProperty("SpawnY", "your choose"));
        CSPAWN_Z = Double.parseDouble(altSettings.getProperty("SpawnZ", "your choose"));

and this

# Custom Respawn When You Die.
RespawnAfterDeath = false
SpawnX = your choose
SpawnY = your choose
SpawnZ = your choose
Edited by haskovo
  • 0
Posted (edited)

Everywhere you want...

Juts change later the "altsettings" if you add the code in another property..

 

or under from 

    public static boolean ALT_PETS_STATS_BONUS;
+    public static boolean CUSTOM_RESPAWN;
+    public static int CSPAWN_X;
+    public static int CSPAWN_Y;
+    public static int CSPAWN_Z;
 
            ALT_PETS_STATS_BONUS = Boolean.parseBoolean(altSettings.getProperty("AltPetsStatsBonus", "True"));
+            CUSTOM_RESPAWN = Boolean.parseBoolean(altSettings.getProperty("RespawnAfterDeath", "false"));
+            CSPAWN_X = Double.parseDouble(altSettings.getProperty("SpawnX", "your choose"));
+            CSPAWN_Y = Double.parseDouble(altSettings.getProperty("SpawnY", "your choose"));
+            CSPAWN_Z = Double.parseDouble(altSettings.getProperty("SpawnZ", "your choose"));

Don't forget to change the "your choose"

 

altsettings.property

AltPetsStatsBonus = True
+
+# Custom Respawn When You Die.
+RespawnAfterDeath = false
+SpawnX = your choose
+SpawnY = your choose
+SpawnZ = your choose

Don't forget to change the "your choose"

Edited by 'Baggos'
  • 0
Posted

Put this

 

            CSPAWN_X = Integer.parseInt(altSettings.getProperty("SpawnX", "your choose"));
            CSPAWN_Y = Integer.parseInt(altSettings.getProperty("SpawnY", "your choose"));
            CSPAWN_Z = Integer.parseInt(altSettings.getProperty("SpawnZ", "your choose"));

and don't forget to change the "your choose".

Guest
This topic is now closed to further replies.


  • Posts

    • 🤝 SocNet is looking for new partners and suppliers!  We are building a reliable partner network across all areas of online business.  If you're in digital, traffic, accounts, or media — let’s discuss collaboration opportunities.   📌 Open to:  — Webmasters and media buyers  — Telegram channel and website owners  — Sellers of accounts and auto-registered profiles  — Developers of digital services  — Marketing agencies and freelancers 💬 We value quality, transparency, and growth. If that resonates with you — get in touch!   📎 Our current list of partners:  🔗 https://socnet.bgng.io/partners   📦 Our key products:  🛒 Online Store: Click ✅  🤖 Telegram Bot: Click ✅  📲 SMM Panel: Click ✅   📩 Contact us:  💬 Telegram: https://t.me/solomon_bog  📱 WhatsApp: https://wa.me/79051904467  🎮 Discord: https://discord.gg/y9AStFFsrh  📧 Email: solomonbog@socnet.store   📢 Follow updates: https://t.me/accsforyou_shop ✅
    • 🤝 SocNet is looking for new partners and suppliers!  We are building a reliable partner network across all areas of online business.  If you're in digital, traffic, accounts, or media — let’s discuss collaboration opportunities. 📌 Open to:  — Webmasters and media buyers  — Telegram channel and website owners  — Sellers of accounts and auto-registered profiles  — Developers of digital services  — Marketing agencies and freelancers 💬 We value quality, transparency, and growth. If that resonates with you — get in touch! 📎 Our current list of partners:  🔗 https://socnet.bgng.io/partners 📦 Our key products:  🛒 Online Store: Click ✅  🤖 Telegram Bot: Click ✅  📲 SMM Panel: Click ✅ 📩 Contact us:  💬 Telegram: https://t.me/solomon_bog  📱 WhatsApp: https://wa.me/79051904467  🎮 Discord: https://discord.gg/y9AStFFsrh  📧 Email: solomonbog@socnet.store 📢 Follow updates: https://t.me/accsforyou_shop ✅
    • 🤝 SocNet is looking for new partners and suppliers!  We are building a reliable partner network across all areas of online business.  If you're in digital, traffic, accounts, or media — let’s discuss collaboration opportunities. 📌 Open to:  — Webmasters and media buyers  — Telegram channel and website owners  — Sellers of accounts and auto-registered profiles  — Developers of digital services  — Marketing agencies and freelancers 💬 We value quality, transparency, and growth. If that resonates with you — get in touch!   📎 Our current list of partners:  🔗 https://socnet.bgng.io/partners   📦 Our key products:  🛒 Online Store: Click ✅  🤖 Telegram Bot: Click ✅  📲 SMM Panel: Click ✅   📩 Contact us:  💬 Telegram: https://t.me/solomon_bog   📱 WhatsApp: https://wa.me/79051904467  🎮 Discord: https://discord.gg/y9AStFFsrh  📧 Email: solomonbog@socnet.store   📢 Follow updates: https://t.me/accsforyou_shop ✅
    • 🔥 **L2MADPvP - Interlude x1200 | GRAND OPENING 19  2025!** 🔥 ✅ Classic Interlude PvP experience — No custom items, only fair gameplay. ✅ Balanced classes — No OP donations, pure skill PvP. ✅ Epic battles, daily GM events, active community. ✅ Auto Farm areas — No grind, just fight! ✅ Vote Reward system — Earn Donate Coins for free. 🌍 Website: www.l2madpvp.com   💬 Join our Discord: https://discord.gg/qDmRjMQ2   🎁 Grand Opening Giveaway  🗓️ Opening: **23/07/2025 at 16:00 GMT+2** 👉 Gather your clan, dominate the battlefield & become legend!
    • [center][size=6][b][color=#FF0000]🔥 L2MadPvP - Lineage 2 Interlude 🔥[/color][/b][/size] [b]🌍 Website:[/b] [url=https://www.L2MadPvP.com]www.L2MadPvP.com[/url]   [b]💬 Discord:[/b] [i]Coming Soon[/i] (Βάλε το link σου εδώ)   [b]📅 Grand Opening:[/b] [i]Βάλε ημερομηνία[/i] [hr] [size=5][b][color=#00BFFF]🎯 Server Rates[/color][/b][/size] [b]• Instant Level:[/b] 80   [b]• EXP/SP:[/b] x1200   [b]• Drop:[/b] Custom   [b]• Epic RB Jewel Drop:[/b] x1 (Most Damage) [hr] [size=5][b][color=#00BFFF]🔨 Enchant Details[/color][/b][/size] [b]• Safe Enchant:[/b] +3   [b]• Max Blessed Enchant:[/b] +14   [b]• Max Crystal Enchant:[/b] +16 [b]• Normal Scroll Chance:[/b] 65% (+0 → +14)   [b]• Blessed Scroll Chance:[/b] 100% (+0 → +14)   [b]• Crystal Scroll Chance:[/b] 50% (+14 → +16) [i](Fail = Same enchant)[/i] [b]• Custom Scroll Chance:[/b]   → +0 → +16: 100%   → +16 → +17: 95%   → +17 → +18: 90%   → +18 → +19: 85%   → +19 → +20: 80% [i]Fail = Item remains at previous enchant.[/i]   Example: Fail from +19 → +20 = stays +19 [hr] [size=5][b][color=#00BFFF]💎 Augmentation[/color][/b][/size] [b]• Max Augment Skills:[/b] 1 Active + 1 Passive   [b]• High Grade Lifestone:[/b] 10%   [b]• Top Grade Lifestone:[/b] 20% [hr] [b][color=#FF0000]👉 JOIN US NOW! PvP Madness Awaits![/color][/b]   [url=https://www.L2MadPvP.com][b]🌐 www.L2MadPvP.com[/b][/url][/center]
  • 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