Jump to content
flamyman1412

How to make lv pet

Recommended Posts

4 hours ago, flamyman1412 said:

I will upgrade to a pet level up easy easy. How do I do it?

Hello mate! 

go to : Resource\script\calculate\variable.lua and look for 

ELEEXP_GETRAD = X	--Pet Growth Rate ( default = 1 )



Edit X with rate you want 

edit 


proxy-image (2).jpg

Share this post


Link to post
Share on other sites
4 hours ago, BugsBunny said:

Hello mate! 

go to : Resource\script\calculate\variable.lua and look for 


ELEEXP_GETRAD = X	--Pet Growth Rate ( default = 1 )



Edit X with rate you want 

edit 

Excuse me for misinterpretation, I mean getting up from the fruit to make it easier to level up.

Share this post


Link to post
Share on other sites
16 hours ago, flamyman1412 said:

Excuse me for misinterpretation, I mean getting up from the fruit to make it easier to level up.

 

Here some improved fruit system with 100%success rate so look this and look your script to get hint how the levup can be failed..  This script will never failing pet leveling.. 

 

 

function Lvup_Str ( role , Item_Num ,Item_Traget ) 
    local attr_type =  ITEMATTR_VAL_STR
    Elf_LvUp ( role , Item_Num , Item_Traget , attr_type )
end 

function Lvup_Str ( role , Item_Num ,Item_Traget ) 
    local attr_type =  ITEMATTR_VAL_STR
    Elf_LvUp ( role , Item_Num , Item_Traget , attr_type )
end 

function Lvup_Con ( role , Item_Num ,Item_Traget ) 
    local attr_type =  ITEMATTR_VAL_CON 
    Elf_LvUp ( role , Item_Num , Item_Traget , attr_type )

end 

function Lvup_Agi ( role , Item_Num ,Item_Traget ) 
    local attr_type = ITEMATTR_VAL_AGI 
    Elf_LvUp ( role , Item_Num , Item_Traget , attr_type )
end 

function Lvup_Dex ( role , Item_Num ,Item_Traget ) 
    local attr_type = ITEMATTR_VAL_DEX
    Elf_LvUp ( role , Item_Num , Item_Traget , attr_type )
end 

function Lvup_Sta ( role , Item_Num ,Item_Traget ) 
    local attr_type = ITEMATTR_VAL_STA 
    Elf_LvUp ( role , Item_Num , Item_Traget , attr_type )
end 

function Lvup_Str_1 ( role , Item_Num ,Item_Traget ) 
    local attr_type =  ITEMATTR_VAL_STR
    Elf_LvUp_1 ( role , Item_Num , Item_Traget , attr_type )
end 

function Lvup_Con_1 ( role , Item_Num ,Item_Traget ) 
    local attr_type =  ITEMATTR_VAL_CON 
    Elf_LvUp_1 ( role , Item_Num , Item_Traget , attr_type )
end 

function Lvup_Agi_1 ( role , Item_Num ,Item_Traget ) 
    local attr_type = ITEMATTR_VAL_AGI 
    Elf_LvUp_1 ( role , Item_Num , Item_Traget , attr_type )
end 

function Lvup_Dex_1 ( role , Item_Num ,Item_Traget ) 
    local attr_type = ITEMATTR_VAL_DEX
    Elf_LvUp_1 ( role , Item_Num , Item_Traget , attr_type ) 
end 

function Lvup_Sta_1 ( role , Item_Num ,Item_Traget ) 
    local attr_type = ITEMATTR_VAL_STA 
    Elf_LvUp_1 ( role , Item_Num , Item_Traget , attr_type )
end 


function Lvup_Str_IMPRO ( role , Item_Num ,Item_Traget ) 
    local attr_type =  ITEMATTR_VAL_STR
    Elf_LvUp_4 ( role , Item_Num , Item_Traget , attr_type )
end 


function Lvup_Con_IMPRO ( role , Item_Num ,Item_Traget ) 
    local attr_type =  ITEMATTR_VAL_CON 
    Elf_LvUp_4 ( role , Item_Num , Item_Traget , attr_type )
end 

function Lvup_Agi_IMPRO ( role , Item_Num ,Item_Traget ) 
    local attr_type = ITEMATTR_VAL_AGI 
    Elf_LvUp_4 ( role , Item_Num , Item_Traget , attr_type )
end 

function Lvup_Dex_IMPRO ( role , Item_Num ,Item_Traget ) 
    local attr_type = ITEMATTR_VAL_DEX
    Elf_LvUp_4 ( role , Item_Num , Item_Traget , attr_type )
end 

function Lvup_Sta_IMPRO ( role , Item_Num ,Item_Traget ) 
    local attr_type = ITEMATTR_VAL_STA 
    Elf_LvUp_4 ( role , Item_Num , Item_Traget , attr_type ) 
end 

function ElfLVUP_2(role,item,attrType,lvupType,falseType)
    local elfLV=GetFairyLevel(Fairy)
    local elfMaxEXP = GetItemAttr(item,ITEMATTR_MAXENERGY) 
    local elfMaxURE = GetItemAttr(item,ITEMATTR_MAXURE)
    local attrNum = GetItemAttr( item ,attrType )
    local a = 0
    local item_elf = GetChaItem(role , 2, 1)            -- Pet Handle
    local item_elf_type = GetItemType ( item_elf )            -- Pet Type
    local Item_ID = GetItemID ( item_elf )                -- Pet ID
    if Item_ID == 181 or Item_ID == 180 or Item_ID==457 or Item_ID==458 then
        a = 0
        BickerNotice (role , "Sorry, [Angela] and [Angela Junior] and [Emerald Parrot] and [Crimson Parrot] can be leveled only with [Improved Fruit]") 
        UseItemFailed ( role ) 
        return 0
    end
    if Item_ID == 199 or Item_ID == 231 or Item_ID == 232 or Item_ID == 233 or Item_ID == 235 or Item_ID == 234 or Item_ID == 236 or Item_ID == 237 or Item_ID == 681 or Item_ID == 183 or Item_ID == 184 or Item_ID == 185 or Item_ID == 186 or Item_ID == 187 or Item_ID == 188 or Item_ID == 189 or Item_ID == 190 or Item_ID == 191 or Item_ID == 680 then
        if elfLV >=40 then 
            a = 0
            BickerNotice (role , "Your pet must be Lv0-39 to use this Fruit") 
            UseItemFailed ( role ) 
            return 0
        end
        if elfLV >=0 and  elfLV <=39 then
            a = 1
        
        end
    end


    local b = a + 1
    local elfEXP = GetItemAttr( item ,ITEMATTR_ENERGY )
    if b == 2 then
        AddItemEffect(role , item , 0  )
        elfEXP = 0
        SystemNotice (role , "Pet level up successfully! Growth rate is depleted")    
        --local testLV = elfLV + 1
        --SystemNotice (role , "SUCCESSFULLY: -> Item_ID:["..Item_ID.."] elfLV:["..testLV.."] A:["..a.."] B:["..b.."]!")
        attrNum = attrNum + 1
        SetItemAttr ( item , attrType , attrNum )
        local Item_MAXENERGY = 240 * ( elfLV+ 1 )
        if Item_MAXENERGY > 6480 then
            Item_MAXENERGY = 6480
        end
        local Item_MAXURE_NUM = elfMaxURE + 1000
        if Item_MAXURE_NUM > 32000 then
            Item_MAXURE_NUM = 32000
        end
        if Item_MAXURE_NUM ==25000  then
            Item_MAXURE_NUM = 25000+1
        end
        SetItemAttr ( item , ITEMATTR_MAXENERGY , Item_MAXENERGY )
        SetItemAttr ( item , ITEMATTR_MAXURE , Item_MAXURE_NUM )
        ResetItemFinalAttr(item)
        AddItemEffect(role , item , 1  )
    else            
        if falseType == 1 then 
            elfEXP = 0
            SystemNotice (role , "Pet level up Failed! Growth rate is depleted")
            --SystemNotice (role , "BUG: -> Item_ID:["..Item_ID.."] elfLV:["..elfLV.."] A:["..a.."] B:["..b.."]!")
            LG( "BUG_Elf_Err" ,Item_ID, elfLV , a , b)
        else
            elfEXP = 0.5 * elfEXP 
            SystemNotice (role , "Pet level up failed! Growth rate reduced by half")
        end
    end
    if falseType == 1 then 
        SetItemAttr ( item , ITEMATTR_URE , 0 )
    end        
    SetItemAttr ( item , ITEMATTR_ENERGY , elfEXP )
end

 

 

function ElfLVUP_2(role,item,attrType,lvupType,falseType)
    local elfLV=GetFairyLevel(Fairy)
    local elfMaxEXP = GetItemAttr(item,ITEMATTR_MAXENERGY) 
    local elfMaxURE = GetItemAttr(item,ITEMATTR_MAXURE)
    local attrNum = GetItemAttr( item ,attrType )
    local a = 0
    local item_elf = GetChaItem(role , 2, 1)            -- Pet Handle
    local item_elf_type = GetItemType ( item_elf )            -- Pet Type
    local Item_ID = GetItemID ( item_elf )                -- Pet ID
    if Item_ID == 181 or Item_ID == 180 or Item_ID==457 or Item_ID==458 then
        a = 0
        BickerNotice (role , "Sorry, [Angela] and [Angela Junior] and [Emerald Parrot] and [Crimson Parrot] can be leveled only with [Improved Fruit]") 
        UseItemFailed ( role ) 
        return 0
    end
    if Item_ID == 199 or Item_ID == 231 or Item_ID == 232 or Item_ID == 233 or Item_ID == 235 or Item_ID == 234 or Item_ID == 236 or Item_ID == 237 or Item_ID == 681 or Item_ID == 183 or Item_ID == 184 or Item_ID == 185 or Item_ID == 186 or Item_ID == 187 or Item_ID == 188 or Item_ID == 189 or Item_ID == 190 or Item_ID == 191 or Item_ID == 680 then
        if elfLV >=40 then 
            a = 0
            BickerNotice (role , "Your pet must be Lv0-39 to use this Fruit") 
            UseItemFailed ( role ) 
            return 0
        end
        if elfLV >=0 and  elfLV <=39 then
            a = 1
        
        end
    end
    
    local b = a + 1
    local elfEXP = GetItemAttr( item ,ITEMATTR_ENERGY )
    if b == 2 then
        AddItemEffect(role , item , 0  )
        elfEXP = 0
        BickerNotice (role , "Pet level up successfully! Growth rate is depleted")    
        --local testLV = elfLV + 1
        --SystemNotice (role , "SUCCESSFULLY: -> Item_ID:["..Item_ID.."] elfLV:["..testLV.."] A:["..a.."] B:["..b.."]!")
        attrNum = attrNum + lvupType
        SetItemAttr ( item , attrType , attrNum )
        local Item_MAXENERGY = 240 * ( elfLV+ lvupType )
        if Item_MAXENERGY > 6480 then
            Item_MAXENERGY = 6480
        end
        local Item_MAXURE_NUM = elfMaxURE + 1000*lvupType
        if Item_MAXURE_NUM > 32000 then
            Item_MAXURE_NUM = 32000
        end
        if Item_MAXURE_NUM ==25000  then
            Item_MAXURE_NUM = 25000+1
        end
        SetItemAttr ( item , ITEMATTR_MAXENERGY , Item_MAXENERGY )
        SetItemAttr ( item , ITEMATTR_MAXURE , Item_MAXURE_NUM )
        ResetItemFinalAttr(item)
        AddItemEffect(role , item , 1  )
    else            
        if falseType == 1 then 
            elfEXP = 0
            SystemNotice (role , "Pet level up Failed! Growth rate is depleted")
            --SystemNotice (role , "BUG: -> Item_ID:["..Item_ID.."] elfLV:["..elfLV.."] A:["..a.."] B:["..b.."]!")
            LG( "BUG_Elf_Err" ,Item_ID, elfLV , a , b)
        else
            elfEXP = 0.5 * elfEXP 
            SystemNotice (role , "Pet level up failed! Growth rate reduced by half")
        end
    end
    if falseType == 1 then 
        SetItemAttr ( item , ITEMATTR_URE , 0 )
    end        
    SetItemAttr ( item , ITEMATTR_ENERGY , elfEXP )
end


function ElfLVUP_IMPRO( role , Item_Num , Item_Traget , attr_type )
    local elfLV=GetFairyLevel(Fairy)
    local elfMaxEXP = GetItemAttr(item,ITEMATTR_MAXENERGY) 
    local elfMaxURE = GetItemAttr(item,ITEMATTR_MAXURE)
    local attrNum = GetItemAttr( item ,attrType )
    local a = 0
    local item_elf = GetChaItem(role , 2, 1)            -- Pet Handle
    local item_elf_type = GetItemType ( item_elf )            -- Pet Type
    local Item_ID = GetItemID ( item_elf )                -- Pet ID
    if Item_ID == 199 or Item_ID == 231 or Item_ID == 232 or Item_ID == 233 or Item_ID == 235 or Item_ID == 234 or Item_ID == 236 or Item_ID == 237 or Item_ID == 681 or Item_ID == 183 or Item_ID == 184 or Item_ID == 185 or Item_ID == 186 or Item_ID == 187 or Item_ID == 188 or Item_ID == 189 or Item_ID == 190 or Item_ID == 191 or Item_ID == 680 then
        if elfLV >=0 and  elfLV <=40 then
            a = 0
            SystemNotice (role , "Your pet must be Lv41-59 to use this Fruit") 
            UseItemFailed ( role ) 
            return 0
        end
        if elfLV >=60 then 

            a = 0
            SystemNotice (role , "Sorry, Your pet is Max level already.") 
            UseItemFailed ( role ) 
            return 0
        end
        if elfLV >=41 and  elfLV <=59 then
            a = 1
        end
    end
    if Item_ID == 181 or Item_ID == 180 or Item_ID==457 or Item_ID==458 then
        if elfLV >=60 then 
            a = 0
            SystemNotice (role , "Sorry, Your pet is Max level already.") 
            UseItemFailed ( role ) 
            return 0
        end
        if elfLV >=0 and  elfLV <=59 then
            a = 1
        end
    end
    
    local b = a + 1
    local elfEXP = GetItemAttr( item ,ITEMATTR_ENERGY )
    if b == 2 then
        AddItemEffect(role , item , 0  )
        elfEXP = 0
        SystemNotice (role , "Pet level up successfully! Growth rate is depleted")    
        --local testLV = elfLV + 1
        --SystemNotice (role , "SUCCESSFULLY: -> Item_ID:["..Item_ID.."] elfLV:["..testLV.."] A:["..a.."] B:["..b.."]!")
        attrNum = attrNum + lvupType
        SetItemAttr ( item , attrType , attrNum )
        local Item_MAXENERGY = 240 * ( elfLV+ lvupType )
        if Item_MAXENERGY > 6480 then
            Item_MAXENERGY = 6480
        end
        local Item_MAXURE_NUM = elfMaxURE + 1000*lvupType
        if Item_MAXURE_NUM > 32000 then
            Item_MAXURE_NUM = 32000
        end
        if Item_MAXURE_NUM ==25000  then
            Item_MAXURE_NUM = 25000+1
        end
        SetItemAttr ( item , ITEMATTR_MAXENERGY , Item_MAXENERGY )
        SetItemAttr ( item , ITEMATTR_MAXURE , Item_MAXURE_NUM )
        ResetItemFinalAttr(item)
        AddItemEffect(role , item , 1  )
    else            
        if falseType == 1 then 
            elfEXP = 0
            SystemNotice (role , "Pet level up Failed! Growth rate is depleted")
            SystemNotice (role , "BUG: -> Item_ID:["..Item_ID.."] elfLV:["..elfLV.."] A:["..a.."] B:["..b.."]!")
            LG( "BUG_Elf_Err" ,Item_ID, elfLV , a , b)
        else
            elfEXP = 0.5 * elfEXP 
            SystemNotice (role , "Pet level up failed! Growth rate reduced by half")
        end
    end
    if falseType == 1 then 
        SetItemAttr ( item , ITEMATTR_URE , 0 )
    end        
    SetItemAttr ( item , ITEMATTR_ENERGY , elfEXP )
end
 

  • Thanks 1

Download: Nightmare Demonic Helm

Dimension Pirates Online files: get now

New map Project: Flag PK

Black Skin 3.1.3 for pko 1: Get now

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...