Jump to content

Recommended Posts

Posted

This is a script for high rate servers, it enchants 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 itens with the same name on your invnetory, if you have one you don't want to enchant put in your wh.

 

INCLUDE StdLib\inventory.l2c

//Settings
DEFINE STRING ITEMNAME "Icarus Spitter"            //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 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

 

Topic in L2.NET foum

Posted

nice I see you check for the crystal type as well. I was going to suggest counting all the crystal grades, but that works too :P

 

 

just wanted to point out, you dont need that ENDIF after your returnsub

 

    IF CRYCOUNT2 > CRYCOUNT

        RETURNSUB

    ENDIF

    ELSE

        PRINT_TEXT "Enchant is over."

        SCRIPT_END

    ENDIF

Posted

just saying, that may cause problems because it never gets to the Endif, just useless if anything, wont break your script or anything

 

never mind... your tabbing was confusing me :|

  • 4 weeks later...
Guest
This topic is now closed to further replies.


  • Posts

    • Hello guys I wanna buy some  Lessons for an L2J Developer
    • Let me give you something for inspiration and get you addicted to bot AI     And a siege 😛     What I have notice helps a lot the LLM to act real, is to give it a real-persons background. So for each LLM in the context beggining, besides the L2 facts, give it a real-life back story "You are a 67 years old retired nurse who plays Lineage 2 while her husband reads his newspaper, you are calm, collected but get mad if insulted". But that makes for a creative bot but its repetitive. So what you can also do, is pick random 20 news sites and for each bot every 2-3 days, initialize a context that is affected by the "news" the bot reads in the "real world".  So for example there's Iran - US war ok ? You take the news, put it in an LLM and ask it, extract the "abstract feelings" that this news piece invokes into you without mentioning anything related to the news. Then you take the result and inject it to the bots LLM prompt after its backstory.  This leads to some VERY human-like behavior from bots. 
    • 🚀 Telonyx Contest Platform Telegram Native Giveaway & Contest System for Modern Communities 💎 White-Label • Self-Hosted • Telegram Mini App • Monetization Ready 🧠 Product Overview Telonyx Contest Platform is a production-ready Telegram Mini App system designed for running modern contests, giveaways and engagement campaigns directly inside Telegram. It replaces outdated bot-based mechanics with a fully interactive application experience — no commands, no chat spam, no external websites. Users interact with a clean, fast and mobile-first interface inside Telegram. ⚡ Core Experience Participants can: • 🚀 instantly join contests inside Telegram Mini App • 🎁 view prizes and participation rules • 📊 track real-time contest status • ✅ verify task completion automatically • 🏆 receive winner results and notifications • 💰 participate in free or paid campaigns Everything is fully native to Telegram. 🧩 Key Platform Capabilities 🎯 Contest Engine • advanced contest creation system • multiple winners and reward tiers • scheduled launches and auto-finish logic • contest duplication and templates • real-time participant tracking • flexible rule configuration 📱 Mini App Interface • modern Telegram Mini App UX • mobile-first optimized layout • fast loading and smooth transitions • participant counter & live status • prize showcase system • one-click participation flow 🔎 Task Verification System Automated validation of participation rules: • Telegram channel subscriptions • sponsor channel requirements • multi-channel verification logic • YouTube subscription checks • TikTok task validation ❌ Zero manual moderation required 🛡 Anti-Fraud & Security Layer • duplicate entry prevention • bot detection system • CAPTCHA integration • rule enforcement engine • participation integrity checks 🏆 Automated Winner Selection • fully automated draw system • transparent winner selection logic • instant result publishing • winner notification system • historical archive of all contests 💎 Telegram Stars Monetization • optional paid participation via Telegram Stars • native Telegram checkout integration • flexible entry pricing per campaign • direct monetization of engagement traffic 🌍 Multi-Language Architecture Built with localization in mind. Supported out of the box: • 🇬🇧 English • 🇷🇺 Russian • 🇺🇦 Ukrainian • 🇹🇷 Turkish • 🇪🇸 Spanish • 🇵🇹 Portuguese • ➕ extensible language system for custom localization All UI layers, notifications and admin panel can be fully translated per deployment. 🎯 Ideal Use Cases 🎮 Gaming Projects / Lineage II Servers • pre-launch hype campaigns • donation reward giveaways • VIP / premium account distribution • promo code campaigns • server opening events 🎥 Streamers & Creators • subscriber engagement campaigns • live stream giveaways • audience growth funnels • partnership promotions 🌐 Communities & Brands • automated engagement systems • viral marketing campaigns • audience retention mechanics 🏗 Architecture & Deployment • Telegram Mini App frontend • FastAPI backend architecture • PostgreSQL database layer • Redis caching system • Docker-based deployment • WebSocket real-time updates • REST API integration layer 📦 Self-hosted deployment — full control over infrastructure and data 🎨 White-Label & Customization Each installation can be fully customized: • complete UI/UX rebranding • project-specific visual identity • custom engagement mechanics • referral & viral systems • loyalty & progression systems • seasonal campaign modules • custom API integrations   💡 Why This Platform Traditional contest bots are limited, noisy and inefficient. Telonyx Contest Platform is a modern engagement layer for Telegram ecosystems — combining UX, automation and monetization in one system. ✔ Higher participation rate ✔ Lower friction ✔ Direct revenue via Telegram Stars ✔ Full control via self-hosted deployment 💼 Commercial Model • Single License (Self-Hosted Deployment) • White-Label Branding Rights • Optional Custom Development • Installation & Setup Service 📩 Contact For demo access, licensing details or custom implementation: @se1dhe @telonyx_dev  
    • https://discord.gg/acvqx9rbhy Added intelligent agent that reads scripts and config and provides infos to players regarding gameplay Like where to farm/max enchants etc etc   Added auto translate to En/ES/BR htmls without api
    • The core strength of Novproxy Perfectly unlock overseas AI large models: 100% pure residential IP, perfectly bypassing various strict risk controls such as ChatGPT, Claude, Midjourney, etc. This is an essential tool for parents to train AI on weekends and during work! Available in 195+ countries/regions worldwide: covering an extremely wide range. Whether it's setting up accounts for cross-border e-commerce, conducting overseas web crawling, or conducting network gray-scale tests, it can all be handled easily. Ultra-fast concurrency: Real residential network, stable and non-blocking, high-concurrency business can also run at full capacity.
  • 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..