1
0

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