Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. * = red syntax
  2.  
  3. *install invisible flag agent
  4. *using my range '14854' so the mistletoe doesn't clash with other patch plants:
  5. new: simp 1 205 14872 "blnk" 0 0 9000
  6.  
  7. *this is the script that the patch core will trigger when it's time to spawn mistletoe:
  8. setv name "spawn_script" 1000
  9.  
  10. *sprite image file and frame when the mistletoe is fully grown:
  11. sets name "sprite_file" "mistletoe"
  12. setv name "sprite_pose" 4
  13.  
  14. *classifiers (family, genus, species):
  15. setv name "prod_fmly" 2
  16. setv name "prod_gnus" 4
  17. setv name "prod_spcs" 14872
  18.  
  19. *set va00 to targ, enumerate all the instances of the patch core agent
  20. *send a message to that patch core agent that script 1000 is being targetted:
  21. seta va00 targ
  22. enum 1 1 22929
  23. mesg wrt+ targ 1000 va00 0 0
  24. next
  25.  
  26. *spawn:
  27. scrp 1 205 14872 1000
  28. inst
  29.  
  30. *create mistletoe:
  31. **9 in order to import all images
  32. new: simp 2 4 14872 "mistletoe" 9 0 name "patch_plane"
  33.  
  34. *mistletoe properties:
  35. **attr 80 = mistletoe invisible to creatures so they won't be eaten, and don't want them to suffer physics just yet.
  36. attr 80
  37. bhvr 48
  38. accg 3
  39. perm 60
  40. fric 100
  41. elas 80
  42. aero 1
  43.  
  44. *move to co-ords sent by the core patch agent:
  45. mvto _p1_ _p2_
  46.  
  47. setv name "patch_id" mame "patch_id"
  48. tick rand mame "tickfrom" mame "tickto"
  49.  
  50. *default tick:
  51. doif tick eq 0
  52. tick 300
  53. endi
  54. endm
  55.  
  56. *timer:
  57. scrp 2 4 14872 9
  58. ***Age it every Tick
  59. addv ov00 1
  60.  
  61. doif ov00 eq 1
  62. * 2 = grow
  63. elif ov00 eq 3
  64. * 4 = grow
  65. else
  66. setv va00 pose
  67. addv va00 1
  68. pose va00
  69. endi
  70. *if it's older then 22 ticks, let it rot
  71. *elif ov00 gt 22*
  72. doif pose eq 5
  73. kill targ
  74. endi
  75. doif pose eq 8
  76. kill targ
  77. endi
  78. setv va00 pose
  79. addv va00 1
  80. pose va00
  81. **if it's fully grown and has been sitting on the plant for 10 turns, it should fall off the patch:
  82. *elif ov00 eq 14*
  83. doif attr eq 67
  84. setv name "patch_id" 0
  85. attr 195
  86. stop
  87. endi
  88. ***if it is fully grown, make sure creatures can see/grab it:
  89. *elif ov00 eq 11*
  90. doif attr eq 80
  91. attr 67
  92. endi
  93. stop
  94. *endi*
  95. endm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement