Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1.  
  2. void SearchForDeadWood(location lLoc)
  3. {
  4.  
  5. float fDir = GetFacingFromLocation(lLoc);
  6. location lSearchLoc = GenerateNewLocationFromLocation(lLoc, 5.0, fDir, fDir);
  7. int nPodpalka = GetLocalInt(OBJECT_SELF, "podpalka");
  8. object oArea = GetArea(OBJECT_SELF);
  9. string sTileset = GetTilesetResRef(oArea);
  10. int DCWood;
  11.  
  12. if (sTileset == TILESET_RESREF_FOREST || sTileset == "ztf01" || sTileset == "ttw01" || sTileset == "tfm01")
  13. {
  14. DCWood = 1;
  15. }
  16. if (sTileset == "trm01")
  17. {
  18. DCWood = 10;
  19. }
  20. if (sTileset == "tcm01" && GetIsAreaNatural(oArea))
  21. {
  22. DCWood = 5;
  23. }
  24. else if(sTileset == "tcr10" && GetIsAreaNatural(oArea))
  25. {
  26. DCWood = 5;
  27. }
  28. else if(sTileset == "tno01" && GetIsAreaNatural(oArea))
  29. {
  30. DCWood = 5;
  31. }
  32. else
  33. {
  34. DCWood = 20;
  35. }
  36.  
  37. int iRoll = d20(1);
  38.  
  39.  
  40. if (nPodpalka == TRUE || iRoll >= DCWood)
  41.  
  42. {
  43. ActionDoCommand(DisplayText("Szukam..."));
  44. ActionPlayAnimation(ANIMATION_LOOPING_LOOK_FAR, 1.0, 3.0);
  45. ActionMoveToLocation(lSearchLoc, FALSE);
  46. ActionDoCommand(CreateWood());
  47. ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0, 2.0);
  48. ActionDoCommand(GiveWood());
  49. return;
  50. }
  51.  
  52. else
  53. {
  54. ActionDoCommand(DisplayText("Szukam..."));
  55. ActionPlayAnimation(ANIMATION_LOOPING_LOOK_FAR, 1.0, 3.0);
  56. ActionDoCommand(DisplayText("Nie znajdujesz suchego drewna w pobliżu."));
  57. }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement