Книги атрибутов

Greed5ds

Пользователь
12 Май 2019
14
1
3
22
Реакции
1 0 0
#1
Помогите кто-нибудь с созданием книг атрибутов,лазил по форуму ничего не нашел.Взял с другой кастомки книгу силы добавил её к себе но она не появляется в магазине.
"DOTAAbilities"
{
"item_bookallstats"
{
// General
//-------------------------------------------------------------------------------------------------------------
"BaseClass" "item_datadriven"
"ID" "2005"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"Model" "models/props_gameplay/red_box.vmdl"
"Effect" "particles/generic_gameplay/dropped_item.vpcf"
"AbilityTextureName" "item_necronomicon_2"

// Item Info
//-------------------------------------------------------------------------------------------------------------
"ItemCost" "50000"
"ItemShopTags" "agi;int;str"
"ItemQuality" "component"
"ItemAliases" "book"



// Special
//-------------------------------------------------------------------------------------------------------------
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"bonus_all_stats" "150"
}
}

"Modifiers"
{
"modifier_item_bookallstats"
{
"Passive" "1"
"IsHidden" "1"
"Attributes" "MODIFIER_ATTRIBUTE_MULTIPLE"

"Properties"
{
"MODIFIER_PROPERTY_STATS_STRENGTH_BONUS" "%bonus_all_stats"
"MODIFIER_PROPERTY_STATS_AGILITY_BONUS" "%bonus_all_stats"
"MODIFIER_PROPERTY_STATS_INTELLECT_BONUS" "%bonus_all_stats"
}
}
}
}
"item_tome_of_strength"
{
// General
//-------------------------------------------------------------------------------------------------------------
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE | DOTA_ABILITY_BEHAVIOR_DONT_RESUME_ATTACK"
"BaseClass" "item_datadriven"
"AbilityTextureName" "item_tome_of_strength"

"Model" "models/props_debris/merchant_debris_book001.vmdl"

// Item Info
//-------------------------------------------------------------------------------------------------------------
//"ItemCost" "50"
"ItemShopTags" "consumable"
"ItemQuality" "consumable"
"ItemStackable" "1"
"ItemKillable" "1"
"ItemPurchasable" "0"
"ItemShareability" "ITEM_FULLY_SHAREABLE_STACKING"
"ItemPermanent" "0"
"ItemInitialCharges" "1"
"SideShop" "1"

"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"bonus_stat" "1"
}
}

"ItemCastOnPickup" "1"
"OnSpellStart"
{
"SpendCharge"
{}
"RunScript"
{
"ScriptFile" "scripts/vscripts/items.lua"
"Function" "StrengthTomeUsed"
"bonus_stat" "%bonus_stat"
}
"FireSound"
{
"EffectName" "DOTA_Item.Refresher.Activate"
"Target" "CASTER"
}
"FireEffect"
{
"Target" "CASTER"
"EffectName" "particles/sweep_generic/sweep_2.vpcf"
"EffectAttachType" "follow_origin"
}
"FireEffect"
{
"Target" "CASTER"
"EffectName" "particles/units/heroes/hero_dragon_knight/dragon_knight_transform_red.vpcf"
"EffectAttachType" "follow_origin"
}
}

"Modifiers"
{
"tome_strenght_modifier"
{
"Attributes" "MODIFIER_ATTRIBUTE_PERMANENT"
"IsBuff" "1"
"TextureName" "item_tome_of_strength"
"Properties"
{
"MODIFIER_PROPERTY_STATS_STRENGTH_BONUS" "1"
}
}
}
}
}
item_tome_of_strength
Скрипт нужный тоже скачал,поместил в нужной директории.И подключил require('items') в addon_game_mode
"dota_shops"
{
"consumables"
{
"item" "item_clarity"
"item" "item_enchanted_mango"
"item" "item_tango"
"item" "item_flask"
"item" "item_smoke_of_deceit"
//"item" "item_blinders"
"item" "item_tpscroll"
//"item" "item_red_mist"
//"item" "item_bounty_pact"
"item" "item_dust"
//"item" "item_courier"
"item" "item_flying_courier"
"item" "item_ward_observer"
"item" "item_ward_sentry"
"item" "item_bottle"
"item" "item_bookallstats"
"item" "item_tome_of_strength"


}

"attributes"
{
"item" "item_branches"

"item" "item_gauntlets"
"item" "item_slippers"
"item" "item_mantle"

"item" "item_circlet"

"item" "item_belt_of_strength"
"item" "item_boots_of_elves"
"item" "item_robe"

"item" "item_ogre_axe"
"item" "item_blade_of_alacrity"
"item" "item_staff_of_wizardry"
}

"weapons_armor"
{
"item" "item_ring_of_protection"
"item" "item_quelling_blade"
"item" "item_orb_of_venom"
"item" "item_stout_shield"
"item" "item_blades_of_attack"
"item" "item_chainmail"
"item" "item_helm_of_iron_will"
"item" "item_broadsword"
"item" "item_quarterstaff"
"item" "item_claymore"
"item" "item_javelin"
"item" "item_mithril_hammer"
}

"misc"
{
"item" "item_magic_stick"
"item" "item_sobi_mask"
"item" "item_ring_of_regen"
//"item" "item_ward_dispenser"
"item" "item_boots"
//"item" "item_whip"
//"item" "item_telescope"
"item" "item_gloves"
"item" "item_cloak"
"item" "item_gem"
"item" "item_lifesteal"
"item" "item_ghost"
"item" "item_blink"
"item" "item_shadow_amulet"
"item" "item_ring_of_health"
"item" "item_void_stone"
}

// Level 1 - Green Recipes
"basics"
{
"item" "item_wraith_band"
"item" "item_null_talisman"
"item" "item_magic_wand"
"item" "item_bracer"
"item" "item_poor_mans_shield"
"item" "item_soul_ring"
"item" "item_phase_boots"
"item" "item_power_treads"
"item" "item_oblivion_staff"
"item" "item_pers"
"item" "item_hand_of_midas"
"item" "item_travel_boots"
"item" "item_moon_shard"
}

// Level 2 - Blue Recipes
"support"
{
"item" "item_ring_of_basilius"
"item" "item_headdress"
"item" "item_buckler"
"item" "item_urn_of_shadows"
//"item" "item_natures_mend"
"item" "item_ring_of_aquila"
//"item" "item_iron_talon"
"item" "item_tranquil_boots"
//"item" "item_nightfall_striders"
"item" "item_guardian_greaves"
"item" "item_medallion_of_courage"
"item" "item_arcane_boots"
//"item" "item_arcane_boots2"
"item" "item_ancient_janggo"
"item" "item_vladmir"
"item" "item_mekansm"
"item" "item_pipe"
}

"magics"
{
"item" "item_force_staff"
"item" "item_necronomicon"
"item" "item_cyclone"
"item" "item_dagon"
"item" "item_veil_of_discord"
"item" "item_rod_of_atos"
"item" "item_ultimate_scepter"
"item" "item_octarine_core"
"item" "item_solar_crest"
//"item" "item_rune_breaker"
//"item" "item_aether_staff"
"item" "item_orchid"
"item" "item_refresher"
"item" "item_sheepstick"
"item" "item_glimmer_cape"
}

// Level 3 - Purple Recipes
"defense"
{
"item" "item_hood_of_defiance"
"item" "item_blade_mail"
"item" "item_vanguard"
"item" "item_soul_booster"
"item" "item_black_king_bar"
"item" "item_shivas_guard"
"item" "item_manta"
"item" "item_bloodstone"
"item" "item_sphere"
"item" "item_assault"
"item" "item_heart"
"item" "item_crimson_guard"
"item" "item_lotus_orb"
}

"weapons"
{
"item" "item_lesser_crit"
"item" "item_armlet"
"item" "item_basher"
"item" "item_invis_sword"
"item" "item_bfury"
"item" "item_silver_edge"
"item" "item_ethereal_blade"
"item" "item_radiance"
"item" "item_monkey_king_bar"
"item" "item_greater_crit"
"item" "item_butterfly"
"item" "item_rapier"
"item" "item_abyssal_blade"


}

// Level 4 - Orange / Orb / Artifacts
"artifacts"
{
//"item" "item_venomous_shield"
"item" "item_helm_of_the_dominator"
"item" "item_mask_of_madness"
"item" "item_sange"
"item" "item_yasha"
"item" "item_maelstrom"
"item" "item_diffusal_blade"
"item" "item_desolator"
"item" "item_heavens_halberd"
"item" "item_sange_and_yasha"
"item" "item_mjollnir"
"item" "item_skadi"
"item" "item_satanic"
}

"sideshop1"
{
"item" "item_tpscroll"
"item" "item_magic_stick"
"item" "item_sobi_mask"
"item" "item_ring_of_regen"
"item" "item_orb_of_venom"
"item" "item_boots"
"item" "item_cloak"
"item" "item_ring_of_health"
"item" "item_void_stone"
"item" "item_lifesteal"
"item" "item_helm_of_iron_will"
"item" "item_energy_booster"
"item" "item_broadsword"
}

"sideshop2"
{
"item" "item_slippers"
"item" "item_mantle"
"item" "item_quelling_blade"
"item" "item_stout_shield"
"item" "item_boots_of_elves"
"item" "item_belt_of_strength"
"item" "item_robe"
"item" "item_blades_of_attack"
"item" "item_gloves"
"item" "item_chainmail"
"item" "item_quarterstaff"
"item" "item_ultimate_orb"
"item" "item_blink"
}

"secretshop"
{
"item" "item_energy_booster"
"item" "item_vitality_booster"
"item" "item_point_booster"
"item" "item_platemail"
"item" "item_talisman_of_evasion"
"item" "item_hyperstone"
"item" "item_ultimate_orb"
"item" "item_demon_edge"
"item" "item_mystic_staff"
"item" "item_reaver"
"item" "item_eagle"
"item" "item_relic"
}
}
В магазине я его прописал.Появляться не хочет.
 

lina_1299

Новичок
16 Апр 2019
4
3
3
21
Реакции
3 0 0
#2
Код:
"item_book_of_stats"
    {
        "ID"                            "2233"       
        "BaseClass"                        "item_datadriven"
        "AbilityBehavior"                "DOTA_ABILITY_BEHAVIOR_NO_TARGET"
        "Model"                         "models/box/box.vmdl"
        "AbilityTextureName"            "book_of_stats"
        "ItemCost"                        "400"
        "ItemShopTags"                    "str;stat;shard"
        "ItemQuality"                    "uncommon"
        "ItemShareability"                "ITEM_FULLY_SHAREABLE"
        "ItemDeclarations"                "DECLARE_PURCHASES_TO_TEAMMATES | DECLARE_PURCHASES_TO_SPECTATORS"
        "ItemStockMax" "5"
        "ItemStockTime" "60"
        "ItemStockInitial" "2"
        "ItemStackable"                    "1"
        "ItemPermanent"                    "0"
        "ItemInitialCharges"            "1"
        "ItemSellable" "0"
        "ItemKillable" "0"

        "precache"
            {
             "soundfile"            "soundevents/book.vsndevts"
            }
            
        "AbilitySpecial"
        {
            "01"
            {
                "var_type"                            "FIELD_INTEGER"
                "bonus_str"                            "10"
            }
        }

        "OnSpellStart"
        {
            "RunScript"
            {
                "ScriptFile"    "items/items_book.lua"
                "Function"        "AddStat"
                "str"            "%bonus_str"
            }
            "RunScript"
            {
                "ScriptFile"    "items/items_book.lua"
                "Function"        "AddStat"
                "agi"            "%bonus_str"
            }
            "RunScript"
            {
                "ScriptFile"    "items/items_book.lua"
                "Function"        "AddStat"
                "int"            "%bonus_str"
            }
              "SpendCharge"
            {}
        }
    }
Код:
function AddStat(keys)

    local caster = keys.caster

    if not caster:IsHero() then

        return

    end

    local ability = keys.ability

    local str = keys.str

    local agi = keys.agi

    local int = keys.int

    if str then

        caster:ModifyStrength(str)

        caster.Additional_str = (caster.Additional_str or 0) + str

    end

    if agi then

        caster:ModifyAgility(agi)

        caster.Additional_agi = (caster.Additional_agi or 0) + agi

    end

    if int then

        caster:ModifyIntellect(int)

        caster.Additional_int = (caster.Additional_int or 0) + int

        caster:EmitSound("book.stats")

    end

end
 
Реклама: