Do you know about https://docs.larian.game/Osiris ? It contains a.o. an overview of the language, including an explanation of the structure and the purpose of the INIT/KB/EXIT sections.

Regarding giving/receiving items, check out the following convenience databases (which you would define in the INIT section as well):
* https://docs.larian.game/Osiris/Shared/DB_HasStoryEvent
* https://docs.larian.game/Osiris/Shared/DB_GiveItemToEvent