Dramzes Posted January 24 Share Posted January 24 public void setClan(Clan clan) { _clan = clan; setTitle(""); if (clan == null) { _clanId = 0; _clanPrivileges = 0; _pledgeType = 0; _powerGrade = 0; _lvlJoinedAcademy = 0; _apprentice = 0; _sponsor = 0; return; } if (!clan.isMember(getName())) { // char has been kicked from clan setClan(null); return; } _clanId = clan.getClanId(); // Add clan leader skills if clanleader addClanLeaderSkills(isClanLeader() && (clan.getLevel() >= 4)); } if i delete setTitle(""), will player be able to set title on their own again? please tell me Link to comment Share on other sites More sharing options...
Psygrammator Posted January 24 Share Posted January 24 1 hour ago, Dramzes said: public void setClan(Clan clan) { _clan = clan; setTitle(""); if (clan == null) { _clanId = 0; _clanPrivileges = 0; _pledgeType = 0; _powerGrade = 0; _lvlJoinedAcademy = 0; _apprentice = 0; _sponsor = 0; return; } if (!clan.isMember(getName())) { // char has been kicked from clan setClan(null); return; } _clanId = clan.getClanId(); // Add clan leader skills if clanleader addClanLeaderSkills(isClanLeader() && (clan.getLevel() >= 4)); } if i delete setTitle(""), will player be able to set title on their own again? please tell me Can, this code deletes the current title when joining a clan. Link to comment Share on other sites More sharing options...
Dramzes Posted January 25 Author Share Posted January 25 9 hours ago, Psygrammator said: Can, this code deletes the current title when joining a clan. ah, and how can i disable all titles to leave only pvp-pk title? Link to comment Share on other sites More sharing options...
Artemis37 Posted January 25 Share Posted January 25 2 hours ago, Dramzes said: ah, and how can i disable all titles to leave only pvp-pk title? Adding a custom code Here is one more example code https://pastebin.com/pkhWZ1z1 Link to comment Share on other sites More sharing options...
Dramzes Posted January 25 Author Share Posted January 25 1 hour ago, Artemis37 said: Adding a custom code i did add pvp pk title, but i can change my title, i want to disable players to change titles Link to comment Share on other sites More sharing options...
Artemis37 Posted January 25 Share Posted January 25 1 hour ago, Dramzes said: i did add pvp pk title, but i can change my title, i want to disable players to change titles So ... CharInfo and UserInfo packets sending the title info. Change inside this packets code to your conditions. Some ideas: add a custom item to change the title (example id:4007). Or try to find any good dev to write the code for you. I guess its not more than 10 lines. Link to comment Share on other sites More sharing options...
andy1984 Posted January 26 Share Posted January 26 RequestGiveNickName() packet find: // Noblesse can bestow a title to themselves if (player.isNoble() && _name.matches(player.getName())) { player.setTitle(_title); player.sendPacket(SystemMessageId.TITLE_CHANGED); player.broadcastTitleInfo(); } else { // Can the player change/give a title? if (!player.hasClanPrivileges(Clan.CP_CL_GIVE_TITLE)) { player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT); return; } if (player.getClan().getLevel() < 3) { player.sendPacket(SystemMessageId.CLAN_LVL_3_NEEDED_TO_ENDOWE_TITLE); return; } final ClanMember member = player.getClan().getClanMember(_name); if (member != null) { final Player playerMember = member.getPlayerInstance(); if (playerMember != null) { playerMember.setTitle(_title); playerMember.sendPacket(SystemMessageId.TITLE_CHANGED); if (player != playerMember) player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CLAN_MEMBER_S1_TITLE_CHANGED_TO_S2).addCharName(playerMember).addString(_title)); playerMember.broadcastTitleInfo(); } else player.sendPacket(SystemMessageId.TARGET_IS_NOT_FOUND_IN_THE_GAME); } else player.sendPacket(SystemMessageId.TARGET_MUST_BE_IN_CLAN); } and replace with // Noblesse can bestow a title to themselves if (player.isNoble() && _name.matches(player.getName())) { player.sendMessage("Titles are disabled."); return; } else { player.sendMessage("Titles are disabled."); return; } not tested but should work Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now