Jump to content

Recommended Posts

Posted

Hi,

 

As far as yo know, there was only nc.exe for C0, which was patched by kvoxi to be compatible with C1. However, it has few bugs (some offsets are wrong, for meal for example). So I've decompied NASC for C1. It took me only 3 days, since everything is inside 1 function (apart yacc modules and NPC-related data, which was decompiled in scope o L2NPC.exe), which is about 2200 lines long.

 

It's original compilator from C1, which is built inside L2NPC.exe. Feel free to use it. However, custom C1 Script code won't compile, you will get errors for missed fields:

 field[m_nNPC_clan_id] doesn't exist
 field[m_nBuilderLevel] doesn't exist
 field[curslot] doesn't exist
 field[m_bIsOnline] doesn't exist
 field[m_bIsPledgeMaster] doesn't exist
 field[m_bIsNPC_in_Clan] doesn't exist
 field[m_nPledgeId] doesn't exist
 field[m_nResidenceId] doesn't exist
 field[m_nMountType] doesn't exist
 field[feet_uid] doesn't exist
 field[head_uid] doesn't exist
 field[exp] doesn't exist
 field[m_Direction] doesn't exist
 field[sex] doesn't exist
 field[m_bIsRunning] doesn't exist

I know, that it's very easy to fix, but my goal is to provide ORIGINAL C1 compiler. For those, who need just tweaked one, might use kvoxi's mode.

 

C1 sources are very similar to C4 ones, where actually only error diagnostic was improved, and few more changes in ai.obj out were added. But to test C4 I need a C4 scripts. If someone could share them, then I can decompile and build C4 compilator.

 

PS: It's  x64 version

Posted

very nice +1

 

PS: By scripts you mean the whole folder from a c4 pack? Would the postpacific release be ok? I never found the original c4 leaked files, and not sure if PPC modified or added any custom.

Posted

No, I mean AI scripts in NCSOFT scripting language. Code like this:

 

class my_ai
{
handler:
	EventHandler CREATED()
	{
		if( ShoutMsg1 > 0 )
		{
			Shout(MakeFString(ShoutMsg1,"","","","",""));
		}
		if( MoveAroundSocial > 0 || ShoutMsg2 > 0 || ShoutMsg3 > 0 )
		{
			AddTimerEx(1001,actInterval);
		}
	}
}

This one is passed as an input to the NASC to get ai.obj. Probably someone has them in private (decompiled with sauron's C4 decompiled and fixed manually)

Posted

Thanks you for this original c1 nasc, i have this c4 ai (not 100% fixed). I hope you will be very helpful.

C4 Ai merged

 

btw Could to be possible compile nasc c1 in release mode please?  msvc2015 redist.  have missing debug libraries and then need install full visual studio 2015.

Posted
28 minutes ago, zconll said:

Thanks you for this original c1 nasc, i have this c4 ai (not 100% fixed). I hope you will be very helpful.

C4 Ai merged

 

btw Could to be possible compile nasc c1 in release mode please?  msvc2015 redist.  have missing debug libraries and then need install full visual studio 2015.

Tnx for C4 scripts. I'll check them!

 

Yes, ofc. I re-uploaded release version with static c-runtime, so no redist is needed. Thx for note!

Posted

Thanks you again.

I am testing your compiler, when compiler find one error during code compilation not dump information about error(s) found in "compile_msg.txt" only show quantity errors found so  it's hard to fix code.

Posted (edited)

@zconll, tnx a lot for the feedback! Indeed, this part of code haven't been revealed. Ofc, it's a bug in decompiled sources. I fixed it and re-uploaded newest version.

 

 

Edited by MasterToma
Posted

Okay, I've found some error root-causes (if talking about C1-package from PP and smeli) . Few variables were present with same offset in original C1, but have another names. So, in your script files (ai_macro.txt, ai_script.txt and questdata.txt) you have to change 

m_bIsPledgeMaster -> is_pledge_master
m_nResidenceId -> residence_id
m_nPledgeId -> pledge_id

 

and remove all        

 int residence_id = 0;

(probably it was a work-around, related with wrong name). About all other errors, I will figure out, when all L2NPC.exe will be decompiled. Probaby there are some functions in script
 

  • 3 months later...
Posted (edited)

Not yet. But I've posted extended compiler 

NASC-C1 compilator is on done. Extended compiler might be found here (use --extmode)
and will publish Quest Compiler soon.
Edited by MasterToma
link updated

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

    • Yes he have account in MXC but didn't came here and didn't post nothing to protect his reputation, and MXC administration doing nothing about scammers seems old scammers accounts was unblocked too.
    • Thank you, Can I have the password ?
    • I'd love to get involved, add me on discord: ilikebeer.
    • Forever Lineage Interlude mid-rate built for people with one hour a night Chronicle: Interlude XP/SP: 25x  |  Drop: 10x  |  Adena: 12x  |  Spoil: 15x Enchant: Safe +3  |  Max +21 Fresh start: 11 September 2026 - server is live now Website: https://l2forever.eu Discord: https://discord.gg/96rdukHvbs Why this server exists I have wanted my own Lineage 2 server since I was a teenager. I tried, failed, came back, failed again. Fifteen years later I am a developer with a full-time job, a family, and maybe an hour before bed. Every server I tried as an adult made that hour feel wasted - log in, kill a few mobs, no real progress, log out annoyed. So I built the server I actually wanted to play. Everything below is designed around one question: can you log in, make real progress, and log out on your own terms in one session? What is different Rebirth and Talent Tree - hit level 80, reset to level 1, keep your gear and skill enchants, earn talent points. Build a different character every rebirth. Bounty Hunter - daily hunt tasks with rank progression, Bounty Coins, and rare bounties. One bounty fits one session. Companions - a summonable tank, healer, or damage ally for any class. First one costs three bounties. Solo play without a solo class. Auto-farm - your character farms on its own for 2 hours a day at full XP and half loot. Solo, monsters only. The only automation allowed. Alchemy - brew stronger HP/MP potions from monster drops, no recipe needed. Custom Gludin start zone - buffs, passive mobs, and the NPCs you need, through your first 20 levels. Shorter class quests - 1st, 2nd, 3rd class, Subclass and Noblesse, all through one NPC. Champions - 5% spawn above level 40, 3x HP, 8x XP, 4-5x loot. Worth stopping for. Scheme buffer, shop up to C-grade, teleporter - B-grade and above come from crafting, drops, and quests. Seasons - each season brings Talent Tree changes. Your master account, titles, and cosmetics carry over. The rules I hold myself to Solo is the default, not a punishment. No clan required, no raid schedule, no guilt when you log off. Paid tiers add convenience and time, not power - the free baseline is the full game. No surprise wipes: if another fresh start ever happens, it is announced at least a month ahead. One developer, no shady admin, and I play on it myself. This is the server I needed fifteen years ago. Come see what I made. https://l2forever.eu  
    • 🚀 September Restock Live! Upgrade your personal Gmail to 5TB + Gemini Pro 12-18 Months instantly. 100% private and automated delivery!
  • 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..