|
@@ -3,102 +3,61 @@
|
|
|
!! {This code should be called to purge a specific NPC. It expects an ARGS[0] of the code of the C array.}
|
|
|
$tempcclean = $ARGS[0]
|
|
|
|
|
|
-if mid($tempcclean, 1, 1) = 'C' and npc_firstname['$tempcclean'] > 0:
|
|
|
- !! {create arrays to loop through}
|
|
|
- ! {array for strings}
|
|
|
- $tmpStrArr[0] = 'npc_firstname'
|
|
|
- $tmpStrArr[] = 'npc_nickname'
|
|
|
- $tmpStrArr[] = 'npc_lastname'
|
|
|
- $tmpStrArr[] = 'npc_usedname'
|
|
|
- $tmpStrArr[] = 'npc_notes'
|
|
|
- $tmpStrArr[] = 'npc_thdick'
|
|
|
- $tmpStrArr[] = 'npc_pic'
|
|
|
- $tmpStrArr[] = 'npc_PersType'
|
|
|
- $tmpStrArr[] = 'npc_dna'
|
|
|
- $tmpStrArr[] = 'npc_occupation'
|
|
|
- ! {array for ints}
|
|
|
- $tmpIntArr[0] = 'npc_dob'
|
|
|
- $tmpIntArr[] = 'npc_intel'
|
|
|
- $tmpIntArr[] = 'npc_drunk'
|
|
|
- $tmpIntArr[] = 'npc_gender'
|
|
|
- $tmpIntArr[] = 'npc_dick'
|
|
|
- $tmpIntArr[] = 'npc_sexskill'
|
|
|
- $tmpIntArr[] = 'npc_spermpot'
|
|
|
- $tmpIntArr[] = 'npc_horny'
|
|
|
- $tmpIntArr[] = 'npc_apprnc'
|
|
|
- $tmpIntArr[] = 'npc_height'
|
|
|
- $tmpIntArr[] = 'npc_bust'
|
|
|
- $tmpIntArr[] = 'npc_haircol'
|
|
|
- $tmpIntArr[] = 'npc_QW'
|
|
|
- $tmpIntArr[] = 'npc_rel'
|
|
|
- $tmpIntArr[] = 'npc_love'
|
|
|
- $tmpIntArr[] = 'npc_outfit'
|
|
|
- $tmpIntArr[] = 'npc_herpes'
|
|
|
- $tmpIntArr[] = 'npc_syth'
|
|
|
- $tmpIntArr[] = 'npc_gon'
|
|
|
- $tmpIntArr[] = 'npc_thrush'
|
|
|
- $tmpIntArr[] = 'npc_style'
|
|
|
+if (mid($tempcclean, 1, 1) = 'B' or mid($tempcclean, 1, 1) = 'C'):
|
|
|
+
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_firstname',$tempcclean
|
|
|
|
|
|
- ! {loop through the arrays to kill entries}
|
|
|
- tmpArrIndex = 0
|
|
|
- :cleanupstrloop
|
|
|
- if tmpArrIndex < arrsize('$tmpStrArr'):
|
|
|
- tmpNpcIndex = arrpos(('<<$tmpStrArr[tmpArrIndex]>>'), val('<<mid($tempcclean, 2)>>'))
|
|
|
- if tmpNpcIndex >= 0:
|
|
|
- killvar '<<$tmpStrArr[tmpArrIndex]>>', tmpNpcIndex
|
|
|
- end
|
|
|
- tmpArrIndex += 1
|
|
|
- jump 'cleanupstrloop'
|
|
|
- end
|
|
|
- tmpArrIndex = 0
|
|
|
- :cleanupintloop
|
|
|
- if tmpArrIndex < arrsize('$tmpIntArr'):
|
|
|
- tmpNpcIndex = arrpos(('$<<$tmpIntArr[tmpArrIndex]>>'), '<<mid($tempcclean, 2)>>')
|
|
|
- if tmpNpcIndex >= 0:
|
|
|
- killvar ('$<<$tmpIntArr[tmpArrIndex]>>'), tmpNpcIndex
|
|
|
- end
|
|
|
- tmpArrIndex += 1
|
|
|
- jump 'cleanupintloop'
|
|
|
- end
|
|
|
+ gs 'shortgs', 'remove_array_element', '$npc_nickname',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', '$npc_lastname',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', '$npc_usedname',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', '$npc_notes',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', '$npc_pic',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', '$npc_thdick',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', '$npc_perstype',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', '$npc_dna',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', '$npc_occupation',$tempcclean
|
|
|
+
|
|
|
+
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_dob',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_gender',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_height',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_haircol',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_apprnc',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_dick',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_spermpot',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_sexskill',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_drunk',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_horny',$tempcclean
|
|
|
+
|
|
|
+! gs 'shortgs', 'remove_array_element', 'npc_bust',$tempcclean
|
|
|
+
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_rel',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_love',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_sex',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_QW',$tempcclean
|
|
|
+
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_herpes',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_syth',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_gon',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_thrush',$tempcclean
|
|
|
+
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_apt_type',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_perv',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_outfit',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_finance',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_intel',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_humor',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_fav_pos',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_tit_pref',$tempcclean
|
|
|
+
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_style',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_addit',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_doors',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_goal',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_fidelity',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_lover_days',$tempcclean
|
|
|
+ gs 'shortgs', 'remove_array_element', 'npc_lover_keys',$tempcclean
|
|
|
|
|
|
- ! {cleanup}
|
|
|
- killvar 'tmpArrIndex'
|
|
|
- killvar 'tmpNpcIndex'
|
|
|
- killvar 'tmpStrArr'
|
|
|
- killvar 'tmpIntArr'
|
|
|
-else
|
|
|
- ! {legacy code in case there is no corresponding index: just sets values to default}
|
|
|
- $npc_firstname[$tempcclean] = ''
|
|
|
- $npc_nickname[$tempcclean] = ''
|
|
|
- $npc_lastname[$tempcclean] = ''
|
|
|
- $npc_usedname[$tempcclean] = ''
|
|
|
- $npc_notes[$tempcclean] = ''
|
|
|
- npc_dob[$tempcclean] = 0
|
|
|
- npc_intel[$tempcclean] = 0
|
|
|
- npc_drunk[$tempcclean] = 0
|
|
|
- npc_gender[$tempcclean] = 0
|
|
|
- $npc_thdick[$tempcclean] = ''
|
|
|
- npc_dick[$tempcclean] = 0
|
|
|
- npc_sexskill[$tempcclean] = 0
|
|
|
- npc_spermpot[$tempcclean] = 0
|
|
|
- npc_horny[$tempcclean] = 0
|
|
|
- npc_apprnc[$tempcclean] = 0
|
|
|
- npc_height[$tempcclean] = 0
|
|
|
- npc_bust[$tempcclean] = 0
|
|
|
- npc_haircol[$tempcclean] = 0
|
|
|
- npc_QW[$tempcclean] = 0
|
|
|
- npc_rel[$tempcclean] = 0
|
|
|
- npc_love[$tempcclean] = 0
|
|
|
- $npc_occupation[$tempcclean] = ''
|
|
|
- npc_outfit[$tempcclean] = 0
|
|
|
- $npc_pic[$tempcclean] = ''
|
|
|
- npc_herpes[$tempcclean] = 0
|
|
|
- npc_syth[$tempcclean] = 0
|
|
|
- npc_gon[$tempcclean] = 0
|
|
|
- npc_thrush[$tempcclean] = 0
|
|
|
- npc_style[$tempcclean] = 0
|
|
|
- $npc_PersType[$tempcclean] = ''
|
|
|
- $npc_dna[$tempcclean] = ''
|
|
|
end
|
|
|
|
|
|
i = arrsize('$cemptyarray')
|