float fAngleref rTargetref rCurrentReffloat fCurrentfloat fCurrentRefAnglefloat PCTalkedfloat ButtonTimer float timer float timer2Ref AngleBegin GameMode;Button Timerif (ButtonTimer == 1) if (timer2 < 5.0) set timer2 to timer2 + GetSecondsPassed else set ButtonTimer to 0 set timer2 to 0 endifendifif Player.IsInCombat == 0 set rTarget to GetCrosshairRef elseif Player.IsInCombat == 1 set rTarget to player.GetCombatTarget endif if Player.IsChild == 1 return elseif GetVATSMode == 1 || GetVATSMode == 2 || GetVATSMode == 3 || GetVATSMode == 4 return elseif Player.IsSneaking == 1 return elseif Player.IsSwimming == 1 return endifif rTarget if rTarget.IsActor set rCurrentRef to GetCrosshairRef if rCurrentRef.GetSleeping == 1 set ButtonTimer to 1 endif endifendif if (ButtonTimer == 0) if rTarget if rTarget.IsActor set rCurrentRef to GetCrosshairRef ;PART I NEED HELP WITH if rCurrentRef if rTarget.GetDead == 1 if rCurrentRef.SamesixAsPC == 0 if Player.GetCannibal == 0 set PCTalked to GetRandomPercent if PCTalked >= 0 ;percent chance PlaySound PCHELLOMFN1 set ButtonTimer to 1 set PCTalked to 0 set timer to 0 endif endif elseif Player.GetCannibal == 1 set PCTalked to GetRandomPercent if PCTalked >= 0 ;percent chance PlaySound PCHELLOMFN1 set ButtonTimer to 1 set PCTalked to 0 set timer to 0 endif endif endif elseif rCurrentRef.SamesixAsPC == 1 if Player.GetCannibal == 0 set PCTalked to GetRandomPercent if PCTalked >= 0 ;percent chance PlaySound PCHELLOMFN1 set ButtonTimer to 1 set PCTalked to 0 set timer to 0 endif endif elseif Player.GetCannibal == 1 set PCTalked to GetRandomPercent if PCTalked >= 0 ;percent chance PlaySound PCHELLOMFN1 set ButtonTimer to 1 set PCTalked to 0 set timer to 0 endif endif endif endif else if rCurrentRef.SamesixAsPC == 0 if Player.IsWeaponOut == 0 ;NPC says somthing to player with gun out set PCTalked to GetRandomPercent if PCTalked >= 85 || PCTalked <= 100 Player.PlaySound PCHELLOMFN1 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 65 || PCTalked <= 84 Player.PlaySound PCHELLOMFN2 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 40 || PCTalked <= 64 Player.PlaySound PCHELLOMFN3 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 15 || PCTalked <= 39 Player.PlaySound PCHELLOMFN4 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 0 || PCTalked <= 14 Player.PlaySound PCHELLOMFN5 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 endif elseif Player.IsWeaponOut == 1 ;NPC says somthing to player with gun out set PCTalked to GetRandomPercent if PCTalked >= 81 || PCTalked <= 100 Player.PlaySound PCWEAPONOUT1 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 71 || PCTalked <= 80 Player.PlaySound PCWEAPONOUT2 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 61 || PCTalked <= 70 Player.PlaySound PCWEAPONOUT3 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 51 || PCTalked <= 60 Player.PlaySound PCWEAPONOUT4 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 41 || PCTalked <= 50 Player.PlaySound PCWEAPONOUT5 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 31 || PCTalked <= 40 Player.PlaySound PCWEAPONOUT6 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 21 || PCTalked <= 30 Player.PlaySound PCWEAPONOUT7 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 11 || PCTalked <= 20 Player.PlaySound PCWEAPONOUT8 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 0 || PCTalked <= 10 Player.PlaySound PCWEAPONOUT9 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 endif endif elseif rCurrentRef.SamesixAsPC == 1 if Player.IsWeaponOut == 0 ;NPC says somthing to player with gun out set PCTalked to GetRandomPercent if PCTalked >= 85 || PCTalked <= 100 Player.PlaySound PCHELLOMFN1 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 65 || PCTalked <= 84 Player.PlaySound PCHELLOMFN2 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 40 || PCTalked <= 64 Player.PlaySound PCHELLOMFN3 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 15 || PCTalked <= 39 Player.PlaySound PCHELLOMFN4 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 0 || PCTalked <= 14 Player.PlaySound PCHELLOMFN5 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 endif elseif Player.IsWeaponOut == 1 ;NPC says somthing to player with gun out set PCTalked to GetRandomPercent if PCTalked >= 81 || PCTalked <= 100 Player.PlaySound PCWEAPONOUT1 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 71 || PCTalked <= 80 Player.PlaySound PCWEAPONOUT2 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 61 || PCTalked <= 70 Player.PlaySound PCWEAPONOUT3 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 51 || PCTalked <= 60 Player.PlaySound PCWEAPONOUT4 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 41 || PCTalked <= 50 Player.PlaySound PCWEAPONOUT5 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 31 || PCTalked <= 40 Player.PlaySound PCWEAPONOUT6 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 21 || PCTalked <= 30 Player.PlaySound PCWEAPONOUT7 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 11 || PCTalked <= 20 Player.PlaySound PCWEAPONOUT8 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 elseif PCTalked >= 0 || PCTalked <= 10 Player.PlaySound PCWEAPONOUT9 rCurrentRef.SetAlert 1 set PCACTIVATE to 2 set ButtonTimer to 1 set PCTalked to 0 endif endif endif endif endif endif endif elseif rTarget == 0 ;No Target Idle endif endif if PCACTIVATE == 1 set timer to timer + GetSecondsPassed if (timer > 2) rCurrentRef.StartConversation player, Greeting rCurrentRef player 1 0 set PCACTIVATE to 0 set timer to 0 endif endif if PCACTIVATE == 2 set timer to timer + GetSecondsPassed if (timer > 2) rCurrentRef.StartConversation player, Greeting rCurrentRef player 1 0 set PCACTIVATE to 0 set timer to 0 endif endifEND