Jump to content
blazi10

Add new pet to marriage

Recommended Posts

Hi @blazi10 !:smile:

 


1 - Go to script>calculate>forge.lua and find 
 "can_jlborn_item_main"


2 - Find     
" local  Item_EMstone_ID = GetItemID ( Item_EMstone )
and put your new fruit at end

     local  Item_EMstone_ID = GetItemID ( Item_EMstone )

	    if Item_EMstone_ID ~= 3918 and Item_EMstone_ID ~= 3919 and Item_EMstone_ID ~= 3920 and Item_EMstone_ID ~= 3921 and Item_EMstone_ID ~= 3922 and Item_EMstone_ID ~= 3924 and Item_EMstone_ID ~= 3925 and Item_EMstone_ID ~= #### then

	 --put your new fruit id 

	        SystemNotice( role ,"Demonic fruit is required for marriage.")

	        return 0

	    end



3 - Find in "jlborn_item ( Table )" this 
 "elseif Item_EMstone_ID == 3920" and before paste :

 

     elseif Item_EMstone_ID == #### then--Your new Demonic fruit

	        local j1 = TakeItem( role, ####, 10 )-- Item need for mirage

	        local j2 = TakeItem( role, 0,####, 10 )--item need for mirage

	        if j1==0 or j2==0 then

	            SystemNotice ( role ,"Deletion of pet fairy reborn tools failed")

	            return

	        end 

	        local rad = math.random ( 1, 100 )

	        local r1 = 0


	        local r2 = 0


        --Angela + Angela
        elseif Item_JLone_ID == 571 and Item_JLother_ID == 571 then
                if lv_JLone >= 20 and lv_JLone < 25 and lv_JLother >= 20 and lv_JLother < 25 and rad >= 90 then        --Pet Lv20-24 10% Chance of Angela JR
                    r1,r2 = MakeItem ( role , 572  , 1 , 4 )-- Your Angela Jr ID
                elseif lv_JLone >= 25 and lv_JLone < 35 and lv_JLother >= 25 and lv_JLother < 35 and rad >= 80 then    --Pet Lv25-34 20% Chance of Angela JR
                    r1,r2 = MakeItem ( role , 572  , 1 , 4 )--Your Angela Jr ID
                elseif lv_JLone >= 35 and lv_JLone < 50 and lv_JLother >= 35 and lv_JLother < 50 and rad >= 70 then    --Pet Lv35-49 30% Chance of Angela JR
                    r1,r2 = MakeItem ( role , 572  , 1 , 4 ) --Your Angela Jr ID
                elseif lv_JLone >= 50 and lv_JLone < 70 and lv_JLother >= 50 and lv_JLother < 70 and rad >= 60 then    --Pet Lv50-69 40% Chance of Angela JR
                    r1,r2 = MakeItem ( role , 572  , 1 , 4 ) --Your Angela Jr ID
                elseif lv_JLone >= 70 and lv_JLone < 85 and lv_JLother >= 70 and lv_JLother < 85 and rad >= 50 then    --Pet Lv70-84 50% Chance of Angela JR
                    r1,r2 = MakeItem ( role , 572  , 1 , 4 ) --Your Angela Jr ID 
                elseif lv_JLone >= 85 and lv_JLother >= 85 and rad >= 25 then                        --Pet Lv85 above 75% Chance of Angela JR
                    r1,r2 =MakeItem ( role , 572  , 1 , 4 )--Your Angela Jr ID
                else
                    r1,r2 = MakeItem ( role , 231  , 1 , 4 )                            --Fairy of Luck
                end


 

 

if you not wanna make new fruit only add this before "elseif Item_EMstone_ID == 3920"

 

        --Angela + Angela

	        elseif Item_JLone_ID == 571 and Item_JLother_ID == 571 then

	                if lv_JLone >= 20 and lv_JLone < 25 and lv_JLother >= 20 and lv_JLother < 25 and rad >= 90 then        --Pet Lv20-24 10% Chance of Angela JR

	                    r1,r2 = MakeItem ( role , 572  , 1 , 4 )-- Your Angela Jr ID

                elseif lv_JLone >= 25 and lv_JLone < 35 and lv_JLother >= 25 and lv_JLother < 35 and rad >= 80 then    --Pet Lv25-34 20% Chance of Angela JR
                    r1,r2 = MakeItem ( role , 572  , 1 , 4 )--Your Angela Jr ID
                elseif lv_JLone >= 35 and lv_JLone < 50 and lv_JLother >= 35 and lv_JLother < 50 and rad >= 70 then    --Pet Lv35-49 30% Chance of Angela JR
                    r1,r2 = MakeItem ( role , 572  , 1 , 4 ) --Your Angela Jr ID
                elseif lv_JLone >= 50 and lv_JLone < 70 and lv_JLother >= 50 and lv_JLother < 70 and rad >= 60 then    --Pet Lv50-69 40% Chance of Angela JR
                    r1,r2 = MakeItem ( role , 572  , 1 , 4 ) --Your Angela Jr ID
                elseif lv_JLone >= 70 and lv_JLone < 85 and lv_JLother >= 70 and lv_JLother < 85 and rad >= 50 then    --Pet Lv70-84 50% Chance of Angela JR
                    r1,r2 = MakeItem ( role , 572  , 1 , 4 ) --Your Angela Jr ID 
                elseif lv_JLone >= 85 and lv_JLother >= 85 and rad >= 25 then                        --Pet Lv85 above 75% Chance of Angela JR
                    r1,r2 =MakeItem ( role , 572  , 1 , 4 )--Your Angela Jr ID
                else
                    r1,r2 = MakeItem ( role , 231  , 1 , 4 )                            --Fairy of Luck
                end

 

Edited by Ximboliex
  • Like 1

xbx3.png

Share this post


Link to post
Share on other sites

I checked this a few years ago. if I remember correctly, Game.exe have hardcoded Demonic Fruit values.

If anyone needs guide to patch, feel free to pm.


+ few years ago, @Angelix released a ready-made FairySystem with tables to handle almost all related functionality with fairies.
(all u needed to do was a simple dofile())
Til now, I have not seen a single person use it besides me xD so Kudos to him! 

 

Codes need to become shorter and simpler, not longer and harder.

  • Like 2

kong.png

a2.png

Share this post


Link to post
Share on other sites
1 hour ago, KONG said:

I checked this a few years ago. if I remember correctly, Game.exe have hardcoded Demonic Fruit values.

If anyone needs guide to patch, feel free to pm.


+ few years ago, @Angelix released a ready-made FairySystem with tables to handle almost all related functionality with fairies.
(all u needed to do was a simple dofile())
Til now, I have not seen a single person use it besides me xD so Kudos to him! 

 

Codes need to become shorter and simpler, not longer and harder.

That file is somewhere in the pkoDev archive in MEGA just in case anyone wants it. It contains everything for rations, fruits, marriage and possession. 

  • Like 2

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...