1
0

npcpreservec.qsrc 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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_dob[$npclastsaved] = npc_dob[$npctemp]
  28. npc_intel[$npclastsaved] = npc_intel[$npctemp]
  29. npc_drunk[$npclastsaved] = npc_drunk[$npctemp]
  30. npc_gender[$npclastsaved] = npc_gender[$npctemp]
  31. $npc_thdick[$npclastsaved] = $npc_thdick[$npctemp]
  32. npc_dick[$npclastsaved] = npc_dick[$npctemp]
  33. npc_sexskill[$npclastsaved] = npc_sexskill[$npctemp]
  34. npc_spermpot[$npclastsaved] = npc_spermpot[$npctemp]
  35. npc_horny[$npclastsaved] = npc_horny[$npctemp]
  36. npc_apprnc[$npclastsaved] = npc_apprnc[$npctemp]
  37. npc_height[$npclastsaved] = npc_height[$npctemp]
  38. npc_bust[$npclastsaved] = npc_bust[$npctemp]
  39. npc_haircol[$npclastsaved] = npc_haircol[$npctemp]
  40. npc_QW[$npclastsaved] = npc_QW[$npctemp]
  41. npc_rel[$npclastsaved] = npc_rel[$npctemp]
  42. npc_love[$npclastsaved] = npc_love[$npctemp]
  43. $npc_occupation[$npclastsaved] = $npc_occupation[$npctemp]
  44. npc_outfit[$npclastsaved] = npc_outfit[$npctemp]
  45. $npc_pic[$npclastsaved] = $npc_pic[$npctemp]
  46. npc_style[$npclastsaved] = npc_style[$npctemp]
  47. $npc_PersType[$npclastsaved] = $npc_PersType[$npctemp]
  48. $npc_dna[$npclastsaved] = $npc_dna[$npctemp]
  49. ! {This checks the miscellanious arrays for the Entry and changes it to the new Array B.}
  50. :npctempmloop
  51. npctemp2 = arrpos('$cumarrnam', $npctemp)
  52. if npctemp2 >= 0: $cumarrnam[npctemp2] = $npclastsaved & jump 'npctempmloop'
  53. npctemp2 = arrpos('$sparrnam', $npctemp)
  54. if npctemp2 >= 0: $sparrnam[npctemp2] = $npclastsaved & jump 'npctempmloop'
  55. npctemp2 = arrpos('$cumfthname', $npctemp)
  56. if npctemp2 >= 0: $cumfthname[npctemp2] = $npclastsaved & jump 'npctempmloop'
  57. npctemp2 = arrpos('$cumfthnames', $npctemp)
  58. if npctemp2 >= 0: $cumfthnames[npctemp2] = $npclastsaved & jump 'npctempmloop'
  59. npctemp2 = arrpos('$wombpotfath', $npctemp)
  60. if npctemp2 >= 0: $wombpotfath[npctemp2] = $npclastsaved & jump 'npctempmloop'
  61. npctemp2 = arrpos('$cumfathlotto', $npctemp)
  62. if npctemp2 >= 0: $cumfathlotto[npctemp2] = $npclastsaved & jump 'npctempmloop'
  63. npctemp2 = arrpos('$ChildFath', $npctemp)
  64. if npctemp2 >= 0: $ChildFath[npctemp2] = $npclastsaved & jump 'npctempmloop'
  65. npctemp2 = arrpos('$ChildThFath', $npctemp)
  66. if npctemp2 >= 0: $ChildThFath[npctemp2] = $npclastsaved & jump 'npctempmloop'
  67. ! {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.}
  68. if $pcs_firstpart = $npctemp: $pcs_firstpart = $npclastsaved
  69. if $pcs_lastpart = $npctemp: $pcs_lastpart = $npclastsaved
  70. ! {This clears the Entry in Array C}
  71. gs 'npccleanc', $npctemp
  72. end
  73. !! Preserves npclastsavedn. Giving the last numerical B array saved.
  74. npclastsavedn = mid($npclastsaved, 2)
  75. killvar 'npctemp2'
  76. killvar '$npctemp2'
  77. killvar '$npctemp'
  78. --- npcpreservec ---------------------------------