Jump to content
  • 0

Online Players On Npc


Question

Posted (edited)

Hello i would like to do this.. when i write on npc %online% npc shows online players how can i do that? for example <center><font color="00FF00">Online Players: %online% </font></center> .. if you know what i mean.

Edited by xNemesis

Recommended Posts

  • 0
Posted

Go at L2Npc.java

 

Find this method:

 

public void showChatWindow(L2PcInstance player, int val)

 

After this:

 

html.replace("%objectId%", getObjectId());

 

Add this:

 

html.replace("%online%", L2World.getInstance().getAllPlayersCount());

 

So, %online% can be used everywhere (at every single NPC).

  • 0
Posted

Hello i would like to do this.. when i write on npc %online% npc shows online players how can i do that? for example <center><font color="00FF00">Online Players: %online% </font></center> .. if you know what i mean.

where is this l2npc.java on eclipse (L2J Frozen)

  • 0
Posted

Go at L2Npc.java

 

Find this method:

 

public void showChatWindow(L2PcInstance player, int val)

 

After this:

 

html.replace("%objectId%", getObjectId());

 

Add this:

 

html.replace("%online%", L2World.getInstance().getAllPlayersCount());

 

So, %online% can be used everywhere (at every single NPC).

Doesnt work , i open L2NpcInstance i cant find what you say.. pack L2j frozen

  • 0
Posted

Doesnt work , i open L2NpcInstance i cant find what you say.. pack L2j frozen

html.replace("%objectId%", String.valueOf(getObjectId())); @l2npcinstance for frozen. u could search ofc but no.

  • 0
Posted

html.replace("%objectId%", String.valueOf(getObjectId())); @l2npcinstance for frozen. u could search ofc but no.

yes i add this exactly after this and i got error.

  • 0
Posted

html.replace("%online%", String.valueOf(L2World.getInstance().getAllPlayersCount()));

No error , but doesnt work ! when i open html of npc i see %online% no how much player are online... npc is L2Npc category.

  • 0
Posted

why u want Online Players npc when u have alt + b or .online  command ? or you want Online Players NPC with Their Time Online + how much Farm Coins / Vote Coins they have?

  • 0
Posted

why u want Online Players npc when u have alt + b or .online  command ? or you want Online Players NPC with Their Time Online + how much Farm Coins / Vote Coins they have?

Cause i create a server info npc and i though is good idea on center to have this Online Players: 200 px its nice though

  • 0
Posted

Cause i create a server info npc and i though is good idea on center to have this Online Players: 200 px its nice though

 

my opinion its not that good:D maybe i can help u in smth like this 

  • 0
Posted

Doesnt work , i open L2NpcInstance i cant find what you say.. pack L2j frozen

I told you L2Npc, not L2NpcInstance.

 

I am using the same code for my NPCs and it works perfect.

  • 0
Posted

Also I bet that you put it at the wrong method.

 

public void showChatWindow(final L2PcInstance player, final int val)

 

at this method.

  • 0
Posted

Go at L2NpcInstance

 

Search for this:

 

public void showChatWindow(final L2PcInstance player, final int val)

 

and here put the line I gave you.

Guest
This topic is now closed to further replies.


  • Posts

    • Looking to hire a skilled L2J developer or team to build a custom private server for solo play with advanced server-side AI bots. This is NOT for public launch — just a self-hosted project where I can simulate a full L2 experience alone or with a few friends. 🔹 What I Need A private L2J server ( High Five preferred, newer versions can work as well) with bots that: Farm 24/7 on their own (solo or in bot parties) Can be invited into party and follow basic orders (attack, follow, res, heal, etc.) Are able to join Olympiad, fight with proper logic (per class), and rank up Can coordinate for Raid Bosses (check spawn, move, assist, heal, DPS, etc.) Act like real players: town routines, rebuffing, restocking, even chatting if possible Have different roles: tanks, healers, nukers, archers, etc. Can interact through simple in-game commands or NPC interface 🔹 Your Job Set up the server and geodata Integrate a scalable bot system (written in Java or scriptable) Write clean, modular AI behavior (farming, PvP, party play, raid logic, etc.) Allow me to control/assign bots easily (in-game or config) Bonus: basic UI or GM panel for bot config 🔹 Payment Serious budget for serious work PayPal, crypto, or preferred method Project-based or hourly, negotiable Milestone-based OK 🔹 Contact Send me: Your experience with L2J or similar projects Any bot/AI systems you've built before Estimated timeframe Pricing expectations
    • Yeah, it’s wild how much gambling has changed. When I was growing up, even scratch-off tickets felt like a big thing, but now with so many casino apps and betting sites, it’s just everywhere. I know a few people who got caught up in online slots during lockdown and really struggled to stop, just because it was always on their phone.   I stick to in-game stuff like skin trading for games like CS2 or Dota, which to me feels less risky, especially if you know the value of the items. If you’re curious how these trades work or want to see some guides, just visit website—there’s a lot of info about trading without real gambling involved.
    • Yea, his work is amazing, very well done designs, but the timing is not really his thing. I’m waiting for logo and launcher design since December 2024, so 10 days is not really that much lol
    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market Auto Buy Store  : https://utchihamkt.mysellauth.com/ Not sure if we’re legit? Check Our server — real reviews, real buyers https://discord.gg/uthciha-servicess  | https://campsite.bio/utchihaamkt  
  • 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