#(debugtarget) Repairing MMOitems

40 messages · Page 1 of 1 (latest)

sour bane
#

Hello,

we are using the Citizens plugin on our server for some basic NPC functionality and wanted to have an NPC that could repair items for a calculated cost. We have gotten this to work pretty well so far, but we can't seem to get it working with MMOitems, as these use their own custom durability bar.
I have attached a screenshot of the relevant MMOitems NBT data.

high jackalBOT
#

(debugtarget) Repairing MMOitems

high jackalBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

halcyon compass
#

Hmm, you would need a command that changes custom nbt.

sour bane
#

mmoitem does have a repair command

halcyon compass
#

!clickcommands

lost vergeBOT
sour bane
#

/mmoitems item repair
this repairs the held item

halcyon compass
#

Oh

sour bane
#

can we just add that to the NPC?

halcyon compass
#

Yeah you can

#

You can also set cost if you want that

#

Does a user has the permissions to run this command?

sour bane
#

A player does not have acces to run any repair commands, but we can probably set the perm for the NPC

#

If I set this command for the NPC, will the regular repair command also still function (to ensure that vanilla items are also repaired)

halcyon compass
#

Hmm could try and see that.

#

Otherwise you could run one command on left click and the other one on right click

#

If you need more advanced logic, you could try Denizen, and add that logic yourself.

sour bane
#

I just tried adding the command with
/npc command add -o /mmoitems item repair
/npc command --permission /mmoitems /item repair -o

but the item still returns damaged

halcyon compass
#

/npc command add -o mmoitems item repair

sour bane
#

oh without the slash

#

Unfortunately the item returns damaged

halcyon compass
#

Hmm could you provide a log?

#

!logs

lost vergeBOT
# halcyon compass !logs
Info: logs

Please post your full latest log file.

Background Info: One of the most helpful tools to identifying the source of a problem is your server logs file! Logs contain all sorts of important information like server and plugin versions, any error messages, and a lot more important information (More Info).

How To: Your log can be found in the logs folder within your server folder. The most recent log is a text file labeled latest.log. To get help using these logs, please open that file in a text editor and copy all of the text, then open https://paste.denizenscript.com/New/Log and paste the text into the box on the page. Then click "Submit" and copy the URL and paste that back into this channel.

Please do not upload the file to Discord or to other pastebin services, use the log pastebin linked above.

halcyon compass
#

And the output of /npc command as screenshot

sour bane
#

these are all the commands shown in the console log

#

the repair command seems to run twice (since the first click asks for a payment)

#

the spawn entity was to damage the item

orchid marsh
#

You don't need both -o and -p

sour bane
#

ok I tried that but now it already repairs the item on the first click (where payment is asked), can I make this command only execute on the second right click?

orchid marsh
#

/npc command sequential

sour bane
#

Unfortunately that didn't quite work as I wanted it to, but I seem to be on the right path
I think I can manage from here on, thank you for the help :)

opal portal
#

if you want more finegrained control can always use denizen

finite tigerBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@sour bane

#
Resolved

Thread closed as resolved.

#
Thread Reopened

Thread was manually reopened by @sour bane.

sour bane
#

bruh reacting reopens-