• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.
Resource icon

Custom task menu 1.1.0

No permission to download

Sorky

Premium User
Premium User
Joined
Dec 17, 2024
Messages
208
Solutions
3
Reaction score
140
GitHub
Sorky96
Sorky submitted a new resource:

Custom task menu - custom, simple task system

Hey everyone!


While learning how to create modules for OTClient, I put together a simple task module that fully relies on extended opcodes for communication between the server and client.


It's designed to show tasks in a panel-style layout with visual elements for:


  • Progress tracking (UIProgressBar)
  • Reward items (UIItem)
  • Task monsters (UICreature with lookType)
  • Dynamic task list loading via opcode 125
    It supports:
  • Persistent selection...

Read more about this resource...
 
Sorky updated Custom task menu with a new update entry:

Mostly performance fixes

Server-side Fixes​


  • Switched to using storageId for task tracking.
  • Optimized network load by sending all tasks in a single batch, reducing opcode spam to the client.
  • Introduced debounce logic in task_kill.lua to prevent rapid execution.
  • Various minor improvements and code cleanups.



️ UI Fixes & Improvements​


  • Added search bar with debounce for smoother filtering.
  • Implemented...

Read the rest of this update entry...
 
Sorky updated Custom task menu with a new update entry:

Task Tracker System Update

View attachment 93049




You can now toggle visibility of completed tasks with a single click. This helps you focus on what’s still pending and keeps your task list clean.​





Track your progress in real time with new floating mini windows!​



  • You can choose a task to “track” using the Show/Hide Tracker button.
  • The mini window updates live as your task progresses.
  • It stays...

Read the rest of this update entry...
 
it looks like file was not loaded correctly, any logs in terminal? ctrl+t. or logs.log

Same problem
1750463175259.webp

Code:
GPU AMD Radeon RX 6600 (ATI Technologies Inc.)
OpenGL 4.6.0 Compatibility Profile Context 24.5.1.240502
[Atlas] Texture size is: 4096x4096 (max: 16384x16384)
Found work dir at 'C:/Users/XX/Desktop/XX/'
== application started at Jun 21 2025 01:48:23
OTCv8 3.2 rev 4 (dev) made by otclient.net built on Feb 26 2023 for arch x86
ERROR: failed to load UI from 'custom_tasks.otui': OTML error in '/modules/custom_tasks/custom_tasks.otui' at line 52: indentation with tabs are not allowed
FATAL ERROR: Unable to load module 'custom_tasks': /modules/custom_tasks/custom_tasks.lua:20: attempt to index field 'window' (a nil value)
stack traceback:
    [C]: in function '__index'
    /modules/custom_tasks/custom_tasks.lua:20: in function 'init'
    /modules/custom_tasks/custom_tasks.otmod:10:[@onLoad]:1: in main chunk
    [C]: in function 'autoLoadModules'
    /init.lua:78: in function 'loadModules'
    /init.lua:92: in main chunk
 
Same problem
View attachment 93189

Code:
GPU AMD Radeon RX 6600 (ATI Technologies Inc.)
OpenGL 4.6.0 Compatibility Profile Context 24.5.1.240502
[Atlas] Texture size is: 4096x4096 (max: 16384x16384)
Found work dir at 'C:/Users/XX/Desktop/XX/'
== application started at Jun 21 2025 01:48:23
OTCv8 3.2 rev 4 (dev) made by otclient.net built on Feb 26 2023 for arch x86
ERROR: failed to load UI from 'custom_tasks.otui': OTML error in '/modules/custom_tasks/custom_tasks.otui' at line 52: indentation with tabs are not allowed
FATAL ERROR: Unable to load module 'custom_tasks': /modules/custom_tasks/custom_tasks.lua:20: attempt to index field 'window' (a nil value)
stack traceback:
    [C]: in function '__index'
    /modules/custom_tasks/custom_tasks.lua:20: in function 'init'
    /modules/custom_tasks/custom_tasks.otmod:10:[@onLoad]:1: in main chunk
    [C]: in function 'autoLoadModules'
    /init.lua:78: in function 'loadModules'
    /init.lua:92: in main chunk
Code:
custom_tasks/custom_tasks.otui' at line 52: indentation with tabs are not allowed

You have placed tab in line 52 in otui file, change it to space, tabs will always crash the module
 
Code:
custom_tasks/custom_tasks.otui' at line 52: indentation with tabs are not allowed

You have placed tab in line 52 in otui file, change it to space, tabs will always crash the module

Next errors after remove all tabs in empty lines
Code:
GPU AMD Radeon RX 6600 (ATI Technologies Inc.)
OpenGL 4.6.0 Compatibility Profile Context 24.5.1.240502
[Atlas] Texture size is: 4096x4096 (max: 16384x16384)
Found work dir at 'C:/Users/knowa/Desktop/ParcelOT_OTCLIENT/'
== application started at Jun 21 2025 14:43:42
OTCv8 3.2 rev 4 (dev) made by otclient.net built on Feb 26 2023 for arch x86
FATAL ERROR: Unable to load module 'custom_tasks': /modules/custom_tasks/custom_tasks.lua:29: attempt to index field 'game_mainpanel' (a nil value)
stack traceback:
    [C]: in function '__index'
    /modules/custom_tasks/custom_tasks.lua:29: in function 'init'
    /modules/custom_tasks/custom_tasks.otmod:10:[@onLoad]:1: in main chunk
    [C]: in function 'autoLoadModules'
    /init.lua:78: in function 'loadModules'
    /init.lua:92: in main chunk
 
I saw the video where you were testing with Mehah, so you should have tested OTCv8 before posting. The structure between OTCv8 and Mehah is completely different. Try testing OTCv8 yourself and you’ll see — there are definitely some issues. Please fix it and make it compatible with OTCv8. Thanks! @Sorky
 
I saw the video where you were testing with Mehah, so you should have tested OTCv8 before posting. The structure between OTCv8 and Mehah is completely different. Try testing OTCv8 yourself and you’ll see — there are definitely some issues. Please fix it and make it compatible with OTCv8. Thanks! @Sorky
Sorry, but why would I? I selected correctly that this module was not tested on otc 8 and I won't touch that repo
Post automatically merged:

Next errors after remove all tabs in empty lines
Code:
GPU AMD Radeon RX 6600 (ATI Technologies Inc.)
OpenGL 4.6.0 Compatibility Profile Context 24.5.1.240502
[Atlas] Texture size is: 4096x4096 (max: 16384x16384)
Found work dir at 'C:/Users/knowa/Desktop/ParcelOT_OTCLIENT/'
== application started at Jun 21 2025 14:43:42
OTCv8 3.2 rev 4 (dev) made by otclient.net built on Feb 26 2023 for arch x86
FATAL ERROR: Unable to load module 'custom_tasks': /modules/custom_tasks/custom_tasks.lua:29: attempt to index field 'game_mainpanel' (a nil value)
stack traceback:
    [C]: in function '__index'
    /modules/custom_tasks/custom_tasks.lua:29: in function 'init'
    /modules/custom_tasks/custom_tasks.otmod:10:[@onLoad]:1: in main chunk
    [C]: in function 'autoLoadModules'
    /init.lua:78: in function 'loadModules'
    /init.lua:92: in main chunk
Module was designed and tested on otland master fork, not OTCv8. I don't have that much time to test each repo
 
Code:
FATAL ERROR: Unable to load module 'custom_tasks': /modules/custom_tasks/custom_tasks.lua:29: attempt to index field 'game_mainpanel' (a nil value)

As the line says, game_minipanel is not initiated before something else is trying to use it, so it is NIL, not existing in that certain moment. Check the order of some lines in init or some onGameStart function, and try to change their order
 
client_topmenu

Ye, after that and one more change
This:
Code:
  taskButton = modules.game_mainpanel.addToggleButton('taskButton', tr('Tasks') .. ' (Ctrl+D)',
                                                      '/images/options/ButtonBosstiary',
                                                      toggle, false, 99)

To
Code:
  taskButton = modules.client_topmenu.addLeftGameButton('taskButton', tr('Tasks') .. ' (Ctrl+D)', '/images/game/prey/prey_inactive', toggle, false, 99)

And it "work" but not perfect, its still needed a UI fixes
1750539646554.webp

And one BIG problem is problem with close a client, after tried exit, client lagged and got crush ;/
For now i saw only that problem, but its problem what eliminated it from use for now on OTCv8 for me.
1750539784840.webp

///// EDIT
To fix problem with lagg client after exit is remove a tracker, i was remove all functions about tracker and a button from UI and it not crashed
 
Last edited:
Ye, after that and one more change
This:
Code:
  taskButton = modules.game_mainpanel.addToggleButton('taskButton', tr('Tasks') .. ' (Ctrl+D)',
                                                      '/images/options/ButtonBosstiary',
                                                      toggle, false, 99)

To
Code:
  taskButton = modules.client_topmenu.addLeftGameButton('taskButton', tr('Tasks') .. ' (Ctrl+D)', '/images/game/prey/prey_inactive', toggle, false, 99)

And it "work" but not perfect, its still needed a UI fixes
View attachment 93204

And one BIG problem is problem with close a client, after tried exit, client lagged and got crush ;/
For now i saw only that problem, but its problem what eliminated it from use for now on OTCv8 for me.
View attachment 93205

///// EDIT
To fix problem with lagg client after exit is remove a tracker, i was remove all functions about tracker and a button from UI and it not crashed
Yeah, it's close to how it looks on mehah. Counters are not cropped here, and the scrollbar looks different.

Do you have problems with closing the task menu while widgets are open? I was testing it for a while on multiple characters online at some time, but didn't lag the client. I have buffy PC on the other hand
 
Yeah, it's close to how it looks on mehah. Counters are not cropped here, and the scrollbar looks different.

Do you have problems with closing the task menu while widgets are open? I was testing it for a while on multiple characters online at some time, but didn't lag the client. I have buffy PC on the other hand

When i removed tracker, problems with client lag after exit gone, i dont saw any other problems with open/close task with other widgets.
Only when i open Task then i can't close that window by using again Button in menu, i need use a ESC and when u logout that window not closing too

And UI need few fix couse look ugly little ;D Scrollbar, item count in reward, small problems
1750583535550.webp

// Edit

After few changes in Ui it look better
1750587830975.webp

But i need find problem why it not closing after using button again or after logout from server ;/

1750587960392.webp

/// Edit V2
Here is .lua file with working button on/off and after logout task window be closing
ATTENTION!
ChatGPT was help me with that, so im not 100% sure its writen perfect
 

Attachments

Last edited:
When i removed tracker, problems with client lag after exit gone, i dont saw any other problems with open/close task with other widgets.
Only when i open Task then i can't close that window by using again Button in menu, i need use a ESC and when u logout that window not closing too

And UI need few fix couse look ugly little ;D Scrollbar, item count in reward, small problems
View attachment 93208

// Edit

After few changes in Ui it look better
View attachment 93209

But i need find problem why it not closing after using button again or after logout from server ;/

View attachment 93210

/// Edit V2
Here is .lua file with working button on/off and after logout task window be closing
ATTENTION!
ChatGPT was help me with that, so im not 100% sure its writen perfect
On mehah it was working with closing via button, I think I forgot to implement esc button closing (always was closing it via ctrl+D)


Edit
I didn't implement closing it after logout either 😂 will do it in free time
 
Last edited:
Back
Top