Jump to content

Smart Community Board


Recommended Posts

It is good! But I have a question that made me freaking out with sql query...

 

PreparedStatement statement = con.prepareStatement("SELECT SUM(chr.points), SUM(it.count), ch.char_name, ch.pkkills, ch.pvpkills, ch.onlinetime, ch.base_class, ch.online FROM characters ch LEFT JOIN character_raid_points chr ON ch.charId=chr.charId LEFT OUTER JOIN items it ON ch.charId=it.owner_id WHERE item_id=57 GROUP  BY ch.charId ORDER BY " + sort + " DESC LIMIT " + Config.TOP_PLAYER_RESULTS);

 

Here what I supposed to do... I was thinking show only normal players with accesslevel 0 so, I decide to add that query:

PreparedStatement statement = con.prepareStatement("SELECT SUM(chr.points), SUM(it.count), ch.char_name, ch.pkkills, ch.pvpkills, ch.onlinetime, ch.base_class, ch.online FROM characters ch LEFT JOIN character_raid_points chr ON ch.charId=chr.charId LEFT OUTER JOIN items it ON ch.charId=it.owner_id WHERE item_id=57 and ch.accesslevel=0 GROUP  BY ch.charId ORDER BY " + sort + " DESC LIMIT " + Config.TOP_PLAYER_RESULTS);

 

I do only put it and ch.accesslevel=0, but it doesn't make anything =(

 

Link to comment
Share on other sites

@f0zi

 

Try this one

 

PreparedStatement statement = con.prepareStatement("SELECT SUM(chr.points), SUM(it.count), ch.char_name, ch.pkkills, ch.pvpkills, ch.onlinetime, ch.base_class, ch.online, ch.accesslevel FROM characters ch LEFT JOIN character_raid_points chr ON ch.charId=chr.charId LEFT OUTER JOIN items it ON ch.charId=it.owner_id WHERE item_id=57 and ch.accesslevel=0 GROUP  BY ch.charId ORDER BY " + sort + " DESC LIMIT " + Config.TOP_PLAYER_RESULTS);

 

You fortgot to select the ch.accesslevel column.

Link to comment
Share on other sites

  • 2 weeks later...

i get this error in eclipse :

    [javac] Note: Some input files use or override a deprecated API.

    [javac] Note: Recompile with -Xlint:deprecation for details.

 

and in game i get first page html but when i click any thing it says Comunity Board: unknown Board: _bbstop any help is rly appreciated thnx

 

What pack do you use?

Maybe you didnt imported correct, try again and check for errors b4 compiling they show up in eclipse.

Link to comment
Share on other sites

  • 2 months later...

hello i have 2 error any help me

 

TopBBSManager.java

 

 

public String getRealOnline()

{

int counter = 0;

for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayersArray())

{

if (onlinePlayer.isOnline() && (onlinePlayer.getClient() != null && !onlinePlayer.getClient().isDetached()))

{

counter++;

}

}

Gracia Epilogue

thanks

Link to comment
Share on other sites

@RefuelGozos: You propably use another pack that doesnt have these methods. Which pack do you use? Try to find similar methods of them, or you can alternate the code to your pack.

Link to comment
Share on other sites

@RefuelGozos:

sorry for interrupting, but try this:

instead of this:

    for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayersArray())

try to use this:

    for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayers().values())

 

and if you use L2jServer epilogue I think this should be done:

    if (onlinePlayer.isOnline() && (onlinePlayer.getClient() != null && !onlinePlayer.getClient().isDetached()))

to:

    if (onlinePlayer.isOnline() == 1 && (onlinePlayer.getClient() != null && !onlinePlayer.getClient().isDetached()))

Link to comment
Share on other sites

@RefuelGozos:

sorry for interrupting, but try this:

instead of this:

    for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayersArray())

try to use this:

    for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayers().values())

 

and if you use L2jServer epilogue I think this should be done:

    if (onlinePlayer.isOnline() && (onlinePlayer.getClient() != null && !onlinePlayer.getClient().isDetached()))

to:

    if (onlinePlayer.isOnline() == 1 && (onlinePlayer.getClient() != null && !onlinePlayer.getClient().isDetached()))

 

fixed ty.

 

 

 

Link to comment
Share on other sites

Hello here I have a small error

 

(Version H5 p5)

 

 

error: non-static method getGameTicks() cannot be referenced from a static context  int timeSeconds = (GameTimeController.getGameTicks() - 36000) / 10;

Link to comment
Share on other sites

@remy80

change this:

    int timeSeconds = (GameTimeController.getGameTicks() - 36000) / 10;

to this:

    int timeSeconds = (GameTimeController.getInstance().getGameTicks() - 36000) / 10;

Link to comment
Share on other sites

thx for Code me need new help

 

[09 juin 18:17:00] GameServer connected!

[09 juin 18:18:59] Connection lost!

java.io.IOException: TCP Read: Failed reading.

        at org.netcon.NetConnection.read(NetConnection.java:109)

        at com.l2jserver.communityserver.network.GameServerThread.run(GameServer

Thread.java:85)

Link to comment
Share on other sites

  • 1 month later...

i only want to have the boss raid info (boss.htm) at the favorite tab. what do i have to change?  :poker face:

 

_bbsgetfav unknown board.

 

i use latest l2j h5  :good sir:

 

i tried for several hours ._.  :o

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.



  • Posts

    • rename the l2.bin into l2.exe
    • L2LIVE.PRO- Dynamic Mid-rates Essence Seven Signs GRAND OPENING - July 5, 20:00 GMT+3 (EEST) TEST SERVER IS OPEN - COME AND CHECK IT OUT TODAY! Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu   Server description * EXP/SP: Dynamic (x1- x100 based on your level, *before* Sayha and EXP buffs * Adena: x50 / Item Drop: x10 / Fishing EXP increased / Attribute EXP increased * Simplified gameplay to stay in the loop while not spending hours and hours farming * Starter Pack containing very useful items for beginners * MP replenishing potions with auto-consumption * No overpowered donations L2LIVE shop * All spellbook coupons, pet spellbook coupons and master books are sold via Game Assistant * Additionally you can buy SP pouches, enchanted talismans, pet training guides and various other consumables for Adena and L-Coin * More items such as cloaks, more talismans, agathions, belts, pendants, enchantment scrolls of various grades, evolution stones, etc will be added! Shop server as a shortcut, and all retail-like ways of earning items are still here! L-Coins * Drops with small change and in random amounts from Lv60+ monsters  * All raidbosses drop random amount of L-Coin Pouches generating up to 420 Lcoin per unit. **Grand Olympiad and Events** * Grand Olympiad is held week day * Format is 1v1, unlimited weekly fights  * Heroes are declared weekly at Sunday * There are three automated events - TvT, CTF and Deathmatch, running at evenings * Orc Fortress, Battle with Balok, Keber Hunter, Archievements Box, Daily Gift Calendar provisional events are active too Custom user commands * .offlineplay command, your character will keep playing till death or server restart * .offlineshop command, keeps your shop sitting until all items are purchased * .apon / .apoff - enable/disable HP/MP autoconsume And lots of other small improvements are waiting for you!   Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu
  • Topics

×
×
  • Create New...