Jump to content

Recommended Posts

Posted

--How To Use!!
-- Start With Weapon you need to augment EQUIPPED!
-- Start With Helmet on your Char!.. IF YOU REMOVE HELMET THE AUGMENTATION WILL STOP (so you can interrupt the script anytime you want)
-- Choose The Next 4 variables Correctly (Write The Exact Names with Exact Capital Letters and Same Spaces!):
local lifestoneName = "Life Stone -  Level 85"
local gemstoneName = "Gemstone B";
local gemstone_count = 58;
local npcName = "Pushkin"; --  only Pushkin(Giran)/ Wilbert(Aden) Supported!
 
 
------Dont Touch Under This Line---------
local AugStatus = 0;
local count = 0; 
AugStatusC = 0;
 
function getItemByName(name)
    local invList = GetInventory();
    for item in invList.list do
        if (item.Name == name) then
            return item;
        end;
    end;
end;
 
function openAugmentWindow(name)
    local target = GetTarget();
    if (target ~= nil) then
        if (target:GetName() ~= name) then
            Command("/target " .. name);
            Sleep(100);
        end;
    else
        Command("/target " .. name);
        Sleep(100);
    end;
 
    target = GetTarget();
    if (target ~= nil) and (target:GetName() == name) then
        if (name == "Wilbert") then
            Talk();
            --ClickLinkAndWait("blacksmith_wilbert005.htm");
            Click("05", "Augment an item");
            Sleep(100);
            Click("01", "Augment an item");
            Sleep(100);
            Click("00", "Start augmenting.");
            --QuestReply("menu_select?ask=-503&reply=100");
            Sleep(100);
            return true;
        elseif (name == "Pushkin") then
            Talk();
            --Sleep(100);
            ClickLinkAndWait("blacksmith_pushkin005.htm");
            Sleep(100);
            ClickLinkAndWait("smelting_start.htm");
            Sleep(100);
            QuestReply("menu_select?ask=-503&reply=100")
            Sleep(100);
            return true;
        end;
    end;
    return false;
end;
 
function getItemByName(name)
    local invList = GetInventory();
    for item in invList.list do
        if (item.Name == name) then
            return item;
        end;
    end;
end;
 
function openAugmentCancelWindow(name)
    count = 2;
    target = GetTarget();
    if (target ~= nil) then
        if (target:GetName() ~= name) then
            Command("/target " .. name);
            Sleep(100);
        end
    else
        Command("/target " .. name);
        Sleep(100);
    end;
 
    target = GetTarget();
    if (target ~= nil) and (target:GetName() == name) then
        if (name == "Wilbert") then
            Talk();
            Click("05", "Augment an item");
            --ClickLinkAndWait("blacksmith_wilbert005.htm");
            Sleep(100);
            Click("02", "Remove Augment");
            --ClickLinkAndWait("smelting_break.htm");
            Sleep(100);
            Click("00", "Remove the refined Life Stone.");
            --ClickLink("menu_select?ask=-503&reply=200");
            Sleep(100);
            return true;
        elseif (name == "Pushkin") then
            Talk();
            ClickLinkAndWait("blacksmith_pushkin005.htm");
            Sleep(100);
            ClickLinkAndWait("smelting_break.htm");
            Sleep(100);
            QuestReply("menu_select?ask=-503&reply=200");
            Sleep(100);
            return true;
        end;
    end;
    return false;
end;
 
weaponId = GetMe():GetEquip_WeaponId();
 
if (weaponId == nil) or (weaponId == 0) then
    ShowToClient("AUGMENT", "You Dont have Any Weapon Equiped to augment!")    ;
else
    weapon = GetInventory():FindById(weaponId);
    if (weapon ~= nil) and ((weapon.RefineryOp2 ~= 0) or (weapon.RefineryOp1 ~= 0)) then
        ShowToClient("AUGMENT", "You Must Start With Non Augmented weapon!") ;
    else
        repeat
 
            if (weapon.RefineryOp2 == 0) and (weapon.RefineryOp1 == 0) then
                AugStatus = 0;
                lifestone = getItemByName(lifestoneName);    
                gemstone = getItemByName(gemstoneName);
                if (lifestone == nil) then
                    ShowToClient("AUGMENT", "Out of life stones.");
                    break;
                end;
                if (gemstone == nil) then
                    ShowToClient("AUGMENT", "Out of gemstones.");
                    AugStatus = 1;
                    break;
                end;
                if (gemstone.ItemNum < gemstone_count) then
                    ShowToClient("AUGMENT", "Gemstones are not enough.");
                    AugStatus = 1;
                    break;
                end;                
 
                ShowToClient("AUGMENT", "Augmenting ..");
                AugStatusC = AugStatusC+1;
                GetAugmentManager():setItemId(weaponId);
                GetAugmentManager():setLifeStoneId(lifestone.objectId);
                GetAugmentManager():setGemstoneId(gemstone.objectId, gemstone_count);
                GetAugmentManager():Augment();    
                if (openAugmentWindow(npcName) == false) then
                    ShowToClient("AUGMENT", "NPC FAIL.");
                    AugStatus = 1;
                    break;
                end;
                repeat
                    Sleep(100);
                    weapon = GetInventory():FindById(weaponId);
                until weapon.RefineryOp1 ~= 0
 
                if (weapon == nil) then
                    ShowToClient("AUGMENT", "The Weapon Couldn't be Detected!");
                    AugStatus = 1;
                    break;
                else
 
                    if (GetAugmentManager():KeepAugment(weapon.RefineryOp2) == true) or (GetAugmentManager():KeepAugment(weapon.RefineryOp1) == true) then
                        ShowToClient("AUGMENT", "Congratulation! You have achieved a desired augment!")
                        AugStatus = 1;
                    else
                        ShowToClient("AUGMENT", "Obtained Useless Augment ...")
                    end;
                end;
                count = 1;
                if (GetMe():GetEquip_HelmId() == 0) then
                    ShowToClient("AUGMENT", "Augmentation Stoped Manualy by removing helment.");
                    AugStatus = 1;
                    break;                            
                end;
            else
                Sleep(100);
                ShowToClient("AUGMENT", "Canceling Augmentation ..");
                weapon = GetInventory():FindById(weaponId);
                if weapon == nil then
                    ShowToClient("AUGMENT", "Weapon for cancel not detected.");
                    count = 3
                    AugStatus = 1;
                    break;
                end;
                if (count == 1) then
                    GetAugmentManager():setItemId(weaponId);
                    GetAugmentManager():AugmentCancel();
                    count = 2;
                end;
                Sleep(100);
 
                if (count == 2) and (openAugmentCancelWindow(npcName) == false) then
                    ShowToClient("AUGMENT", "The NPC Dialog Is not Working Properly.");
                    count = 3
                    AugStatus = 1;
                    break;
                end;
 
                repeat
                    Sleep(100);
                    weapon = GetInventory():FindById(weaponId);
                until weapon.RefineryOp1 == 0
 
                if not (weapon.RefineryOp1 == 0 and weapon.RefineryOp2 == 0) then
                    ShowToClient("AUGMENT", "Augment Canceling Failed.");
                    AugStatus = 1;
                    break;                
                end;
                if (GetMe():GetEquip_HelmId() == 0) then
                    ShowToClient("AUGMENT", "Augmentation Stoped Manualy by removing helment.");
                    AugStatus = 1;
                    break;                            
                end;
            end;
        until weapon == nil or AugStatus == 1 ;
        ShowToClient("AUGMENT","Have Fun!");
    end;
end;

 

 

 

 

DONT WORK ALL TIME, HE BUG STOP GOOD TIME, VERY SLOW HELP ME PLZ  this script /xcfg selection argument    /cfg play scritp    in L2tower, i  change sleep for 1000  / 1500 /100 dont work 

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


×
×
  • 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..