Fajar 1 Report post Posted December 12, 2016 [System]npc[High Priest]script info manage function [NpcProc]transefer failed! <<=== HOW TO FIX THAT? PLEASE HELP ME.. NB: AND IM SORRY I HAVE A PROBLEM TO UPLOAD MY PICTURE Quote Share this post Link to post Share on other sites
Guest Report post Posted December 13, 2016 Upload your Npc Scripts (High Priest) and marriage scripts. Quote Share this post Link to post Share on other sites
Fajar 1 Report post Posted December 13, 2016 (edited) 8 hours ago, qwerty said: Upload your Npc Scripts (High Priest) and marriage scripts. @qwerty NPC SCRIPT (HIGH 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 Edited December 13, 2016 by Fajar Quote Share this post Link to post Share on other sites
Fajar 1 Report post Posted December 13, 2016 50 minutes ago, qwerty said: Upload your Npc Scripts (High Priest) and marriage scripts. 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 Quote Share this post Link to post Share on other sites
Fajar 1 Report post Posted December 13, 2016 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 ~= nil then local Ring_Num_Add = CheckBagItem( t , 2521 ) if Ring_Num_Add == 1 then local retbag = HasLeaveBagGrid( t, 1) if retbag ~= LUA_TRUE then BickerNotice(role,"Your partners Inventory is full!") BickerNotice(t,"You need at least 1 free Slot!") return LUA_FALSE end local NocLock =KitbagLock( t, 0 ) if NocLock == LUA_FALSE then BickerNotice( role , "Your partners Inventory is locked!") BickerNotice( t , "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, "Your partner is not dressed up") return 0 end if CheckWeddingDress(t) == 0 then BickerNotice (role, "Your partner is not dressed up!") BickerNotice (t, "You are not dressed up!") return 0 end t_Num = 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 , 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,"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 Quote Share this post Link to post Share on other sites
Fajar 1 Report post Posted December 13, 2016 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 ~= nil then local Ring_Num_Add = CheckBagItem( t , 2521 ) if Ring_Num_Add == 1 then t_Num = 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 , 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,"You can marry only once! Get divorced!") return LUA_FALSE end end end end Quote Share this post Link to post Share on other sites
Fajar 1 Report post Posted December 13, 2016 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 == 1 then --local RoleType = GetChaID(role) --local TeamerType = GetChaID(t) 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 , 0 , 7408 , 1 , 4 ) local a = DelBagItem ( t , 2521 , 1) local Item = GetChaItem2 ( t , 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 , 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) --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)..") for getting married! May you share eternal happiness for the rest of your lives!") PlayEffect(role, 839) PlayEffect(t, 839) else BickerNotice(role,"Please note about your gender!") end end end local cha1 = GetChaDefaultName ( role ) local cha2 = GetChaDefaultName ( t ) 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 Quote Share this post Link to post Share on other sites
Fajar 1 Report post Posted December 13, 2016 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 , 7408) local Ring_Num = Ring_Num + item_count if Ring_Num == 1 then for i = 1 , 4 , 1 do if t ~= 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 == 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) Quote Share this post Link to post Share on other sites