Jump to content

Recommended Posts

Posted

need some help, i adpted, no errors, no warnings, but can's spawm service manager, it's like he is not defined..... checked everythink... helpp 

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

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



  • Posts

    • buenas no puedo poner el server On para que entren mis amigos   LoginServer # ================================================= # Settings authorization server # ================================================= # Host and port for client connections LoginserverHostname = 127.0.0.1 LoginserverPort = 2106 # Host and port for game servers LoginHost = 192.168.100.25 ( mi Ip interna) LoginPort = 9014     GameServer   # =============================== # Network Configuration Server  # # =============================== # IP which Bind Game server, * - all possible GameserverHostname = * GameserverPort = 7777 # This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname ExternalHostname = 186.158.144.71 ( Ip externa ovbio) # This is transmitted to the client from the same network, so it has to be a local IP or resolvable host name InternalHostname = 192.168.100.25 # AdvIpSystem Make more GameServerIDs. Every Ip should be Protected by a DDoS Guard. # Your Server will have Success with this system Online. AdvIPSystem = False # Address \ port LS LoginPort = 9014 LoginHost = 192.168.100.25 LoginUseCrypt = true # How to request ID of LS RequestServerID = 4 # Permission to take a different id, if requested busy AcceptAlternateID = False     en que estaria fallando ?    
    • mporeis na valeis l2jaCis i kapoio etimo project  free sources gia aCis edw https://acis.i-live.eu/index.php?topic=1974.0 server install ktl edw https://acis.i-live.eu/index.php?topic=10190.0 an dn vgaleis akrh steile mou discord margazeas2
    • Hello! I am new to l2 server creation and i need your help please!!! I want to make my own l2 interlude c6 server with custom thing in it.  I need help with where to start. What source pack to pick to start and what to do. Please if you can help me i would appreciate it very much !!!
    • Need Discord with rare badge? VISIT US AND SHOP WITH US! NEW STOCK   Aged, Early Supporter Discord Accounts I sell HQ Aged and Early, Discord Accounts that are inactive and not flagged by discord at cheap prices   If you want to contact me, you can add me on discord: worldcoldwar Features: Format - age : email : pass : token Not flagged and undetected by discord HQ % With OGE Emails, password etc can be changed Unverified Early Supporter 24M Boost Badge HypeSquad Events Early Verified Bot Developer Early Supporters SHOP LINK: disvault1.mypaylix.gg/ For PayPal payments, please open a ticket. If you experience any problems with cryptocurrency payments, please open a ticket as well.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..