Jump to content

Gracia Final Decompiled & Fixed Ai


Recommended Posts

Hi everyone,

 

thanks to Sauron, I was able to decompile and manually fix the whole Gracia Final AI.

 

All sources can be compiled with MyExt64 compiler and the output seems completely right :) If you find any bug/error, please let me know.

 

Download here http://download.l2shrine.com/ai.tar.bz2

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

goog work eressea, could you share your complete ai.obj compiled from script folder?

from leaked pack is different i need to know which class were add by rgb-club for work with clean ai.

Link to comment
Share on other sites

goog work eressea, could you share your complete ai.obj compiled from script folder?

from leaked pack is different i need to know which class were add by rgb-club for work with clean ai.

 

Here you go http://download.l2shrine.com/ai.obj.bz2

Link to comment
Share on other sites

  • 3 weeks later...

How to build it?

 

You can either compile just one NASC file (but you'll have to add stubs for all base classes - you need just class definition + parameters used in subclasses) or you can join the whole thing into single NASC file and compile whole AI at the time:

#!/usr/bin/env python

# join NASC AI files to single NASC file

from os import walk, getcwd
from codecs import open

cwd = getcwd()
cwd = u"\\\\?\\%s" % (cwd, )

fw = open("ai.nasc", "w", "utf-16le")

for path, dirs, files in walk("%s\\ai-src" % (cwd, )):
    for file in files:
        print file
        fw.write(open("%s\\%s" % (path, file, ), "r", "utf-8").read())

fw.close()


Link to comment
Share on other sites

 

Build here this compiler?  http://download.l2shrine.com/compiler.zip

 

Yes (or you can buy compiler from AdvExt team for $100 :troll:)

Link to comment
Share on other sites

  • 1 month later...
  • 8 months later...

please help deompiled code:

Spoiler

		

		class 1 sia_premium : citizen
		parameter_define_begin
		    int nMoneyId1 4037
		    int nAmount1 150
		    int nDuration1 604800
		    float nAdenaRate1 1.500000
		    float nItemRate1 1.500000
		    float nSpoilRate1 1.500000
		    float nExpRate1 1.500000
		    float nSpRate1 1.500000		

		    int nMoneyId2 4037
		    int nAmount2 250
		    int nDuration2 1296000
		    float nAdenaRate2 1.500000
		    float nItemRate2 1.500000
		    float nSpoilRate2 1.500000
		    float nExpRate2 1.500000
		    float nSpRate2 1.500000		

		    int nMoneyId3 4037
		    int nAmount3 450
		    int nDuration3 2592000
		    float nAdenaRate3 1.500000
		    float nItemRate3 1.500000
		    float nSpoilRate3 1.500000
		    float nExpRate3 1.500000
		    float nSpRate3 1.500000
		    string fnOk "gmshop_premium_activated.htm"
		    string fnError "gmshop_premium_error.htm"
		    string fnAll "gmshop_premium_already.htm"
		parameter_define_end
		handler 32 349    //  MENU_SELECTED
		    variable_begin
		        "talker"
		        "ask"
		        "reply"
		        "myself"
		        "_choiceN"
		        "_code"
		        "_from_choice"
		    variable_end		

		    push_event
		    push_const 160
		    add
		    fetch_i4
		    push_const 360
		    equal
		    branch_false L18
		L0
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_const 0
		    func_call 184680556
		    shift_sp -2
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_const 1
		    func_call 184680556
		    shift_sp -2
		    push_const 0.800000
		    mul
		    greater_equal
		    push_reg_sp
		    fetch_i
		    branch_true L1
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_const 2
		    func_call 184680556
		    shift_sp -2
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_const 3
		    func_call 184680556
		    shift_sp -2
		    push_const 0.800000
		    mul
		    greater_equal
		    or
		L1
		    branch_false L3
		L2
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_const 1118
		    func_call 184680517
		    shift_sp -2
		    shift_sp -1
		    exit_handler
		L3
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_const 144
		    add
		    fetch_i4
		    push_const 0
		    equal
		    branch_false L16
		L4
		    push_event
		    push_const 164
		    add
		    fetch_i4
		    push_const 1
		    equal
		    branch_false L8
		L5
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter nMoneyId1
		    func_call 184680579
		    shift_sp -2
		    push_parameter nAmount1
		    greater_equal
		    branch_false L7
		L6
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter nMoneyId1
		    push_parameter nAmount1
		    func_call 184746114
		    shift_sp -3
		    shift_sp -1
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter nAdenaRate1
		    push_parameter nItemRate1
		    push_parameter nSpoilRate1
		    push_parameter nExpRate1
		    push_parameter nSpRate1
		    push_parameter nDuration1
		    func_call 185008561
		    shift_sp -7
		    shift_sp -1
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter fnOk
		    func_call 184680516
		    shift_sp -2
		    shift_sp -1
		    jump L17
		L7
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter fnError
		    func_call 184680516
		    shift_sp -2
		    shift_sp -1
		    jump L17
		L8
		    push_event
		    push_const 164
		    add
		    fetch_i4
		    push_const 2
		    equal
		    branch_false L12
		L9
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter nMoneyId2
		    func_call 184680579
		    shift_sp -2
		    push_parameter nAmount2
		    greater_equal
		    branch_false L11
		L10
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter nMoneyId2
		    push_parameter nAmount2
		    func_call 184746114
		    shift_sp -3
		    shift_sp -1
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter nAdenaRate2
		    push_parameter nItemRate2
		    push_parameter nSpoilRate2
		    push_parameter nExpRate2
		    push_parameter nSpRate2
		    push_parameter nDuration2
		    func_call 185008561
		    shift_sp -7
		    shift_sp -1
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter fnOk
		    func_call 184680516
		    shift_sp -2
		    shift_sp -1
		    jump L17
		L11
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter fnError
		    func_call 184680516
		    shift_sp -2
		    shift_sp -1
		    jump L17
		L12
		    push_event
		    push_const 164
		    add
		    fetch_i4
		    push_const 3
		    equal
		    branch_false L17
		L13
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter nMoneyId3
		    func_call 184680579
		    shift_sp -2
		    push_parameter nAmount3
		    greater_equal
		    branch_false L15
		L14
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter nMoneyId3
		    push_parameter nAmount3
		    func_call 184746114
		    shift_sp -3
		    shift_sp -1
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter nAdenaRate3
		    push_parameter nItemRate3
		    push_parameter nSpoilRate3
		    push_parameter nExpRate3
		    push_parameter nSpRate3
		    push_parameter nDuration3
		    func_call 185008561
		    shift_sp -7
		    shift_sp -1
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter fnOk
		    func_call 184680516
		    shift_sp -2
		    shift_sp -1
		    jump L17
		L15
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter fnError
		    func_call 184680516
		    shift_sp -2
		    shift_sp -1
		    jump L17
		L16
		    push_event
		    push_const 704
		    add
		    fetch_i
		    push_event
		    push_const 40
		    add
		    fetch_i
		    push_parameter fnAll
		    func_call 184680516
		    shift_sp -2
		    shift_sp -1
		L17
		    exit_handler
		L18
		    call_super
		handler_end		

		class_end		

 

Edited by webdes27
Link to comment
Share on other sites

Probably something like this but I can't figure out what variable is 144 on talker (CSharedCreatureData + 0x90) - you'll have to find it in your extender (it doesn't seem to be in C4 l2npc.exe):

set_compiler_opt base_event_type(@NTYPE_NPC_EVENT)

class sia_premium : citizen {
parameter:
	int nMoneyId1 = 4037;
	int nAmount1 = 150;
	int nDuration1 = 604800;
	float nAdenaRate1 = 1.500000;
	float nItemRate1 = 1.500000;
	float nSpoilRate1 = 1.500000;
	float nExpRate1 = 1.500000;
	float nSpRate1 = 1.500000;

	int nMoneyId2 = 4037;
	int nAmount2 = 250;
	int nDuration2 = 1296000;
	float nAdenaRate2 = 1.500000;
	float nItemRate2 = 1.500000;
	float nSpoilRate2 = 1.500000;
	float nExpRate2 = 1.500000;
	float nSpRate2 = 1.500000;

	int nMoneyId3 = 4037;
	int nAmount3 = 450;
	int nDuration3 = 2592000;
	float nAdenaRate3 = 1.500000;
	float nItemRate3 = 1.500000;
	float nSpoilRate3 = 1.500000;
	float nExpRate3 = 1.500000;
	float nSpRate3 = 1.500000;
	string fnOk = "gmshop_premium_activated.htm";
	string fnError = "gmshop_premium_error.htm";
	string fnAll = "gmshop_premium_already.htm";

handler:
	EventHandler MENU_SELECTED(talker, ask, reply)
	{
		if (ask == 360) {
			if (GetInventoryInfo(talker, 0) >= GetInventoryInfo(talker, 1) * 0.8
				|| GetInventoryInfo(talker, 2) >= GetInventoryInfo(talker, 3) * 0.8) {

				ShowSystemMessage(talker, 1118);
				return;
			}

			if (talker.unknown144 == 0) { // COULDN'T FIND OUT WHAT IS THIS - It's INT32 on CSharedCreatureData+0x90
				if (reply == 1) {
					if (OwnItemCount(talker, nMoneyId1) >= nAmount1) {
						DeleteItem1(talker, nMoneyId1, nAmount1)
						ChangeDynamicRates(talker, nAdenaRate1, nItemRate1,
							nSpoilRate1, nExpRate1, nSpRate1, nDuration1);
						ShowPage(talker, fnOk);
						return;
					} else {
						ShowPage(talker, fnError);
						return;
					}
				} else if (reply == 2) {
					if (OwnItemCount(talker, nMoneyId2) >= nAmount2) {
						DeleteItem1(talker, nMoneyId2, nAmount2)
						ChangeDynamicRates(talker, nAdenaRate2, nItemRate2,
							nSpoilRate2, nExpRate2, nSpRate2, nDuration2);
						ShowPage(talker, fnOk);
						return;
					} else {
						ShowPage(talker, fnError);
						return;
					}
				} else if (reply == 3) {
					if (OwnItemCount(talker, nMoneyId3) >= nAmount3) {
						DeleteItem1(talker, nMoneyId3, nAmount3)
						ChangeDynamicRates(talker, nAdenaRate3, nItemRate3,
							nSpoilRate3, nExpRate3, nSpRate3, nDuration3);
						ShowPage(talker, fnOk);
						return;
					} else {
						ShowPage(talker, fnError);
						return;
					}
				}
			} else {
				ShowPage(talker, fnAll);
			}
			return;
		}
		super();
	}
}

 

Link to comment
Share on other sites

This nasc code looks like from AdvExt. I do not know which extender you are working on, but looks like the "unknown144" is:

 

int CNPC::IsUserVip(CSharedCreatureData *c);

 

so try to replace like this:

 

if (talker.IsUserVip == 0)

 

cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • bro is any chance some one share compile pack and patch system for that one? is any chance here.... and client
    • Hello members of the forum! We offer hosting services for a different range of services: - ip spoofing; - scanning; - phishing; - botnets; - proxy; - gambling; - stealers; - legal adult; Prices: - VPS starting at $24; - Dedicated servers  starting at  $110; Contctats: layer0.ltd@gmail.com Telegram: @layer0_ltd Discord: layer0.ltd#6843 site: layer0.ltd
    • OUR OFFICIAL WEBSITE / FORUM - MILLENNIUM-HOOK.NET CHEAT DESCRIPTION: Our CS2 cheat is a premium cheat which provides a ton of features for legit gamplay. The cheat was created specifically for strong leagues and anti-cheats such as Faceit, 5EWin, Gamersclub, Esportal and many others. This cheat is perfect for players who want a safe undetected and reliable multi-hack while dominating their opponents and winning the game in their own style. To ensure maximum security of our cheat, we use more than 15+ methods of protection (for example, String Encryption, PE Header Erased, Code Mutation and much more that we cannot talk about for security reasons). Settings are directly configurable via a superb looking in-game menu or over our online «Cloud Panel». Our product is constantly receiving updates in collaboration with the our coders community and suggestions by you! SUPPORTED ANTI-CHEATS: (read more on official website) - VAC (Valve Anti-Cheat) - MM (Matchmaking) - FACEIT Server-Side - FACEIT Client - CEVO / Gfinity - EAC (Easy Anti-Cheat) - ESL Wire - 5EWin / 5EPlay - Perfect World - Gamersclub - Esportal - WePlay - ESEA Our CS2 cheat has a limited number of slots to ensure greater product security! (Available slots check on official website) FEATURES: AIMBOT: - Bone Aimbot (Legit aimbot that doesn't use any angle code that other competitors use. It aims in a legitimate fashion) - Bone and Multibone (Adjust which bone to aim at or select as many Bones as you want) - Smoothaim (Adjust how smooth the aimbot is in its human-like drag) - CloseAim (Toggle distance based aiming algorithm, for increased stickyness, or whoever is closest to the crosshair) - FoV (Adjust the Field of View of the aimbot or percentage of the screen that the aimbot will target enemies from) - Aimkey (Adjust which key the aimbot will use to aim) - AimDraw (Toggle the drawing of the aimspot on enemies (Visible/Always) - VisibleCheck (Visible checking on enemies with close enemy) - NoHop (Aim at One Target per press of the AimKey (Aimbot Doesn't Hop to Other Targets even after death) - RandomSpot (Randomizes the Spot around the target bones, making your aim look more humanized and legit) - Aimtime (Amount of time that the aimbot and Aimbot-RCS is active for, after you press the aimkey) - Ammo Management (Disable aimbot and TriggerBot when the gun clip is empty) - CloseFoV (Different FoV for players with in a certain distance (CloseFOV Distance) - AimOnShoot (Aim when shooting, aim when not shooting) - RecoilAfter (Start recoil after x bullets (Good for 1-2 Taps) - Recoil (Adjust the recoil counter while using the aimbot) - RecoilKey (Adjust which key the anti-recoil is set on (For all Aimbot Keys) - RecoilType (Control if recoil control is always on or only when using the Aimbot) - RecoilFOV (Adjust how long the Recoil will stay stuck to the target, very usable for when playing at a LAN) TRIGGERBOT: - TriggerBot (Automatically shoot at an enemy in a radius (usable with or without Aimbot) - TriggerKey (Control what key activates the TriggerBot (use with any key) - TriggerFov (Control the radius around the AimSpot which activates the TriggerBot) - TriggerDraw (Draw the bone spot that the TriggerBot is aiming at) - TriggerBone (Select the bone that the TriggerBot will target) - TriggerDelay (To add to the legitimacy of the TriggerBot, delays shooting for up to 0.5 seconds) - MonsterTrigger (Extremely Fast & Accurate TriggerBot with Fullbody Options Perfect TriggerBot) - VisCheck (Make sure you're only hitting enemies that you can see, or turn it off to get some sick wallbangs) - Random Delay (A random delay for your trigger bot to look even more legitimate) - Trigger Button (Use any button you like to control the triggerbot) ESP: - Name (Name of the player) - Health (Shows the current health of a player) - Armor (Shows the current amount of armor a player has) - ArmorType (Show if a player currently has a Kevlar vest, a helmet or both equipped) - Weapon (See what weapon a player is currently holding) - Weapon Ammo (See how much ammo you have left in the current clip) - Index (The internal index of the player based on the CSGO engine) - Distance (The distance of each player from you) - Box (A box around each players model, adjusting with distance (new rectangle box type) - Sequence (What action or stance the player is in (Running, Ducking, Jumping, Scoped etc) - Box Size & Box Multi (The size of the boxes around the players, adjustable to how you like) - Team ESP (Toggle ESP on your teammates) - Clean Draw ESP (Move ESP away from box) - Pixel ESP (Single Pixel ESP for legitimate play, shows one single pixel on the screen so it's not noticeable to any casual observers) - Visible ESP (Different color ESP for visible & non-visible players) - Entity ESP (See weapons, defusers, Bomb Location, and defusing players) - Entity Distance (Adjust how far away you will see different Entities for the ultimate in Player-Location assistance) - List ESP (The Ultimate Legit ESP, Listing Players that are not on your screen, or players anywhere in case you don't want to know where they are exactly) MISC: - Bunny Hop (Jumps automatically while the chosen key is being held) - Crosshair (When enabled it will draw a cross-hair on your screen, perfect for snipers, it also features an adjustable size) - Weapon Config System (Weapon configurations for each weapon group (pistols, deagle, snipers, SMG, Knife, rifles, etc) - Flash reduction (Make sure you can see enemies while you're supposed to be flashed) - Radar In Game (A radar is displayed where you see opponents) REQUIREMENTS: - Included HWID Spoofer: Yes - Stream Bypass: Yes - Supported game modes: Windowed, Borderless - Supported CPU: Intel & AMD - Supported OS: Windows 10 (1903,1909,2004,20H2,21H1, 22H2), Windows 11 (All version). Supported OS change and are added periodically. More check on official website.   IN-GAME SCREENSHOTS:   - Check on the official website.
    • A very skilled guy, did the job and delivered super fast, you can go without fear   100% malaka boy
  • Topics

×
×
  • Create New...