Jump to content
dragontechi

help with the script of the married pets

Recommended Posts

 

I don't understand very well how this script works can someone help me because no matter how many times I change the id it always ends up giving me the first pet

 

	if Item_EMstone_ID ==3924 then ---奇异恶魔果实 敏之精灵 敏捷加防御
		local j1 = TakeItem( role, 0,4540, 10 )			---鲨鱼背鳍              
		local j2 = TakeItem( role, 0,3443, 10 )			----沼泽枯木    
		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
		if Item_JLone_ID ==680 or Item_JLother_ID ==680 then
			if Item_JLone_ID==Item_JLother_ID then
				r1,r2 =MakeItem ( role , 681  , 1 , 4 )
			elseif lv_JLone>=20 and lv_JLone<25 and lv_JLother >=20 and lv_JLother<25 and rad>=88 then	--12% Chance of Mordo JR
				r1,r2 =MakeItem ( role , 681  , 1 , 4 )
			elseif lv_JLone>=25 and lv_JLone<35 and lv_JLother >=25 and lv_JLother<35 and rad>=50 then	--50% Chance of Mordo JR
				r1,r2 =MakeItem ( role , 681  , 1 , 4 )
			elseif lv_JLone>=35 and lv_JLother >=35 and rad>=10 then	--90% Chance of Mordo JR
				r1,r2 =MakeItem ( role , 681  , 1 , 4 )	--Mordo JR		
			else
				r1,r2 =MakeItem ( role , 236  , 1 , 4 )	--Fairy of Agility
			end
		else
			r1,r2 =MakeItem ( role , 236  , 1 , 4 )	--Fairy of Agility
		end
		local Item_newJL = GetChaItem ( role , 2 , r2 )			--取新精灵道具指针
		local Num_newJL = GetItemForgeParam ( Item_newJL , 1 )
		local Part1_newJL = GetNum_Part1 ( Num_newJL )	--Get Num Part 1 到 Part 7
		local Part2_newJL = GetNum_Part2 ( Num_newJL )	
		local Part3_newJL = GetNum_Part3 ( Num_newJL )
		local Part4_newJL = GetNum_Part4 ( Num_newJL )
		local Part5_newJL = GetNum_Part5 ( Num_newJL )
		local Part6_newJL = GetNum_Part6 ( Num_newJL )
		local Part7_newJ L= GetNum_Part7 ( Num_newJL )
		if lv_JLone>=20 and lv_JLother >=20 then
			Part2_newJL = 11													 ---------敏之精灵技能编号
			Part3_newJL = 1													---------初级阶段
		end		
		if lv_JLone>=25 and lv_JLother >=25 then
			Part2_newJL = 11													 ---------敏之精灵技能编号
			Part3_newJL = 2													---------中级阶段
		end
		if lv_JLone>=35 and lv_JLother >=35 then
			Part2_newJL = 11													 ---------敏之精灵技能编号
			Part3_newJL = 3													---------高级阶段
		end
		local rad1 = math.random ( 1, 100 )
		if Part3_newJL==3 then
			GiveItem ( role , 0 , 609  , 1 , 4 )	--Expert Fairy Possession
			GiveItem ( role , 0 , 612  , 1 , 4 )	--Expert Self Destruct
		end
		if Part3_newJL==2 then
			if rad1 <=95 then
				GiveItem ( role , 0 , 608  , 1 , 4 )	--Standard Fairy Possession
				GiveItem ( role , 0 , 611  , 1 , 4 )	--Standard Self Destruct
			elseif rad1 > 95 and rad1 <=100 then
				GiveItem ( role , 0 , 609  , 1 , 4 )	--Expert Fairy Possession
				GiveItem ( role , 0 , 612  , 1 , 4 )	--Expert Self Destruct
			end
		end
		if Part3_newJL==1 then
			if rad1 <=90 then
				GiveItem ( role , 0 , 239  , 1 , 4 )	--Novice Fairy Possession
				GiveItem ( role , 0 , 610  , 1 , 4 )	--Novice Self Destruct
			elseif rad1 > 90 and rad1 <=98 then
				GiveItem ( role , 0 , 608  , 1 , 4 )	--Standard Fairy Possession
				GiveItem ( role , 0 , 611  , 1 , 4 )	--Standard Self Destruct
			elseif rad1 > 98 and rad1 <=100 then
				GiveItem ( role , 0 , 609  , 1 , 4 )	--Expert Fairy Possession
				GiveItem ( role , 0 , 612  , 1 , 4 )	--Expert Self Destruct
			end
		end
		Num_newJL = SetNum_Part1 ( Num_newJL , 1 ) ----------二转标记
		Num_newJL = SetNum_Part2 ( Num_newJL , Part2_newJL )
		Num_newJL = SetNum_Part3 ( Num_newJL , Part3_newJL )
		Num_newJL = SetNum_Part4 ( Num_newJL , Part4_newJL )
		Num_newJL = SetNum_Part5 ( Num_newJL , Part5_newJL )
		Num_newJL = SetNum_Part6 ( Num_newJL , Part6_newJL )
		Num_newJL = SetNum_Part7 ( Num_newJL , Part7_newJL )
		SetItemForgeParam ( Item_newJL , 1 , Num_newJL )

		SetItemAttr ( Item_newJL , ITEMATTR_VAL_STR , new_str )
		SetItemAttr ( Item_newJL , ITEMATTR_VAL_DEX , new_dex )	 
		SetItemAttr ( Item_newJL , ITEMATTR_VAL_STA , new_sta )
		SetItemAttr ( Item_newJL , ITEMATTR_VAL_AGI , new_agi )
		SetItemAttr ( Item_newJL , ITEMATTR_VAL_CON , new_con )
		SetItemAttr ( Item_newJL , ITEMATTR_MAXENERGY , new_MAXENERGY ) 	
		SetItemAttr ( Item_newJL , ITEMATTR_MAXURE , new_MAXURE ) 	
	end

 

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