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.


×
×
  • Create New...