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

    • Thnx for share, i can't pm u for password  
    • I'm looking for the best current files that are up to date for the year 2025, not files that are stuck in 2020.
    • EXOPLANET 2.0     GRAND OPENING 09.05.2025 We are thrilled to announce the upcoming launch of a brand new server. This isn’t just a copy of the previous server – it’s the next step in the development of Exoplanet. Based on our past experience, we’re bringing you a server that is faster, more stable, and more fun than ever before.     GRAND OPENING:  09.05.2025 at 20:00 GMT+1 BETA TEST:   04.05.2025    Client: High Five Rates: x10   Website: https://l2exoplanet.net Facebook: https://www.facebook.com/L2-Exoplanet-106811564103836 Discord: https://discord.gg/4fzhW7ZSPc         Game Rates    Experience: x10  Skill Points: x10  Adena: x8  Drop: x8  Spoil: x8  Quest: x5  Raid Boss Drop: x5  Fame: x2  Epaulette: x8  Manor: x8      Safe Enchant: +3  Maximum Enchant: +16  Normal Scroll Chance: 60%  Blessed Scroll Chance: 63%  Attribute Stone Chance: 50%  Attribute Crystal Chance: 30%      Game Settings    Multibox - 3 game clients per HWID  Autoloot  Autolearn Skills Auto Farm  NPC Buffer   Buff Slots (24+4/12)  Buff Duration (2h)  Olympiad Period 7days (new heroes appear every monday)  Seven Signs Period  Class Transfer for Adena  Max Sub-Class 3  Sub-Class Max Level 85  Essence Interface  Champions System  Vote Reward System  Dayli Reward System  PC Points Reward (500PC = 1 Donate Coin)      Epic Bosses Respawn Times     Queen Ant:  24 Hours +/- 4 Hours   Beleth: 3 Days +/- 8 Hours   Baium: 3 Days +/- 8 Hours   Antharas: 4 Days +/- 8 Hours   Valakas:  5 Days +/- 8 Hours     Instance Info     Normal Freya = 6 Players   Hard Freya = 12 Players   Frintezza = 6 Players   Zaken 83 Day = 6 Players   Zaken 60 Day = 6 Players   Zaken Nightly = 9 Players   Tiat = 6 Players   Beleth = 12 Players
    • EXOPLANET 2.0     GRAND OPENING 09.05.2025 We are thrilled to announce the upcoming launch of a brand new server. This isn’t just a copy of the previous server – it’s the next step in the development of Exoplanet. Based on our past experience, we’re bringing you a server that is faster, more stable, and more fun than ever before.     GRAND OPENING:  09.05.2025 at 20:00 GMT+1 BETA TEST:   04.05.2025    Client: High Five Rates: x10   Website: https://l2exoplanet.net Facebook: https://www.facebook.com/L2-Exoplanet-106811564103836 Discord: https://discord.gg/4fzhW7ZSPc         Game Rates    Experience: x10  Skill Points: x10  Adena: x8  Drop: x8  Spoil: x8  Quest: x5  Raid Boss Drop: x5  Fame: x2  Epaulette: x8  Manor: x8      Safe Enchant: +3  Maximum Enchant: +16  Normal Scroll Chance: 60%  Blessed Scroll Chance: 63%  Attribute Stone Chance: 50%  Attribute Crystal Chance: 30%      Game Settings    Multibox - 3 game clients per HWID  Autoloot  Autolearn Skills Auto Farm  NPC Buffer   Buff Slots (24+4/12)  Buff Duration (2h)  Olympiad Period 7days (new heroes appear every monday)  Seven Signs Period  Class Transfer for Adena  Max Sub-Class 3  Sub-Class Max Level 85  Essence Interface  Champions System  Vote Reward System  Dayli Reward System  PC Points Reward (500PC = 1 Donate Coin)      Epic Bosses Respawn Times     Queen Ant:  24 Hours +/- 4 Hours   Beleth: 3 Days +/- 8 Hours   Baium: 3 Days +/- 8 Hours   Antharas: 4 Days +/- 8 Hours   Valakas:  5 Days +/- 8 Hours     Instance Info     Normal Freya = 6 Players   Hard Freya = 12 Players   Frintezza = 6 Players   Zaken 83 Day = 6 Players   Zaken 60 Day = 6 Players   Zaken Nightly = 9 Players   Tiat = 6 Players   Beleth = 12 Players      
  • Topics

×
×
  • Create New...