npc_intro 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. ! Format: gs npc_intro, ARGS[0], $ARGS[1], $ARGS[2], $ARGS[3], $ARGS[4]
  9. ! Example: gs npc_intro, 23, '', '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.
  10. !Credit goes to rachels for coming up with the concept and initial code!!!
  11. *clear
  12. numnpc = args[0]
  13. $static_num = 'A<<numnpc>>'
  14. if $ARGS[1] = '':
  15. $image_path = $npc_pic[$static_num]
  16. else
  17. $image_path = $args[1]
  18. end
  19. if $args[2] = '':
  20. $titlecolor ='maroon'
  21. else
  22. $titlecolor = $args[2]
  23. end
  24. if $args[3] = '':
  25. $description = $npc_notes[$static_num]
  26. else
  27. $description = $args[3]
  28. end
  29. $apendix = $args[4]
  30. '<center><b><font color = <<$titlecolor>>><<$npc_firstname[$static_num]>> <<$npc_lastname[$static_num]>></font></b></center>' & *nl
  31. if $image_path ! '':'<center><img src="<<$image_path>>"></center>' & *nl
  32. if $description ! '' and $description ! ' ': $description
  33. if $apendix ! '' and $apendix ! ' ':$apendix
  34. if npc_rel[$static_num] < 20:'You currently don''t get along at all with <<$npc_firstname[$static_num]>>.'
  35. if npc_rel[$static_num] >= 20 and npc_rel[$static_num] < 40:'You currently don''t get along very well with <<$npc_firstname[$static_num]>>.'
  36. if npc_rel[$static_num] >= 40 and npc_rel[$static_num] < 60:'You currently have a normal relationship with <<$npc_firstname[$static_num]>>.'
  37. if npc_rel[$static_num] >= 60 and npc_rel[$static_num] < 80:'You currently have a good relationship with <<$npc_firstname[$static_num]>>.'
  38. if npc_rel[$static_num] >= 80:'You currently have a great relationship with <<$npc_firstname[$static_num]>>.'
  39. killvar '$apendix'
  40. killvar '$description'
  41. killvar 'numnpc'
  42. killvar '$static_num'
  43. killvar '$image_path'
  44. --- npc_intro ---------------------------------