Jump to content
  • 0

Making A New Clan Manager (Can't Add Skills; Acis)


Question

Posted

Hi guys, i'm reworking some old's clan managers; I got a problem making the scripts give full clan skills; 

 

If u clan is lvl 0-1-2-3-4-5-6-7 make it 8; give u 10.000k Rep (This work FINE) ; But can't make it give skills too.

 

Any help guys?

int[] clanSkills =
       {
               370,
               371,
               372,
               373,
               374,
               375,
               376,
               377,
               378,
               379,
               380,
               381,
               382,
               383,
               384,
               385,
               386,
               387,
               388,
               389,
               390,
               391
       };
if (((player.getClan().getLevel() <= 1) || (player.getClan().getLevel() == 2) || (player.getClan().getLevel() == 3) || (player.getClan().getLevel() == 4) || (player.getClan().getLevel() == 5) || (player.getClan().getLevel() == 6) || (player.getClan().getLevel() == 7)))
                {
                    if (st.getQuestItemsCount(clanLevelItemsId[2]) >= clanLevelItemsCount[2])
                    {
                        st.takeItems(clanLevelItemsId[2], clanLevelItemsCount[2]);
                        player.getClan().changeLevel(8);
                        player.getClan().addReputationScore(100000);
                        player.getClan().addNewSkill(clanSkill);
                        player.getClan().broadcastClanStatus();
                        player.sendMessage("Your clan is now level " + player.getClan().getLevel() + ".");
                        player.sendMessage("Your reputation score is now " + player.getClan().getReputationScore() + ".");
                        player.sendMessage("Your clan has learned all clan skills.");
                        player.setTarget(player);
                        player.broadcastPacket(new MagicSkillUse(player, 5103, 1, 1000, 0));
                        
                        return "ClanLevelUp.htm";
                    }
                    return "ClanLevelUp-NoItems.htm";
                }
                
                player.getClan().broadcastClanStatus();
                return "ClanLevelUp.htm";
        	}

Recommended Posts

  • 0
Posted (edited)

You have to make a for loop.

 

Edit 1:

 

if (((player.getClan().getLevel() <= 1) || (player.getClan().getLevel() == 2) || (player.getClan().getLevel() == 3) || (player.getClan().getLevel() == 4) || (player.getClan().getLevel() == 5) || (player.getClan().getLevel() == 6) || (player.getClan().getLevel() == 7)))

 

change to

 

if (player.getClan().getLevel() > 1 && player.getClan().getLevel() < 8 )

 

Edit 2:

 

About skills add the following codes:

 

http://pastebin.com/z9V28JyU

Edited by Devlin
  • 0
Posted (edited)

Even better, change this

if (((player.getClan().getLevel() <= 1) || (player.getClan().getLevel() == 2) || (player.getClan().getLevel() == 3) || (player.getClan().getLevel() == 4) || (player.getClan().getLevel() == 5) || (player.getClan().getLevel() == 6) || (player.getClan().getLevel() == 7)))

to

if (player.getClan().getLevel() < 8 )

About skills, if you want to load it inside core, then do it properly (no offense Devlin) :P

Index: java/net/sf/l2j/gameserver/datatables/SkillTable.java

+    private static final L2Skill[] _clanSkills = new L2Skill[22];
+    private static final int[] _clanSkillsId =
+    {
+        370,371,372,373,374,375,376,377,378,379,
+        380,381,382,383,384,385,386,387,388,389,
+        390,391
+    };
+    
     private static final L2Skill[] _nobleSkills = new L2Skill[8];
@@ -99,6 +107,9 @@
         for (int i = 0; i < _heroSkillsId.length; i++)
             _heroSkills[i] = getInfo(_heroSkillsId[i], 1);
         
+        for (int i = 0; i < _clanSkillsId.length; i++)
+            _clanSkills[i] = getInfo(_clanSkillsId[i], 1);
+        
         for (int i = 0; i < _nobleSkills.length; i++)

     }

@@ -175,6 +186,11 @@
+    public static L2Skill[] getClanSkills()
+    {
+        return _clanSkills;
+    }

and then call this method inside your bypass to give the clan skills

for (L2Skill cs : SkillTable.getClanSkills())
   player.getClan().addNewSkill(cs);
Edited by SweeTs
  • 0
Posted (edited)

Yup :D

 

Else, if you want to call it from script, then do like Devlin did inside this clan manager http://pastebin.com/n4kY3kbJ . As you can see, you miss the for loop and such. Compare.

 

 

@Devlin

if (!(sk == null))

Why not simply sk != null :D

Edited by SweeTs
  • 0
Posted

Yup :D

 

Else, if you want to call it from script, then do like Devlin did inside this clan manager http://pastebin.com/n4kY3kbJ . As you can see, you miss the for loop and such. Compare.

 

 

@Devlin

if (!(sk == null))

Why not simply sk != null :D

2014 stuff :p

  • 0
Posted

Don't use Vector (which is synchronized), but ArrayList (or even L2Skill[])

 

-----------

 

Writing style

 if (!(sk == null))

>

if (sk != null)

----------------

 

You probably can use directly

if (player.getClan().getLevel() < 8)

because I doubt it works for academy, knight and etc. Otherwise use (for 0 to 7)

if (player.getClan().getLevel() >= 0 && player.getClan().getLevel() <= 7) 
  • 0
Posted

Hi guys, thanks for helping me;

 

I got 2 errors; Maybe i put it wrong on java script;

 else if (event.equals("levelUpClan"))
			for (L2Skill cs : SkillTable.getClanSkills())
        {
        	if (player.getClan() == null)
            {
            	return "ClanLevelUp-NoClan.htm";
            }
        	else if (!player.isClanLeader())
        	{
        		return "ClanLevelUp-NoLeader.htm";
        	}
        	else
        	{
				
				if (player.getClan().getLevel() < 8 )
				{
					if (st.getQuestItemsCount(clanLevelItemsId[2]) >= clanLevelItemsCount[2])
					{
						st.takeItems(clanLevelItemsId[2], clanLevelItemsCount[2]);
						player.getClan().changeLevel(8);
						player.getClan().addReputationScore(100000);
						player.getClan().addNewSkill(cs);
						player.getClan().broadcastClanStatus();
						player.sendMessage("Your clan is now level " + player.getClan().getLevel() + ".");
						player.sendMessage("Your reputation score is now " + player.getClan().getReputationScore() + ".");
						player.sendMessage("Your clan has learned all clan skills.");
				        player.setTarget(player);
				        player.broadcastPacket(new MagicSkillUse(player, 5103, 1, 1000, 0));
				        
				        return "ClanLevelUp.htm";
					}
					return "ClanLevelUp-NoItems.htm";
				}
				
				player.getClan().broadcastClanStatus();
				return "ClanLevelUp.htm";
        	}
        }

1449081065_error%20consola.png

  • 0
Posted (edited)

The code is a mess.. fix it

else if (event.equals("levelUpClan"))
            for (L2Skill cs : SkillTable.getClanSkills())

wuut.. wrong place. You have everything you need in this topic. Check the pastebin above..

Edited by SweeTs
  • 0
Posted

@Sweets ; 

 

Yeah, i see the pastebin;  But i wanna 

if (event.equals("levelUpClan"))

Make clan lvl 8 ; give reputation score and skills, is posible give skills to, or i need make another event? 

  • 0
Posted

Ofc it's possible, you only put the "execute" part. Just.. you have to use it properly. Atm, it's one big mess.

  • 0
Posted

Ofc it's possible, you only put the "execute" part. Just.. you have to use it properly. Atm, it's one big mess.

 

I do it too;

Index: java/net/sf/l2j/gameserver/datatables/SkillTable.java

+    private static final L2Skill[] _clanSkills = new L2Skill[22];
+    private static final int[] _clanSkillsId =
+    {
+        370,371,372,373,374,375,376,377,378,379,
+        380,381,382,383,384,385,386,387,388,389,
+        390,391
+    };
+    
     private static final L2Skill[] _nobleSkills = new L2Skill[8];
@@ -99,6 +107,9 @@
         for (int i = 0; i < _heroSkillsId.length; i++)
             _heroSkills[i] = getInfo(_heroSkillsId[i], 1);
         
+        for (int i = 0; i < _clanSkillsId.length; i++)
+            _clanSkills[i] = getInfo(_clanSkillsId[i], 1);
+        
         for (int i = 0; i < _nobleSkills.length; i++)

     }

@@ -175,6 +186,11 @@
+    public static L2Skill[] getClanSkills()
+    {
+        return _clanSkills;
+    }

I think i missing the part on .java , to "call" the skills, right ?

  • 0
Posted (edited)

I think i missing the part on .java , to "call" the skills, right ?

Nop, you already call it on your script. But while you cay this, you have no idea what you have c/p there and so, you have no idea why its not working.. :P

Edited by SweeTs
  • 0
Posted

I dont say it, but is my first time with "code part"; on the past  just use custom packs, with tons of this shits; 

Yep i download it and copy paste to make it to my need. I can't move on so, i ask for help . I dont wanna any make it for me; i wanna someone say to me, wath i doing wrong... So i can learn.

 

So... u have time, to be my mentor on this script? :) Thanks

  • 0
Posted (edited)

I showed you 2 posts before.

        else if (event.equals("levelUpClan"))
        {
            if (player.getClan() == null)
                return "ClanLevelUp-NoClan.htm";
            else if (!player.isClanLeader())
                return "ClanLevelUp-NoLeader.htm";
            else if (player.getClan().getLevel() == 8)
                return "ClanLevelUp-Limit.htm"; // CREATE THIS FILE, IF YOU DON'T HAVE IT
            else if (st.getQuestItemsCount(clanLevelItemsId[2]) < clanLevelItemsCount[2])
                return "ClanLevelUp-NoItems.htm";
            else
            {
                    st.takeItems(clanLevelItemsId[2], clanLevelItemsCount[2]);
                    player.getClan().changeLevel(8);
                    player.getClan().addReputationScore(100000);
                    for (L2Skill cs : SkillTable.getClanSkills())
                        player.getClan().addNewSkill(cs);
                    player.getClan().broadcastClanStatus();
                    player.sendMessage("Your clan is now level " + player.getClan().getLevel() + ".");
                    player.sendMessage("Your reputation score is now " + player.getClan().getReputationScore() + ".");
                    player.sendMessage("Your clan has learned all clan skills.");
                    player.broadcastPacket(new MagicSkillUse(player, player, 5103, 1, 1000, 0));
                    
                    return "ClanLevelUp.htm";    
            }
        }

Your code, if you compare, is messy, don't follow the order. Notably the for loop :D

Edited by SweeTs
Guest
This topic is now closed to further replies.


  • Posts

    • Hello, our prices are either average or often even lower than the market. At some point, it happens that adena is very expensive, but it is worth waiting and it falls in price. In the first days, adena usually costs a lot of money because of the level race.
    • hello, do you have maybe source nwindow.u for protocol 24?
    • Now begins your final fall, you don't know who you messed with and who I am, nor can you imagine what awaits you. Dragon Network will have to answer for its actions before the FBI, and thus begins its downfall.
    • This post originally appeared on zupyak. The EA FC 26 Closed Beta is almost here, giving select players an exclusive first look at the game before its official release. Running from August 6 to August 26, 2025, this beta will let testers try out key gameplay changes and provide feedback to EA. If you're eager to secure a beta code, this guide will walk you through everything you need to know—from eligibility requirements to how to maximize your chances of getting an invite.   How to Get an EA FC 26 Beta Code 1. Beta Codes Are Account-Locked (No Sharing!) • If you receive a beta code, it will be tied to your EA account and cannot be shared or sold. • Attempting to share or buy a code is against EA's NDA (Non-Disclosure Agreement) and will result in a ban. 2. Check Your EA Account Settings • Log in to the EA website and go to Account Settings. • Navigate to Communication Preferences and ensure you're opted in for: • All EA Sports games, including FC 25 and FC 24 • The platform you actually play on • Promotional emails 3. Sign Up for EA Playtesting • Visit the EA Playtesting portal and register. This increases your chances of being selected for beta access. 4. Play FC 25 Regularly EA prioritizes active players, especially those who compete in Division Rivals and FUT Champions. The more you play, the higher your chances of receiving an invite. 5. Check Your Email (Including Spam!) If you don't receive one immediately, check again on August 13, as EA sometimes sends codes in waves.   What Game Modes Are Available in the Beta? • Kickoff (available to all testers) • Ultimate Team (FUT) • Clubs • Career Mode Your access to modes beyond Kickoff depends on your past gameplay history in FC 25.   Important Beta Rules & Restrictions Do: • Test the game and provide feedback in the official EA beta forums. • Keep all beta details confidential—no streaming, screenshots, or social media posts. Don't: • Share or sell your beta code (it won't work for anyone else). • Discuss the beta publicly—breaking the NDA can lead to account bans. • Expect progress to carry over—the beta is for testing only.   Final Tips to Improve Your Chances • Play FC 25 frequently—active players get priority. • Only select platforms you own—only available for consoles. • Check your spam folder—beta emails sometimes land there. • Avoid VPNs—EA may restrict access based on region (US & UK have higher priority).   What If You Don't Get a Beta Code? The beta code has been released on Augest 4. If you didn't receive one, don't worry, as EA sometimes sends codes in waves. Final Thoughts The EA FC 26 Closed Beta is a fantastic opportunity for dedicated fans to shape the future of the game while enjoying early access. By following these steps and staying active in FC 25, you can maximize your chances of securing a coveted beta code. Remember, confidentiality is key—so keep all details private and abide by EA's rules. And when the full game officially launches, consider buying FC 26 coins to give yourself an edge in building your Ultimate Team and dominating the competition! Are you ready for EA FC 26? Let us know your thoughts in the comments below!
    • https://maxcheaters.com/topic/253284-⭐l2off-h5-gx-ext⭐/
  • 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