-
Posts
239 -
Credits
0 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Williams
-
Good evening, I come to share a code that I made for my project. Code : https://pastebin.com/raw/sWbUMqiG Good as I do not like to use these ready made codes I made this, as aCis is clean and light, I will explain how to use my code. I took Draconic as an example. <item id="7575" type="Weapon" name="Draconic Bow"> <set name="icon" val="icon.weapon_draconic_bow_i00" /> <set name="default_action" val="equip" /> <set name="weapon_type" val="BOW" /> <set name="bodypart" val="lrhand" /> <set name="random_damage" val="5" /> <set name="attack_range" val="500" /> <set name="damage_range" val="0;0;10;0" /> <set name="crystal_count" val="2440" /> <set name="crystal_type" val="S" /> <set name="material" val="ADAMANTAITE" /> <set name="weight" val="1650" /> <set name="price" val="48800000" /> <set name="soulshots" val="1" /> <set name="spiritshots" val="1" /> <set name="mp_consume" val="11" /> <set name="reuse_delay" val="1500" /> <cond msgId="1518"> <and> <player classId="SAGGITARIUS" /> </and> </cond> <for> <set order="0x08" stat="pAtk" val="581" /> <set order="0x08" stat="mAtk" val="132" /> <set order="0x08" stat="rCrit" val="12" /> <sub order="0x10" stat="accCombat" val="3" /> <set order="0x08" stat="pAtkSpd" val="293" /> <enchant val="0" order="0x0C" stat="pAtk" /> <enchant val="0" order="0x0C" stat="mAtk" /> </for> </item> Here you block to other classes, so only a certain class can use. <cond msgId="1518"> <and> <player classId="DUELIST" /> </and> </cond> when another class tries to use the bow !!
-
Help GateKeeper aCis
Williams replied to Williams's question in Request Server Development Help [L2J]
Sorted out. thank you @Tryskell -
Hello, I am looking for where is this msg = "" in the teleport buttons, I searched for all soucer and I did not even find Exemple : <a action="bypass -h npc_%objectId%_goto 15" msg="811;The Village of Gludin">The Village of Gludin - 18000 Adena</a><br1> where did the Triskell myth hide the MSG????
-
Help Siege Reward for aCis
Williams replied to Williams's question in Request Server Development Help [L2J]
I will do what you said, thanks. I'm your fan -
Hello i'm creating this code for the clan that take the castle. created rewardClanWinner () method in Player.java , sure he rewards the winning clan. method: public Clan rewardClanWinner() { for (Player player : getClan().getOnlineMembers()) { if (player.isClanLeader()) { for (IntIntHolder reward : Config.LEADER_REWARD_WINNER_SIEGE_CLAN) player.addItem("", reward.getId(), reward.getValue(), player, true); } else { for (IntIntHolder reward : Config.REWARD_WINNER_SIEGE_CLAN) player.addItem("", reward.getId(), reward.getValue(), player, true); } } return _clan; } After finishing the siege, I made a restriction of the same IP plus the 2 players of the same ip wins the item, what did I do wrong? method created for SiegeEnd () // Reward Clan winner getRewardClanWinner(); private static final Map<String, Integer> _playerIps = new ConcurrentHashMap<>(); public void getRewardClanWinner() { for (Player player : World.getInstance().getPlayers()) { String pIp = player.getClient().getConnection().getInetAddress().getHostAddress(); if (!_playerIps.containsKey(pIp)) { _playerIps.put(pIp, 1); player.rewardClanWinner().setCastle(getCastle().getOwnerId()); } else { int count = _playerIps.get(pIp); if (count < 1) { _playerIps.remove(pIp); _playerIps.put(pIp, count + 1); player.rewardClanWinner().setCastle(getCastle().getOwnerId()); } else player.sendMessage("Already 1 character(s) of your ip have been rewarded, so this character won't be rewarded."); } } } It does not only reward one as I write in the code.
-
Help Error while restoring clan aCis
Williams replied to Williams's question in Request Server Development Help [L2J]
i use mysql 8.0.17 newer version -
Help Error while restoring clan aCis
Williams replied to Williams's question in Request Server Development Help [L2J]
the mistake is acis itself, I tested it clean -
Help Error while restoring clan aCis
Williams posted a question in Request Server Development Help [L2J]
This error occurs when restart server, is this error official from aCis? -
I come to share a code that I made. It is intended for clan leaders to leave a message for their members. código : https://pastebin.com/raw/YACt3bjn Add this to your system in commandname-e.dat 115 114 notice htm message by clan owner message if a member tries to create a news story
-
I am working hard to improve ThreadPool and remove the setOriginalCoordinates method, updated topic with v2 I will improve the main topic with more information.
-
which would be better to list the players? private Map<Integer, Player> _registered = new ConcurrentHashMap<>(); or private Set<Player> _registered = ConcurrentHashMap.newKeySet();
-
* CopyOnWriteArrayList container should be avoid for performance reason, use ConcurrentHashMap.newKeySet instead. * Hello Master, I'm studying and improving TVT, I'm tending to change the player lists. I changed to ConcurrentHashMap.newKeySet () in private List<Player> _registered = new CopyOnWriteArrayList<>(); for private Set<Player> _registered = ConcurrentHashMap.newKeySet(); I have this error I don't know if it's the correct one but I did it like this in Player player = _registered.get(Rnd.get(_registered.size())); for Player player = World.getInstance().getPlayer(Rnd.get(_registered.size()));
-
hello service available?
-
manda em mp que faco o pacth, amanha ja posto
-
Estou sem tempo, quando estiver posto as alterações feitas.
-
already changed for for (IntIntHolder reward: Config.TVT_REWARDS) World.announceToOnlinePlayers("TvT Event: Reward "+ ItemTable.getInstance().getTemplate(reward.getId()).getName() +","+ reward.getValue(), true); already fixed
-
a lot to redo so I did this makeover. I removed for (Player blue : _blueTeam) { if (blue == null) continue; // Give rewards if (_state != EventState.INITIAL && (_blueTeamKills > _redTeamKills || _blueTeamKills == _redTeamKills && Config.REWARD_DIE)) { for (IntIntHolder reward : Config.TVT_REWARDS) { if (reward == null) continue; blue.addItem("TvTReward", reward.getId(), reward.getValue(), null, true); } if (blue.isDead()) blue.doRevive(); removePlayer(blue); blue.teleportTo(blue.getOriginalCoordinates(), 0); } } for (Player red : _redTeam) { if (red == null) continue; // Give rewards if (_state != EventState.INITIAL && (_blueTeamKills < _redTeamKills || _blueTeamKills == _redTeamKills && Config.REWARD_DIE)) { for (IntIntHolder reward : Config.TVT_REWARDS) { if (reward == null) continue; red.addItem("TvTReward", reward.getId(), reward.getValue(), null, true); } if (red.isDead()) red.doRevive(); removePlayer(red); red.teleportTo(red.getOriginalCoordinates(), 0); } } // Event ended in a tie and no rewards will be given if (_blueTeamKills == _redTeamKills && !Config.REWARD_DIE) World.announceToOnlinePlayers("TvT Event: Event ended in a Tie. No rewards will be given!", true); _blueTeam.clear(); _redTeam.clear(); _redTeamKills = 0; _blueTeamKills = 0; I did like this: // Check the winning team. TeamType teamWinner = TeamType.NONE; if (_state != EventState.INITIAL) { // Tied teams if (_blueTeamKills == _redTeamKills && !Config.REWARD_DIE) World.announceToOnlinePlayers("TvT Event: Event ended in a Tie. No rewards will be given!", true); else if (_blueTeamKills > _redTeamKills) teamWinner = TeamType.BLUE; else teamWinner = TeamType.RED; if (teamWinner == TeamType.NONE) World.announceToOnlinePlayers("TvT Event: The event ends in a draw!"); else { for (Player player : World.getInstance().getPlayers()) { if (player == null) continue; // Prizes are awarded to the winning team. if (player.getTeam() == teamWinner) { for (IntIntHolder reward : Config.TVT_REWARDS) player.addItem("TvTReward", reward.getId(), reward.getValue(), null, true); if (player.isDead()) player.doRevive(); removePlayer(player); player.teleToLocation(player.getOriginalCoordinates()); } } } } _blueTeam.clear(); _redTeam.clear(); _blueTeamKills = 0; _redTeamKills = 0; I will remove _redTeamKills, _blueTeamKills and move to Player.java etc... about threadpool execution i don't know how i will do i will do more research on.
-
thank you very much, i will try to do what you say. You do a great job with aCis.
-
what can i improve?
-
Does anyone know this error? I get into my serving perfectly but I get it over and over. Att: Removi c3p0 and added HikariCP-3.3.1
-
Help HikariCP-3.2.0 in aCis 370
Williams replied to Williams's question in Request Server Development Help [L2J]
Solved topic may close please -
Hello removed c3p0 from my acis and having problems I'm using these calls package net.sf.l2j; import java.sql.Connection; import java.util.logging.Logger; import com.zaxxer.hikari.HikariDataSource; public class L2DatabaseFactory { private static final Logger LOGGER = Logger.getLogger(L2DatabaseFactory.class.getName()); private static final HikariDataSource _hds = new HikariDataSource(); public static void init() { _hds.setDriverClassName("com.mysql.cj.jdbc.Driver"); _hds.setJdbcUrl(Config.DATABASE_URL); _hds.setUsername(Config.DATABASE_LOGIN); _hds.setPassword(Config.DATABASE_PASSWORD); _hds.setMaximumPoolSize(Config.DATABASE_MAX_CONNECTIONS); _hds.setConnectionTimeout(600000); _hds.setIdleTimeout(1200000); _hds.setMaxLifetime(1200000); // Test if connection is valid. try { _hds.getConnection().close(); LOGGER.info("Database: Initialized."); } catch (Exception e) { e.printStackTrace(); } } public static Connection getConnection() { Connection con = null; while (con == null) { try { con = _hds.getConnection(); } catch (Exception e) { LOGGER.severe("DatabaseFactory: Cound not get a connection. " + e); } } return con; } public static void shutdown() { try { _hds.close(); } catch (Exception e) { LOGGER.severe("DatabaseFactory: There was a problem closing the data source. " + e); } } }
-
Help Pin Code Elfocrash
Williams replied to Williams's question in Request Server Development Help [L2J]
What do I have to do to work this out? -
Hi I'm trying to put in to add the pin code when selecting the character, I removed EnterWorld code and added in CharacterSelect Code : https://pastebin.com/raw/gzC3FMBG CharacterSelect.java + + if (!cha.getPincheck()) + { + final NpcHtmlMessage html = new NpcHtmlMessage(0); + html.setFile("data/html/pin.htm"); + html.replace("%player%", cha.getName()); + cha.setIsSubmitingPin(true); + sendPacket(html); + return; + } + cha.setClient(client); I get the html from the pin code but when I enter a password it does not release me to enter the character I removed java HTML and wrote this way. <html><head><title>Character Pin Panel</title></head>" <body> <center> <table width="250" cellpadding="5" bgcolor="000000"> <tr> <td width="45" valign="top" align="center"><img src="L2ui_ch3.menubutton4" width="38" height="38"></td> <td valign="top"><font color="FF6600">Pin Panel</font> <br1><font color="00FF00"> %player% </font>, use this interface to enable pin secirity.</td></tr></table></center> <center> <img src="l2ui_ch3.herotower_deco" width=256 height=32 align=center><br> </center> <table width="350" cellpadding="5" bgcolor="000000"> <tr> <td width="45" valign="top" align="center"><img src="Icon.etc_old_key_i02" width="32" height="32"></td> <td valign="top">Please enter your PIN:<edit var="dapin" width=80 height=15> <br1>info or something (can delete)</td> </tr> </table> <br>" <center> <button value="Submit" action="bypass -h enterpin $dapin" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"> </center> <center> <img src="l2ui_ch3.herotower_deco" width=256 height=32 align=center> <font color="FF6600">By Elfocrash</font> </center> </body></html>
-
private com.lameguard.crypt.GameCrypt _lameCrypt;