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

    • just with this extender that I have shared it is not possible to start with c4 client, you have to make some changes to the extender and it works with c4 client perfectly. regarding the updates in this last revision   🔹dll is not packaged with vmprotect   New custom zone types have been added: 🔹 NO_NOBLESS begin MinX=84638 MaxX=92616 MinY=-87170 MaxY=-82018 MinZ=-6000 MaxZ=0 Type=NO_NOBLESS KickOutPos=83007/148057/-3464 end   ▶️ This zone checks if the character is noble. If it does not meet the condition, it will be automatically kicked to the indicated position (KickOutPos). 🔹 CUSTOM_SPAWN_ZONE begin MinX=77275 MaxX=85704 MinY=10122 MaxY=18066 MinZ=-8000 MaxZ=5000 Type=CUSTOM_SPAWN_ZONE OutPos=83007/148057/-3464 Spawns={{82984/18066/-5256}};{{79275/15147/-5248}};{{82922/14263/-5256}};{{83704/10122/-5288}} end ▶️ This zone allows characters, upon death, to respawn with full buff, CP, HP and MP if they press “Fixed”. They will only be able to revive in one of the positions defined in Spawns. 🔧 Both zones are fully configurable from territorydata.txt
    • Could you tell me what changed in this update?   more one question: Is it possible to log in through the c4 client instead of interlude? That would be great  
    • ➡ Discount for your purchase: JULY2025 (11% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: JULY2025 (11% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
  • 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