Jump to content
Sign in to follow this  
WVWMK

The deleted items or empty cells

Recommended Posts

Probably many have faced the same problem - you removed the item, but did not remove from his creatures, and thus when assembling items with a creature which is not in the database just sits in my inventory and takes the cell.

The question how to deal with it - by using SQL queries or some miraculous way to catch distant objects?


Делай добро и бросай его в воду

Share this post


Link to post
Share on other sites
19 минут назад, Jones сказал:

or clean inventory

LOL
each player who has an empty(locked cell)?))

I know how to deal with it, but I would like a more automatic way which he will follow up on this and remove unnecessary items(unlock cell)

It's just that sometimes you forget that you have deleted and then a lot of mistakes, and to clean hands this is the most boring option and long.


Делай добро и бросай его в воду

Share this post


Link to post
Share on other sites
function FixInv(role)
	for i = 0,47 do
		local item = GetChaItem(role,2,i)
		local ID = GetItemID(item)
		local name = GetItemName(ID)
		if ID ~= 0 and name == "Unknown" then
			SystemNotice(role,"Removed bugged item at slot "..i)
			RemoveChaItem ( role , ID , 1 , 2 , i, 2 , 1 , 1 )
		end
	end
	SynChaKitbag(role,13)
end

I havent tested this, but it should work. You may need to change "Unknown" if the name of an undefined item is different on your GS.

 

Hook that somewhere, probably on ExAttrCheck is best as it would run as soon as the player logs in.

 

  • Like 2

Share this post


Link to post
Share on other sites

ty @7n6
This script can be migrated to the documentation for it is very useful for developers.
As on the ru side and international

  • Like 1

Делай добро и бросай его в воду

Share this post


Link to post
Share on other sites
On 6/11/2016 at 11:08 PM, NMS3RR said:

ty @7n6
This script can be migrated to the documentation for it is very useful for developers.
As on the ru side and international

 

Did the script work? I tested it, and it says deleted item at [SLOT], but the empty cell still remains.


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...