Recent posts

#91
MU Louis .lua script autopots + right click. :drinkiing  :drinkiing

I'll assume your client looks like this (like the pack you showed):

QuoteScript/
  ScriptMain.lua
  System/
  Util/
    KeysValue.lua
  Scripts/
    ... other scripts ...

And that these exist in your Lua API:
GetCharacterLifePercent()

GetCharacterManaPercent()

GetCharacterSDPercent()

GetCharacterAGPercent()

SendKey(vk) 

BridgeFunctionAttach(eventName,functionName)

require("Util\\KeysValue")

If any names are slightly different, you'll just map them, but let's start with the standard ones.

1. Create the auto pots + right-click script

Create a new file:

QuoteScript/Scripts/AutoPotsRightClick.lua

Put this full code inside:
You require the following to view this post content:
  • To see this content, please click the "-SAY THANKS-" button located on the bottom-right of this post.


If your environment has a nicer on-screen text function (like PrintText, AddNotice, etc.), you can replace the print(...) lines with that so you get in-game feedback instead of console.

2. Hook the script in ScriptMain.lua

Open:

QuoteScript/ScriptMain.lua

Add a require for this new script.

Example:
You require the following to view this post content:
  • To see this content, please click the "-SAY THANKS-" button located on the bottom-right of this post.


Save it.

3. In-game setup

Now the "dumb but important" part: bars and usage.
1. Put your potions on the correct keys:
    •    HP potion → Q
    •    MP potion → W
    •    SD potion → E
    •    AG potion → R
2. Put your main attack/skill on right click like you normally would.
3. Start the client and log in.
4. Check for errors:
- If your Lua engine prints errors to a console/log, make sure there's no "attempt to call global" type issues.
- If something breaks at boot, it's usually a typo in require paths or missing API function.

4. Using the features

Once you're in game:
    •    Auto pots
    •    Starts enabled by default.
    •    Press F8 to toggle:
    •    F8 → "AutoPots ENABLED / DISABLED" in the console/log.
    •    When HP/MP/SD/AG drop below configured thresholds:
    •    Script will press Q/W/E/R with a small cooldown.
    •    Auto right-click
    •    Starts disabled by default.
    •    Press F9 to toggle:
    •    F9 → "AutoRightClick ENABLED / DISABLED".
When enabled:
- It will call SendKey(VK_RBUTTON) every RIGHTCLICK_TICK_INTERVAL ticks.
— If VK_RBUTTON doesn't work in your client, you'll swap that line for whatever mouse API the client exposes (e.g. MouseClickR() if it exists).

5. Tweaking behavior

You don't need to rewrite logic; just tune the constants at the top of the file.
- Want pots to kick in earlier?
→ Increase thresholds:
You require the following to view this post content:
  • To see this content, please click the "-SAY THANKS-" button located on the bottom-right of this post.


Too many keys firing?
- Increase CHECK_EVERY_TICKS or POT_COOLDOWN_TICKS.
Right-click too fast or too slow?
- Change:
You require the following to view this post content:
  • To see this content, please click the "-SAY THANKS-" button located on the bottom-right of this post.


6. If right-click doesn't fire

If you don't see right-click happening at all:
1. First confirm F9 toggling works (you see the log line).
2. If it does, but no in-game effect:
- Your SendKey function might ignore 0x02.
- Check your other scripts / docs to see if there's a mouse function like:
MouseClickR()
MouseClick(x, y, button)
SendMouseClick(button)

If you find the actual function name, you just go to:
You require the following to view this post content:
  • To see this content, please click the "-SAY THANKS-" button located on the bottom-right of this post.

and replace it with whatever your environment uses, e.g.:
You require the following to view this post content:
  • To see this content, please click the "-SAY THANKS-" button located on the bottom-right of this post.

...leaving everything else in the script as is.

:magic
#92
Mu Online Server Advertisement / AdvertisingRe: 🚀EntropyMU🚀December 19th |...
Last post by entropymu - Dec 02, 2025, 09:41 PM
New edition is starting this month!
December 19th Grand Opening!
#93
Mu Editors / Mu EditorRe: Titan editor Premium 2022
Last post by Dorin - Dec 02, 2025, 10:39 AM
I have a project Titan Editor 2026—it will be smarter and nicer. Maybe this month will be the launch.  :)
#94
Mu Editors / Mu EditorRe: Titan editor Premium 2022
Last post by PowerNet - Dec 02, 2025, 10:30 AM
work not have bug
#95
Mu Online Server Advertisement / AdvertisingRe: ⚔️AVRORAMU|S6EP3|EXP:200x|...
Last post by MAMMOTHGG - Dec 02, 2025, 08:36 AM
up
#96
Support / Help / HelpRe: Lua Script Auto Pots and H...
Last post by maha000 - Dec 02, 2025, 03:35 AM
yes my files supports lua script i'm using Louis file V40 to 41 so it really support Lua Script already have some script running on it.

#97
Support / Help / HelpRe: Lua Script Auto Pots and H...
Last post by ꧁Phantasm꧂ - Dec 01, 2025, 11:51 PM
I would, but there is more to say, like, is your server support lua? Maybe how could I know that? It wouldn't be possible to integrate it otherwise, if not, you need the source. Like MuEmu Louis up to last patch, it supports lua and you could easily integrate this script. It's not like demonstrate it, you need to be sure of what have you got there "under the hood".

We can't just speak like demonstrate it, it's not about demonstration, you need to make sure about your server.

+ it's a free script .lua

I would say test it and come back with some results.

The only way MuServers communicate with .lua it's before compilation, that's why I have mentioned all this.

Example: Mu Louis up to 31 ain't communicating with .lua, you need higher upgrade from Louis (just an example didn't mean to bring MuEmu Louis in this conversation).

Thank you.
#98
Support / Help / HelpRe: Lua Script Auto Pots and H...
Last post by maha000 - Dec 01, 2025, 11:39 PM
Hello can you show me some examples of it in-game?  sorry to bother you just a newbie when it comes to lua script.
#99
Mu Online Server Advertisement / AdvertisingRe: ⚔️AVRORAMU|S6EP3|EXP:200x|...
Last post by MAMMOTHGG - Dec 01, 2025, 09:40 PM
up
#100
Mu Editors / Mu EditorRe: Titan editor Premium 2022
Last post by rodrigoo22 - Dec 01, 2025, 11:07 AM
Me tome el trabajo de traducirlo todo al ingles no quedo nada ni un texto en vietnamita aadi algunos fixes y sigo en proceso mejora  ni bien este terminado lo publicare
Powered by SMFPacks Ads Manager Mod