Jump to content

[Share] Auto-Enchant 100% working and more!


mpj123

Recommended Posts

It work for me... I make u notice that if u wanna enchant an A grade item u have to put " - " in crystal definition

 

Like:

//Some definitions
DEFINE INT CURENCHANT 0                    
DEFINE INT SUCCESSENCHANTED 0 
DEFINE STRING CRYSTAL "Crystal: <&ITGRADE&>-Grade"

Link to comment
Share on other sites

i using l2net  v361 and use script

 

//edited and tweaked by mpj123
//testing, bug solutions and just being cool, MeatWod
INCLUDE StdLib\inventory.l2c

//Settings
DEFINE STRING ITEMNAME "Icarus Disperser/ARMOR HERE"            //Item name, don't write the SA SA
DEFINE STRING ITGRADE S                    //Item grade (s80=s)
DEFINE STRING ENCHNAME "Scroll: Enchant Weapon (S)"    //Enchant name
DEFINE STRING ENCHANT 12              //Max enchant
DEFINE INT CURENCHANT 0                    //Current enchant, change line 38 too
DEFINE INT DELAY 1100                  //Delay of all actions in MS


//Some definitions
DEFINE INT SUCCESSENCHANTED 0 
DEFINE STRING CRYSTAL "Crystal: <&ITGRADE&> Grade"
DEFINE INT CRYID 0
DEFINE INT CRYCOUNT 0
DEFINE INT CRYCOUNT2 0
ITEM_GET_ID CRYID "<&CRYSTAL&>"
DEFINE STRING ITNAME 0
DEFINE INT ENCHID 0
DEFINE INT ENCHCOUNT 0
DEFINE INT ENCHUID 0
DEFINE STRING ENCHCODE 0
DEFINE STRING ITEM 0
DEFINE ARRAYLIST INVEN_AL 0
GET_INVENTORY INVEN_AL

//Calc enchant unique id
ITEM_GET_ID ENCHID "<&ENCHNAME&>"
INVEN_GET_UID ENCHUID "<&ENCHID&>"
ENCHCODE = ENCHUID.GET_HEX32
DEFINE STRING ENCH "19 <&ENCHCODE&> 00 00 00 00"

//Start actions
FOREACH I Inventory INVEN_AL
    ITNAME = INVEN_AL.I.NAME
    IF ITNAME == ITEMNAME
        CALLSUB ENCHANT
        PRINT_TEXT "<&ENCHCOUNT&> enchants remaining."
        CURENCHANT = ZERO
    ENDIF
NEXTEACH
PRINT_TEXT "<&SUCCESSENCHANTED&> are currently enchanted successfully to <&ENCHANT&>"
PRINT_TEXT "Done"
SCRIPT_END

SUB ENCHANT
DEFINE bytebuffer my_bb 256
my_bb.WRITE_BYTE #i95
my_bb.WRITE_INT32 INVEN_AL.I.ID
my_bb.WRITE_INT32 #i0


WHILE ZERO == ZERO
ITEM_COUNT CRYCOUNT "<&CRYID&>"
IF CURENCHANT < ENCHANT
    ITEM_COUNT ENCHCOUNT "<&ENCHID&>"
    IF ENCHCOUNT > ONE
        CURENCHANT = CURENCHANT + ONE
        PRINT_TEXT "Your weapon is enchanting to <&CURENCHANT&>"
        INJECT "<&ENCH&>"
        SLEEP "<&DELAY&>"
        my_bb.TRIM_TO_INDEX
        injectbb my_bb
        SLEEP 300
        ITEM_COUNT CRYCOUNT2 "<&CRYID&>"
        IF CRYCOUNT2 > CRYCOUNT
            DELETE my_bb
            RETURNSUB
        ELSE
           IF CURENCHANT == ENCHANT
           SUCCESSENCHANTED = SUCCESSENCHANTED + #i1
           ENDIF
        ENDIF
    ELSE
        PRINT_TEXT "Enchant is over."
        PRINT_TEXT "<&SUCCESSENCHANTED&> are currently enchanted successfully to <&ENCHANT&>"
        SCRIPT_END
    ENDIF
ELSE
    PRINT_TEXT "Successfully enchanted."
    DELETE my_bb
    RETURNSUB
ENDIF
WEND
RETURNSUB

 

and result:

8:12:57 PM :[0 are currently enchanted successfully to 12

8:12:57 PM :[Done

              ???

Link to comment
Share on other sites

OH MY GOD.

 

DEFINE STRING ITEMNAME "Icarus Disperser/ARMOR HERE" 

 

should be

 

DEFINE STRING ITEMNAME "Icarus Disperser" 

Link to comment
Share on other sites

I HAVE DEFINE DEFINE STRING ITEMNAME "Icarus Disperser" 

AND RESULT

8:32:23 PM :[ERROR: SCRIPT ERROR : THREAD[14] LINE[39] : VARIABLE ITEMNAME IS UNDEFINED

8:32:23 PM :[0 are currently enchanted successfully to 4

8:32:23 PM :[Done

Link to comment
Share on other sites

but what I don scriptu I go? Gimme scriptu you please try to complete echantez Icarus Disperser

 

//made by rocket666
//edited and tweaked by mpj123
//testing, bug solutions and just being cool, MeatWod
INCLUDE StdLib\inventory.l2c

//Settings
DEFINE STRING ITEMNAME "Icarus Disperser"             //Item name, don't write the SA
DEFINE STRING ITGRADE S                    //Item grade (s80=s)
DEFINE STRING ENCHNAME "Scroll: Enchant Weapon (S)"    //Enchant name
DEFINE STRING ENCHANT 4             //Enchant amount wanted to every weapon in inventory
DEFINE INT DELAY 1100                  //Delay of all actions in MS, this may help dodge anti enchanting bans if there are any. Put at least 600.


//Some definitions
DEFINE INT CURENCHANT 0                   
DEFINE INT SUCCESSENCHANTED 0
DEFINE STRING CRYSTAL "Crystal: <&ITGRADE&> Grade"
DEFINE INT CRYID 0
DEFINE INT CRYCOUNT 0
DEFINE INT CRYCOUNT2 0
ITEM_GET_ID CRYID CRYSTAL
DEFINE STRING ITNAME 0
DEFINE INT ENCHID 0
DEFINE INT ENCHCOUNT 0
DEFINE INT ENCHUID 0
DEFINE STRING ENCHCODE 0
DEFINE STRING ITEM 0
DEFINE ARRAYLIST INVEN_AL 0
GET_INVENTORY INVEN_AL

//Calc enchant unique id
ITEM_GET_ID ENCHID ENCHNAME
INVEN_GET_UID ENCHUID "<&ENCHID&>"
ENCHCODE = ENCHUID.GET_HEX32
DEFINE STRING ENCH "19 <&ENCHCODE&> 00 00 00 00"

//Start actions
FOREACH I Inventory INVEN_AL
    ITNAME = INVEN_AL.I.Name
    IF ITNAME == ITEMNAME
        CALLSUB ENCHANT
        PRINT_TEXT "<&ENCHCOUNT&> enchants remaining."
        CURENCHANT = ZERO
    ENDIF
NEXTEACH
PRINT_TEXT "<&SUCCESSENCHANTED&> are currently enchanted successfully to <&ENCHANT&>"
PRINT_TEXT "Done"
SCRIPT_END

SUB ENCHANT
DEFINE bytebuffer my_bb 256
my_bb.WRITE_BYTE #i95
my_bb.WRITE_INT32 INVEN_AL.I.ID
my_bb.WRITE_INT32 #i0


WHILE ZERO == ZERO
ITEM_COUNT CRYCOUNT "<&CRYID&>"
IF CURENCHANT < ENCHANT
    ITEM_COUNT ENCHCOUNT "<&ENCHID&>"
    IF ENCHCOUNT > ONE
        CURENCHANT = CURENCHANT + ONE
        PRINT_TEXT "Your weapon is enchanting to <&CURENCHANT&>"
        INJECT "<&ENCH&>"
        SLEEP "<&DELAY&>"
        my_bb.TRIM_TO_INDEX
        injectbb my_bb
        SLEEP 300
        ITEM_COUNT CRYCOUNT2 "<&CRYID&>"
        IF CRYCOUNT2 > CRYCOUNT
            DELETE my_bb
            RETURNSUB
        ELSE
           IF CURENCHANT == ENCHANT
           SUCCESSENCHANTED = SUCCESSENCHANTED + #i1
           ENDIF
        ENDIF
    ELSE
        PRINT_TEXT "Enchant is over."
        PRINT_TEXT "<&SUCCESSENCHANTED&> are currently enchanted successfully to <&ENCHANT&>"
        SCRIPT_END
    ENDIF
ELSE
    PRINT_TEXT "Successfully enchanted."
    DELETE my_bb
    RETURNSUB
ENDIF
WEND
RETURNSUB

 

result

11:39:35 PM :[Enchant is over.

11:39:35 PM :[0 are currently enchanted successfully to 4

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.



  • Posts

    • Welcome to my store : https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 60.99 $ 2016 Discord Account : 10.50 $ 2017 Discord Account :4.99 $ 2018 Discord Account : 3.99 $ 2019 Discord Account : 2.99 $ 2020 Discord Account :1.99$ 2021 Discord Account :1.50$ 2022 Discord Account :0.99$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore11 Whatsapp ; +212614849119
    • The heavy lifting is done in the client, because while you can get away with small imperfections in the java, everything in the client must be impecable. So, if you haven't touched the client, I'd say pick the newest protocol version you can find the client editing tools and Interface.u (mandatory) / NWindow.dll (better to have it) / Engine.dll (optional) sources for. At the very least, you need the Interface.u to fix the Clan Window and enable skill enchanting on Classic/Essence versions, if you decide to use one of them instead of MAIN/LIVE.
    • Thanks for clarification. Do you think the newest clients offer solid advantages compared to the classic ones like Salvation? I'm also in the process of porting h5 to one of them just for the sake of it, so I was wondering if I should just attempt to go to the newest possible.
    • Upgrading to Salvation is exactly the same as upgrading to the newest client with the only difference being access to free-shared client editing tools and resources. I am speaking from experience. I have upgraded my HF source to one of the newest clients by myself (in terms of server side. got help with the client) and hit every single wall there was in the process. Now, I already have several multi-protocool server cores so I can easily compare different approaches to tackling the same issue, which also helped the learning process. Best way to learn would be to use this one (link below) to snoop around and figure out what has been changed in the server side (the packet structure will be different, for sure, but works for understanding/figuring the process out in general terms). https://github.com/iBezneR/L2J_SunriseProject_Purity The client side will always be the same, always the same files, only the DAT structure will be different. I personally wrote myself some parsers for the data of the DAT files from OLD -> NEW client.
  • Topics

×
×
  • Create New...