private int fnTheyDoWeWait(SwordObject cpt, int id, int tar, int instruc, int param1, int param2, int param3, int x)
{
// workaround for scriptbug #928791: Freeze at hospital
// in at least one game version, a script forgets to set sam_returning back to zero
if ((tar == SAM) && (instruc == INS_talk) && (param2 == 2162856))
ScriptVars[(int)ScriptVariableNames.SAM_RETURNING] = 0;
SwordObject target = _objMan.FetchObject((uint)tar);
target.down_flag = instruc; // instruction for the mega
target.ins1 = param1;
target.ins2 = param2;
target.ins3 = param3;
target.status &= ~STAT_TALK_WAIT;
cpt.logic = LOGIC_wait_for_talk;
cpt.down_flag = tar;
return SCRIPT_STOP;
}