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

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

    • Good evening everyone! I wouldn't normally ask for help with something like this, but I'm honestly stuck and can't figure it out anymore. I have a C3 pack (I'll also include the link below since it took me a while to find a good one with everything needed to run it): (https://www.mediafire.com/file/glhnscql6hkd6ra/l2jnvc3_rev178_Greenhope_l2j_%2Bjava_%2Bsql.zip/file) The problem is that I'm completely stuck on one thing. No matter what I do, I can't log in. I keep getting a "wrong protocol" error. I've tried changing the protocol from 550–700 all the way to 1–999. I've tested many different C3 versions and every main system I could find, but I still haven't managed to log in successfully. I'm not sure if I'm doing something wrong when saving the .ini file after changing it to my server's IP address. If anyone could help me, I would really appreciate it. I'll keep the server online so that if someone is willing to assist, they can try logging in and help me figure out what's wrong. Server IP: 194.219.108.63 Thank you very much in advance to anyone who decides to take the time to help me. I'd really love to get this pack running properly and preserve it for the future.
    • Anosim Update   - New updated design is live - Free Numbers added on the mainpage - Use free numbers for activation - Receive SMS for free   ⸻   New Blog added Future news, updates and platform changes will be posted there   ⸻   Partner Section added New space for partners and integrations   ⸻   New Websites for Activation added   🇩🇪 Germany wg-gesucht.de dikidi.net 🇨🇭 Switzerland Tutti.ch Ricardo.ch 🇦🇺 Australia Gumtree.com.au 🇬🇧 UK Askable.com   ⸻   New Countries added for Activation   🇦🇷 Argentina 🇧🇬 Bulgaria 🇨🇲 Cameroon 🇭🇷 Croatia 🇬🇷 Greece 🇰🇿 Kazakhstan 🇲🇦 Morocco   ⸻   New Full Rent 🇬🇪 Georgia +995 Numbers Full Rent now available Real SIM Cards No VoIP   ⸻   Available now on https://anosim.net
    • Shadowsocks Released   World’s first Dedicated Mobile Proxy with Shadowsocks support. Dedicated 4G/5G mobile proxies can now be used with Shadowsocks.   New dedicated mobile proxy locations added: 🇩🇪 Germany (Leipzig) 🇳🇬 Nigeria (Lagos) 🇺🇸 USA (South Haven)   Also available: 🌐 Residential Proxies from $1/GB   ⚡️ Datacenter Proxies from $0.50/GB   Available now on Proxied.   https://proxied.com For Free Trials, write us a DM with your registered E-mail.
  • 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..