Jump to content
  • 0

Any Faster Way For Shortcuts?


Question

Posted (edited)

Hello i got a question

            	        L2ShortCut shortcut;
        		shortcut = new L2ShortCut(8, 0, 3, 0, -1, 1);
        		player.registerShortCut(shortcut);
        		player.sendPacket(new ShortCutRegister(shortcut));
            	
        		L2ShortCut shortcut1;
          		shortcut1= new L2ShortCut(11, 0, 2, 4, 1, 1);
        		player.registerShortCut(shortcut1);
        		player.sendPacket(new ShortCutRegister(shortcut1));

Any faster way to sendpacket and register shortcuts all together and not one by one?

Edited by L2LostWard

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

Depends when/where you want to add this code. What shortcut you want to register?

Edited by SweeTs
  • 0
Posted

I am using this on class instance for while player get classid equal bla bla get schortcuts .. this works fine but if there is any better way to avoid write 4 lines for every skill

  • 0
Posted

You can use a for loop, but the finality would be almost exactly the same size. If all those shortcuts are similar for everyone, you can use a static L2ShortCut array to avoid to generate new objects everytime.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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