Jump to content

Recommended Posts

Posted

http://ltwonet.com/showthread.php?t=1846

 

This is rocket666's script, fixed and edited by me, and re-fixed and edited by trixy.

 

 

 

This is rocket666's enchant script now fixed for CT 2.3 (Gracia Final)

Special thanks to mpj123 for helping me to better understand the bytebuffer function!

 

Please post problems, suggestions, bugs. Thanks

 

(NOT auto detect S Grade)

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

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

//Some definitions
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
DEFINE bytebuffer new_bb 256

my_bb.WRITE_BYTE #i95
my_bb.WRITE_INT32 INVEN_AL.I.ID
my_bb.WRITE_INT32 #i0

new_bb.WRITE_BYTE #i208
new_bb.WRITE_BYTE #i76
new_bb.WRITE_BYTE #i0
new_bb.WRITE_INT32 INVEN_AL.I.ID

WHILE ZERO == ZERO
ITEM_COUNT CRYCOUNT "<&CRYID&>"
IF CURENCHANT < ENCHANT
    ITEM_COUNT ENCHCOUNT "<&ENCHID&>"
    IF ENCHCOUNT > ZERO
        CURENCHANT = CURENCHANT + ONE
        PRINT_TEXT "Your item is enchanting to <&CURENCHANT&>"
        INJECT "<&ENCH&>"
        SLEEP "<&DELAY&>"
        new_bb.TRIM_TO_INDEX
        injectbb new_bb
        SLEEP 1000
        my_bb.TRIM_TO_INDEX
        injectbb my_bb
        SLEEP 300
        ITEM_COUNT CRYCOUNT2 "<&CRYID&>"
        IF CRYCOUNT2 > CRYCOUNT
            DELETE new_bb
            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 new_bb
    DELETE my_bb
    RETURNSUB
ENDIF
WEND
RETURNSUB

EDIT: Ok So I went and changed a few things, I made it so it will now auto detect if you are enchanting S grade or not.

Just Remember to change the DEFINE STRING ITGRADE "S" line, to whatever you need.

 

Also I adjusted the placement of the Definable DELAY. It was after using the enchant scroll, now it's after clicking "ENCHANT".

The slower I ran this script with this DEFINE INT DELAY 4000 (4 seconds delay after clicking enchant button) the more accurate it was.

Had a little lag on the server while waiting for crystals or successful enchant.

 

Use either one you want, hope it works for ya, worked fine for me for an hour.

 

(AUTO detect S Grade)

//made by rocket666
//edited and tweaked by mpj123
//testing, bug solutions and just being cool, MeatWod
//new_bb & S-Grade Auto Detection - trixy
INCLUDE StdLib\inventory.l2c

//Settings
DEFINE STRING ITEMNAME "WEAPON OR ARMOR NAME"            //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 "14"                          //Max enchant (# to stop at)
DEFINE INT CURENCHANT 0                           //Current enchant,change lines 44 & 48 ALSO!!!
DEFINE INT DELAY 4000                                  //Delay of all actions in MS
DEFINE INT SUCCESSENCHANTED 0

//Some definitions
DEFINE STRING CRYSTAL "Crystal: <&ITGRADE&> Grade"
DEFINE STRING CRYSTAL2 "Crystal: <&ITGRADE&>-Grade"
DEFINE INT CRYID 0
DEFINE INT CRYID2 0
DEFINE INT CRYCOUNT 0
DEFINE INT CRYCOUNT2 0
ITEM_GET_ID CRYID "<&CRYSTAL&>"
ITEM_GET_ID CRYID2 "<&CRYSTAL2&>"
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
       IF ITGRADE != #$S
            CURENCHANT = #i0
            CALLSUB ENCHANT_OTHER
            PRINT_TEXT "<&ENCHCOUNT&> enchants remaining."
       ELSE
            CURENCHANT = #i0
            CALLSUB ENCHANT_SGRADE
            PRINT_TEXT "<&ENCHCOUNT&> enchants remaining."
       ENDIF
  ENDIF
NEXTEACH
PRINT_TEXT "<&SUCCESSENCHANTED&> are currently enchanted successfully to <&ENCHANT&>"
PRINT_TEXT "Done"
SCRIPT_END

SUB ENCHANT_OTHER
DEFINE bytebuffer my_bb 256
DEFINE bytebuffer new_bb 256

my_bb.WRITE_BYTE #i95
my_bb.WRITE_INT32 INVEN_AL.I.ID
my_bb.WRITE_INT32 #i0

new_bb.WRITE_BYTE #i208
new_bb.WRITE_BYTE #i76
new_bb.WRITE_BYTE #i0
new_bb.WRITE_INT32 INVEN_AL.I.ID

WHILE ZERO == ZERO
ITEM_COUNT CRYCOUNT "<&CRYID2&>"
IF CURENCHANT < ENCHANT
    ITEM_COUNT ENCHCOUNT "<&ENCHID&>"
    IF ENCHCOUNT > ZERO
        CURENCHANT = CURENCHANT + ONE
        PRINT_TEXT "Your <&ITEMNAME&> is enchanting to <&CURENCHANT&>"
        INJECT "<&ENCH&>"
        SLEEP 500
        new_bb.TRIM_TO_INDEX
        injectbb new_bb
        SLEEP 500
        my_bb.TRIM_TO_INDEX
        injectbb my_bb
        SLEEP "<&DELAY&>"
        ITEM_COUNT CRYCOUNT2 "<&CRYID2&>"
        IF CRYCOUNT2 > CRYCOUNT
            DELETE new_bb
            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 new_bb
    DELETE my_bb
    RETURNSUB
ENDIF
WEND
RETURNSUB


SUB ENCHANT_SGRADE
DEFINE bytebuffer my_bb 256
DEFINE bytebuffer new_bb 256

my_bb.WRITE_BYTE #i95
my_bb.WRITE_INT32 INVEN_AL.I.ID
my_bb.WRITE_INT32 #i0

new_bb.WRITE_BYTE #i208
new_bb.WRITE_BYTE #i76
new_bb.WRITE_BYTE #i0
new_bb.WRITE_INT32 INVEN_AL.I.ID

WHILE ZERO == ZERO
ITEM_COUNT CRYCOUNT "<&CRYID&>"
IF CURENCHANT < ENCHANT
    ITEM_COUNT ENCHCOUNT "<&ENCHID&>"
    IF ENCHCOUNT > ZERO
        CURENCHANT = CURENCHANT + ONE
        PRINT_TEXT "Your <&ITEMNAME&> is enchanting to <&CURENCHANT&>"
        INJECT "<&ENCH&>"
        SLEEP 500
        new_bb.TRIM_TO_INDEX
        injectbb new_bb
        SLEEP 500
        my_bb.TRIM_TO_INDEX
        injectbb my_bb
        SLEEP "<&DELAY&>"
        ITEM_COUNT CRYCOUNT2 "<&CRYID&>"
        IF CRYCOUNT2 > CRYCOUNT
            DELETE new_bb
            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 new_bb
    DELETE my_bb
    RETURNSUB
ENDIF
WEND
RETURNSUB

Posted

er can u make the script enchant one by one like easy2k4 's script. his script doesnt work since l2 gracia ct2.3 have been updated!

i know this script very useful but when i enchant the weap to +5 and i have some weap still +4 when i want to enchant the weap still +4 to +5 but this script enchant my weap +5 frist, then +4 after and i get tons of cry :((

Posted

er can u make the script enchant one by one like easy2k4 's script. his script doesnt work since l2 gracia ct2.3 have been updated!

i know this script very useful but when i enchant the weap to +5 and i have some weap still +4 when i want to enchant the weap still +4 to +5 but this script enchant my weap +5 frist, then +4 after and i get tons of cry :((

 

Slow down your int delay, and it wont mess up. The other enchant scripts could be easily fixed using the "new_bb" bytebuffers and inject them..... I just dont have the time right now to go through all the old enchant scripts to fix them. I like this one most :)

 

Enjoy.. Thanks mpj

Posted

this is my favorite, I just set the enchant to 5, then run the script once with 1 enchant to each until they all break.

Posted

these enchant scripts were already made a while back, we just updated it to support ct2.3 packets now.

Posted

I play on L2Inc and this script is working for S grade , still , for A grade or lower it might have a problem or do i , when i try to enchant  something it show me that .... tallum armor is enchanted to 10 ,  i got cristals , and he don`t start another armor  it shows to me that he is enchanting to 11 ..... and all items are succeseful enchanted .... does anyone have any idea????

Guest
This topic is now closed to further replies.


  • Posts

    • Hi! I downloaded the Topic's files but i have the same issue as others with black gras. but i do not have Illumination at Server Info in F6. Someone could help me with it? im using L2C4 client and L2Julvius. Thank you all!
    • WTB GEODATA FOR GRACIA FINAL PROJECT.
    • Server is not Classic, is C4 Scions of Destiny.   http://eternalsinl2.com   https://l2network.eu/details/2458/Lineage-II-Eternal-SIn/#google_vignette
    • Dynamic traffic, static ISP, unlimited traffic and bandwidth packages HTTP, HTTPS, SOCKS5 Over 195 countries/regions Over 100 million real residential IP address pools, with a normal uptime of 99.9%. Special discount code:VIP999
    • Here is the translation, formatted to look professional, clean, and highly scannable for your forum post: Hello L2JBrasil community! I present to you the newest development from MiaCodeWeb. We have created a robust and advanced adaptation of the Phantom system for aCis / L2JAcis 409, focused on Interlude C6 servers. Our main goal was to transform traditional "ornamental bots" into highly realistic, autonomous players. They are capable of creating themselves, restoring themselves, farming, auto-equipping, using skills, responding in chat using Artificial Intelligence, and being managed directly via an in-game panel. GitHub: https://github.com/miacodeweb/L2-Phantom-AI Video Demonstration: [Insert link here]   ## Main Features and Implementation We implemented the core of the Phantom system directly into the aCis gameserver. The architecture was divided into independent modules for AI, combat, chat, equipment, inventory, progression, logs, and administration. In-Game Admin Panel: Fully functional //phantom command. It allows you to create new phantoms, restore saved ones, reload configs, start/stop the AI, view online phantoms, kill bugged phantoms, delete them individually, and navigate through pages. Data Persistence: Created phantoms can be registered in phantoms.properties, allowing them to be restored later while maintaining all their progress directly from the database. Centralized Configuration: Everything is controlled by the phantoms.properties file, organized by sections: AI, Loot, Skills, Equipment, Zones, PVP/PK, Gemini (Chat), Logs, Respawn, and Anti-Stuck system. ## Phantom Skills and Behavior Smart Combat: They patrol, search for mobs, and claim targets to prevent multiple phantoms from attacking the same monster. Mages rest when they run out of MP and avoid hitting with physical weapons unnecessarily. Automatic Progression: Auto-learning of skills, automatic class changes following the logical tree of the chosen profession, receiving buffs, and inventory clearing when reaching a certain weight/space percentage. Dynamic Equipment System: They auto-equip based on class and level, using varying item combinations so they don't all look the same. Optimized Loot: Each phantom focuses on picking up drops/herbs from its own mob, avoiding that ugly scene of 10 phantoms chasing the same adena. PVP/PK Behavior (Configurable): Immediate response to attacks, detection of PK players in the visible area, and an optional "PK Rage Mode". ## AI and Movement Navigation and Anti-Stuck: Patrol system, free wandering, obstacle and stuck detection, with Geodata validation (when enabled on the server). Respawn: Automatic return to town after death, alongside safety rules to prevent them from getting permanently stuck in textures. Leveling Zones: Configurable leveling zones (automatic teleports to farm zones are disabled by default, as in Interlude/aCis they rely heavily on geodata accuracy and the real coordinates of your server). ## AI Chat Integration (Gemini 2.5 Flash) We integrated a Whisper system via the Gemini 2.5 Flash API, making the phantoms respond like real Lineage 2 players. Support for both free and paid API tiers. Configurable parameters: GeminiApiTier, Keys, Cooldowns, and DailyLimits. The system detects connection failures, API limits, and empty responses, and logs everything. The prompt has been adjusted so that the phantom doesn't reply with empty or robotic phrases when asked where to level up or what it's doing. ## Dedicated Log System We created an exclusive log file located at gameserver/log/phantoms.log. It records: loading of phantoms, auto-skills, buffs, Gemini API errors/successes, anti-stuck actions, kills/deletes by admin, and configuration issues. ## Simplified Distribution and Installation Thinking about ease of use for administrators, the mod is delivered in a ready-to-use package: phantom-acis-installer-client.zip. Includes an automatic PowerShell installer that injects the code into your Eclipse project. Contains README.md, INSTALL_MAP.md, and the payload/ folder with ready-made routes for aCis. Clean configuration files (without my API keys). Just run the installer over your copy of aCis, refresh Eclipse, compile, and test. ## Custom Jobs The project already has a solid and functional base for aCis 409. The ideal next steps would be to refine the farm routes by level and social behavior with long-term testing on live servers. I accept custom jobs! If you need this system adapted for another revision, exclusive modules, or any other development for your server, get in touch. Through MiaCodeWeb, I also offer complete services involving geodata optimization, advanced VPS administration (Linux), and Java backend management for L2J. Send a PM or visit the GitHub!   https://www.l2jbrasil.com/applications/core/interface/file/attachment.php?id=17801&key=135fc8d831b84c05089851b18bfca58a   Link dowload:https://github.com/miacodeweb/L2-Phantom-Acis-409
  • Topics

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