DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
PrepareLizard.c
См. документацию.
1class PrepareLizard extends PrepareAnimal
2{
3 override void Init()
4 {
5 super.Init();
6
7 //----------------------------------------------------------------------------------------------------------------------
8 //ingredient 1
9 InsertIngredient(0,"DeadLizard", DayZPlayerConstants.CMD_ACTIONFB_ANIMALSKINNING, false);//you can insert multiple ingredients this way
10
11 m_IngredientAddHealth[0] = 0;// 0 = do nothing
12 m_IngredientSetHealth[0] = -1; // -1 = do nothing
13 m_IngredientAddQuantity[0] = 0;// 0 = do nothing
14 m_IngredientDestroy[0] = true;//true = destroy, false = do nothing
15
16 //----------------------------------------------------------------------------------------------------------------------
17 //result1
18 AddResult("Bone");//add results here
19 m_ResultSetFullQuantity[0] = false; //true = set full quantity, false = do nothing
20 m_ResultSetQuantity[0] = -1; // -1 = do nothing
21 m_ResultSetHealth[0] = -1; // -1 = do nothing
24 m_ResultToInventory[0] = -2;
26
27 //result2
28 AddResult("LizardPelt");//add results here
29 m_ResultSetFullQuantity[1] = false; //true = set full quantity, false = do nothing
30 m_ResultSetQuantity[1] = -1; // -1 = do nothing
31 m_ResultSetHealth[1] = -1; // -1 = do nothing
34 m_ResultToInventory[1] = -2;
36 }
37
38 override void Do(ItemBase ingredients[], PlayerBase player, array<ItemBase> results, float specialty_weight)//gets called upon recipe's completion
39 {
40 ItemBase deadLizard = ingredients[0];
41 ItemBase resultBones = results[0];
42
43 ItemBase result = ItemBase.Cast(player.SpawnEntityOnGroundRaycastDispersed("LizardMeat"));
44 MiscGameplayFunctions.TransferItemProperties(deadLizard, result);
45 result.SetQuantityNormalized(Math.RandomFloatInclusive(0.8, 1));
46
47 MiscGameplayFunctions.TransferItemProperties(deadLizard, resultBones);
48 resultBones.SetQuantity(Math.RandomIntInclusive(2, 5));
49
50 SetBloodyHands(ingredients, player);
51 }
52}
void SetBloodyHands(PlayerBase player, bool show)
Определения PluginLifespan.c:449
int m_ResultReplacesIngredient[MAXIMUM_RESULTS]
Определения RecipeBase.c:62
int m_ResultToInventory[MAXIMUM_RESULTS]
Определения RecipeBase.c:59
float m_IngredientAddHealth[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:49
float m_IngredientSetHealth[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:51
int m_ResultInheritsHealth[MAXIMUM_RESULTS]
Определения RecipeBase.c:60
void AddResult(string item)
Определения RecipeBase.c:198
int m_ResultInheritsColor[MAXIMUM_RESULTS]
Определения RecipeBase.c:61
float m_ResultSetQuantity[MAXIMUM_RESULTS]
Определения RecipeBase.c:56
bool m_ResultSetFullQuantity[MAXIMUM_RESULTS]
Определения RecipeBase.c:55
void InsertIngredient(int index, string ingredient, DayZPlayerConstants uid=BASE_CRAFT_ANIMATION_ID, bool showItem=false)
Определения RecipeBase.c:159
float m_ResultSetHealth[MAXIMUM_RESULTS]
Определения RecipeBase.c:57
float m_IngredientAddQuantity[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:50
bool m_IngredientDestroy[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:52
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Определения PileOfBricks.c:64
Определения EnMath.c:7
Определения PlayerBaseClient.c:2
override void Do(ItemBase ingredients[], PlayerBase player, array< ItemBase > results, float specialty_weight)
Определения PrepareLizard.c:38
override void Init()
Определения PrepareLizard.c:3
Определения PrepareChicken.c:2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Определения EnMath.c:106
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Определения EnMath.c:54