1
0

npc_intro.qsrc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # npc_intro
  2. !! this procedure is designed for introduction of any npc either with standard or with custom description
  3. !! $ARGS[0] is ID number of npc ... required parameter
  4. !! $ARGS[1] is an image path
  5. !! $ARGS[2] is a color name of the title e.g. 'red'
  6. !! $ARGS[3] is $npc_notes replacement
  7. !! $ARGS[4] is an additional text
  8. !! ARGS[5] sets image path to video output - 0 = off - 1 = on
  9. !! Format: gs 'npc_intro', ARGS[0], $ARGS[1], $ARGS[2], $ARGS[3], $ARGS[4]
  10. !! Example: gs 'npc_intro', 'A23', '', 'green', '', 'Optional text here' <=== This would display Albina''s picture using the path in 'npcstatic1' with her name above it in green text followed by her default description and finally, your relationship level.
  11. !! Credit goes to rachels for coming up with the concept and initial code!!!
  12. *clear
  13. $static_num = $args[0]
  14. if npc_rel[$static_num] < 20: $npc_cur_rel = 'You don''t get along at all with <<$npc_firstname[$static_num]>>.'
  15. if npc_rel[$static_num] >= 20 and npc_rel[$static_num] < 40: $npc_cur_rel = 'You don''t get along very well with <<$npc_firstname[$static_num]>>.'
  16. if npc_rel[$static_num] >= 40 and npc_rel[$static_num] < 60: $npc_cur_rel = 'You have a normal relationship with <<$npc_firstname[$static_num]>>.'
  17. if npc_rel[$static_num] >= 60 and npc_rel[$static_num] < 80: $npc_cur_rel = 'You have a good relationship with <<$npc_firstname[$static_num]>>.'
  18. if npc_rel[$static_num] >= 80: $npc_cur_rel = 'You have a great relationship with <<$npc_firstname[$static_num]>>.'
  19. if $ARGS[1] = '':
  20. $image_path = $npc_pic[$static_num]
  21. else
  22. $image_path = $args[1]
  23. end
  24. if $args[2] = '':
  25. $titlecolor ='maroon'
  26. else
  27. $titlecolor = $args[2]
  28. end
  29. if $args[3] = '':
  30. $description = $npc_notes[$static_num]
  31. else
  32. $description = $args[3]
  33. end
  34. $apendix = $args[4]
  35. '<center><b><font color = <<$titlecolor>>><<$npc_firstname[$static_num]>> <<$npc_lastname[$static_num]>></font></b></center>' & *nl
  36. if $image_path ! '':
  37. if ARGS[5] = 0:
  38. '<center><img <<$set_imgh>> src="<<$image_path>>"></center>' & *nl
  39. else
  40. '<center><video autoplay loop src="<<$image_path>>"></video></center>' & *nl
  41. end
  42. end
  43. if $description ! '' and $description ! ' ': $description + $npc_cur_rel
  44. if $apendix ! '' and $apendix ! ' ':$apendix
  45. killvar '$npc_cur_rel'
  46. killvar '$apendix'
  47. killvar '$description'
  48. killvar '$image_path'
  49. --- npc_intro ---------------------------------