AIO Npc question (not just buff), and subclass quesitons L2J 

Joined
Nov 6, 2008
Messages
8
Reaction score
0
So far it seems everyone has separate NPCs to handle certain tasks.
1 for buffs
1 for teleport
1 for shop
etc etc

Is it not possible to have 1 NPC that can handle all those functions? Or are NPCs limited to what they can do by their designations (L2Teleport, L2Merchant, etc, etc)?

Currently:
Teleport - functions work
Shop - functions work through multisell (i prefer it anyway)
Augment - functions work
Warehouse - functions do NOT work. :(
Buffs - Haven't added
Subclass - Haven't added

Anyone have ideas as to why warehouse functions don't work?




Now for the subclass questions...
Is it possible to have a separate XP gain for the main class and sub classes? (ie. I want main classes to level slowly, while subs will level far faster)

Is it possible to change the level at which players start when they obtain a new subclass? (if so, is it a configuration file setting, or something in the core I'll have to change?)

Is it possible to change the max level of subclasses to 85 or even 81? (sub question: If it's not possible, then is it possible to give them the level 81 skills somehow?)

Is it possible to allow for overlords to be subclassed? Or is that one completely restricted client side?



I know, it's a lot. I'm a very curious person. :grr:

Thanks for taking the time to read though.
 
Last edited:
So far it seems everyone has separate NPCs to handle certain tasks.
1 for buffs
1 for teleport
1 for shop
etc etc

Is it not possible to have 1 NPC that can handle all those functions? Or are NPCs limited to what they can do by their designations (L2Teleport, L2Merchant, etc, etc)?
So far I've finished out my custom teleport NPC (did it by hand since I didn't trust any of the ones you could download to work or look like I wanted them to). And now I'm attempting to add shop functions to it. Sadly, I'm not making much progress.

Here is what I've done.
  1. Made a teleporter NPC. ID is 9999999 (currently classed as L2Teleporter)
  2. Works just fine with the GK functions I've added.
  3. Next I added this to it for testing
    Code:
    <a action="bypass -h npc_%objectId%_Buy 9999999">Buy Something</a>
  4. Next I added the shop ID of 9999999, an item, the cost of the item, the order, etc to merchant_buylists in ....
Yes, it's quite possible to put all the functions in 1 NPC.
I am not sure if the Buy function can handle such a high integar... maybe try with a smaller one? In any case, there is no reason for this not to work.


Now for the subclass questions...
Is it possible to have a separate XP gain for the main class and sub classes? (ie. I want main classes to level slowly, while subs will level far faster)

Is it possible to change the level at which players start when they obtain a new subclass? (if so, is it a configuration file setting, or something in the core I'll have to change?)

Is it possible to change the max level of subclasses to 85 or even 81? (sub question: If it's not possible, then is it possible to give them the level 81 skills somehow?)

Is it possible to allow for overlords to be subclassed? Or is that one completely restricted client side?
All of this is possible, but I surely hope that you are skilled in Java because they will require alot of modifications in the server core.

Good luck with your project, it's ambitious (especially the last part) :P:
 
Upvote 0
Yes, it's quite possible to put all the functions in 1 NPC.
I am not sure if the Buy function can handle such a high integar... maybe try with a smaller one? In any case, there is no reason for this not to work.



All of this is possible, but I surely hope that you are skilled in Java because they will require alot of modifications in the server core.

Good luck with your project, it's ambitious (especially the last part) :P:

Thanks for the response. I've given up on using a standard shop and am using multisell lists instead. While it'll take me forever to make lists for everything (no grade to dynasty grade for armors and weapons and about 5-10 more lists for other items), I think players will like it better. Especially when buying multiple armors/weapons for enchanting purposes.

So yeah, looks like so far things are coming along. The buylists will just take a week (haha, sadly I don't think it's an exageration... :( )
 
Upvote 0
I just want to post that I have found the problem and solution.

1. Warehouse functions can only be called from an NPC where those functions exist within it. Meaning I had to copy all relevant warehouse functions and related material (what they import information from, etc).
Currently, it's fixed for my multinpc.

2. Shop functions are similar to warehouse functions, but the respective client packet files need to be modified as well and so does merchantpriceconfig all to allow the new instance access to functions contained within. Sounds hard, but I'm totally new to java and managed to figure it out.
Currently, it's fixed for my multinpc.

3. Teleport functions are the same as previous. They all need to be contained within the NPC being given the commands.


Now class master/subclass functions are more complicated. It seems that any premade class changer and subclass helper uses a different type of, hrm, well, I don't know what you'd call it in java. But basically it has to do with how the commands are handled and the fact that subclass stuff is typically done with an array while other npcs typically don't need to use an array, and for some reason that messes everything up.

So yeah, with a little coaching from a few people in the IRC room, I have managed to come up with an NPC that so far, does:
Teleport
Augmenting
GM Shop (regular shop and multisell)
Warehouse

Doing this means less NPCs running around on the server, that's less NPCs to manage, and less lag and confusion for players since everything is centralized.

Plus it's been a great learning experience to get into Java and figure out how things work.
 
Upvote 0
I would have to check, but I am quite sure that you would have been able to do all this, using a script, without having to change the core... by calling everything from the script and not from the NPC html. I'll make some tests and get back to you with the results.
 
Upvote 0
I would have to check, but I am quite sure that you would have been able to do all this, using a script, without having to change the core... by calling everything from the script and not from the NPC html. I'll make some tests and get back to you with the results.

Haha, well, to save time and to reduce the amount of files I edited, I extended my NPC through merchant, then added the others.

If you can find a way to do subclass addition/change/cancel through scripts, I'd owe you one. :)

Pretty much everything works right now EXCEPT for Subclass functions. My progress (my server is not public at the moment, NOR does it have a name, L2Unknown is simply filler until I make a name, so I am not advertising =P )...
toastgodsupreme - AIO Npc question (not just buff), and subclass quesitons - RaGEZONE Forums
toastgodsupreme - AIO Npc question (not just buff), and subclass quesitons - RaGEZONE Forums

toastgodsupreme - AIO Npc question (not just buff), and subclass quesitons - RaGEZONE Forums
toastgodsupreme - AIO Npc question (not just buff), and subclass quesitons - RaGEZONE Forums

toastgodsupreme - AIO Npc question (not just buff), and subclass quesitons - RaGEZONE Forums
toastgodsupreme - AIO Npc question (not just buff), and subclass quesitons - RaGEZONE Forums

toastgodsupreme - AIO Npc question (not just buff), and subclass quesitons - RaGEZONE Forums
 
Upvote 0
If you can find a way to do subclass addition/change/cancel through scripts, I'd owe you one. :)

Pretty much anything that you can do in core you can do in script. And if there isnt a way to do it directly, you can just use database queries to solve the problem(that's what is done in Core anyway) :):
At the moment, for example, I am using a L2Npc to do the Clan modification functions:
- Clan leveling
- Creating Orders of Knights and Royal Orders
- etc...

I am using another L2Npc to perform weddings too...

So I guess that this proves my point :8:
Anything can be done in script, just look into the core and find the command that the L2Merchant, L2Warehouse, etc... uses and call this command directly from the script.
 
Upvote 0
Back