Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void SearchForDeadWood(location lLoc)
- {
- float fDir = GetFacingFromLocation(lLoc);
- location lSearchLoc = GenerateNewLocationFromLocation(lLoc, 5.0, fDir, fDir);
- int nPodpalka = GetLocalInt(OBJECT_SELF, "podpalka");
- object oArea = GetArea(OBJECT_SELF);
- string sTileset = GetTilesetResRef(oArea);
- int DCWood;
- if (sTileset == TILESET_RESREF_FOREST || sTileset == "ztf01" || sTileset == "ttw01" || sTileset == "tfm01")
- {
- DCWood = 1;
- }
- if (sTileset == "trm01")
- {
- DCWood = 10;
- }
- if (sTileset == "tcm01" && GetIsAreaNatural(oArea))
- {
- DCWood = 5;
- }
- else if(sTileset == "tcr10" && GetIsAreaNatural(oArea))
- {
- DCWood = 5;
- }
- else if(sTileset == "tno01" && GetIsAreaNatural(oArea))
- {
- DCWood = 5;
- }
- else
- {
- DCWood = 20;
- }
- int iRoll = d20(1);
- if (nPodpalka == TRUE || iRoll >= DCWood)
- {
- ActionDoCommand(DisplayText("Szukam..."));
- ActionPlayAnimation(ANIMATION_LOOPING_LOOK_FAR, 1.0, 3.0);
- ActionMoveToLocation(lSearchLoc, FALSE);
- ActionDoCommand(CreateWood());
- ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0, 2.0);
- ActionDoCommand(GiveWood());
- return;
- }
- else
- {
- ActionDoCommand(DisplayText("Szukam..."));
- ActionPlayAnimation(ANIMATION_LOOPING_LOOK_FAR, 1.0, 3.0);
- ActionDoCommand(DisplayText("Nie znajdujesz suchego drewna w pobliżu."));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement