The general structure of an Osiris rule is as follows (note that the colours below don't reflect the colouring within the Osiris editor, they're just colours that I picked because they're easily distinguishable on the forums' black background):

IF
<triggering event>
AND
<condition>
AND
<other condition>
THEN
<actions>.

Here, the triggering event need to be an event, the conditions need to be queries (built-in or custom-defined), and the actions need to be calls, either built-in ones or procedures.

Databases can be used for all three of these, with subtly different meanings - a database used as an event triggers that rule when it something is added to the database. A database used as a query checks whether something exists in the database, and a database used as an action adds something to the database.
The latter two uses can be modified with the NOT keyword, to do the opposite.

If you ever require information that is not already supplied by the event, you'll need to use queries to get that information, so that'll go before the THEN section.

In practice, that means you'll want to use
IF
CharacterEnteredTrigger(_Character, TRIGGERGUID_MonkworksBOXtrigger000_287131ab-cb9a-4506-841a-d40afdd5b53c)
AND
GetPosition(TRIGGERGUID_MonkworksBOXtrigger000_287131ab-cb9a-4506-841a-d40afdd5b53c, _X, _Y, _Z)
AND
CharacterCreateAtPosition(_X, _Y, _Z, "CHARACTERGUID_Animals_Crocodile_A_Polymorph_4e394cab-17d5-4eb5-9b1b-f81a66db35d9", 1, _Crocodile)
THEN
DB_MonkWorksCrocodileDatabase(_Crocodile);

After the crocodile has been created, it will be stored in the DB_MonkWorksCrocodileDatabase (I suggest you rename it to something more convenient in your actual script), which you can then check when you need to know whether the creature exists and what that creature is.
Note that CharacterCreateAtPosition is a query. It must be, because it has a return value: it tells you something - what character was created.


Now, for what goes into the INIT section of your code:
The Init section is a list of calls (actions) that need to be taken when the goal is first loaded, effectively at game start. You can't put queries or events there.