Jump to content

Recommended Posts

Posted

I have found a bug, no - mistake :

<set name="type" val="L2MultiShopInstance"/> <--- donatenpc, have to be right like this, was val="L2MultiShop"

 

  • 4 weeks later...
Posted (edited)
  • Updated to aCis 360.
  • Cleaned a bit. 
  • Removed MultiShopManager file. Everything moved to L2MultiShopInstance.

Some(the most) of those checks can be easily bypassed if you know how. I won't give you the way to fix those checks. So, I mentioned this just to have a clue.

Edited by 'Baggos'
Posted

You managed to make Java look like some scripting language.

You have done it many times in shares :P 

( I do not say so to offend you ) is just share code

but they said ( while you forgot it ) :)

Some(the most) of those checks can be easily bypassed if you know how. I won't give you the way to fix those checks. So, I mentioned this just to have a clue.

Good luck.

 

shares is for help newbies to see how work code ( no one share is ready for used in live server )

 

ty for share 

Posted (edited)

 

no one share is ready for used in live server 

 

Why? if the code is properly coded its ready. thats why we are coding :D

 

You can use many many alternative ways of coding, especially in baggos shop. 

 

Example this code:

   if (command.startsWith("donate"))
   {
       StringTokenizer st = new StringTokenizer(command);
       st.nextToken();
       try
       {
           String type = st.nextToken();
           switch (type)
           {
               case "Noblesse":
                   Nobless(player);
                   break;
               case "ChangeSex":
                   Sex(player);
                   break;
               case "CleanPk":
                   CleanPk(player);
                   break;
               case "FullRec":
                   Rec(player);
                   break;
               case "ChangeClass":
                   final NpcHtmlMessage html = new NpcHtmlMessage(0);
                   html.setFile("data/html/mods/donateNpc/50091-2.htm");
                   player.sendPacket(html);
                   break;
           }
       }
       catch (Exception e)
       {
       }
   }

can be written in this way even if switch case maybe will be more safer,readable

	Method callingMethod = L2MultiShopInstance.class.getMethod(st.nextToken(), L2PcInstance.class);
	callingMethod.invoke(new L2MultiShopInstance(), player);

Ofc there must be some changes for example in methods name so they can be called by exactly the same name of the token ...

Nvm the coding style of a person is different from others but this doesn't mean that isn't correct ;)

 

(For sure this example is usefull when you have to call many methods so, you just avoid the switch case ...)

Edited by melron
Posted

Why? if the code is properly coded its ready. thats why we are coding :D

can you show me one shared code ready ? ( how is in shared section ? )

Posted

Why did you have to code everything static in the NpcInstance?

 

Also SO MUCH REDUNDANT code.

 

I mean what is that:

You repeat this for every class while you would have the class id to be the command substring then parse it as an integer and all those 300 lines of code become 6.

 

You managed to make Java look like some scripting language.

The most parts of this code, it was on MultiManager file(As I said I moved everything to MultiInstance). That's why I used static methods. But yes, I should change it now.

 

About the other, can be done with x,y ways for sure, and will be more clean/smaller/readable. I used this way at the beginning of this code(December) and maybe I should give a other view as I did with some others parts.

Thanks for mention it.

 

shares is for help newbies to see how work code ( no one share is ready for used in live server )

ty for share 

Sure, some shares are pretty much a ready review of something, but that's not mean you shouldn't have something clean for a newbie to understand the basic things. :P 

Posted

can you show me one shared code ready ? ( how is in shared section ? )

What you mean? i can show you a classic code .online. the way its working isn't correct?

 

All i want to say is, that in this forum 70% of the members (+me) we are trying to improve ourselves and being better but this doesn't mean

we cannot make a correct code...

Posted

Sure, some shares are pretty much a ready review of something, but that's not mean you shouldn't have something clean for a newbie to understand the basic things. :P

i have help many people from this forum ... if i want this don't learn java ( just can i give it ready code ) 

if they don't stay to find the " bug " can't learn l2j

 

What you mean? i can show you a classic code .online. the way its working isn't correct?

 

All i want to say is, that in this forum 70% of the members (+me) we are trying to improve ourselves and being better but this doesn't mean

we cannot make a correct code...

i don't mean you can't create 1 correct code ( and for sure i don't try to offend no one who share codes )
but think the 99% of share is codes ( who i don't need on my pc , so can i share it ) before delete it ... ( this i thinking )
Posted

can you show me one shared code ready ? ( how is in shared section ? )

My AIO system for example, offline shops.. You can use it for live server without fear :D
Posted

 

i don't mean you can't create 1 correct code ( and for sure i don't try to offend no one who share codes )
but think the 99% of share is codes ( who i don't need on my pc , so can i share it ) before delete it ... ( this i thinking )

 

 

I was not offended relax :P

 

If i understand well you mean 99% of the codes that are shared here are from guys that they think the code is useless for them and they say "i will share it to get some reputation"?
If yes , i agree in some cases ... besides, why someone will share a 'rare' code without getting some money? Ofcourse there are exceptions ...
Posted

A shared code is an examble to work on it or even with a base create another one mod..its usefull for the users who want to learn java..when someone starts must read and understand the code..then all is possible..

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
Reply to this topic...

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




  • Posts

    • Hello guys.Im looking for a simple autoclicker that works for servers with anticheat
    • Thank you for the reply. I know that this issue is due to L2 being so old. I was just wondering if there was an external way to fix the UI scaling. Like a patch or some settings.
    • Bro the game is so old it doesn't have a native option to scale the UI like in modern MMOs
    • Dear players, From April 19 to April 27 inc., the Bonus Start event will be active. It’s designed to help new and low-level characters get started more easily.   All characters that meet one of the following conditions: — created less than 3 days ago (regardless of level), — currently level 20 or below, — created during the event period, will receive upon login: — 10 sets of buff scrolls (phys or mage, depending on class), — 10 packs of +50% Drop/Spoil runes (2 hours each), — 10 packs of +50% Exp runes (2 hours each). Characters between level 21 and 30 will receive upon login: — 6 sets of buff scrolls, — 6 packs of +50% Drop/Spoil runes (2h each), — 6 packs of +50% Exp runes (2h each).   Event items will be removed approx. 09.05.2025 Server rates will be increased to x2.25. Take this chance to start your journey with ease or bring an old hero back into the fight — it’s the perfect time to test your strength! Open Beta Test is started!  Helper cats are waiting in towns — talk to them to receive the necessary equipment and level up your character. Siege Schedule:  - April 13 at 16:00 (GMT+2) – Innadrile Castle - April 14 at 20:00 (GMT+2) – Bandit Stronghold - April 15 at 20:00 (GMT+2) – Devastated Castle 📌 During the OBT, players who report bugs will receive CoL:   - 1 CoL for each reported staticmeshes bug (e.g., walking through textures, stairs, etc.) - 2 CoL or more for server-related issues (depending on severity) You can report bugs on the forum. The Open Beta Test will run approximately until April 15 at 23:00 (GMT+2). Your activity and feedback will help us improve the game.   Download links: Download client | Download updater 
    • begin if (user.dead) then begin delay(555); Engine.GoHome(rtCastle); print('User dead, going to castle..') end; end.  
  • Topics

×
×
  • Create New...