Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Game.GetPlayer().RemovePerk(perkWaterRepeat)
- Utility.Wait(10)
- int iWater = Game.GetPlayer().GetValue(avWater) as int
- int iFirstAid = Game.GetPlayer().GetValue(avFirstAid) as int
- if (iWater == 1 || iFirstAid == 1)
- int iWaterThirst = Game.GetPlayer().GetValue(avWaterThirst) as int
- int iRads = Game.GetPlayer().GetValue(avRads) as int
- Game.GetPlayer().SetValue(avWaterThirst, (iWaterThirst+1))
- if (iRads > 0 && iFirstAid == 1 )
- if (iWaterThirst == 30 || iWaterThirst == 60 || iWaterThirst == 90 || iWaterThirst == 120 || iWaterThirst == 150 || iWaterThirst == 180)
- Debug.Trace(iRads + " - Old Value")
- Game.GetPlayer().RestoreValue(avRads, 10)
- iRads = Game.GetPlayer().GetValue(avRads) as int
- Debug.Trace(iRads + " - New Value Restored 5")
- endif
- endif
- if (iWaterThirst >= 180)
- int iThirst = Game.GetPlayer().GetValue(avThirst) as int
- iRads = Game.GetPlayer().GetValue(avRads) as int
- Debug.Trace(iThirst + " - Thirst")
- Debug.Trace(iRads + " - Rads")
- Utility.Wait(2)
- if (iThirst > 0 && iRads > 0 && iWater == 1 && iFirstAid == 1)
- Game.GetPlayer().SetValue(avWaterThirst, 0)
- Game.GetPlayer().RestoreValue(avRads, 20)
- Game.GetPlayer().SetValue(avThirst, (iThirst-1))
- Game.GetPlayer().RestoreValue(avHealth, 20)
- sndDrink.Play(Game.GetPlayer())
- msgWater.Show()
- elseif (iRads > 0 && iWater == 0 && iFirstAid == 1)
- Game.GetPlayer().SetValue(avWaterThirst, 0)
- Debug.Trace(iRads + " - Old Value")
- Game.GetPlayer().RestoreValue(avRads, 10)
- iRads = Game.GetPlayer().GetValue(avRads) as int
- Debug.Trace(iRads + " - New Value")
- elseif (iThirst > 0 && iWater == 1 && iFirstAid == 0)
- sndDrink.Play(Game.GetPlayer())
- msgWater.Show()
- Game.GetPlayer().SetValue(avThirst, (iThirst-1))
- Game.GetPlayer().RestoreValue(avHealth, 20)
- Game.GetPlayer().SetValue(avWaterThirst, 0)
- elseif (iThirst > 0 && iRads == 0 && iWater == 1 && iFirstAid == 1)
- sndDrink.Play(Game.GetPlayer())
- msgWater.Show()
- Game.GetPlayer().SetValue(avThirst, (iThirst-1))
- Game.GetPlayer().RestoreValue(avHealth, 20)
- Game.GetPlayer().SetValue(avWaterThirst, 0)
- else
- Debug.Trace("0 Rads and 0 Thirst. Set timer to -5.")
- Game.GetPlayer().SetValue(avWaterThirst, (iWaterThirst-5))
- endif
- endIf
- Debug.Trace(iWaterThirst)
- endif
- Game.GetPlayer().AddPerk(perkWaterRepeat)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement