Jump to content

Question

Posted

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.

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

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
  • 0
Posted

 

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 :)

  • 0
Posted (edited)
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
Guest
This topic is now closed to further replies.


  • Posts

    • Buying Epics/ S Gear on Elixir Whisper me
    • Hello everyone, I am looking to purchase a Premium Lineage 2 High Five server pack. My main requirements are: Stability & Quality (Most Important): The pack must be highly stable with no system errors or major bugs. Custom Features: It must include ready-to-use custom features such as a fully functional Community Board, custom NPC Buffers, and Custom Item Sellers (GM Shops), etc. Complete Files: It is absolutely necessary that the full source code (src) and complete Geodata are included. If you are selling a pack that meets these criteria, please send me a PM or leave a reply with the following information: Brief details and key features of the pack Price Test server availability (I would like to test it before buying) Thank you!
    • L2jmobiusDevClon — Classic Interlude p110 Emulator L2jmobiusDevClon is actively developing a Lineage 2 Classic Interlude p110 emulator. Development is done in free time with a strong focus on: • Stability • Authentic Classic mechanics • Clean and optimized architecture The project is based on the L2jMobius source and is continuously evolving and improving. System Requirements: • Java 25 • MariaDB 12.0 • Client p110 Current Revision: 3.0 Development Status: Active Distribution: Free Official Website: https://www.l2jmobiusdevclon.pp.ua Discord Server: https://discord.gg/23a9S8g4Bn Contact: Telegram — @L2jmobiusDevClon Also available via private messages Project Goals: ✔ Improved stability ✔ Maximum Classic accuracy ✔ Core optimization We are currently looking for: • Testers • Server administrators Suggestions, bug reports, and ideas are always welcome. Contact us via: ✔ Discord ✔ Telegram ✔ Private Messages
    • i guess loading only the effects that are needed it will maybe work, like removing from reshade shader folder the ones that are not needed, depends on the pc also i guess, also limithing the game at 30fps can be better maybe
  • 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..