Jump to content
  • 0

[Help] XP/SP


Question

4 answers to this question

Recommended Posts

  • 0
Posted

here is enterworld.java what i have to change?

/*

* This program is free software: you can redistribute it and/or modify it under

* the terms of the GNU General Public License as published by the Free Software

* Foundation, either version 3 of the License, or (at your option) any later

* version.

*

* This program is distributed in the hope that it will be useful, but WITHOUT

* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more

* details.

*

* You should have received a copy of the GNU General Public License along with

* this program. If not, see <http://www.gnu.org/licenses/>.

*/

package com.l2jesios.gameserver.network.clientpackets;

 

import com.l2jesios.Config;

import com.l2jesios.gameserver.Announcements;

import com.l2jesios.gameserver.GameTimeController;

import com.l2jesios.gameserver.SevenSigns;

import com.l2jesios.gameserver.ThreadPoolManager;

import com.l2jesios.gameserver.cache.HtmCache;

import com.l2jesios.gameserver.datatables.AdminCommandAccessRights;

import com.l2jesios.gameserver.datatables.CharSchemesTable;

import com.l2jesios.gameserver.datatables.GmListTable;

import com.l2jesios.gameserver.datatables.MapRegionTable;

import com.l2jesios.gameserver.datatables.SkillTable.FrequentSkill;

import com.l2jesios.gameserver.instancemanager.ClanHallManager;

import com.l2jesios.gameserver.instancemanager.CoupleManager;

import com.l2jesios.gameserver.instancemanager.DimensionalRiftManager;

import com.l2jesios.gameserver.instancemanager.PetitionManager;

import com.l2jesios.gameserver.instancemanager.QuestManager;

import com.l2jesios.gameserver.instancemanager.SiegeManager;

import com.l2jesios.gameserver.instancemanager.SiegeReward;

import com.l2jesios.gameserver.model.L2Clan;

import com.l2jesios.gameserver.model.L2World;

import com.l2jesios.gameserver.model.actor.L2Character;

import com.l2jesios.gameserver.model.actor.instance.L2PcInstance;

import com.l2jesios.gameserver.model.addons.L2AccountManager;

import com.l2jesios.gameserver.model.addons.PvPColorSystem;

import com.l2jesios.gameserver.model.addons.StartupSystem;

import com.l2jesios.gameserver.model.addons.VipEngine;

import com.l2jesios.gameserver.model.entity.ClanHall;

import com.l2jesios.gameserver.model.entity.Couple;

import com.l2jesios.gameserver.model.entity.Siege;

import com.l2jesios.gameserver.model.olympiad.Olympiad;

import com.l2jesios.gameserver.model.quest.Quest;

import com.l2jesios.gameserver.model.quest.QuestState;

import com.l2jesios.gameserver.network.SystemMessageId;

import com.l2jesios.gameserver.network.serverpackets.CreatureSay;

import com.l2jesios.gameserver.network.serverpackets.Die;

import com.l2jesios.gameserver.network.serverpackets.EtcStatusUpdate;

import com.l2jesios.gameserver.network.serverpackets.ExShowScreenMessage;

import com.l2jesios.gameserver.network.serverpackets.ExStorageMaxCount;

import com.l2jesios.gameserver.network.serverpackets.FriendList;

import com.l2jesios.gameserver.network.serverpackets.HennaInfo;

import com.l2jesios.gameserver.network.serverpackets.ItemList;

import com.l2jesios.gameserver.network.serverpackets.NpcHtmlMessage;

import com.l2jesios.gameserver.network.serverpackets.PledgeShowMemberListAll;

import com.l2jesios.gameserver.network.serverpackets.PledgeShowMemberListUpdate;

import com.l2jesios.gameserver.network.serverpackets.PledgeSkillList;

import com.l2jesios.gameserver.network.serverpackets.PledgeStatusChanged;

import com.l2jesios.gameserver.network.serverpackets.QuestList;

import com.l2jesios.gameserver.network.serverpackets.ShortCutInit;

import com.l2jesios.gameserver.network.serverpackets.SkillCoolTime;

import com.l2jesios.gameserver.network.serverpackets.SystemMessage;

import com.l2jesios.gameserver.network.serverpackets.UserInfo;

 

import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.util.Calendar;

 

import javolution.text.TextBuilder;

 

 

 

 

public class EnterWorld extends L2GameClientPacket

{

 

 

 

@Override

protected void readImpl()

{

// this is just a trigger packet. it has no content

}

 

@Override

protected void runImpl()

{

final L2PcInstance activeChar = getClient().getActiveChar();

if (activeChar == null)

{

_log.warning("EnterWorld failed! activeChar is null...");

getClient().closeNow();

return;

}

 

if (L2World.getInstance().findObject(activeChar.getObjectId()) != null)

{

if (Config.DEBUG)

_log.warning("User already exist in OID map! User " + activeChar.getName() + " is character clone.");

}

 

if (activeChar.isGM())

{

if (Config.GM_STARTUP_INVULNERABLE && AdminCommandAccessRights.getInstance().hasAccess("admin_invul", activeChar.getAccessLevel()))

activeChar.setIsInvul(true);

 

if (Config.GM_STARTUP_INVISIBLE && AdminCommandAccessRights.getInstance().hasAccess("admin_hide", activeChar.getAccessLevel()))

activeChar.getAppearance().setInvisible();

 

if (Config.GM_STARTUP_SILENCE && AdminCommandAccessRights.getInstance().hasAccess("admin_silence", activeChar.getAccessLevel()))

activeChar.setInRefusalMode(true);

 

if (Config.GM_STARTUP_AUTO_LIST && AdminCommandAccessRights.getInstance().hasAccess("admin_gmliston", activeChar.getAccessLevel()))

GmListTable.getInstance().addGm(activeChar, false);

else

GmListTable.getInstance().addGm(activeChar, true);

}

 

if(Config.PVP_COLOR_ENABLED)

{

PvPColorSystem pvpcolor = new PvPColorSystem();

pvpcolor.updateNameColor(activeChar);

pvpcolor.updateTitleColor(activeChar);

}

 

if(SiegeReward.ACTIVATED_SYSTEM && !SiegeReward.REWARD_ACTIVE_MEMBERS_ONLY)

SiegeReward.getInstance().processWorldEnter(activeChar);

 

if(Config.VIP_ENABLE)

VipEngine.onEnterVip(activeChar);

VipEngine.onEnterVipMessage(activeChar);

 

if (Config.AIO_ENABLE)

VipEngine.onEnterAio(activeChar);

 

if(Config.STARTUP_SYSTEM_ENABLED)

StartupSystem.startIt(activeChar);

 

// Set dead status if applies

if (activeChar.getCurrentHp() < 0.5)

activeChar.setIsDead(true);

 

if (activeChar.getClan() != null)

{

activeChar.sendPacket(new PledgeSkillList(activeChar.getClan()));

notifyClanMembers(activeChar);

notifySponsorOrApprentice(activeChar);

 

// Add message at connexion if clanHall not paid.

ClanHall clanHall = ClanHallManager.getInstance().getClanHallByOwner(activeChar.getClan());

if (clanHall != null)

{

if (!clanHall.getPaid())

activeChar.sendPacket(SystemMessageId.PAYMENT_FOR_YOUR_CLAN_HALL_HAS_NOT_BEEN_MADE_PLEASE_MAKE_PAYMENT_TO_YOUR_CLAN_WAREHOUSE_BY_S1_TOMORROW);

}

 

for (Siege siege : SiegeManager.getSieges())

{

if (!siege.getIsInProgress())

continue;

 

if (siege.checkIsAttacker(activeChar.getClan()))

activeChar.setSiegeState((byte) 1);

else if (siege.checkIsDefender(activeChar.getClan()))

activeChar.setSiegeState((byte) 2);

}

 

activeChar.sendPacket(new PledgeShowMemberListAll(activeChar.getClan(), activeChar));

activeChar.sendPacket(new PledgeStatusChanged(activeChar.getClan()));

}

 

// Updating Seal of Strife Buff/Debuff

if (SevenSigns.getInstance().isSealValidationPeriod() && SevenSigns.getInstance().getSealOwner(SevenSigns.SEAL_STRIFE) != SevenSigns.CABAL_NULL)

{

int cabal = SevenSigns.getInstance().getPlayerCabal(activeChar.getObjectId());

if (cabal != SevenSigns.CABAL_NULL)

{

if (cabal == SevenSigns.getInstance().getSealOwner(SevenSigns.SEAL_STRIFE))

activeChar.addSkill(FrequentSkill.THE_VICTOR_OF_WAR.getSkill());

else

activeChar.addSkill(FrequentSkill.THE_VANQUISHED_OF_WAR.getSkill());

}

}

else

{

activeChar.removeSkill(FrequentSkill.THE_VICTOR_OF_WAR.getSkill());

activeChar.removeSkill(FrequentSkill.THE_VANQUISHED_OF_WAR.getSkill());

}

 

if (Config.PLAYER_SPAWN_PROTECTION > 0)

activeChar.setProtection(true);

 

activeChar.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ());

 

// buff and status icons

if (Config.STORE_SKILL_COOLTIME)

activeChar.restoreEffects();

 

// engage and notify Partner

if (Config.ALLOW_WEDDING)

engage(activeChar);

 

// Announcements, welcome & Seven signs period messages

activeChar.sendPacket(SystemMessageId.WELCOME_TO_LINEAGE);

SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar);

Announcements.getInstance().showAnnouncements(activeChar);

 

// if player is DE, check for shadow sense skill at night

if (activeChar.getRace().ordinal() == 2)

{

// If player got the skill (exemple : low level DEs haven't it)

if (activeChar.getSkillLevel(294) == 1)

{

if (GameTimeController.getInstance().isNowNight())

activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NIGHT_EFFECT_APPLIES).addSkillName(294));

else

activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.DAY_EFFECT_DISAPPEARS).addSkillName(294));

}

}

 

activeChar.getMacroses().sendUpdate();

activeChar.sendPacket(new UserInfo(activeChar));

activeChar.sendPacket(new HennaInfo(activeChar));

activeChar.sendPacket(new FriendList(activeChar));

// activeChar.queryGameGuard();

activeChar.sendPacket(new ItemList(activeChar, false));

activeChar.sendPacket(new ShortCutInit(activeChar));

activeChar.sendPacket(new ExStorageMaxCount(activeChar));

activeChar.sendPacket(new EtcStatusUpdate(activeChar));

activeChar.sendSkillList();

 

        if (Config.ALLOW_SCREEN_MESSAGE)

        activeChar.sendPacket(new ExShowScreenMessage(Config.SCREEN_MESSAGE, 6000));

       

        if(Config.ALLOW_ACCOUNT_MAILER)

        {

        if (!L2AccountManager.hasSubEmail(activeChar))

        ThreadPoolManager.getInstance().scheduleGeneral(new entermail(activeChar), 20000);

        }

        if (Config.ALLOW_ENTER_MESSAGES)

        {

        CreatureSay np = new CreatureSay(0, Say2.PARTY,Config.PREFIX, Config.MESSAGE_1);

        activeChar.sendPacket(np);

        CreatureSay nd = new CreatureSay(0, Say2.PARTY,Config.PREFIX, Config.MESSAGE_2);

        activeChar.sendPacket(nd);

        CreatureSay ns = new CreatureSay(0, Say2.PARTY,Config.PREFIX, Config.MESSAGE_3);

        activeChar.sendPacket(ns);

        }

       

        if (Config.ALLOW_LAST_VISIT_INFORMATION)

    {

        DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");

        Calendar calendar = Calendar.getInstance();

        calendar.setTimeInMillis(activeChar.getLastAccess());

        if (activeChar.getUptime() > 1)

            activeChar.sendMessage("Your last visit was at " + formatter.format(calendar.getTime()));

        }

       

Quest.playerEnter(activeChar);

if (!Config.DISABLE_TUTORIAL)

loadTutorial(activeChar);

 

if (Config.CHECK_SKILLS_ON_ENTER && !Config.ALT_GAME_SKILL_LEARN)

    if (!activeChar.isAio())

    activeChar.checkAllowedSkills();

 

for (Quest quest : QuestManager.getInstance().getAllManagedScripts())

{

if (quest != null && quest.getOnEnterWorld())

quest.notifyEnterWorld(activeChar);

}

activeChar.sendPacket(new QuestList());

 

if (Config.SERVER_NEWS)

{

String serverNews = HtmCache.getInstance().getHtm("data/html/servnews.htm");

if (serverNews != null)

sendPacket(new NpcHtmlMessage(1, serverNews));

}

 

if ( Config.TEST_SERVER || Config.SERVER_GMONLY)

{

activeChar.sendMessage("This Server uses L2j Esios Pack.");

        activeChar.sendMessage("www.l2jesios.org");

}

 

        if(activeChar.getClan() != null)

        {

        if(activeChar.getClan().getClanMes() != null)

        {

        CreatureSay np = new CreatureSay(0, Say2.ALLIANCE,activeChar.getClan().getLeader().getName() , activeChar.getClan().getClanMes());

        activeChar.sendPacket(np);

        }

        }

       

        if (Config.NPCBUFFER_FEATURE_ENABLED)

        CharSchemesTable.getInstance().onPlayerLogin(activeChar.getObjectId());

       

PetitionManager.getInstance().checkPetitionMessages(activeChar);

 

// no broadcast needed since the player will already spawn dead to others

if (activeChar.isAlikeDead())

sendPacket(new Die(activeChar));

 

activeChar.onPlayerEnter();

 

sendPacket(new SkillCoolTime(activeChar));

 

// If player logs back in a stadium, port him in nearest town.

if (Olympiad.getInstance().playerInStadia(activeChar))

activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Town);

 

if (DimensionalRiftManager.getInstance().checkIfInRiftZone(activeChar.getX(), activeChar.getY(), activeChar.getZ(), false))

DimensionalRiftManager.getInstance().teleportToWaitingRoom(activeChar);

 

if (activeChar.getClanJoinExpiryTime() > System.currentTimeMillis())

activeChar.sendPacket(SystemMessageId.CLAN_MEMBERSHIP_TERMINATED);

 

// Attacker or spectator logging into a siege zone will be ported at town.

if (!activeChar.isGM() && (!activeChar.isInSiege() || activeChar.getSiegeState() < 2) && activeChar.isInsideZone(L2Character.ZONE_SIEGE))

activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Town);

 

}

 

 

 

private static void engage(L2PcInstance cha)

{

int _chaid = cha.getObjectId();

 

for (Couple cl : CoupleManager.getInstance().getCouples())

{

if (cl.getPlayer1Id() == _chaid || cl.getPlayer2Id() == _chaid)

{

if (cl.getMaried())

cha.setMarried(true);

 

cha.setCoupleId(cl.getId());

}

}

}

 

class entermail implements Runnable{

private L2PcInstance p;

   

public entermail(L2PcInstance player)

{

  p = player;

}

   

@Override

public void run()

{

subhtml(p);

}

 

}

 

public void subhtml(L2PcInstance player)

{

TextBuilder tb = new TextBuilder();

NpcHtmlMessage html = new NpcHtmlMessage(1);

       

tb.append("<html><head><title>Submit your Email</title></head>");

tb.append("<body>");     

tb.append("<center>");

tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">");

tb.append("<tr>");

tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>");

tb.append("<td valign=\"top\"><font color=\"FF6600\">Email submitance</font>");

tb.append("<br1><font color=\"00FF00\">"+player.getName()+"</font>, please submit here your REAL email address.</td></tr></table></center>");

tb.append("<center>");

tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center><br>");

tb.append("</center>");

tb.append("<table width=\"350\" cellpadding=\"5\" bgcolor=\"000000\">");

tb.append("<tr>");

tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"Icon.etc_old_key_i02\" width=\"32\" height=\"32\"></td>");

tb.append("<td valign=\"top\">Please enter your Email:<multiedit var=\"email1\" width=180 height=15>");

tb.append("<br1>We need this to be your real one.</td>");

tb.append("</tr>");

tb.append("</table>");

tb.append("<br>");

tb.append("<center>");

tb.append("<button value=\"Submit\" action=\"bypass -h submitemail $email1\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\">");

tb.append("</center>");

tb.append("<center>");

tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center>");

tb.append("<font color=\"FF6600\">By Elfocrash</font>");

tb.append("</center>");

tb.append("</body></html>");

       

html.setHtml(tb.toString());

player.sendPacket(html);

}

 

private static void notifyClanMembers(L2PcInstance activeChar)

{

L2Clan clan = activeChar.getClan();

clan.getClanMember(activeChar.getName()).setPlayerInstance(activeChar);

 

SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.CLAN_MEMBER_S1_LOGGED_IN);

msg.addPcName(activeChar);

 

clan.broadcastToOtherOnlineMembers(msg, activeChar);

clan.broadcastToOtherOnlineMembers(new PledgeShowMemberListUpdate(activeChar), activeChar);

 

msg = null;

}

 

private static void notifySponsorOrApprentice(L2PcInstance activeChar)

{

if (activeChar.getSponsor() != 0)

{

L2PcInstance sponsor = L2World.getInstance().getPlayer(activeChar.getSponsor());

if (sponsor != null)

sponsor.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_APPRENTICE_S1_HAS_LOGGED_IN).addPcName(activeChar));

}

else if (activeChar.getApprentice() != 0)

{

L2PcInstance apprentice = L2World.getInstance().getPlayer(activeChar.getApprentice());

if (apprentice != null)

apprentice.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_SPONSOR_S1_HAS_LOGGED_IN).addPcName(activeChar));

}

}

 

private static void loadTutorial(L2PcInstance player)

{

QuestState qs = player.getQuestState("Tutorial");

if (qs != null)

qs.getQuest().notifyEvent("UC", null, player);

}

 

@Override

protected boolean triggersOnActionRequest()

{

return false;

}

}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Opening December 6th at 19:00 (GMT +3)! Open Beta Test from November 30th!   https://l2soe.com/   🌟 Introducing L2 Saga of Eternia: A Revolution in Lineage 2 High Five! 🌟   Dear Lineage 2 enthusiasts, Prepare to witness the future of private servers! L2 Saga of Eternia is not just another High Five project—it’s a game-changing experience designed to compete with the giants of the Lineage 2 private server scene. Built for the community, by the community, we’re here to raise the bar in quality, innovation, and longevity. What Sets Us Apart? 💎 No Wipes, Ever Say goodbye to the fear of losing your progress. Our server is built to last and will never close. Stability and consistency are our promises to you. ⚔️ Weekly New Content Our dedicated development team ensures fresh challenges, events, and updates every week. From custom quests to exclusive features, there will always be something exciting to explore. 💰 No Pay-to-Win Skill and strategy matter most here. Enjoy a balanced gameplay environment where your achievements come from effort, not your wallet. 🌍 A Massive Community With 2000+ players expected, join a vibrant and active community of like-minded adventurers ready to conquer the world of Aden. 🏆 Fair and Competitive Gameplay Our systems are designed to promote healthy competition while avoiding abusive mechanics and exploits. 🔧 Professional Development From advanced bug fixes to carefully curated content, we pride ourselves on smooth performance, no lag, and unparalleled server quality. Key Features Chronicle: High Five with unique interface Rate: Dynamic x10 rates Class Balance: Carefully fine-tuned for a fair experience PvP Focused: PvP Ranking & aura display effect for 3 Top PvPers every week Custom Events: Seasonal and permanent events to keep you engaged Additional Features:   Custom Endgame Content: Introduce unique dungeons, raids, or zones unavailable in other servers. Player-Driven Economy: Implement a strong market system and avoid overinflated drops or rewards. Epic Siege Battles: Announce special large-scale sieges and PvP events. Incentives for Streamers and Clans: Attract influencers and big clans to boost server publicity. Roadmap Transparency: Share a public roadmap of planned updates to build trust and excitemen   Here you can read all the features: https://l2soe.com/features   Video preview: Join the Revolution! This is your chance to be part of something legendary. L2 Saga of Eternia is not just a server; it’s a movement to redefine what Lineage 2 can be. Whether you’re a seasoned veteran or a newcomer to the world of Aden, we invite you to experience Lineage 2 at its finest.   Official Launch Date: December 6th 2024 Website: https://l2soe.com/ Facebook: https://www.facebook.com/l2soe Discord: https://discord.com/invite/l2eternia   Let’s build the ultimate Lineage 2 experience together. See you in-game! 🎮
    • That's like a tutorial on how to run l2 on MacOS Xd but good job for the investigation. 
    • small update: dc robe set sold   wts adena 1kk = 1.5$ 
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hood-services https://campsite.bio/utchihaamkt
    • Why adena in this sever so expensive 🙂
  • Topics

×
×
  • Create New...