Jump to content
  • 0

[Help] TVT/CTF/DM participation problem


baiumbg

Question

9 answers to this question

Recommended Posts

  • 0

There is no html. It's only in java. I can paste you the html part of the script though (the whole function) :) :

 

public static void showEventHtml(L2PcInstance eventPlayer, String objectId)

{

try

{

NpcHtmlMessage adminReply = new NpcHtmlMessage(5);

 

L2TextBuilder replyMSG = L2TextBuilder.newInstance("<html><body>");

replyMSG.append("TvT Match<br><br><br>");

replyMSG.append("Current event...<br1>");

replyMSG.append("    ... name: <font color=\"00FF00\">" + _eventName + "</font><br1>");

replyMSG.append("    ... description: <font color=\"00FF00\">" + _eventDesc + "</font><br>");

if (Config.TVT_ANNOUNCE_REWARD)

replyMSG.append("    ... reward: (" + _rewardAmount + ") " + ItemTable.getInstance().getTemplate(_rewardId).getName() + "<br>");

 

if (!_started && !_joining)

replyMSG.append("<center>Wait till the admin/gm start the participation.</center>");

else if (Config.TVT_EVEN_TEAMS.equals("SHUFFLE") && !checkMaxPlayers(_playersShuffle.size()))

{

if (!TvT._started)

{

replyMSG

.append("<font color=\"FFFF00\">The event has reached its maximum capacity.</font><br>Keep checking, someone may crit and you can steal their spot.");

}

}

else if (eventPlayer.isCursedWeaponEquipped() && !Config.TVT_JOIN_CURSED)

{

replyMSG.append("<font color=\"FFFF00\">You can't participate in this event with a cursed Weapon.</font><br>");

}

else if (!_started && _joining && eventPlayer.getLevel() >= _minlvl && eventPlayer.getLevel() < _maxlvl)

{

if (_players.contains(eventPlayer) || checkShufflePlayers(eventPlayer))

{

if (Config.TVT_EVEN_TEAMS.equals("NO") || Config.TVT_EVEN_TEAMS.equals("BALANCE"))

replyMSG.append("You are already participating in team <font color=\"LEVEL\">" + eventPlayer.as(TvTPlayerInfo.class)._teamNameTvT + "</font><br><br>");

else if (Config.TVT_EVEN_TEAMS.equals("SHUFFLE"))

replyMSG.append("You are already participating!<br><br>");

 

replyMSG.append("<table border=\"0\"><tr>");

replyMSG.append("<td width=\"200\">Wait till event start or</td>");

replyMSG.append("<td width=\"60\"><center><button value=\"remove\" action=\"bypass -h npc_" + objectId

+ "_tvt_player_leave\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></center></td>");

replyMSG.append("<td width=\"100\">your participation!</td>");

replyMSG.append("</tr></table>");

}

else

{

replyMSG.append("You want to participate in the event?<br><br>");

replyMSG.append("<td width=\"200\">Your level : <font color=\"00FF00\">" + eventPlayer.getLevel() + "</font></td><br>");

replyMSG.append("<td width=\"200\">Min level : <font color=\"00FF00\">" + _minlvl + "</font></td><br>");

replyMSG.append("<td width=\"200\">Max level : <font color=\"00FF00\">" + _maxlvl + "</font></td><br><br>");

 

if (Config.TVT_EVEN_TEAMS.equals("NO") || Config.TVT_EVEN_TEAMS.equals("BALANCE"))

{

replyMSG.append("<center><table border=\"0\">");

 

for (String team : _teams)

{

replyMSG.append("<tr><td width=\"100\"><font color=\"LEVEL\">" + team + "</font> (" + teamPlayersCount(team) + " joined)</td>");

replyMSG.append("<td width=\"60\"><button value=\"Join\" action=\"bypass -h npc_" + objectId + "_tvt_player_join " + team

+ "\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");

}

 

replyMSG.append("</table></center>");

}

else if (Config.TVT_EVEN_TEAMS.equals("SHUFFLE"))

{

replyMSG.append("<center><table border=\"0\">");

 

for (String team : _teams)

replyMSG.append("<tr><td width=\"100\"><font color=\"LEVEL\">" + team + "</font></td>");

 

replyMSG.append("</table></center><br>");

 

replyMSG.append("<button value=\"Join\" action=\"bypass -h npc_" + objectId

+ "_tvt_player_join eventShuffle\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");

replyMSG.append("Teams will be randomly generated!");

}

}

}

else if (_started && !_joining)

replyMSG.append("<center>TvT match is in progress.</center>");

else if (eventPlayer.getLevel() < _minlvl || eventPlayer.getLevel() > _maxlvl)

{

replyMSG.append("Your level : <font color=\"00FF00\">" + eventPlayer.getLevel() + "</font><br>");

replyMSG.append("Min level : <font color=\"00FF00\">" + _minlvl + "</font><br>");

replyMSG.append("Max level : <font color=\"00FF00\">" + _maxlvl + "</font><br><br>");

replyMSG.append("<font color=\"FFFF00\">You can't participate in this event.</font><br>");

}

// Show how many players joined & how many are still needed to join

replyMSG.append("<br>There are " + _playersShuffle.size() + " player(s) participating in this event.<br>");

if (_joining)

{

if (_playersShuffle.size() < _minPlayers)

{

int playersNeeded = _minPlayers - _playersShuffle.size();

replyMSG.append("The event will not start unless " + playersNeeded + " more player(s) joins!");

}

}

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

adminReply.setHtml(replyMSG.moveToString());

eventPlayer.sendPacket(adminReply);

 

// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet

eventPlayer.sendPacket(ActionFailed.STATIC_PACKET);

}

catch (Exception e)

{

_log.warn("TvT Engine[showEventHtlm(" + eventPlayer.getName() + ", " + objectId + ")]: exception", e);

}

}

Link to comment
Share on other sites

  • 0

if (!_started && !_joining)
            replyMSG.append("<center>Wait till the admin/gm start the participation.</center>");

 

It's not obvious for you to think you have to start manually the thing ?

 

There are players level checks too (min and max).

 

----

 

Made me laugh (devs are bitches lol).

 

Keep checking, someone may crit and you can steal their spot.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore1 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11
    • L2 ArenaWar: Low Rate PvP Server with Free Buffs & Autofarm [PVP]⚔️ [Free]🆓 Classic Interlude with  3x XP rates! Free starter pack(no grade) to kickstart your adventure! Autofarm for convenient grinding! Free buffs to keep you fighting fit! (2 job buffs) No experience loss on death! (Except with Karma) Clear Karma system to keep things fair! ⚖️ Active community of 800-1k players! Join our Discord to learn more! >> Discord <<     Server website: https://l2arenawar.com/en/    
    • This is dedication! 2 years working on a problem. Congratulations!
    • You indeed have to save player position over Enterworld to properly clean it up later (if you don't, even trying to delete packet content would eventually keep it up), that's what we do with debug packet (which is a reusable Map of ExServerPrimitive packets) on aCis.   It doesn't solve the FPS stuttering - more you draw/delete lines, more your client becomes laggy. It's like if client wasn't deleting drawn points/lines properly, but instead simply hide them and redrawn content above.   If you got a solution, I would happy to integrate it.   You should check aCis#Player _debug packet integration, it allows very big amount of lines/points to be drawn, it is also reusable.   https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java?ref_type=heads https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java?ref_type=heads  
    • we sell website templates, make websites to order. Great selection at very good prices. My contacts discord : advert1231 telegram : https://t.me/ggwpins  
  • Topics

×
×
  • Create New...