Advertisement
Guest User

Untitled

a guest
Aug 29th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. the duc is :
  2. (defrule
  3. (players-building-type-count target-player watch-tower > 0)
  4. (unit-type-count militiaman-line >= 4)
  5. =>
  6. (up-reset-search 1 1 1 1)
  7. (up-reset-filters)
  8. (set-strategic-number sn-focus-player-number 0)
  9. (up-find-player enemy find-closest math-goal)
  10. (up-modify-sn sn-focus-player-number g:= math-goal)
  11. (up-find-remote c: watch-tower c: 1)
  12. (up-set-target-object search-remote c: 0)
  13. (up-filter-include cmdid-military -1 -1 -1)
  14. (up-find-local c: infantry-class c: 10)
  15. (up-target-objects 0 action-default -1 stand-ground))
  16.  
  17. it workes with a goal called tower-demolition-goal which is set to "1" when tower is detected
  18. Then it is set to 2 when militians are trained + men at arms UP
  19.  
  20. (defrule
  21. (current-age == feudal-age)
  22. (players-building-type-count target-player watch-tower > 0)
  23. (goal tower-demolition-goal 1)
  24. (unit-type-count militiaman-line > 4)
  25. =>
  26. (set-goal tower-demolition-goal 2)
  27. (chat-local-to-self "Tower demolition project Phase 2 !")
  28. (chat-local-to-self "DEMOLITION"))
  29.  
  30. I want it to be set to zero when the tower is destroyed
  31. =>
  32. (defrule
  33. (current-age == feudal-age)
  34. (players-building-type-count target-player watch-tower == 0)
  35. =>
  36. (set-goal tower-demolition-goal 0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement