-
Notifications
You must be signed in to change notification settings - Fork 0
/
FPE_BabyNames.psc
81 lines (71 loc) · 3.2 KB
/
FPE_BabyNames.psc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Scriptname FPE_BabyNames extends Quest
Actor Property PlayerREF Auto Const Mandatory
String[] Property Names_Male Auto Const
String[] Property Names_Female Auto Const
String[] Property Names_Unisex Auto Const
Faction Property FPFP_AdultResource Auto Const Mandatory
Actorbase Property WorkshopNPC Auto Const Mandatory
Actorbase Property WorkshopDog Auto Const Mandatory
Actorbase Property WorkshopNPCGuard Auto Const Mandatory
Actorbase Property WorkshopBrahmin Auto Const Mandatory
Race Property HumanRace Auto
FPFP_BabyHandlerScript property FPFP_BabyHandler Auto Const Mandatory
GlobalVariable property FPFP_Global_Rename_Human Auto Const Mandatory
Keyword Property kw_named Auto const
GlobalVariable property FPFP_Global_Allow_ReRenaming Auto Const Mandatory
String Function BabyNames_Male(Race akDadRace)
if akDadRace != HumanRace && akDadRace != None && FPFP_BabyHandler.WhatsmyName_Auto(akDadRace) == 1
return FPFP_BabyHandler.WhatsmyName_Male(akDadRace)
elseif akDadRace == HumanRace && FPFP_Global_Rename_Human.GetValue() == 1
int random_Name = Utility.RandomInt(0, Names_Male.Length-1)
return Names_Male[random_Name]
else
return None
endif
EndFunction
String Function BabyNames_Female(Race akDadRace)
if akDadRace != HumanRace && akDadRace != None && FPFP_BabyHandler.WhatsmyName_Auto(akDadRace) == 1
return FPFP_BabyHandler.WhatsmyName_Female(akDadRace)
elseif akDadRace == HumanRace && FPFP_Global_Rename_Human.GetValue() == 1
int random_Name = Utility.RandomInt(0, Names_Female.Length-1)
return Names_Female[random_Name]
else
return None
endif
EndFunction
String Function BabyNames(Race akDadRace)
if akDadRace != HumanRace && akDadRace != None && FPFP_BabyHandler.WhatsmyName_Auto(akDadRace) == 1
return FPFP_BabyHandler.WhatsmyName(akDadRace)
elseif akDadRace == HumanRace && FPFP_Global_Rename_Human.GetValue() == 1
int random_Name = Utility.RandomInt(0, Names_Unisex.Length-1)
return Names_Unisex[random_Name]
else
return None
endif
EndFunction
Actor Function GetActorUnderCrosshairs()
Actor ScannedActor = LL_FourPlay.LastCrossHairActor()
If ScannedActor == NONE || ScannedActor.GetDistance(PlayerRef) > 256.000
return None
EndIf
Return ScannedActor
EndFunction
Function GiveNPCUnderCrosshairs_Rename()
Actor akActor = GetActorUnderCrosshairs()
String Name
if FPFP_Global_Allow_ReRenaming.GetValue() == 1 || !akActor.hasKeyword(kw_named)
if akActor.IsInFaction(FPFP_AdultResource) || akActor.GetLeveledActorBase() == WorkshopNPC || akActor.GetLeveledActorBase() == WorkshopBrahmin || akActor.GetLeveledActorBase() == WorkshopDog || akActor.GetLeveledActorBase() == WorkshopNPCGuard
if akActor.GetLeveledActorBase().GetSex() == 0
Name = BabyNames_Male(akActor.GetLeveledActorBase().GetRace())
elseif akActor.GetLeveledActorBase().GetSex() == 1
Name = BabyNames_Female(akActor.GetLeveledActorBase().GetRace())
else
Name = BabyNames(akActor.GetLeveledActorBase().GetRace())
endif
RenameAnything.SetRefName(akActor, Name)
akActor.addKeyword(kw_named)
endif
else
Debug.notification(akActor.GetLeveledActorBase().GetName() +" looks at you like you are a fucking moron")
endif
EndFunction