Jump to content
  • 0

[L2Off]Set Player Level


ΑκΑλυπτος*

Question

Hello,

 

I am using vang's pack and I want to create an NPC that can set the player level, for example level 10,15,66, etc.

Could anyone tell me the command in ai.obj that can do that? There is a bypass in html but only works to delevel not to level up.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I'm not familiar with Vang's pack so don't know if there is a bypass or other command that does it.

 

You could use the native 

myself.IncrementParam(talker, @PARAM_EXP, 123456789);

This WILL show the level up animation to the player and everyone around them as it is the normal "give player some exp" command which quest NPC's use for rewards, etc.

 

If you are not able to find an EXP table (X Level = Y EXP) you can always log in with the appropriate rights and run "//setparam level X" on yourself.

Doing this obviously changes your characters level but also stores the new levels EXP value (completely readable) in the database immediately.

 

Notes:

1.

The param value takes a SIGNED INT32 so you can use negative numbers to subtract a params value.

 

2.

When you decompile the AI, you'll most likely see an int as the second argument.

@PARAM_ is a shortcut you can use while compiling. The compiler turns it into the native int.

 

Here is a list the params that can be incremented:

 

[PARAM_EXP]=0

[PARAM_SP]=1
[PARAM_INT]=2
[PARAM_STR]=3
[PARAM_CON]=4
[PARAM_MEN]=5
[PARAM_DEX]=6
[PARAM_WIT]=7
[PARAM_LEVEL]=8
[PARAM_PKCOUNT]=9
 

( Credits: FidoW )

 
/// EDIT: ///
Just noticed you should be able to increment the level directly according to the above list (though i haven't tried it myself).
 
So do something like:
// !!! Disclaimer !!!
// The below was written on a Mac in SublimeText and is completely
// not syntactically accurate or tested.
// :D

if (talker.level == desiredLevel)
{
	return;
}
else
{
	if (desiredLevel > talker.level)
	{
		myself.IncrementParam(talker, @PARAM_LEVEL, desiredLevel - talker.level);
	}
	else
	{
		myself.IncrementParam(talker, @PARAM_LEVEL, (talker.level - desiredLevel) * -1);
                                                             // * -1 to NEGATIVELY "increment" the
							     // players current level.
	}
}
Let me know if it works! :P
Edited by tk422
Link to comment
Share on other sites

  • 0

 

I'm not familiar with Vang's pack so don't know if there is a bypass or other command that does it.

 

You could use the native 

myself.IncrementParam(talker, @PARAM_EXP, 123456789);

This WILL show the level up animation to the player and everyone around them as it is the normal "give player some exp" command which quest NPC's use for rewards, etc.

 

If you are not able to find an EXP table (X Level = Y EXP) you can always log in with the appropriate rights and run "//setparam level X" on yourself.

Doing this obviously changes your characters level but also stores the new levels EXP value (completely readable) in the database immediately.

 

Notes:

1.

The param value takes a SIGNED INT32 so you can use negative numbers to subtract a params value.

 

2.

When you decompile the AI, you'll most likely see an int as the second argument.

@PARAM_ is a shortcut you can use while compiling. The compiler turns it into the native int.

 

Here is a list the params that can be incremented:

 

[PARAM_EXP]=0

[PARAM_SP]=1
[PARAM_INT]=2
[PARAM_STR]=3
[PARAM_CON]=4
[PARAM_MEN]=5
[PARAM_DEX]=6
[PARAM_WIT]=7
[PARAM_LEVEL]=8
[PARAM_PKCOUNT]=9
 

( Credits: FidoW )

 
/// EDIT: ///
Just noticed you should be able to increment the level directly according to the above list (though i haven't tried it myself).
 
So do something like:
// !!! Disclaimer !!!
// The below was written on a Mac in SublimeText and is completely
// not syntactically accurate or tested.
// :D

if (talker.level == desiredLevel)
{
	return;
}
else
{
	if (desiredLevel > talker.level)
	{
		myself.IncrementParam(talker, @PARAM_LEVEL, desiredLevel - talker.level);
	}
	else
	{
		myself.IncrementParam(talker, @PARAM_LEVEL, (talker.level - desiredLevel) * -1);
                                                             // * -1 to NEGATIVELY "increment" the
							     // players current level.
	}
}
Let me know if it works! :P

 

works :)

Link to comment
Share on other sites

  • 0
For AutolLearn, this is defined in your servers Scripts/SKillAquire.txt.

- Find the skill you want then set the auto_get param to true.

- If you just want to add the correct skills to your test character target them and type //setskillall.

- I don't think there is an official "Give character all of their skills" AI function or bypass.

 

Interesting about levels not sticking...

 

Idea: (Not tested!)

- Set the character to their desired level via IncrementParam and using some maths.

- Call IncrementParam and increase their exp by one point.

- Call IncrementParam and increase their exp by negative one point.

- See if it sticks.

 

If this doesn't work then the following absolutely will:

- Call IncrementParam with negative 2 bil 5 times.

- Call IncrementParam with the respective EXP amount for their desired level.

 

Notes:

- As far as i know you cannot get a characters current EXP value with AI. THANKS Obama...

- Since IncrementParam takes a SIGNED INT32 the largest number you can give it is 2.1bil however level 80 in Interlude is 4.2 bil.

   So removing 10 bil total EXP virtually guarantees all exp will be removed for any realistic character who ever uses your NPC.

- EXP is handled in the server and DB as A UINT64 and there is an overflow check so it can't wrap or go negative.

- If your goal is to set a character's level to a level that has more than 2.1bil exp you again have to do some simple maths.

Edited by tk422
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Guys, if you'd let me be the bearer of bad news, No amount of "break from server development" can justify your complete lack of idea how things work. If it was this easy, you should've been seeing 90% of the servers of the popular old versions, such as IL and HF, running on the newest client. For this task, you would need a lot of time - think at least 2 months, if you can code, have access to all the necessary tools for client development, and you have a relatively good idea of how server<->client communication works. f you don't, then you either find yourself a well-paying job and find someone who would do it for you or you put the idea aside (for no less than 1-2 years) and start reading and learning asap. Let me give you a little preview/breakdown of what some of the work includes. The work can be split into two parts - SERVER side and CLIENT side.  The server and the client communicate through packets. Each of these packets has a defined structure. Both, the server and the client MUST know this structure and MUST use the same structure, otherwise they won't be able to "understand" each other. - The server side predominantly includes the alteration of existing packet structure and the creation (from zero) of missing packets that the client requires. Then you also have to take these changes into account and alter the existing features of your server to match the changes. A good example for this is SKILL ENCHANTING. On older chronicles, the enchant level is determined by the LEVEL value of the skill and on the new clients, it has been taken out into a separate value. What this means is that you would have to figure out a way to adapt the old system to the new requirements. - Now that we mentioned the client, you would also need to edit a bunch of files, such as Interface, UTX, UNR, as well as DAT files, including those related to ITEMS, SKILLS, QUESTS, NPCS, and AUGMENTATION STATS and DESCRIPTIONS, etc. For some of those, you would also have to figure out how to check for missing entries and how to parse data from the older client to the new. The best example, again, would be the SKILLS. On the latest clients, the skill enchanting was limited to only +20. As such, even if there were some matching skills between the two different client versions, you would still need to add the missing 10 levels to +30. And once you complete all of that, you start testing and fixing bugs and sh1t. And once you have fixed all of that, you can start adding new features from the new client, because otherwise it would be one big mess and a waste of time and/or money.
    • As far as I know, these are not linked to the server. What I mean by this is - there is no server <-> client communication for these two features. If that is indeed the case, you would need the Interface sources in order to create a custom function which you can trigger with a SERVER_TO_CLIENT packet.
    • Hello, I recently Installed the h5 Interface from emu-dev   Everything is working great but i was wondering if anyone can help me add the monster book and item book buttons on my community board to make it more accessible. Or if there is a way to add a button with HTML that calls these windows. I have xdat editor installed and i have located the relevant windows, but i don't know what to do with them. Thank you for your time.  
    • Add Support ShortCutPanel https://jumpshare.com/s/VTm9x1wvHmPokrqomNun
  • Topics

×
×
  • Create New...