asdas456 发表于 2015-8-29 17:53:05

醉八仙镶宝石空数

-------------------------------------------------------
--****************************************************
--装备生成脚本:武器
--author:        徐古月
--*****************************************************
--------------------------------------------------------

------------------------------------------------------
--武器初始化入口函数
------------------------------------------------------
function EquipItem_weapon_Init( Item,itemtype )      
    if itemtype == emEQUIPNPCBUY then
            --调用商店产出函数
            Weapon_Init_Store(Item,itemtype)   
    end
   
    if itemtype == emEQUIPDROP then
            --调用掉落产出函数
            Weapon_Init_Drop(Item,itemtype)   
    end
   
    if itemtype == emEQUIPBUILD then
            --调用生产产出函数
            Weapon_Init_Make(Item,itemtype)   
    end
   
    if itemtype == emGETTYPE_REWARD then
            --调用奖励产出函数
            Weapon_Init_Give(Item,itemtype)   
    end
end
-------------------------------------------------------
--商店产出函数
-------------------------------------------------------
function Weapon_Init_Store(Item,itemtype)
          -- 武器类装备独有接口
          Item:SetGradeOne( 1 )
          Item:SetGradeTwo( 1 )
end
-------------------------------------------------------
--掉落产出函数
-------------------------------------------------------
function Weapon_Init_Drop(Item,itemtype)

    --武器类装备独有接口,基础属性
                local r = g_GetRandomNum(emRANDOM_DEFAULT, 1,100)
                if r <= 40 then
                        Item:SetGradeOne( 2 )
                  Item:SetGradeTwo( 2 )

                else               
                  Item:SetGradeOne( 1 )
                        Item:SetGradeTwo( 1 )
                end
               
end

-------------------------------------------------------
--生产产生函数
-------------------------------------------------------
function Weapon_Init_Make(Item,itemtype)

                local r = g_GetRandomNum(emRANDOM_DEFAULT, 1,100)
                if r <= 100 then
                  Item:SetMaxApertureNum(100)
                elseif r <= 40 then
                  Item:SetMaxApertureNum(3)
                elseif r <= 70 then
                  Item:SetMaxApertureNum(2)
                else
                  Item:SetMaxApertureNum(1)
                end
               
                Item:SetNeedAppraise(true)
               
                local RandomNum1 = g_GetRandomNum(emRANDOM_DEFAULT, 1,100)
                if RandomNum1 <= 100 then               
                  Item:AddSubjoinInt(emSUBJOIN_TYPE_SPECIAL, 0, 251)
                end
               
                local RandomNum2 = g_GetRandomNum(emRANDOM_DEFAULT, 1,100)
                if RandomNum2 <= 100 then       
                  local RandomNum = g_GetRandomNum(emRANDOM_DEFAULT, 1,2)
                  if RandomNum == 1 then
                        Item:AddSubjoinInt(emSUBJOIN_TYPE_SPECIAL, 0, 255)
                  else
                        Item:AddSubjoinInt(emSUBJOIN_TYPE_SPECIAL, 0, 256)
                  end                  
                end
               
                local RandomNum3 = g_GetRandomNum(emRANDOM_DEFAULT, 1,100)
                if RandomNum3 <= 100 then               
                  Item:AddSubjoinInt(emSUBJOIN_TYPE_SPECIAL, 0, 265)
                end

          -- 武器类装备独有接口
                local r1 = g_GetRandomNum(emRANDOM_DEFAULT, 1,100)
                local r2 = g_GetRandomNum(emRANDOM_DEFAULT, 85,100)
                local r3 = g_GetRandomNum(emRANDOM_DEFAULT, 85,100)
                if r1 <= 30 then
                          Item:SetGradeOne( 3 )
                          Item:SetGradeTwo( 3 )
                          Item:SetEquipRandomValue1(r2)
                          Item:SetEquipRandomValue2(r3)
                elseif r1 <= 60then
                          Item:SetGradeOne( 2 )
                          Item:SetGradeTwo( 2 )
                          Item:SetEquipRandomValue1(r2)
                          Item:SetEquipRandomValue2(r3)
                else         
                      Item:SetGradeOne( 1 )
                          Item:SetGradeTwo( 1 )
                          Item:SetEquipRandomValue1(r2)
                          Item:SetEquipRandomValue2(r3)
                end
end



-------------------------------------------------------
--物品奖励函数
-------------------------------------------------------
function Weapon_Init_Give(Item,itemtype)

    Item:SetBinded( true )   
    Item:SetGrade( 5)
    Item:SetMaster(true)
    --武器类装备独有接口,基础属性
                               
        Item:SetGradeOne( 3 )
        Item:SetGradeTwo( 3 )
        Item:SetMaxApertureNum( 10)
               
end
求大神告知那条是打造装备的空数150级装备孔数太多看不到属性

asdas456 发表于 2015-8-29 18:36:43

tem:SetMaxApertureNum(100)   自己研究出来啦 你要你生产的装备有多少孔就在括号里填多少

期待玄 发表于 2015-9-9 12:27:33

填的再多也没用还不是只能镶嵌4个

飞扬1123 发表于 2017-12-21 19:07:04

:
页: [1]
查看完整版本: 醉八仙镶宝石空数

本站内容如若侵犯到您的权益,请来电来函告知,我们会尽快处理!
联系QQ:1953150286,2251387361,123784736,免责申明