function DelItemFromSlotargument0 argument1 argument2 argument3 argument4 var bag = argument0; var page = argument1; var row = argument2; var col = argument3; var num = argument4; var curItm
}
This function takes in five arguments: the bag, page, row, and column of the item to be deleted, and the number of items to delete. It first retrieves the item at the specified position and checks that it is not of type ITEM_TYPE.NONE. If the number of items to delete is greater than 0 and the retrieved item is valid, it checks if the number of items in the retrieved item is greater than the number of items to be deleted. If it is, it subtracts the number of items to be deleted from the retrieved item's number of items and sets the remaining number of items in the retrieved item. If the number of items to be deleted is greater than or equal to the retrieved item's number of items, it sets the specified slot to be empty. Finally, it returns the number of items that were not deleted, which would be 0 if all items were successfully deleted
原文地址: https://www.cveoy.top/t/topic/cA28 著作权归作者所有。请勿转载和采集!