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

    • Hi! If you love TikTok music and want to download it, use SaveTikTok. Just copy the TikTok video link, paste it on the site, and download your favorite tracks and videos quickly. I think this is a great opportunity. I also really like to use Instagram. I wonder if there is such a function. I will tell you how to get likes on Instagram very quickly. So I wish you success in achieving popularity. Enjoy them anytime, on any device!nytime, on any device!
    • U dont kbow what happened with dumanist I send him files he downloaded and then asked for refund, i got all proofs at whatsapp, why he never open a topic, fucking idiot u are 😆 There are no fake updates me and him made all fixes, we dont have to prove something.. especially when you told him that cache is wrong and this is why it crashes while you have half of the code unclosed connections in mail system.. as i said gtfo, pay your programmer to make your fixes! Cause for scripts changing stats you are more than good.. as i said.. bulgarian whore, lick everyone!  There are no fake updates me and him made all fixes, we dont have to prove something.. especially when you told him that cache is wrong and this is why it crashes while you have half of the code unclosed connections in mail system.. as i said gtfo, pay your programmer to make your fixes! Cause for scripts changing stats you are more than good.. as i said.. bulgarian whore, lick everyone!       Also the truth is i helped in many codes inside the pack! But the most percentage is zoumhs work! If he is the one making it or someone else its non of your bussiness he doesnt have profit from this! He is clever to make subscriptions that way he can find all issues , while u just ask 100 per fixes 😅🤣     If u are that great, why u lick trevorj and why back in the days begging gustavo to make you stuff!  Just enjoy your life and leave zoumhs alone! To do his hobby! You are just a toxic and jealous rat! All your "clients" speak with the best for you 🤣🤣🤣      
    • So since interlude chronicle when a monster attacks you , it auto targets the monster , i need to disable it , like on C1-C4 was.   Im using vanganth extender also have sources ,but have no idea wheare to take a look.    
    • I have a rebirth engine on my server and it works great, except after the first rebirth... When taking 2nd+++ Rebirth it does NOT give any rewards... If someone could PM me I would appreciate it, I dont want to post the code here until it is fixed... This can be closed, stupidly enough you have to repeat the rewards for every separate rebirth instead of just the one item you want them all to give....
    • You telling me that ZOUMHS fixing things in the source code xD, please don't try to be funny. When are you going to tell the truth? just fake updates 🙂   ps What happened to the deleted posts from me and the evidence of how much FAKE you are? Another person who thinks like me. Let's see who will be quicker to delete the posts.  I admit, i cant live without you 🙂 But please stop changing your nicknames because i no longer know who is who.      
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock