Jump to content

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


mpj123

Recommended Posts

//made by rocket666

//edited and tweaked by masterkingg

//testing, bug solutions and just being cool, masterkingg

INCLUDE StdLib\inventory.l2c

 

//Settings

DEFINE STRING ITEMNAME "Sword of Miracles"            //Item name, don't write the SA

DEFINE STRING ITGRADE A                    //Item grade (A=s)

DEFINE STRING ENCHNAME "Scroll: Enchant Weapon (A)"    //Enchant name

DEFINE STRING ENCHANT 5          //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

 

 

we succeeded

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.



  • Posts

    • From my personal experiences 🙂   Few months ago I decided to create my own Essence project. Project needs website, and I do not specialize in frontend development (t.y. i can make web work, but it won't be pretty for eye). So I search and find a guy in Discord, which claims he can make me a good looking HTML website for 30 EUR, prove some screenshots from his previous work. I agree. 1 week later, I get my HTML website, make few changes to contents, update URLs and upload it to FTP. Site looks good, I am happy that this headache is no more.   Few months passes. I randomly crawl through other Essence server websites scouting for good ideas for my own project. Suddenly one of russians project website opens and.. it's the same website as one I have 😉 perfectly absolutely same layout, colours, etc etc etc. I contact my guy to ask what the hell, to get blocked 😉  So I find a weekend worth of my time. Find HTML5 boilerplate generator and ask it to include Bootstrap 5 and some other stuff. Open Bootstrap documentation, drink two energy drinks on instant and start working my backend-inspired HTML black magic... Once I found suiting firefly effect for header, result looked oikay for me: Absolutely no magic or beauty here, but: * Unique (and probably nobody cares to rip it) * Done for free in ~10 hours by non-frontend dev * Most modern browsers friendly * Completely static content, loads instantly. No PHP at all * Sidebar statuses (online, pvp, pk) are pulled from account manager REST API endpoint and is cached for 5 minutes. Account manager runs separately from website frontend and has access to server DB. Where could/will it get better? * Code in Vue instead of HTML - time concerns only, but Vue is superior compared to HTML/PHP for supporting desktop/mobile, easing development by miles. Need to learn how to use it properly. * Way to manage content from backend - in my instance I think account manager is not really meant for that. Vue can help here too - there are components for content building. * Currently default Bootstrap components are used. Would be nice to have custom and more vibrant buttons. Guess what, Vue can help here too.   tl;dr don't buy 30EUR website, it will be ripped or shit. you better make your own website. Be curious. I am backend developer, I obviously have general idea how frontend works. But imho everyone who can make L2 server by editing NPC HTMLs, also can make their own simple website. ChatGPT and other AIs are your friends. Bootstrap. jQuery documentations are your friends. And when you feel good and comfortable with HTML, if you like, you can continue learning Vue, or going backend.  
    • Need cheap aged discord accounts ? :  https://campsite.bio/utchihaamkt DISCORD USERNAME : utchiha_market TELEGRAM : https://t.me/utchiha_market Discover new products in our exclusive server today : https://discord.gg/hoodservices
    • i've copyed the files from a server that has it , like all except system folder to another that didn't had the feature and it worked but i can't find any file to resemble save acc or something
    • I'm using linux for the proxy and after 5-6 hours the aplication L2Proxy gets closed without any error, what can be or what do u recomend me? 
  • Topics

×
×
  • Create New...