1
0

npccleanc.qsrc 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. # npccleanc
  2. !! {This code should be called to purge a specific NPC. It expects an ARGS[0] of the code of the C array.}
  3. $tempcclean = $ARGS[0]
  4. if mid($tempcclean, 1, 1) = 'C' and npc_firstname['$tempcclean'] > 0:
  5. !! {create arrays to loop through}
  6. ! {array for strings}
  7. $tmpStrArr[0] = 'npc_firstname'
  8. $tmpStrArr[] = 'npc_nickname'
  9. $tmpStrArr[] = 'npc_lastname'
  10. $tmpStrArr[] = 'npc_usedname'
  11. $tmpStrArr[] = 'npc_notes'
  12. $tmpStrArr[] = 'npc_firstpart'
  13. $tmpStrArr[] = 'npc_lastpart'
  14. $tmpStrArr[] = 'npc_kidpater'
  15. $tmpStrArr[] = 'npc_thdick'
  16. $tmpStrArr[] = 'npc_dad'
  17. $tmpStrArr[] = 'npc_mom'
  18. $tmpStrArr[] = 'npc_pic'
  19. $tmpStrArr[] = 'npc_PersType'
  20. $tmpStrArr[] = 'npc_dna'
  21. ! {array for ints}
  22. $tmpIntArr[0] = 'npc_dob'
  23. $tmpIntArr[] = 'npc_vital'
  24. $tmpIntArr[] = 'npc_stren'
  25. $tmpIntArr[] = 'npc_intel'
  26. $tmpIntArr[] = 'npc_agil'
  27. $tmpIntArr[] = 'npc_sprt'
  28. $tmpIntArr[] = 'npc_magik'
  29. $tmpIntArr[] = 'npc_drunk'
  30. $tmpIntArr[] = 'npc_pantys'
  31. $tmpIntArr[] = 'npc_cyc'
  32. $tmpIntArr[] = 'npc_fert'
  33. $tmpIntArr[] = 'npc_gender'
  34. $tmpIntArr[] = 'npc_dick'
  35. $tmpIntArr[] = 'npc_sexskill'
  36. $tmpIntArr[] = 'npc_spermpot'
  37. $tmpIntArr[] = 'npc_vag'
  38. $tmpIntArr[] = 'npc_ass'
  39. $tmpIntArr[] = 'npc_hymen'
  40. $tmpIntArr[] = 'npc_horny'
  41. $tmpIntArr[] = 'npc_Pavrep'
  42. $tmpIntArr[] = 'npc_Godrep'
  43. $tmpIntArr[] = 'npc_apprnc'
  44. $tmpIntArr[] = 'npc_lipbalm'
  45. $tmpIntArr[] = 'npc_makeup'
  46. $tmpIntArr[] = 'npc_sweat'
  47. $tmpIntArr[] = 'npc_dye'
  48. $tmpIntArr[] = 'npc_hairbsh'
  49. $tmpIntArr[] = 'npc_skin'
  50. $tmpIntArr[] = 'npc_bodyhair'
  51. $tmpIntArr[] = 'npc_breath'
  52. $tmpIntArr[] = 'npc_hipcurv'
  53. $tmpIntArr[] = 'npc_hgt'
  54. $tmpIntArr[] = 'npc_bust'
  55. $tmpIntArr[] = 'npc_nips'
  56. $tmpIntArr[] = 'npc_fat'
  57. $tmpIntArr[] = 'npc_pubes'
  58. $tmpIntArr[] = 'npc_hairlng'
  59. $tmpIntArr[] = 'npc_haircol'
  60. $tmpIntArr[] = 'npc_haircurl'
  61. $tmpIntArr[] = 'npc_tan'
  62. $tmpIntArr[] = 'npc_lip'
  63. $tmpIntArr[] = 'npc_lashes'
  64. $tmpIntArr[] = 'npc_eyesize'
  65. $tmpIntArr[] = 'npc_eyecol'
  66. $tmpIntArr[] = 'npc_dom'
  67. $tmpIntArr[] = 'npc_sub'
  68. $tmpIntArr[] = 'npc_glasses'
  69. $tmpIntArr[] = 'npc_grades'
  70. $tmpIntArr[] = 'npc_run'
  71. $tmpIntArr[] = 'npc_vball'
  72. $tmpIntArr[] = 'npc_shoot'
  73. $tmpIntArr[] = 'npc_sewing'
  74. $tmpIntArr[] = 'npc_serving'
  75. $tmpIntArr[] = 'npc_chess'
  76. $tmpIntArr[] = 'npc_dance'
  77. $tmpIntArr[] = 'npc_danceero'
  78. $tmpIntArr[] = 'npc_jab'
  79. $tmpIntArr[] = 'npc_punch'
  80. $tmpIntArr[] = 'npc_kick'
  81. $tmpIntArr[] = 'npc_def'
  82. $tmpIntArr[] = 'npc_vokal'
  83. $tmpIntArr[] = 'npc_teach'
  84. $tmpIntArr[] = 'npc_QW'
  85. $tmpIntArr[] = 'npc_rel'
  86. $tmpIntArr[] = 'npc_love'
  87. $tmpIntArr[] = 'npc_job'
  88. $tmpIntArr[] = 'npc_cloc'
  89. $tmpIntArr[] = 'npc_herpes'
  90. $tmpIntArr[] = 'npc_syth'
  91. $tmpIntArr[] = 'npc_gon'
  92. $tmpIntArr[] = 'npc_chlam'
  93. $tmpIntArr[] = 'npc_genwart'
  94. $tmpIntArr[] = 'npc_thrush'
  95. $tmpIntArr[] = 'npc_malen'
  96. $tmpIntArr[] = 'npc_chem'
  97. $tmpIntArr[] = 'npc_clothpref'
  98. ! {loop through the arrays to kill entries}
  99. tmpArrIndex = 0
  100. :cleanupstrloop
  101. if tmpArrIndex < arrsize('$tmpStrArr'):
  102. tmpNpcIndex = arrpos(('<<$tmpStrArr[tmpArrIndex]>>'), val('<<mid($tempcclean, 2)>>'))
  103. if tmpNpcIndex >= 0:
  104. killvar '<<$tmpStrArr[tmpArrIndex]>>', tmpNpcIndex
  105. end
  106. tmpArrIndex += 1
  107. jump 'cleanupstrloop'
  108. end
  109. tmpArrIndex = 0
  110. :cleanupintloop
  111. if tmpArrIndex < arrsize('$tmpIntArr'):
  112. tmpNpcIndex = arrpos(('$<<$tmpIntArr[tmpArrIndex]>>'), '<<mid($tempcclean, 2)>>')
  113. if tmpNpcIndex >= 0:
  114. killvar ('$<<$tmpIntArr[tmpArrIndex]>>'), tmpNpcIndex
  115. end
  116. tmpArrIndex += 1
  117. jump 'cleanupintloop'
  118. end
  119. ! {cleanup}
  120. killvar 'tmpArrIndex'
  121. killvar 'tmpNpcIndex'
  122. killvar 'tmpStrArr'
  123. killvar 'tmpIntArr'
  124. else
  125. ! {legacy code in case there is no corresponding index: just sets values to default}
  126. $npc_firstname[$tempcclean] = ''
  127. $npc_nickname[$tempcclean] = ''
  128. $npc_lastname[$tempcclean] = ''
  129. $npc_usedname[$tempcclean] = ''
  130. $npc_notes[$tempcclean] = ''
  131. npc_dob[$tempcclean] = 0
  132. npc_vital[$tempcclean] = 0
  133. npc_stren[$tempcclean] = 0
  134. npc_intel[$tempcclean] = 0
  135. npc_agil[$tempcclean] = 0
  136. npc_sprt[$tempcclean] = 0
  137. npc_magik[$tempcclean] = 0
  138. npc_drunk[$tempcclean] = 0
  139. npc_pantys[$tempcclean] = 0
  140. npc_cyc[$tempcclean] = 0
  141. npc_fert[$tempcclean] = 0
  142. $npc_firstpart[$tempcclean] = ''
  143. $npc_lastpart[$tempcclean] = ''
  144. $npc_kidpater[$tempcclean] = ''
  145. npc_gender[$tempcclean] = 0
  146. $npc_thdick[$tempcclean] = ''
  147. npc_dick[$tempcclean] = 0
  148. npc_sexskill[$tempcclean] = 0
  149. npc_spermpot[$tempcclean] = 0
  150. npc_vag[$tempcclean] = 0
  151. npc_ass[$tempcclean] = 0
  152. npc_hymen[$tempcclean] = 0
  153. npc_horny[$tempcclean] = 0
  154. npc_Pavrep[$tempcclean] = 0
  155. npc_Godrep[$tempcclean] = 0
  156. npc_apprnc[$tempcclean] = 0
  157. npc_lipbalm[$tempcclean] = 0
  158. npc_makeup[$tempcclean] = 0
  159. npc_sweat[$tempcclean] = 0
  160. npc_dye[$tempcclean] = 0
  161. npc_hairbsh[$tempcclean] = 0
  162. npc_skin[$tempcclean] = 0
  163. npc_bodyhair[$tempcclean] = 0
  164. npc_breath[$tempcclean] = 0
  165. npc_hipcurv[$tempcclean] = 0
  166. npc_hgt[$tempcclean] = 0
  167. npc_bust[$tempcclean] = 0
  168. npc_nips[$tempcclean] = 0
  169. npc_fat[$tempcclean] = 0
  170. npc_pubes[$tempcclean] = 0
  171. npc_hairlng[$tempcclean] = 0
  172. npc_haircol[$tempcclean] = 0
  173. npc_haircurl[$tempcclean] = 0
  174. npc_tan[$tempcclean] = 0
  175. npc_lip[$tempcclean] = 0
  176. npc_lashes[$tempcclean] = 0
  177. npc_eyesize[$tempcclean] = 0
  178. npc_eyecol[$tempcclean] = 0
  179. npc_dom[$tempcclean] = 0
  180. npc_sub[$tempcclean] = 0
  181. npc_glasses[$tempcclean] = 0
  182. npc_grades[$tempcclean] = 0
  183. npc_run[$tempcclean] = 0
  184. npc_vball[$tempcclean] = 0
  185. npc_shoot[$tempcclean] = 0
  186. npc_sewing[$tempcclean] = 0
  187. npc_serving[$tempcclean] = 0
  188. npc_chess[$tempcclean] = 0
  189. npc_dance[$tempcclean] = 0
  190. npc_danceero[$tempcclean] = 0
  191. npc_jab[$tempcclean] = 0
  192. npc_punch[$tempcclean] = 0
  193. npc_kick[$tempcclean] = 0
  194. npc_def[$tempcclean] = 0
  195. npc_vokal[$tempcclean] = 0
  196. npc_teach[$tempcclean] = 0
  197. npc_QW[$tempcclean] = 0
  198. npc_rel[$tempcclean] = 0
  199. npc_love[$tempcclean] = 0
  200. npc_job[$tempcclean] = 0
  201. npc_cloc[$tempcclean] = 0
  202. $npc_dad[$tempcclean] = ''
  203. $npc_mom[$tempcclean] = ''
  204. $npc_pic[$tempcclean] = ''
  205. npc_herpes[$tempcclean] = 0
  206. npc_syth[$tempcclean] = 0
  207. npc_gon[$tempcclean] = 0
  208. npc_chlam[$tempcclean] = 0
  209. npc_genwart[$tempcclean] = 0
  210. npc_thrush[$tempcclean] = 0
  211. npc_malen[$tempcclean] = 0
  212. npc_chem[$tempcclean] = 0
  213. npc_clothpref[$tempcclean] = 0
  214. $npc_PersType[$tempcclean] = ''
  215. $npc_dna[$tempcclean] = ''
  216. end
  217. i = arrsize('$cemptyarray')
  218. $cemptyarray[i] = $tempcclean
  219. :clean_sanity_loop
  220. i = arrsize('$cemptyarray')
  221. If i > 1 and $cemptyarray[0] = $cemptyarray[i]: killvar '$cemptyarray', i & jump 'clean_sanity_loop'
  222. killvar '$tempcclean'
  223. --- npccleanc ---------------------------------