Jump to content
danny1ma

Manual marriage

Recommended Posts

Scripts Marriage Manual installation

 

Marriage System Manual

 

----------------------------------------------------
----------------------------------------------------
---------------- Manual Install --------------------
----------------------------------------------------
---------------------------------------------------- 
----------------------------------------------------
--------- By Danny1ma ------------------------------
----------------------------------------------------
----------------------------------------------------

-- Marriage Effect -- Skilleffect
function marriage_Add ( role , statelv )
		local month = os.date ("%m")
		local day = os.date ("%d")
		local monthnum = tonumber(month)
		local daynum = tonumber(day)
						
		if monthnum == 02 and daynum == 14 then 
		local statelv = 2 
		local mspdsa_dif =  (statelv * 0.009) * .15
		local mspdsa = (MspdSa(role) + mspdsa_dif) * ATTR_RADIX  
		SetCharaAttr( mspdsa , role , ATTR_STATEV_MSPD ) 


        local strsb_dif = 15 + (15 * .15)
        local strsb = StrSb( role ) + strsb_dif
        SetCharaAttr( strsb , role , ATTR_STATEV_STR )

        local consb_dif = 15 + (15 * .15)
        local consb = ConSb( role ) + consb_dif
        SetCharaAttr( consb , role , ATTR_STATEV_CON )

        local agisb_dif = 15 + (15 * .15)
        local agisb = AgiSb( role ) + agisb_dif
        SetCharaAttr( agisb , role , ATTR_STATEV_AGI )

        local dexsb_dif = 15 + (15 * .15)
        local dexsb = DexSb( role ) + dexsb_dif
        SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )

        local stasb_dif = 15 + (15 * .15)
        local stasb = StaSb( role ) + stasb_dif
        SetCharaAttr( stasb , role , ATTR_STATEV_STA )

		local defsb_dif = 100 + (100 * .15)
		local defsb = DefSb(role) + defsb_dif
		SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) 

		local hrecsb_dif = 30 + (30 * .15)
		local hrecsb = HrecSb(role) + hrecsb_dif
		SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC ) 
		--------Any other day other than valentines
		else
		
		local statelv = 2 
		local mspdsa_dif =  statelv * 0.009
		local mspdsa = (MspdSa(role) + mspdsa_dif) * ATTR_RADIX  
		SetCharaAttr( mspdsa , role , ATTR_STATEV_MSPD ) 


        local strsb_dif = 15
        local strsb = StrSb( role ) + strsb_dif
        SetCharaAttr( strsb , role , ATTR_STATEV_STR )

        local consb_dif = 15
        local consb = ConSb( role ) + consb_dif
        SetCharaAttr( consb , role , ATTR_STATEV_CON )

        local agisb_dif = 15
        local agisb = AgiSb( role ) + agisb_dif
        SetCharaAttr( agisb , role , ATTR_STATEV_AGI )

        local dexsb_dif = 15
        local dexsb = DexSb( role ) + dexsb_dif
        SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )

        local stasb_dif = 15
        local stasb = StaSb( role ) + stasb_dif
        SetCharaAttr( stasb , role , ATTR_STATEV_STA )

		local defsb_dif = 100
		local defsb = DefSb(role) + defsb_dif
		SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) 

		local hrecsb_dif = 30
		local hrecsb = HrecSb(role) + hrecsb_dif
		SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC ) 
	
        ALLExAttrSet(role)
	end		
end 

function marriage_Rem ( role , statelv )
        local month = os.date ("%m")
		local day = os.date ("%d")
		local monthnum = tonumber(month)
		local daynum = tonumber(day)
	if monthnum == 02 and daynum == 14 then 
		local statelv = 2
		local mspdsa_dif =  (statelv * 0.009 ) * .15
		local mspdsa = (MspdSa(role) - mspdsa_dif) *  ATTR_RADIX 
		SetCharaAttr( mspdsa , role , ATTR_STATEV_MSPD ) 

		
        local strsb_dif = 15 + (15 * .15)
        local strsb = StrSb( role ) - strsb_dif
        SetCharaAttr( strsb , role , ATTR_STATEV_STR )

        local consb_dif = 15 + (15 * .15)
        local consb = ConSb( role ) - consb_dif
        SetCharaAttr( consb , role , ATTR_STATEV_CON )
        

        local agisb_dif = 15 + (15 * .15)
        local agisb = AgiSb( role ) - agisb_dif
        SetCharaAttr( agisb , role , ATTR_STATEV_AGI )

        local dexsb_dif = 15 + (15 * .15)
        local dexsb = DexSb( role ) - dexsb_dif
        SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )

        local stasb_dif = 15 + (15 * .15)
        local stasb = StaSb( role ) - stasb_dif
        SetCharaAttr( stasb , role , ATTR_STATEV_STA )

		local defsb_dif = 100 + (100 * .15)
		local defsb = DefSb(role) - defsb_dif
		SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) 

		local hrecsb_dif = 30 + (30 * .15)
		local hrecsb = HrecSb(role) - hrecsb_dif
		SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
	else		

		local statelv = 2
		local mspdsa_dif =  statelv * 0.009 
		local mspdsa = (MspdSa(role) - mspdsa_dif) *  ATTR_RADIX 
		SetCharaAttr( mspdsa , role , ATTR_STATEV_MSPD ) 

		
        local strsb_dif = 15
        local strsb = StrSb( role ) - strsb_dif
        SetCharaAttr( strsb , role , ATTR_STATEV_STR )

        local consb_dif = 15
        local consb = ConSb( role ) - consb_dif
        SetCharaAttr( consb , role , ATTR_STATEV_CON )
        

        local agisb_dif = 15
        local agisb = AgiSb( role ) - agisb_dif
        SetCharaAttr( agisb , role , ATTR_STATEV_AGI )

        local dexsb_dif = 15
        local dexsb = DexSb( role ) - dexsb_dif
        SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )

        local stasb_dif = 15
        local stasb = StaSb( role ) - stasb_dif
        SetCharaAttr( stasb , role , ATTR_STATEV_STA )

		local defsb_dif = 100
		local defsb = DefSb(role) - defsb_dif
		SetCharaAttr( defsb , role , ATTR_STATEV_DEF ) 

		local hrecsb_dif = 30
		local hrecsb = HrecSb(role) - hrecsb_dif
		SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
		ALLExAttrSet(role) 
	end
end

-- Marriage Chest -- itemeffect
function ItemUse_Marriage(role, Item)
	local Item_CanGet = GetChaFreeBagGridNum ( role )
	if Item_CanGet < 1 then
			SystemNotice(role ,"You need at least 1 available slot to open Marriage Chest.")
		UseItemFailed ( role )
		return
	end
		local cha_name = GetChaDefaultName ( role )
		Logs('Marriage Chest', ''..cha_name..' opened Marriage Chest')
		GiveItem ( role , 0 , 2521  , 1 , 1 )
end	

------------------------------------------------------------
-- 						Marriage System					  -- -- Functions
------------------------------------------------------------
function CheckWeddingDress (role)
    local ChaType = GetChaTypeID(role) -- Character Race
    local Body = GetItemID (GetEquipItemP(role, 2)) -- Body
    local Glove = GetItemID (GetEquipItemP(role, 3)) -- Gloves
    local Shoes = GetItemID (GetEquipItemP(role, 4)) -- Boots
    local Hat = GetItemID(GetEquipItemP(role, 0))-- Hat
    -- Lance
    if ChaType == 1 then
        if Body ~= 5221 or Glove ~= 5222 or Shoes ~= 5223 then
            return 0
        end
    -- Carsise
    elseif ChaType == 2 then
        if Body ~= 5238 or Glove ~= 5239 or Shoes ~= 5240 then
            return 0
        end
    -- Phyllis
    elseif ChaType == 3 then
        if Body ~= 5245 or Glove ~= 5246 or Shoes ~= 5247 or Hat ~= 5244 then
            return 0
        end  
    -- Amy
    elseif ChaType == 4 then
        if Body ~= 5253 or  Glove ~= 5254 or Shoes ~= 5255 or Hat ~= 5252 then
            return 0
        end
    end
end
function ValentinesRingJudge(role)
        local Ring_Num = 0
        local t = {}                    --called the target of various teammates
                t[0] = role
                t[1] = GetTeamCha(role, 0 )
                t[2] = GetTeamCha(role, 1 )
                t[3] = GetTeamCha(role, 2 )
                t[4] = GetTeamCha(role, 3 )
        local t_Num = {}                --all teammates who recorded the number of rings
        t_Num[0]        = 0
        t_Num[1]        = 0
        t_Num[2]        = 0
        t_Num[3]        = 0
        t_Num[4]        = 0
        local i = 1
        for i = 1 , 4, 1 do
                if t[i] ~= nil then
                        local Ring_Num_Add = CheckBagItem(  t[i] , 2521 )    
                        if Ring_Num_Add == 1 then

                                local retbag = HasLeaveBagGrid(  t[i], 1)
                                if retbag ~= LUA_TRUE then
                                        BickerNotice(role,"Your partners Inventory is full!")
                                        BickerNotice(t[i],"You need at least 1 free Slot!")
                                        return LUA_FALSE
                                end  
                                local NocLock =KitbagLock( t[i], 0 )
                                if NocLock == LUA_FALSE then
                                        BickerNotice( role , "Your partners Inventory is locked!")
                                        BickerNotice( t[i] , "You need to make sure your inventory is unlocked")
                                        return LUA_FALSE
                                end
                          
                                if CheckWeddingDress(role) == 0 then
                                    BickerNotice(role, "You are not dressed up!")
                                    BickerNotice(t[i], "Your partner is not dressed up")  
                                    return 0
                                end

                                if CheckWeddingDress(t[i]) == 0 then
                                    BickerNotice (role, "Your partner is not dressed up!")
                                    BickerNotice (t[i], "You are not dressed up!")
                                    return 0
                                end
                                t_Num[i] = 1            								--If you have rings, the Value set to 1, so check back for use
                                Ring_Num = Ring_Num + Ring_Num_Add      				--Will ring the ranks of the total number of records for the judge to do with the back
                                local USED_Ring_Num = CheckBagItem(  t[i] , 7408 )      --determine whether this team-mate who has been bound ring
                                if USED_Ring_Num >= 1 then
                                        BickerNotice(role,"Your partner is already married!")
                                        BickerNotice(t[i],"You can only marry once! Get divorced!")
                                        return LUA_FALSE            
                                end
                        end
                end
        end
        if Ring_Num == 1 then                          --if the team ring A total of 1 man and take on this task were combined
                return LUA_TRUE
        elseif Ring_Num > 1 then
                BickerNotice(role,"You need one Valentines Day Ring!")
                return LUA_FALSE
        else
                BickerNotice(role,"Please find someone who has a ring to marry!")
                return LUA_FALSE
        end
end

function ValentinesRing(role)
        local Ring_Num = 0
        local t = {}                    --called the target of various teammates
                t[0] = role
                t[1] = GetTeamCha(role, 0 )
                t[2] = GetTeamCha(role, 1 )
                t[3] = GetTeamCha(role, 2 )
                t[4] = GetTeamCha(role, 3 )
        local t_Num = {}                --all teammates who recorded the number of rings
                t_Num[0]        = 0
                t_Num[1]        = 0
                t_Num[2]        = 0
                t_Num[3]        = 0
                t_Num[4]        = 0
        local i = 1
        for i = 1 , 4, 1 do
                if t[i] ~= nil then
                        local Ring_Num_Add = CheckBagItem(  t[i] , 2521 )   
                        if Ring_Num_Add == 1 then
                                t_Num[i] = 1            --If you have rings, the Value set to 1, so check back for use
                                Ring_Num = Ring_Num + Ring_Num_Add      -- Will ring the ranks of the total number of records for the judge to do with the back
                                local USED_Ring_Num = CheckBagItem(  t[i] , 7408 )      --determine whether this team-mate who has been bound ring
                                if USED_Ring_Num >= 1 then
                                        BickerNotice(role,"Your partner is already married!")
                                        BickerNotice(t[i],"You can marry only once! Get divorced!")
                                        return LUA_FALSE           
                                end
                        end
                end
        end
   
        if Ring_Num == 1 then                          -- if the team ring A total of 1 man and take on this task were combined
                local i = 1
                for i = 1 , 4 ,1 do
                        if t_Num[i] == 1 then
                           
                                --local RoleType = GetChaID(role)
                                --local TeamerType = GetChaID(t[i])
								if (RoleType<=2 and TeamerType>=3) or (RoleType>=3 and TeamerType<=2) then              --sex determination
																						--Players will take the task of information recorded in the other ring Means of
                                        local ID_Num = GetCharID(role)  				--Get access tasks players ID number, and record in the ring in
                                        GiveItem ( t[i] , 0 , 7408  , 1 , 4  )
                                        local a = DelBagItem ( t[i] , 2521 , 1)
                                        local Item = GetChaItem2 ( t[i] , 2 , 7408 )   	--Valentines teammates made the right ring pointer
                                        local Num_JZ = GetItemForgeParam ( Item , 1 )
                                        Num_JZ = TansferNum ( Num_JZ )
                                        Num_JZ = ID_Num 								--with a concise record of information bits Role ID number recorded
                                        SetItemForgeParam ( Item , 1 , Num_JZ )
                                        AddChaSkill ( t[i] , SK_QLZX, 1 , 1 , 0 )					
																						--To record the appropriate information teammates play in the next task Ring in the home
                                        local ID_Num1 = GetCharID(t[i]) 				--Get the right team-mates ID number, and record in the ring in
                                        GiveItem ( role , 0 , 7408  , 1 , 4  )
                                        local b = DelBagItem ( role , 2521 , 1)
                                        local Item1 = GetChaItem2 ( role , 2 , 7408 )  	--made the task then the players Valentines Day ring pointer
                                        local Num_JZ1 = GetItemForgeParam ( Item1 , 1 )
                                        Num_JZ1 = TansferNum ( Num_JZ1 )
                                        Num_JZ1 = ID_Num1      							--Scouring Records the ID number of information bits
                                        SetItemForgeParam ( Item1 , 1 , Num_JZ1 )
                                        AddChaSkill ( role , SK_QLZX, 1 , 1 , 0 )

                                        Notice("<High Priest>: Congrats to the couple, ("..GetChaDefaultName(role).." & "..GetChaDefaultName(t[i])..") for getting married! May you share eternal happiness for the rest of your lives!")
                                        PlayEffect(role, 839)
                                        PlayEffect(t[i], 839)
                                else
                                        BickerNotice(role,"Please note about your gender!")
								end
                        end
                end

                local cha1 = GetChaDefaultName ( role )
                local cha2 = GetChaDefaultName ( t[i] )
            return LUA_TRUE
         
        elseif Ring_Num > 1 then
                BickerNotice(role,"You can only marry one person!")
                return LUA_FALSE
        else
              BickerNotice(role,"Please find someone who has a ring to marry!")
                return LUA_FALSE
        end
end

function MarriageDivorce(role)
	local Ring = CheckBagItem( role, 7408 )
	local Dev = CheckBagItem(role, 7409)
	local RName = 7408
	local DName = 7409
	if Ring > 0 then
	if Dev > 0 then
		TakeItem( role, 0, 7408 , 1 )
		TakeItem( role, 0, 7409 , 1 )
        else
	HelpInfo(role,0,"High Priest:You do not meet the requirements to divorce ! You do not have "..GetItemName(RName).." anymore!")
	end
	else
	HelpInfo(role,0,"High Priest:You do not meet the requirements to divorce ! You do not have a "..GetItemName(DName).." ")
	end
end

function marriage_effect_hook(ignore,role,freq,time)
	Hearts = {}
	Hearts[1] = 355
	Hearts[2] = 370
	Hearts[3] = 354
	Hearts[4] = 355
	Hearts[5] = 356
	
	local x = math.random(1,5)
		
	 local Ring_Num = 0
		local t = {} 
		t[0] = role 
		t[1] = GetTeamCha(role, 0 )  
		t[2] = GetTeamCha(role, 1 )   
		t[3] = GetTeamCha(role, 2 )    
		t[4] = GetTeamCha(role, 3 )
		local i = 1
		local item_count = CheckBagItem ( role , 7408 )
		local item_party = CheckBagItem ( t[i] , 7408)
		local Ring_Num = Ring_Num + item_count
		 if Ring_Num == 1 then
			for i = 1 , 4 , 1 do
				if t[i] ~= nil then
					local statelv = 1
					local statetime = 3600
					if item_count > 0 then
						if item_party > 0 then
						local month = os.date ("%m")
						local day = os.date ("%d")
						local hour = os.date ("%H")
						local minute = os.date ("%M")
						local second = os.date ("%S")
	
						local minutenum = tonumber(minute)
						local hournum = tonumber(hour)
						local secondnum = tonumber(second)
						local monthnum = tonumber(month)
						local daynum = tonumber(day)
						
						if monthnum == 02 and daynum == 14 and minutenum == 05 and secondnum == 00 then
							PlayEffect(role, Hearts[x])
						end
						AddState ( role , role , marriage , statelv , statetime )
						end
					end
				end	
			end
				if t[i] == nil then			
					local statelv_marriage = GetChaStateLv ( role , marriage )
					if statelv_marriage~=0 then
						RemoveState ( role, marriage )
						BickerNotice( role , "<High Priest>: Marriage Effect Disabled!")					
					end
				end
		else	
	end
end
Hook:AddPostHook("cha_timer", marriage_effect_hook,1)	



function RemoveStats( role )
	RemoveState(role, STATE_BBRING1)
	RemoveState(role, STATE_BBRING2)
	RemoveState(role, STATE_BBRING3)
	RemoveState(role, STATE_BBRING4)
	RemoveState(role, STATE_BBRING5)
	RemoveState(role, STATE_BBRING6)
	RemoveState(role, STATE_BBRING7)
	RemoveState(role , STATE_ROSO1 )
	RemoveState(role , STATE_ROSO2 )
	RemoveState(role , STATE_ROSO3 )
	RemoveState(role , STATE_ROSO4 )
	RemoveState(role , STATE_ROSO5 )
	RemoveState(role , STATE_ROSO6 )
	RemoveState(role , STATE_ROSO7 )
	RemoveState(role , STATE_ROSO8 )
	RemoveState(role , STATE_ROSO9 )
	RemoveState(role, marriage )
	RemoveState(role , STATE_VIPSET)
	return 1 
end



--Iteminfo

7408	Marriage Certificate	n1785	10130005	0	0	0	0	0	0	41	0	0	0	0	0	0	0	0	0	1	0	0	-1,-2,-2,-2	0	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2	0	0	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0	0,0	0,0	0	0	0	0	0	0	0	0	0	0	0	0	0	0,0	0	0	This here certificate proves that you are married! I cannot be deleted unless you wish to be divorced! If you want to be divorced, please go see the priest at Church!	0
7409	Divorce Certificate	Dcerti	10130005	0	0	0	0	0	0	41	0	0	0	0	0	0	0	0	0	1	0	0	-1,-2,-2,-2	0	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2	0	0	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0	0,0	0,0	0	0	0	0	0	0	0	0	0	0	0	0	0	0,0	0	0	You will need to show me to the priest, in order to prove that you can be divorced!	0
2521	Valentine's Day Ring	n2119	10130005	0	0	0	0	0	0	41	0	0	0	0	1	0	0	0	0	1	0	0	-1,-2,-2,-2	0	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2	0	0	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2	-1,-2,-2,-2,-2,-2,-2,-2,-2,-2	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0	0,0	0,0	0	0	0	0	0	0	0	0	0	0	0	0	0	0,0	0	0	Go with your soulmate to find Magician and ask him to enchant the ring.	0
---
--- NPC

----------------------
--Church NPCs
---------------------
--Cleaner
function npc_talk01()

	Talk( 1, "Cleaner: Hello! What a happy day to start a new life with the person you love!" )

end

--Monk - Lisa
function npc_talk02()

	Talk( 1, "Monk - Lisa: My name it's such artistic. Dont you think so?")

end

--Little Boy
function npc_talk03()

	Talk( 1, "Little Boy: Nobody wants to play with me. In moments like this I rather be emo.")

end

--Kidsnapper
function npc_talk04()

	Talk( 1, "Kidsnapper: To many children around, and there are not parents to care of them. This is going to be easy.")
	
end

--Luca Tony
function npc_talk05 ()

	Talk( 1, "Luca Tony: What the hell!! Means these pictures? Just wondering, What was Moliyo developer smoking when he designed this.")

end

--Richardson
function npc_talk06 ()

	Talk( 1, "Richardson: A happy couple! So cute... Now buy one of my products to celebrate!")
	Text( 1, "Trade", BuyPage)
	
	InitTrade()
	Other(	3343	)--Rose
	Other(	3344	)--Lovers Chocolate
	Other(	3345	)--Firecracker A
	Other(	3346	)--Firecracker B
	Other(	3347	)--Firecracker C
	Other(	3348	)--Firework A
	Other(	3349	)--Firework B
	Other(	3350	)--Firework C
	Other(	3351	)--Royal Salute A
	Other(	3352	)--Royal Salute B
	Other(	3353	)--Royal Salute C
	Other(	3354	)--Heart Shape I
	Other(	3355	)--Heart Shape LOVE
	Other(	3356	)--Heart Shape U
end

--Granny Mila
function npc_talk07()

	Talk( 1, "Granny Mila: Hello! I always pray here, and if you sit in the seat behind me, you will have bad luck for 3 days!")

end

-----------------------
--Npc Function Priest--
-----------------------
function Priest()
	Talk( 1, "High Priest: I am very happy to see you around, you had finally decided to devote the word of God?")
	Text( 1, "Buy Apparel", BuyPage)
	Text( 1, "I wish to marry", JumpPage, 2)
	Text( 1, "I wish to divorce", JumpPage, 6)
	Text( 1, "What I need to get married?", JumpPage, 5)
	Text( 1, "Nevermind i just check it.", CloseTalk)

	Talk( 2, "High Priest: Nice to hear that these days! To marry first you need to get the Certificate, and that is not a easy task. You need to show us that you are ready to start a new life and a family with the person you love!")
	Text( 2, "We are ready to get married!", JumpPage, 3)
 
	Talk (3, "High Priest: Please find your lover, and team with him up than you may live together happy!") 
	InitTrigger () 
	TriggerCondition (1, HasItem, 2521, 1) 
	TriggerCondition (1, ValentinesRingJudge) 
	TriggerCondition (1, HasLeaveBagGrid, 1) 
	TriggerCondition (1, KitbagLock, 0) 
	TriggerAction (1, ValentinesRing) 
	TriggerFailure (1, JumpPage, 4) 	
	Text (3, "Yes I want to marry!", MultiTrigger, GetMultiTrigger (), 1) 
	
	Talk (4, "High Priest: I believe you do not meet the requirments to marry this person!") 
	Text (4, "Back", JumpPage, 1) 
	
	Talk (5, "You need the Valentine's Day Ring and to be in Party with your Sweetheart! You must also be wearing your tuxedo and wedding dress! Then come to me to do the further process!") 
	Text (5, "Back", JumpPage, 1) 
		
	Talk (6, "High Priest: You sure you want to divorce? ")
	Text (6, "Yes I am Sure!", MarriageDivorce)

	Talk (7, "High Priest: I believe you do not meet the requirments to divorce this person!") 
	Text (7, "Back", JumpPage, 1) 
	

	InitTrade()
	Weapon()
	Weapon(5221)
	Weapon(5222)
	Weapon(5223)	
	Weapon()
	Weapon(5238)
	Weapon(5239)
	Weapon(5240)	
	Weapon(5244)
	Weapon(5245)
	Weapon(5246)
	Weapon(5247)
	Weapon(5252)
	Weapon(5253)
	Weapon(5254)
	Weapon(5255)
	Other(7409)
	
end

function npc_talk09()

	Talk( 1, "Monk - Eli: I am not able to give you the bless of God yet, but who cares?")

	InitTrigger()
	TriggerAction( 1, ReAll )
	Text( 1, "Bless me anyway!", MultiTrigger,GetMultiTrigger(),1)

end


function npc_priest()
	Talk( 1, "Priest - Maylada: Hi! I am Priest Maylada, tell me when you need to purify your soul in the Church." )
	Text( 1, "How to go Church?", JumpPage, 2)
	Text( 1, "Never Mind",  CloseTalk)
	Talk( 2, "Priest - Maylada: To access the Church, you need a Church Visit Ticket." )
	Text( 2, "Purchase Church Visit Ticket", JumpPage, 3)
	
	
	Talk (3, "Priest - Maylada: In order to purchase church visit ticket, i will need 300,000 gold") 
	InitTrigger () 
	TriggerCondition (1, HasMoney, 300000) 
	TriggerCondition (1, KitbagLock, 0) 
	TriggerCondition (1, HasLeaveBagGrid, 1) 
	TriggerAction (1, TakeMoney, 300000) 
	TriggerAction (1, GiveItem, 3024, 1, 4) 
	TriggerFailure (1, JumpPage, 4) 
	Text (3, "Purchase!", MultiTrigger, GetMultiTrigger (), 1) 

	Talk( 4, "Priest - Maylada: Something went wrong. You don't have 300,000 gold!" )
end

----------------------------------------------------------
--	Holy Priestess - Ada
----------------------------------------------------------
function r_talk70 ()
	Talk( 1, "Ada: Hi, friend from afar. May the Goddess be with you. I am High Priestess Ada." )

	AddNpcMission ( 756 )
	AddNpcMission ( 341 )
	AddNpcMission ( 356 )
	AddNpcMission ( 357 )
	AddNpcMission ( 521 )
	AddNpcMission ( 539 )
	AddNpcMission ( 540 )
	AddNpcMission ( 541 )
	AddNpcMission ( 552 )
	AddNpcMission ( 553 )
	AddNpcMission ( 556 )

end 


----------------------------------------------------------
--	Highest Priest
---------------------------------
function r_talk47 ()
	Talk( 1, "Gannon: Hello, my friend. May the Goddess Kara bless you. I'm High Priest Gannon of Shaitan City" )
	Text( 1, "Research Runestone", JumpPage, 2)
	Text( 1, "Combine Treasure Map", JumpPage, 7)
	Text( 1, "Illusion Fragment to change a Blueprint", JumpPage, 9)
	Text( 1, "Illusion Heart to exchange for Lv 60 ring", JumpPage, 10)

	Talk( 2, "Gannon: I am doing some research on ancient runestones. If you bring me enough, I will exchange them for something good." )
	Text( 2, "Regarding Skeletar set items", JumpPage, 3)
	Text( 2, "Regarding Incantation set", JumpPage, 4)
	Text( 2, "Regarding Evanescence set items", JumpPage, 5)
	Text( 2, "Regarding Enigma set items", JumpPage, 6)
	
	Talk( 3, "Gannon: Skeletar set items belong to Lv 30 equipments from Forsaken City. You will need to pass me 10 Nal Runestones and 10 Sol Runestones. You can select the related class too." )

	InitTrigger()
	TriggerCondition( 1, HasItem, 3425, 10 )
	TriggerCondition( 1, HasItem, 3426, 10 )
	TriggerAction( 1, TakeItem, 3425, 10 )
	TriggerAction( 1, TakeItem, 3426, 10 )
	TriggerAction( 1, GiveItem, 3400, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 3, "Obtain Swordsman equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3425, 10 )
	TriggerCondition( 1, HasItem, 3426, 10 )
	TriggerAction( 1, TakeItem, 3425, 10 )
	TriggerAction( 1, TakeItem, 3426, 10 )
	TriggerAction( 1, GiveItem, 3401, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 3, "Obtained Hunter equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3425, 10 )
	TriggerCondition( 1, HasItem, 3426, 10 )
	TriggerAction( 1, TakeItem, 3425, 10 )
	TriggerAction( 1, TakeItem, 3426, 10 )
	TriggerAction( 1, GiveItem, 3402, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 3, "Obtained Herbalist equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3425, 10 )
	TriggerCondition( 1, HasItem, 3426, 10 )
	TriggerAction( 1, TakeItem, 3425, 10 )
	TriggerAction( 1, TakeItem, 3426, 10 )
	TriggerAction( 1, GiveItem, 3403, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 3, "Obtained Explorer equipment", MultiTrigger, GetMultiTrigger(), 1)

	Talk( 4, "Gannon: Incantation set items are Lv 40 equipments from Forsaken City and Dark Swamp. You need to bring me 10 El Runestone and 10 Cam Runestone in exchange. You can select the class for the equipment." )

	InitTrigger()
	TriggerCondition( 1, HasItem, 3428, 10 )
	TriggerCondition( 1, HasItem, 3429, 10 )
	TriggerAction( 1, TakeItem, 3428, 10 )
	TriggerAction( 1, TakeItem, 3429, 10 )
	TriggerAction( 1, GiveItem, 3404, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 4, "Obtained Crusader equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3428, 10 )
	TriggerCondition( 1, HasItem, 3429, 10 )
	TriggerAction( 1, TakeItem, 3428, 10 )
	TriggerAction( 1, TakeItem, 3429, 10 )
	TriggerAction( 1, GiveItem, 3405, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 4, "Obtained Champion equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3428, 10 )
	TriggerCondition( 1, HasItem, 3429, 10 )
	TriggerAction( 1, TakeItem, 3428, 10 )
	TriggerAction( 1, TakeItem, 3429, 10 )
	TriggerAction( 1, GiveItem, 3406, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 4, "Obtained Sharpshooter equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3428, 10 )
	TriggerCondition( 1, HasItem, 3429, 10 )
	TriggerAction( 1, TakeItem, 3428, 10 )
	TriggerAction( 1, TakeItem, 3429, 10 )
	TriggerAction( 1, GiveItem, 3407, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 4, "Obtain Cleric equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3428, 10 )
	TriggerCondition( 1, HasItem, 3429, 10 )
	TriggerAction( 1, TakeItem, 3428, 10 )
	TriggerAction( 1, TakeItem, 3429, 10 )
	TriggerAction( 1, GiveItem, 3408, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 4, "Obtained Seal Master equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3428, 10 )
	TriggerCondition( 1, HasItem, 3429, 10 )
	TriggerAction( 1, TakeItem, 3428, 10 )
	TriggerAction( 1, TakeItem, 3429, 10 )
	TriggerAction( 1, GiveItem, 3409, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 4, "Obtained Voyager equipment", MultiTrigger, GetMultiTrigger(), 1)

	Talk( 5, "Gannon: Incantation set items belonged to Demonic World Lv50 equipments. You will need to pass me 10 Ja Runestones and 10 Tef Runestones. You can select the related class too." )

	InitTrigger()
	TriggerCondition( 1, HasItem, 3427, 10 )
	TriggerCondition( 1, HasItem, 3430, 10 )
	TriggerAction( 1, TakeItem, 3427, 10 )
	TriggerAction( 1, TakeItem, 3430, 10 )
	TriggerAction( 1, GiveItem, 3410, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 5, "Obtained Crusader equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3427, 10 )
	TriggerCondition( 1, HasItem, 3430, 10 )
	TriggerAction( 1, TakeItem, 3427, 10 )
	TriggerAction( 1, TakeItem, 3430, 10 )
	TriggerAction( 1, GiveItem, 3411, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 5, "Obtained Champion equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3427, 10 )
	TriggerCondition( 1, HasItem, 3430, 10 )
	TriggerAction( 1, TakeItem, 3427, 10 )
	TriggerAction( 1, TakeItem, 3430, 10 )
	TriggerAction( 1, GiveItem, 3412, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 5, "Obtained Sharpshooter equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3427, 10 )
	TriggerCondition( 1, HasItem, 3430, 10 )
	TriggerAction( 1, TakeItem, 3427, 10 )
	TriggerAction( 1, TakeItem, 3430, 10 )
	TriggerAction( 1, GiveItem, 3413, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 5, "Obtain Cleric equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3427, 10 )
	TriggerCondition( 1, HasItem, 3430, 10 )
	TriggerAction( 1, TakeItem, 3427, 10 )
	TriggerAction( 1, TakeItem, 3430, 10 )
	TriggerAction( 1, GiveItem, 3414, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 5, "Obtained Seal Master equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3427, 10 )
	TriggerCondition( 1, HasItem, 3430, 10 )
	TriggerAction( 1, TakeItem, 3427, 10 )
	TriggerAction( 1, TakeItem, 3430, 10 )
	TriggerAction( 1, GiveItem, 3415, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 5, "Obtained Voyager equipment", MultiTrigger, GetMultiTrigger(), 1)

	Talk( 6, "Gannon: Enigma set items belonged to Demonic World Lv60 equipments. You will need to pass me 10 Ter Runestones and 10 Fa Runestones. You can select the related class too." )

	InitTrigger()
	TriggerCondition( 1, HasItem, 3455, 10 )
	TriggerCondition( 1, HasItem, 3456, 10 )
	TriggerAction( 1, TakeItem, 3455, 10 )
	TriggerAction( 1, TakeItem, 3456, 10 )
	TriggerAction( 1, GiveItem, 3416, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 6, "Obtained Crusader equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3455, 10 )
	TriggerCondition( 1, HasItem, 3456, 10 )
	TriggerAction( 1, TakeItem, 3455, 10 )
	TriggerAction( 1, TakeItem, 3456, 10 )
	TriggerAction( 1, GiveItem, 3417, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 6, "Obtained Champion equipment", MultiTrigger, GetMultiTrigger(), 1)
	
	InitTrigger()
	TriggerCondition( 1, HasItem, 3455, 10 )
	TriggerCondition( 1, HasItem, 3456, 10 )
	TriggerAction( 1, TakeItem, 3455, 10 )
	TriggerAction( 1, TakeItem, 3456, 10 )
	TriggerAction( 1, GiveItem, 3418, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 6, "Obtained Sharpshooter equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3455, 10 )
	TriggerCondition( 1, HasItem, 3456, 10 )
	TriggerAction( 1, TakeItem, 3455, 10 )
	TriggerAction( 1, TakeItem, 3456, 10 )
	TriggerAction( 1, GiveItem, 3419, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 6, "Obtain Cleric equipment", MultiTrigger, GetMultiTrigger(), 1)
	
	InitTrigger()
	TriggerCondition( 1, HasItem, 3455, 10 )
	TriggerCondition( 1, HasItem, 3456, 10 )
	TriggerAction( 1, TakeItem, 3455, 10 )
	TriggerAction( 1, TakeItem, 3456, 10 )
	TriggerAction( 1, GiveItem, 3420, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 6, "Obtained Seal Master equipment", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 3455, 10 )
	TriggerCondition( 1, HasItem, 3456, 10 )
	TriggerAction( 1, TakeItem, 3455, 10 )
	TriggerAction( 1, TakeItem, 3456, 10 )
	TriggerAction( 1, GiveItem, 3421, 1 , 4)
	TriggerFailure( 1, JumpPage, 30 )
	Text( 6, "Obtained Voyager equipment", MultiTrigger, GetMultiTrigger(), 1)
 
	InitTrigger()
	TriggerCondition( 1, HasItem, 0432, 1 )
	TriggerCondition( 1, HasItem, 0433, 1 )
	TriggerCondition( 1, HasItem, 0434, 1 )
	TriggerCondition( 1, HasItem, 0435, 1 )
	TriggerCondition( 1, HasMoney, 2000 )
	TriggerAction( 1, TakeItem, 0432, 1 )
	TriggerAction( 1, TakeItem, 0433, 1 )
	TriggerAction( 1, TakeItem, 0434, 1 )
	TriggerAction( 1, TakeItem, 0435, 1 )
	TriggerAction( 1, TakeMoney, 2000 )
	TriggerAction( 1, GiveItem, 1092, 1, 4 )
	TriggerFailure( 1, JumpPage, 8 ) 

	Talk( 7, "Gannon: Bring the 4 map fragments to me and I will combine a complete treasure map for you." )
	Text( 7, "Combine Treasure Map",MultiTrigger, GetMultiTrigger(), 1) 
	Talk( 8, "Gannon: When you have collected the 4 separate maps, look for me and bring along 2000G." )

	InitTrigger()
	TriggerCondition( 1, HasItem, 2324, 5 )
	TriggerCondition( 1, HasLeaveBagGrid, 1 )
	TriggerCondition( 1, KitbagLock, 0 )
	TriggerAction( 1, TakeItem, 2324, 5 )
	TriggerAction( 1, GiveItem, 1000, 1 , 4)
	TriggerFailure( 1, JumpPage, 11 )
	Talk( 9, "Gannon: Ah? Can you give me your Fragment? It will be worth your while." )
	Text( 9, "5 Illusion Fragments to exchange for 1 Burry Blueprint", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 2324, 30 )
	TriggerCondition( 1, HasLeaveBagGrid, 1 )
	TriggerCondition( 1, KitbagLock, 0 )
	TriggerAction( 1, TakeItem, 2324, 30 )
	TriggerAction( 1, GiveItem, 1001, 1 , 4)
	TriggerFailure( 1, JumpPage, 11 )
	Text( 9, "30 Illusion Fragments to exchange for 1 Encrypted Blueprint ", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 2324, 100 )
	TriggerCondition( 1, HasLeaveBagGrid, 1 )
	TriggerCondition( 1, KitbagLock, 0 )
	TriggerAction( 1, TakeItem, 2324, 100 )
	TriggerAction( 1, GiveItem, 1002, 1 , 4)
	TriggerFailure( 1, JumpPage, 11 )
	Text( 9, "100 Illusion Fragments to exchange for 1 Sealed Blueprint", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 2324, 500 )
	TriggerCondition( 1, HasLeaveBagGrid, 1 )
	TriggerCondition( 1, KitbagLock, 0 )
	TriggerAction( 1, TakeItem, 2324, 500 )
	TriggerAction( 1, GiveItem, 1003, 1 , 4)
	TriggerFailure( 1, JumpPage, 11 )
	Text( 9, "500 Illusion Fragments to exchange for 1 Invocation Blueprint", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 2325, 1 )
	TriggerCondition( 1, HasLeaveBagGrid, 1 )
	TriggerCondition( 1, KitbagLock, 0 )
	TriggerAction( 1, TakeItem, 2325, 1 )
	TriggerAction( 1, GiveItem, 4656, 1 , 4)
	TriggerFailure( 1, JumpPage, 11 )
	Talk( 10, "Gannon: Its such a beautiful Illusion Heart. Let me use this ring to exchange." )
	Text( 10, "Exchanged Flame of Fury", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 2325, 1 )
	TriggerCondition( 1, HasLeaveBagGrid, 1 )
	TriggerCondition( 1, KitbagLock, 0 )
	TriggerAction( 1, TakeItem, 2325, 1 )
	TriggerAction( 1, GiveItem, 4657, 1 , 4)
	TriggerFailure( 1, JumpPage, 11 )
	Text( 10, "Redeem Stable Cliff", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 2325, 1 )
	TriggerCondition( 1, HasLeaveBagGrid, 1 )
	TriggerCondition( 1, KitbagLock, 0 )
	TriggerAction( 1, TakeItem, 2325, 1 )
	TriggerAction( 1, GiveItem, 4658, 1 , 4)
	TriggerFailure( 1, JumpPage, 11 )
	Text( 10, "Redeem Wind of the Gentle Soul", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 2325, 1 )
	TriggerCondition( 1, HasLeaveBagGrid, 1 )
	TriggerCondition( 1, KitbagLock, 0 )
	TriggerAction( 1, TakeItem, 2325, 1 )
	TriggerAction( 1, GiveItem, 4659, 1 , 4)
	TriggerFailure( 1, JumpPage, 11 )
	Text( 10, "Redeem Entwined Rattan", MultiTrigger, GetMultiTrigger(), 1)

	InitTrigger()
	TriggerCondition( 1, HasItem, 2325, 1 )
	TriggerCondition( 1, HasLeaveBagGrid, 1 )
	TriggerCondition( 1, KitbagLock, 0 )
	TriggerAction( 1, TakeItem, 2325, 1 )
	TriggerAction( 1, GiveItem, 4660, 1 , 4)
	TriggerFailure( 1, JumpPage, 11 )
	Text( 10, "Redeem Water of Miracle", MultiTrigger, GetMultiTrigger(), 1)

	Talk( 11, "You do not have the items required for exchanging, or your inventory might be binded or you do not have sufficient inventory slots." )

	AddNpcMission ( 102 )
	AddNpcMission ( 416 )
	AddNpcMission ( 751 )
	AddNpcMission ( 755 )
	AddNpcMission ( 95 )
	AddNpcMission ( 96 )
	AddNpcMission ( 97 )
	AddNpcMission ( 151 )
	AddNpcMission ( 1227 )
	AddNpcMission ( 342 )
	AddNpcMission ( 343 )
	AddNpcMission ( 344 )
	AddNpcMission ( 345 )
	AddNpcMission ( 346 )
	AddNpcMission ( 347 )
	AddNpcMission ( 348 )
	AddNpcMission ( 349 )
	AddNpcMission ( 350 )
	AddNpcMission ( 351 )
	AddNpcMission ( 352 )
	AddNpcMission ( 353 )
	AddNpcMission ( 354 )
	AddNpcMission ( 355 )
	AddNpcMission ( 5009 )
	AddNpcMission ( 5015 )
	AddNpcMission ( 5017 )
	AddNpcMission ( 5024 )
	AddNpcMission ( 5028 )
	AddNpcMission ( 5031 )
	AddNpcMission ( 5059 )
	AddNpcMission ( 5064 )
	
end 

 function el_talk15 () 
 Talk (1, "magic summer: I dream to be a friend Pei cruel devil killed Locke. Brave soldier, if you can find for me the soul of my friend on behalf of the seven letters PEIMENG. I will take the collection of many years I give you the magic box. ") 
 
 Text (1, "I would like to give me the magic ring", JumpPage, 2) 

 AddNpcMission (6139) 
 AddNpcMission (6161) 
 AddNpcMission (6166) 
 
 Talk (2, "said magician: Please find your lover, and a good team group, and then loudly singing to find a good man to marry a bar.") 
 InitTrigger () 
 TriggerCondition (1, HasItem, 2521, 1) ------------------ mall to buy Valentine's Day Ring 
 TriggerCondition (1, ValentinesRingJudge) 
 TriggerCondition (1, HasLeaveBagGrid, 1) 
 TriggerCondition (1, KitbagLock, 0) 
 TriggerAction (1, ValentinesRing) 
 TriggerFailure (1, JumpPage, 3) 
 Text (2, "marry a good man to find it, although I did not mind ... ...", MultiTrigger, GetMultiTrigger (), 1) 
 Talk (3, "Where is the problem? Check whether the conditions to meet you") 
 Text (3, "Back", JumpPage, 2) 
 end 

 --High Priest
function npc_talk08()

	Talk( 1, "High Priest: I am very happy to see you around, you had finally decided to devote the word of God?")
	Text( 1, "I am looking forward to Marry.", JumpPage, 2)
	Text( 1, "What I need to marry!", JumpPage, 5)
	Text( 1, "Nah I have nothing to do here.", CloseTalk)

	Talk( 2, "High Priest: Nice to hear that these days! To marry first you need to get the Certificate, and that is not a easy task. You need to show us that you are ready to start a new life and a family with the person you love!")
	Text( 2, "I am ready!", JumpPage, 3)
 
	Talk (3, "High Priest: Please find your lover, and team with him up than you may live togher happy!.") 
	InitTrigger () 
	TriggerCondition (1, HasItem, 2521, 1) ------------------ mall to buy Valentine's Day Ring 
	TriggerCondition (1, ValentinesRingJudge) 
	TriggerCondition (1, HasLeaveBagGrid, 1) 
	TriggerCondition (1, KitbagLock, 0) 
	TriggerAction (1, ValentinesRing) 
	TriggerFailure (1, JumpPage, 4) 
	Text (3, "Yes I want to marry!", MultiTrigger, GetMultiTrigger (), 1) 
	Talk (4, "Where is the problem? Check whether you meet the condtions!") 
	Text (4, "Back", JumpPage, 2) 
	Talk (5, "You need the Valentine's Day Ring and to be in Party with your Sweetheart than come to me to do the further process!") 
	Text (5, "Back", JumpPage, 1) 

end

--- NPC - Magsea

24	Holy Priestess - Ada	1	430	0	86248,330381	86248,330381	159	Old Shaitan City	14	0	r_talk70	0
99	Nun-Maylada	1	430	0	82300,353400	82300,353400	45	Shaitan City	13	0	npc_priest	0
1	High Priest - Gannon	1	23	0	86299,350092	86299,350092	264	Shaitan City	13	0	r_talk47	0
-- Missionsdk

			elseif conditions[i].func == ValentinesRingJudge then
				PRINT( "ConditionsTest:ValentinesRingJudge, p1 = ", conditions[i].p1 )
				local ret = ValentinesRingJudge( character, conditions[i].p1 )
				if ret ~= LUA_TRUE then
					PRINT( "ConditionsTest:ValentinesRingJudge = false" )
					return LUA_FALSE
				end
				
	PRINT( "AcceptMission:npcid = %d ", npcid )
	if mission.tp == NOMAL_MISSION or mission.tp == WORLD_MISSION then
		PRINT( "AcceptMission:Required number of empty slots in inventory:numgrid = ", mission.begin.baggrid )
		local ret = HasLeaveBagGrid( character, mission.begin.baggrid )
		if ret ~= LUA_TRUE then
			PRINT( "AcceptMission:insufficient inventory slot when character accept quest! num = ", mission.begin.baggrid )
			BickerNotice( character, "Inventory space insufficient, requires "..mission.begin.baggrid.." space. Activation of quest failed!" )
			return LUA_FALSE
		end
		
				PRINT( "AcceptMission:Required number of empty slots in inventory:numgrid = ", mission.missionlist[tpindex].begin.baggrid )
		local numgrid = mission.missionlist[tpindex].begin.baggrid
		local ret = HasLeaveBagGrid( character, numgrid )
		if ret ~= LUA_TRUE then
			PRINT( "AcceptMission:insufficient inventory slot when character accept quest! num = ", numgrid )
			BickerNotice( character, "Inventory space insufficient, requires "..numgrid.." space. Activation of quest failed!" )
			return LUA_FALSE
		end
		
			if mission.tp == NOMAL_MISSION or mission.tp == WORLD_MISSION then
		PRINT( "CompleteMission:Required number of empty slots in inventory:numgrid = ", mission.result.baggrid )
		local ret = HasLeaveBagGrid( character, mission.result.baggrid )
		if ret ~= LUA_TRUE then
			PRINT( "CompleteMission:insufficient inventory slot when character completes quest!num = ", mission.result.baggrid )
			BickerNotice( character, "Inventory space insufficient, requires "..mission.result.baggrid.."1 slot. Completion of quest failed!" )
			return LUA_FALSE
		end
		
				PRINT( "CompleteMission:Required number of empty slots in inventory:numgrid = ", mission.missionlist[index].result.baggrid )
		local numgrid = mission.missionlist[index].result.baggrid
		local ret = HasLeaveBagGrid( character, numgrid )
		if ret ~= LUA_TRUE then
			PRINT( "CompleteMission:insufficient inventory slot when character accept quest! num = ", numgrid )
			BickerNotice( character, "Inventory space insufficient, requires "..numgrid.."1 slot. Completion of quest failed!" )
			return LUA_FALSE
		end
		
		
					elseif conditions[i].func == HasLeaveBagGrid then
				PRINT( "ConditionsTest:HasLeaveBagGrid, p1 =", conditions[i].p1 )
				local ret = HasLeaveBagGrid( character, conditions[i].p1 )
				if ret ~= LUA_TRUE then
					PRINT( "ConditionsTest:HasLeaveBagGrid = false" )
					return LUA_FALSE
				end
				
					PRINT( "CreateRandMission:Required number of empty slots in inventory:numgrid = ", mission.missionlist[tpindex].begin.baggrid )
	local numgrid = mission.missionlist[tpindex].begin.baggrid
	local ret = HasLeaveBagGrid( character, numgrid )
	if ret ~= LUA_TRUE then
		PRINT( "CreateRandMission:insufficient inventory slot when character accept quest! num = ", numgrid )
		BickerNotice( character, "Inventory space insufficient, requires "..numgrid.." space. Activation of quest failed!" )
		return LUA_FALSE, 0
	end
	
	
				elseif conditions[i].func == KitbagLock then
				PRINT( "ConditionsTest:KitbagLock, p1 = ", conditions[i].p1 )
				local ret = KitbagLock( character, conditions[i].p1 )
				if ret ~= LUA_TRUE then
					PRINT( "ConditionsTest:KitbagLock = false" )
					return LUA_FALSE
				end	
				
							elseif conditions[i].func == ValentinesRing then
				PRINT( "ConditionsTest:ValentinesRing, p1 = ", conditions[i].p1 )
				local ret = ValentinesRing( character, conditions[i].p1 )
				if ret ~= LUA_TRUE then
					PRINT( "ConditionsTest:ValentinesRing = false" )
					return LUA_FALSE
				end	
				
							elseif conditions[i].func == ValentinesRingJudge then
				PRINT( "ConditionsTest:ValentinesRingJudge, p1 = ", conditions[i].p1 )
				local ret = ValentinesRingJudge( character, conditions[i].p1 )
				if ret ~= LUA_TRUE then
					PRINT( "ConditionsTest:ValentinesRingJudge = false" )
					return LUA_FALSE
				end
				
						elseif actions[i].func == ValentinesRing then
			PRINT( "ActionsProc:ValentinesRing, p1 = ", actions[i].p1 )
			local ret = ValentinesRing( character, actions[i].p1 )
			if ret ~= LUA_TRUE then
				PRINT( "ActionsProc:ValentinesRing failed!" )
				SystemNotice( character, "ActionsProc:ValentinesRing failed!" )
				return LUA_FALSE
			end
				
				--NPCSDK
				
					elseif usCmd == CMD_CM_BLACKMARKET_EXCHANGE_REQ then --黑市兑换
		local timeNum = ReadWord( rpk )
		local srcID = ReadWord( rpk )
		local srcNum = ReadWord( rpk )
		local tarID = ReadWord( rpk )
		local tarNum = ReadWord( rpk )
		local byIndex = ReadWord( rpk )
		
		local ret = KitbagLock( character, 0 )
		if ret ~= LUA_TRUE then
			SystemNotice( character, "Inventory is binded. Unable to redeem" )
			return
		end

 

Edited by danny1ma
  • Like 3

Share this post


Link to post
Share on other sites

i have problem whit chuch map sir can u help me!! i cant load the map idk if there is a problem on scriptdefine , miscript or bith lua can u help me???

Share this post


Link to post
Share on other sites
В 12.09.2016 в 18:30, danny1ma сказал:

7408 Marriage Certificate n1785 10130005 0 0 0 0 0 0 41 0 0 0 0 0 0 0 0 0 1 0 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0 0 This here certificate proves that you are married! I cannot be deleted unless you wish to be divorced! If you want to be divorced, please go see the priest at Church! 0 7409 Divorce Certificate Dcerti 10130005 0 0 0 0 0 0 41 0 0 0 0 0 0 0 0 0 1 0 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0 0 You will need to show me to the priest, in order to prove that you can be divorced! 0 2521 Valentine's Day Ring n2119 10130005 0 0 0 0 0 0 41 0 0 0 0 1 0 0 0 0 1 0 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0 0 Go with your soulmate to find Magician and ask him to enchant the ring. 0 

i cant compile this

Share this post


Link to post
Share on other sites
5 hours ago, Mesut said:

i cant compile this

7408 Marriage Certificate n1785 10130005 0 0 0 0 0 0 41 0 0 0 0 0 0 0 0 0 1 0 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0 0 This here certificate proves that you are married! I cannot be deleted unless you wish to be divorced! If you want to be divorced, please go see the priest at Church! 
7409 Divorce Certificate Dcerti 10130005 0 0 0 0 0 0 41 0 0 0 0 0 0 0 0 0 1 0 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0 0 You will need to show me to the priest, in order to prove that you can be divorced!
2521 Valentine's Day Ring n2119 10130005 0 0 0 0 0 0 41 0 0 0 0 1 0 0 0 0 1 0 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0 0 Go with your soulmate to find Magician and ask him to enchant the ring.

compile now

Share this post


Link to post
Share on other sites

Hello @gunnapong,

 

Have you added custom functions to MissionSdk.lua?

							elseif conditions[i].func == ValentinesRing then
				PRINT( "ConditionsTest:ValentinesRing, p1 = ", conditions[i].p1 )
				local ret = ValentinesRing( character, conditions[i].p1 )
				if ret ~= LUA_TRUE then
					PRINT( "ConditionsTest:ValentinesRing = false" )
					return LUA_FALSE
				end	
				
							elseif conditions[i].func == ValentinesRingJudge then
				PRINT( "ConditionsTest:ValentinesRingJudge, p1 = ", conditions[i].p1 )
				local ret = ValentinesRingJudge( character, conditions[i].p1 )
				if ret ~= LUA_TRUE then
					PRINT( "ConditionsTest:ValentinesRingJudge = false" )
					return LUA_FALSE
				end
						elseif actions[i].func == ValentinesRing then
			PRINT( "ActionsProc:ValentinesRing, p1 = ", actions[i].p1 )
			local ret = ValentinesRing( character, actions[i].p1 )
			if ret ~= LUA_TRUE then
				PRINT( "ActionsProc:ValentinesRing failed!" )
				SystemNotice( character, "ActionsProc:ValentinesRing failed!" )
				return LUA_FALSE
			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...