A
Admincraft•8mo ago
Masuary

FTB Quests reward using KubeJS

I am trying to reward people with multiple rewards using KubeJS.
// specific object completion
onEvent('ftbquests.completed.58C318067922EBD2', event => {
if (event.player) {
event.server.runCommand(`lp user ${event.player.username} parent set doan`)
event.server.runCommand(`openpac player-config for ${event.player.username} set claims.bonusChunkClaims 35`)
}
})
// specific object completion
onEvent('ftbquests.completed.58C318067922EBD2', event => {
if (event.player) {
event.server.runCommand(`lp user ${event.player.username} parent set doan`)
event.server.runCommand(`openpac player-config for ${event.player.username} set claims.bonusChunkClaims 35`)
}
})
But for some reason this code block isn't working. Any idea what I'm doing wrong here ? SOLUTION: https://discord.com/channels/348681414260293634/1251519979120230480/1251575854203408415
14 Replies
Admincraft Meta
Admincraft Meta•8mo ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by masuary#0
Snow Kit
Snow Kit•8mo ago
Doesn't ftb quests allow you to give quest rewards in the book?
ProGamingDk
ProGamingDk•8mo ago
what ftb quest version?
ProGamingDk
ProGamingDk•8mo ago
No description
Masuary
MasuaryOP•8mo ago
No description
Masuary
MasuaryOP•8mo ago
Already included the compat mod I was forced to use KubeJS as giving luckperms ranks with FTB Quests doesn't work
Snow Kit
Snow Kit•8mo ago
even when setting it to run as server?
Masuary
MasuaryOP•8mo ago
It doesn't work sadly because it runs the command as if you would have permissions level 2 not 4 No way to set it to OP Level 4 Or do you know if you can change that ?
Snow Kit
Snow Kit•8mo ago
not sure tbh
Skullians
Skullians•8mo ago
Last time I checked no
Masuary
MasuaryOP•8mo ago
Any other ideas ? Fixed it using KubeJS
Skullians
Skullians•8mo ago
can you post the solution for future use? if anyone needs it
Masuary
MasuaryOP•8mo ago
I am using FTB Quests together with FTB XMod Compat. I have made a server script using KubeJS on server side only. ( clients don't need the mod )
FTBQuestsEvents.completed('QUESTIDHERE', event => {
event.server.runCommand(`lp user ${event.player.username} parent set LPGROUP`)
})
FTBQuestsEvents.completed('QUESTIDHERE', event => {
event.server.runCommand(`lp user ${event.player.username} parent set LPGROUP`)
})
Whenever people finish this quest, it will run the command directly as console and it works like a charm 😄
Skullians
Skullians•8mo ago
nice :)

Did you find this page helpful?