npcpreservec.qsrc 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. # npcpreservec
  2. !! {It expects an Args containing a C array index}
  3. !! {This initializes the array and acts as a gate to deny bad calls.}
  4. $npctemp = $ARGS[0]
  5. if mid($npctemp,1,1) = 'C':
  6. :npcsavebsanityloop
  7. i = 0
  8. $npclastsaved = 'B' + '<<barraynumber>>'
  9. $npctemparrb = 'B' + '<<(barraynumber)-(1)>>'
  10. if $npc_PersType[$npctemparrb] = '' and barraynumber > 0:
  11. barraynumber -= 1
  12. i = 1
  13. elseif $npc_PersType[$npclastsaved] = '':
  14. i = 0
  15. else
  16. barraynumber += 1
  17. i = 1
  18. end
  19. if i = 1: jump 'npcsavebsanityloop'
  20. barraynumber += 1
  21. ! {This copies the array from Array C to Array B}
  22. $npc_firstname[$npclastsaved] = $npc_firstname[$npctemp]
  23. $npc_nickname[$npclastsaved] = $npc_nickname[$npctemp]
  24. $npc_lastname[$npclastsaved] = $npc_lastname[$npctemp]
  25. $npc_usedname[$npclastsaved] = $npc_usedname[$npctemp]
  26. $npc_notes[$npclastsaved] = $npc_notes[$npctemp]
  27. $npc_pic[$npclastsaved] = $npc_pic[$npctemp]
  28. npc_dob[$npclastsaved] = npc_dob[$npctemp]
  29. npc_gender[$npclastsaved] = npc_gender[$npctemp]
  30. npc_height[$npclastsaved] = npc_height[$npctemp]
  31. ! npc_body
  32. npc_haircol[$npclastsaved] = npc_haircol[$npctemp]
  33. npc_apprnc[$npclastsaved] = npc_apprnc[$npctemp]
  34. npc_dick[$npclastsaved] = npc_dick[$npctemp]
  35. $npc_thdick[$npclastsaved] = $npc_thdick[$npctemp]
  36. npc_spermpot[$npclastsaved] = npc_spermpot[$npctemp]
  37. npc_sexskill[$npclastsaved] = npc_sexskill[$npctemp]
  38. npc_drunk[$npclastsaved] = npc_drunk[$npctemp]
  39. npc_horny[$npclastsaved] = npc_horny[$npctemp]
  40. npc_rel[$npclastsaved] = npc_rel[$npctemp]
  41. npc_love[$npclastsaved] = npc_love[$npctemp]
  42. npc_sex[$npclastsaved] = npc_sex[$npctemp]
  43. npc_QW[$npclastsaved] = npc_QW[$npctemp]
  44. $npc_perstype[$npclastsaved] = $npc_perstype[$npctemp]
  45. $npc_dna[$npclastsaved] = $npc_dna[$npctemp]
  46. npc_herpes[$npclastsaved] = npc_herpes[$npctemp]
  47. npc_syth[$npclastsaved] = npc_syth[$npctemp]
  48. npc_gon[$npclastsaved] = npc_gon[$npctemp]
  49. npc_thrush[$npclastsaved] = npc_thrush[$npctemp]
  50. ! npc_bust[$npclastsaved] = npc_bust[$npctemp]
  51. npc_residence[$npclastsaved] = npclocation
  52. npc_apt_type[$npclastsaved] = npc_apt_type[$npctemp]
  53. npc_apt_number[$npclastsaved] = npc_apt_number[$npctemp]
  54. $npc_apt_bedroom[$npclastsaved] = $npc_apt_bedroom[$npctemp]
  55. $npc_apt_kitchen[$npclastsaved] = $npc_apt_kitchen[$npctemp]
  56. $npc_apt_livingroom[$npclastsaved] = $npc_apt_livingroom[$npctemp]
  57. $npc_apt_bathroom[$npclastsaved] = $npc_apt_bathroom[$npctemp]
  58. npc_perv[$npclastsaved] = npc_perv[$npctemp]
  59. npc_outfit[$npclastsaved] = npc_outfit[$npctemp]
  60. npc_finance[$npclastsaved] = npc_finance[$npctemp]
  61. $npc_occupation[$npclastsaved] = $npc_occupation[$npctemp]
  62. npc_intel[$npclastsaved] = npc_intel[$npctemp]
  63. npc_humor[$npclastsaved] = npc_humor[$npctemp]
  64. npc_fav_pos[$npclastsaved] = npc_fav_pos[$npctemp]
  65. npc_tit_pref[$npclastsaved] = npc_tit_pref[$npctemp]
  66. npc_style[$npclastsaved] = npc_style[$npctemp]
  67. npc_addit[$npclastsaved] = npc_addit[$npctemp]
  68. npc_doors[$npclastsaved] = npc_doors[$npctemp]
  69. npc_goal[$npclastsaved] = npc_goal[$npctemp]
  70. npc_fidelity[$npclastsaved] = npc_fidelity[$npctemp]
  71. npc_lover_days[$npclastsaved] = 0
  72. npc_lover_keys[$npclastsaved] = 0
  73. npc_residence[$npclastsaved] = npc_residence[$npctemp]
  74. ! {This checks the miscellanious arrays for the Entry and changes it to the new Array B.}
  75. :npctempmloop
  76. npctemp2 = arrpos('$cumarrnam', $npctemp)
  77. if npctemp2 >= 0: $cumarrnam[npctemp2] = $npclastsaved & jump 'npctempmloop'
  78. npctemp2 = arrpos('$sparrnam', $npctemp)
  79. if npctemp2 >= 0: $sparrnam[npctemp2] = $npclastsaved & jump 'npctempmloop'
  80. npctemp2 = arrpos('$cumfthname', $npctemp)
  81. if npctemp2 >= 0: $cumfthname[npctemp2] = $npclastsaved & jump 'npctempmloop'
  82. npctemp2 = arrpos('$cumfthnames', $npctemp)
  83. if npctemp2 >= 0: $cumfthnames[npctemp2] = $npclastsaved & jump 'npctempmloop'
  84. npctemp2 = arrpos('$wombpotfath', $npctemp)
  85. if npctemp2 >= 0: $wombpotfath[npctemp2] = $npclastsaved & jump 'npctempmloop'
  86. npctemp2 = arrpos('$cumfathlotto', $npctemp)
  87. if npctemp2 >= 0: $cumfathlotto[npctemp2] = $npclastsaved & jump 'npctempmloop'
  88. npctemp2 = arrpos('$ChildFath', $npctemp)
  89. if npctemp2 >= 0: $ChildFath[npctemp2] = $npclastsaved & jump 'npctempmloop'
  90. npctemp2 = arrpos('$ChildThFath', $npctemp)
  91. if npctemp2 >= 0: $ChildThFath[npctemp2] = $npclastsaved & jump 'npctempmloop'
  92. ! {Thic checks Array A for the Entry and changes it to the new Array B. The parts commented out don''t work and need to be replaced with something that does.}
  93. if $pcs_firstpart = $npctemp: $pcs_firstpart = $npclastsaved
  94. if $pcs_lastpart = $npctemp: $pcs_lastpart = $npclastsaved
  95. ! {This clears the Entry in Array C}
  96. gs 'npccleanc', $npctemp
  97. end
  98. !! Preserves npclastsavedn. Giving the last numerical B array saved.
  99. npclastsavedn = mid($npclastsaved, 2)
  100. killvar 'npctemp2'
  101. killvar '$npctemp2'
  102. killvar '$npctemp'
  103. --- npcpreservec ---------------------------------