insert_item command

10/01/2023 01:23 InarusX#1
Recently, I encountered an issue with the 'insert_item' command. Now that I've resolved it, I'd love to share the solution for those who might be facing the same challenge.

Here's a simplified guide:

1 - Open the "CaptainHerlockServer" chat box.
2 - Enter the following command: #sv("permission",100,"YourCharName")
3 - Next, in the game's chat box, type: /run insert_item(101102, 1, 10, 1, 2, "YourCharName")

I hope this helps!

Note: Remember to repeat these steps each time you log in.
10/01/2023 10:03 CHlNAMAN#2
What exactly was the issue with that command..?
10/01/2023 12:56 InarusX#3
Hello CHINAMAN,

To be honest, I've spent days looking for a solution to this, or a detailed explanation of how to use this command. When trying to use the #insert_item command in CaptainHerlockServer or the /run insert_item in the game chat, it doesn't work. To fix this, it's necessary to use the #sv command to assign a value of 100 to the permissions for yourself
10/01/2023 15:12 InkDevil#4
I'm sorry to ruin your short explanation, but even that way your "YourCharName" is obsolete, since the standard gameserver attaches the receiving character always after the given parameters.
So, even if you use
Code:
/run insert_item(101102, 1, 10, 1, 2, "AnyPlayerName")
the server itself will use it like...
Code:
/run insert_item(101102, 1, 10, 1, 2, "AnyPlayerName","ExecutingPlayerName")
and "ExecutingPlayerName" will receive the item.

So you can also simply use
Code:
/run insert_item(101102, 1, 10, 1, 2)
If you want to add an item to anybody of your choice,
here's a simple bypass you can use - even through gameserver console:
Code:
dlg_special("confirm_window",'insert_item(101102, 1, 10, 1, 2)',"Confirm to get your dumb item", "AnyPlayerName")

for gameserver:
#dlg_special("confirm_window",'insert_item(101102, 1, 10, 1, 2)',"Confirm to get your dumb item", "AnyPlayerName")

For ingame (if you have permission 100):
/run dlg_special("confirm_window",'insert_item(101102, 1, 10, 1, 2)',"Confirm to get your dumb item", "AnyPlayerName")
[Only registered and activated users can see links. Click Here To Register...]
I just used the example item you wanted to add, you can ofc change item and its attributes the way you want it to.
10/03/2023 00:02 InarusX#5
Thank you so much InkDevil its work perfectly too