This script can enchant lots of the same item.
Detect when the item broke and jumps to the next and when the enchant is over.
It will enchant all items with the same name on your inventory, if you have one you don't want to enchant put in your wh.
working 100% enjoy! 358+
made by Meatwod and mpj123
Code:
//made by rocket666
//edited and tweaked by mpj123
//testing, bug solutions and just being cool, MeatWod
INCLUDE StdLib\inventory.l2c
//Settings
DEFINE STRING ITEMNAME "WEAPON HERE or ARMOR HERE" //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 "12" //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
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 > ZERO
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
357 and under, made by rocket666:
Code:
INCLUDE StdLib\inventory.l2c
//Settings
DEFINE STRING ITEMNAME "Icarus Spitter" //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 "20" //Max enchant
DEFINE INT CURENCHANT 0 //Current enchant, change line 38 too
DEFINE INT DELAY 1000 //Delay of all actions (ms)
//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 HEXCODE "00 00 00 00"
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&>"
MATH ENCHCODE ENCHUID GET_HEX
DEFINE STRING ENCH "19 <&ENCHCODE&> 00 00 00 00"
//Start actions
FOREACH I Inventory INVEN_AL
SET ITNAME "<&INVEN_AL.I.NAME&>"
IF ITNAME == ITEMNAME
CALLSUB ENCHANT
PRINT_TEXT "<&ENCHCOUNT&> enchants sobrando. "
SET CURENCHANT 0
ENDIF
NEXTEACH
PRINT_TEXT "Done"
SCRIPT_END
SUB ENCHANT
MATH HEXCODE "INVEN_AL.I.ID" GET_HEX
SET ITEM "5F <&HEXCODE&> 00 00 00 00"
WHILE ZERO == ZERO
ITEM_COUNT CRYCOUNT "<&CRYID&>"
IF CURENCHANT < ENCHANT
ITEM_COUNT ENCHCOUNT "<&ENCHID&>"
IF ENCHCOUNT > ZERO
INJECT "<&ENCH&>"
SLEEP "<&DELAY&>"
INJECT "<&ITEM&>"
SLEEP "<&DELAY&>"
MATH CURENCHANT CURENCHANT ADD ONE
ITEM_COUNT CRYCOUNT2 "<&CRYID&>"
IF CRYCOUNT2 > CRYCOUNT
RETURNSUB
ENDIF
ELSE
PRINT_TEXT "Enchant is over."
SCRIPT_END
ENDIF
ELSE
PRINT_TEXT "Successfully enchanted."
RETURNSUB
ENDIF
WEND
RETURNSUB
You can record your own script with L2 walker. Use EWD or EAD since it's cheap. Get the ITEM ID FOR C,B,A,S enchants (same for bless), and replace it with the EWD/EAD ID.
To get the ITEM ID you are looking for, ask a friend to borrow you a EAS, EWS, BEAS, BEWS if it's possible. And look in walker what its ID is. If you can't find it, I think walker has on its website ITEM IDs, in a folder.
L2NET Script 06/24/2020 - Lineage 2 - 5 Replies Can someon write simple scrit for mana potion for dragon networc.I lookt at L2net forum but ther are no script for Enhanced mana potion.
Enhanced mana potion ID:9264
Script enchant skills/weapon 11/21/2009 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 2 Replies Do u guys know any script or macro to auto enchant skills or weapons?
Plz i need that
Regards Cien
how do i enchant my weapon using l2net? 07/31/2009 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 2 Replies how do i enchant my weapon using l2net? i'm playing a sever call l2inc, i just wanna know what do i have to do to enchant a weapon from +0 to +30?
can anyone help me with this?
thnks
L2 Enchant Script 01/22/2009 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 1 Replies I didn`t know what to do with it (i`m not even NOOB Rank at hacking)... i found it on another forum searching for L2Phx Enchant Script.
If i made a mistake,i`m sorry,but if it`s a script for L2phx and u know what to do whit it .... can u pls teach me what to do whit this.
edited