Jump to content
  • 0

Any Faster Way For Shortcuts?


SQL Developer

Question

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
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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

Edited by SweeTs
Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...