Jump to content

FapFap

Community
  • Content Count

    318
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by FapFap


  1. 14 hours ago, Satan said:

    Hello @FapFap. It's probably because your six task has SetRecord action and condition on quest scripts.

     

    
    MisResultCondition( NoRecord, 1007)
    MisResultAction( SetRecord, 1007)

     

    yea but if remove those I can take the first task as much as I want, without completing others


  2. I'm having a problem with Hexa Quest, when i complete all six tasks i cant re-take the quest from npc again.. whats the problem? heres my quest scripts:
    Pko 1.36 by @Lucky
     

    	DefineMission( 6114, "The First Task", 1000)
    
    	MisBeginTalk( "<t>Could you do me one more favor? Please send this letter to Shaitan Chairman Guile at (873, 3545).Hurry up. A higher experience is waiting for you!")
    	MisBeginCondition( CheckTime )
    	MisBeginCondition(LvCheck, "<", 76 )
    	MisBeginCondition( NoMission, 1000)
    	MisBeginCondition( NoRecord, 1000)
    	MisBeginAction( GiveItem, 3292, 1, 4)
    	MisBeginAction( AddMission, 1000)
    	MisCancelAction( ClearMission, 1000)
    	MisBeginBagNeed(1)
    	
    	MisNeed( MIS_NEED_DESP, "Please send this letter to Chairman Guile in the Shaitan City")
    	
    	MisHelpTalk( "<t>Guile is at (873,3545) in the Shaitan City. Good Luck.")
    	MisResultCondition( AlwaysFailure )
    
    ----------------------------鐵人六項之一
    	DefineMission( 6115, "The First Task", 1000, COMPLETE_SHOW)
    
    	MisBeginCondition( AlwaysFailure )
    
    	MisResultTalk( "<t>A letter for me? Thanks.")
    	MisResultCondition( HasMission, 1000)
    	MisResultCondition( HasItem, 3292, 1)
    	MisResultCondition( NoRecord, 1000)
    	MisResultAction( TakeItem, 3292, 1)
    	MisResultAction( SetRecord, 1000)
    	MisResultAction( ClearMission, 1000)
    	MisResultAction( AddExp_1)
    
    
    -----------------------------鐵人六項之二
    	DefineMission( 6116, "The Second Task", 1001)
    
    	MisBeginTalk( "<t>The Nurse Gina of Argent City wants a tail grass. Buy Gina a tail grass from Physician Ditto.")
    	MisBeginCondition( HasRecord, 1000)
    	MisBeginCondition( NoMission, 1001)
    	MisBeginCondition( NoRecord, 1001)
    	MisBeginAction( AddMission, 1001)
    	MisBeginAction(AddTrigger, 10011, TE_GETITEM, 3143, 1)
    	MisCancelAction( ClearMission, 1001)
    
    	MisNeed( MIS_NEED_DESP, "Go and buy a tail grass from Physician Ditto for Nurse Gina")
    	MisNeed( MIS_NEED_ITEM, 3910, 1, 10, 1)
    
    	MisHelpTalk( "<t>Physician Ditto sells the tail grass.")
    	MisResultCondition( AlwaysFailure )
    
    
    
    ----------------------------鐵人六項之二
    	DefineMission( 6117, "The Second Task", 1001, COMPLETE_SHOW)
    
    	MisBeginCondition( AlwaysFailure )
    
    	MisResultTalk( "<t>Your tail grass comes at the right time. I need it right now!")
    	MisResultCondition( HasMission, 1001)
    	MisResultCondition( NoRecord, 1001)
    	MisResultCondition( HasItem, 3910, 1)
    	MisResultAction( TakeItem, 3910, 1)
    	MisResultAction( SetRecord, 1001)
    	MisResultAction( ClearMission, 1001)
    	MisResultAction( AddExp_1 )
    
    
    	InitTrigger()
    	TriggerCondition( 1, IsItem, 3910)	
    	TriggerAction( 1, AddNextFlag, 1001, 10, 1 )
    	RegCurTrigger( 10011 )
    
    ---------------------------鐵人六項之三A
    	DefineMission( 6118, "The Third Task", 1002)
    	
    	MisBeginTalk( "<t> Recently, the grassland elks brought us a lot of trouble. Could you give them a lesson for us?")
    	MisBeginCondition( HasRecord, 1001)
    	MisBeginCondition( NoMission, 1002)
    	MisBeginCondition( NoRecord, 1002)
    	MisBeginCondition( NoRecord, 1003)
    	MisBeginCondition( LvCheck, "<", 40)
    	MisBeginAction( AddMission, 1002)
    	MisBeginAction( AddTrigger, 10021, TE_KILL, 299, 20 )
    	MisCancelAction( ClearMission, 1002)
    	
    	MisNeed( MIS_NEED_DESP, "Kill 20 grassland elks at Garner (1360,2683) and come back .")
    	MisNeed( MIS_NEED_KILL, 299, 20, 10, 20)
    
    	MisResultTalk( "<t>Well done. You completed it so quickly. I will reward you something.")
    	MisHelpTalk( "<t>You can find grassland elks around the Garner at (1360, 2683).")
    	MisResultCondition( HasMission, 1002)
    	MisResultCondition( NoRecord, 1002)
    	MisResultCondition( HasFlag, 1002, 29)
    	MisResultAction( SetRecord, 1002)
    	MisResultAction( SetRecord, 1003)
    	MisResultAction( ClearMission, 1002)
    	MisResultAction( AddExp, 13000, 13000)
    
    	InitTrigger()
    	TriggerCondition( 1, IsMonster, 299)	
    	TriggerAction( 1, AddNextFlag, 1002, 10, 20 )
    	RegCurTrigger( 10021 )
    
    ----------------------------鐵人三項之三B
    	DefineMission( 6119, "The Third Task", 1004)
    	
    	MisBeginTalk( "<t>Recently, the pumpkin knights brought us a lot of trouble. Could you give them a lesson for us?")
    	MisBeginCondition( HasRecord, 1001)
    	MisBeginCondition( NoMission, 1004)
    	MisBeginCondition( NoMission, 1002)
    	MisBeginCondition( NoRecord, 1003)
    	MisBeginCondition( NoRecord, 1004)
    	MisBeginCondition( LvCheck, ">", 39)
    	MisBeginAction( AddMission, 1004)
    	MisBeginAction( AddTrigger, 10041, TE_KILL, 37, 20 )
    	MisCancelAction( ClearMission, 1004)
    	
    	MisNeed( MIS_NEED_DESP, "Kill 20 pumpkin knights at Silver Mine 2, Silver Mine 3 or Garner at (622, 3364)")
    	MisNeed( MIS_NEED_KILL, 37, 20, 10, 20)
    
    	MisResultTalk( "<t>Wow~ Well done. You completed it so quickly. I will reward you something.")
    	MisHelpTalk( "<t>The pumpkin knights are around the Garner at (622, 3364).")
    	MisResultCondition( HasMission, 1004)
    	MisResultCondition( NoRecord, 1004)
    	MisResultCondition( HasFlag, 1004, 29)
    	MisResultAction( SetRecord, 1004)
    	MisResultAction( SetRecord, 1003)
    	MisResultAction( ClearMission, 1004)
    	MisResultAction( AddExp_3)
    
    	InitTrigger()
    	TriggerCondition( 1, IsMonster, 37)	
    	TriggerAction( 1, AddNextFlag, 1004, 10, 20 )
    	RegCurTrigger( 10041 )
    
    ----------------------------------鐵人六項之四
    	DefineMission( 6120, "The Fourth Task", 1005)
    	MisBeginTalk( "<t> Now you are qualified to the fourth task. Collect 3 Wood and 3 Iron Ore and give them to Greg at (1882, 2805) in Abandon Mine Haven.")
    	MisBeginCondition( HasRecord, 1003)
    	MisBeginCondition( NoMission, 1005)
    	MisBeginCondition( NoRecord, 1005)
    	MisBeginAction( AddMission, 1005)
    	MisBeginAction(AddTrigger, 10051, TE_GETITEM, 4543, 3 )
    	MisBeginAction(AddTrigger, 10052, TE_GETITEM, 4545, 3 )
    	MisBeginAction(AddTrigger, 10053, TE_GETITEM, 1478, 3 )
    	MisCancelAction( ClearMission, 1005)
    
    	MisNeed( MIS_NEED_DESP, "Send 3 Wood, 3 Sashimi and 3 Iron Ore to Greg at (1882, 2805) in Abandon Mine Haven.")
    	MisNeed( MIS_NEED_ITEM, 4543, 3, 10, 3)
    	MisNeed( MIS_NEED_ITEM, 4545, 3, 20, 3)
    	MisNeed( MIS_NEED_ITEM, 1478, 3, 20, 3)
    
    	MisHelpTalk( "<t>You can get the Wood by cutting down trees, the Sashimi fishing and get the Iron Ore by mining.")
    
    	MisResultCondition( AlwaysFailure )
    
    ---------------------------------鐵人六項之四
    	DefineMission( 6121, "The Fourth Task", 1005, COMPLETE_SHOW)
    	MisBeginCondition( AlwaysFailure )
    
    	MisResultTalk( "<t>Your Wood and  Iron Ore come just at the right time. I need them right now.")
    	MisResultCondition( HasMission, 1005)
    	MisResultCondition( NoRecord, 1005)
    	MisResultCondition( HasItem, 4543, 3)
    	MisResultCondition( HasItem, 4545, 3)
    	MisResultCondition( HasItem, 1478, 3)
    	MisResultAction( TakeItem, 4543, 3)
    	MisResultAction( TakeItem, 4545, 3)
    	MisResultAction( TakeItem, 1478, 3)
    	MisResultAction( SetRecord, 1005)
    	MisResultAction( ClearMission, 1005)
    	MisResultAction( AddExp_4)
    
    	InitTrigger()
    	TriggerCondition( 1, IsItem, 4543)	
    	TriggerAction( 1, AddNextFlag, 1005, 10, 3 )
    	RegCurTrigger( 10051 )
    
    	InitTrigger()
    	TriggerCondition( 1, IsItem, 4545)		TriggerAction( 1, AddNextFlag, 1005, 20, 3 )
    	RegCurTrigger( 10052 )
    
    	InitTrigger()
    	TriggerCondition( 1, IsItem, 1478)	
    	TriggerAction( 1, AddNextFlag, 1005, 20, 3 )
    	RegCurTrigger( 10053 )
    
    
    -----------------------------------鐵人六項之五
    	DefineMission( 6122, "The Fifth Task", 1006)
    	MisBeginTalk( "<t> The next task is collecting two pink pearls and give them to Forbei at (2226,2726) in the Argent City.")
    	MisBeginCondition( HasRecord, 1005)
    	MisBeginCondition( NoMission, 1006)
    	MisBeginCondition( NoRecord, 1006)
    	MisBeginAction( AddMission, 1006)
    	MisBeginAction(AddTrigger, 10061, TE_GETITEM, 2588, 5 )
    	MisCancelAction( ClearMission, 1006)
    
    	MisNeed( MIS_NEED_DESP, "Collect five Elven Signets and give them to Forbei at (2226,2726) in the Argent City")
    	MisNeed( MIS_NEED_ITEM, 2588, 5, 10, 5)
    
    	MisHelpTalk( "<t>It seems that you can only get the Elven Signets from your Pet.")
    	MisResultCondition( AlwaysFailure )
    
    -----------------------------------鐵人六項之五
    	DefineMission( 6123, "The Fifth Task", 1006, COMPLETE_SHOW)
    	MisBeginCondition( AlwaysFailure )
    	
    	MisResultTalk( "<t> You are so strong.The pearls are so beautiful. Now you have the chance to do the final task. I believe you can do it.")
    	MisResultCondition( HasMission, 1006)
    	MisResultCondition( NoRecord, 1006)
    	MisResultCondition( HasItem, 2588, 5)
    	MisResultAction( TakeItem, 2588, 5)
    	MisResultAction( SetRecord, 1006)
    	MisResultAction( ClearMission, 1006)
    	MisResultAction( AddExp_5)
    
    	InitTrigger()
    	TriggerCondition( 1, IsItem, 2588)	
    	TriggerAction( 1, AddNextFlag, 1006, 10, 5 )
    	RegCurTrigger( 10061 )
    
    -----------------------------------鐵人六項之六
    	DefineMission( 6124, "The Sixth Task", 1007)
    	MisBeginTalk( "<t>The final task is very simple. All you need to do is just finding another two people as you companions. And on you team, you must have one person whose level is from 20 to 30, another person whose level is from 31 to 40 and the other whose level is higher than 40.When you make it, you can go to find Swordsman Ray in the Lower Icicle Castle to get your award!")
    	MisBeginCondition( HasRecord, 1006)
    	MisBeginCondition( NoMission, 1007)
    	MisBeginCondition( NoRecord, 1007)
    	MisBeginAction( AddMission, 1007)
    	MisCancelAction( ClearMission, 1007)
    
    	MisHelpTalk( "<t>Go to find your companion")
    
    	MisResultCondition( AlwaysFailure )
    
    ----------------------------------鐵人六項之六
    	DefineMission( 6125, "The Sixth Task", 1007, COMPLETE_SHOW)
    	MisBeginCondition( AlwaysFailure )
    
    
    	MisResultTalk( "<t>You are so great! congratulations! I will look forward to your performance next time.")
    	MisResultCondition( HasMission, 1007)
    	MisResultCondition( NoRecord, 1007)
    	MisResultCondition( CheckTeam )
    	MisResultAction( SetRecord, 1007)
    	MisResultAction( ClearMission, 1007)
    	MisResultAction( AddExp_6)


     

    function CheckTime ( role )
    	local now_week= os.date("%w")		-------------星期几(十进制) 
    	local now_hour= os.date("%H")		-------------时 
    	now_week= tonumber(now_week)
    	now_hour= tonumber(now_hour)
    --	SystemNotice( role, "星期"..now_week.."时间"..now_hour)
    	if now_week == 6 then
    		if now_hour >= 9 and now_hour < 12 then
    			return LUA_TRUE		
    		elseif now_hour >= 18 and now_hour < 24 then
    			return LUA_TRUE
    		end
    	end
    end

     


  3. 23 minutes ago, Faller said:

    Hi!

    I just made this up for you, works fine in my side.

    Paste in the beginning of your ChatHandler function.

     

    Btw, if I may ask, why are you applying such limitation?

    My gameserver aint using chathandler.. rip x.x

    I would tell you but can't make it public


  4. 15 hours ago, Dan~ said:

    Or just make a param, if character has item X in inventory, while forge, if forge gem lv X then give Check_A = 1, after finish remove item X from inventory less work with skilleffect.

    I have that one, but im trying to make the effect fruit useable for 60 seconds using itemeffect, but aint working

    @Onioni I used ur script but isn't working the forging is 100% and also using fruit doesn't work


  5. 4 minutes ago, Onioni said:

    Show me the script, some files have base lv1-5 100%...

     

     

    Like I have I f gem lev <6 A=1 and 1 mean success is 100%. 

     

     if Baoshi_NeedLv < 6 then               
                    Check_A = 1
                    CheckFaild = Percentage_Random ( Check_A )

    I've made combine work fine with fruit and without, im just having a problem with the Forging Fruit for 100%

    this is my forging success rates without fruits, but fruit aint working..

    	local Sklv = 1
    	local StateLv = GetChaStateLv ( role , STATE_JLGLJB )
    	
    	Sklv = Sklv + StateLv
    
    	local Check_A
            local CheckFaild
            
            if Baoshi_NeedLv < 4 then               
                    Check_A = 1
                    CheckFaild = Percentage_Random ( Check_A )
    
            elseif Baoshi_NeedLv == 4 then
                    Check_A = 0.9
                    CheckFaild = Percentage_Random ( Check_A )
                    
            elseif Baoshi_NeedLv == 5 then
                    Check_A = 0.7
                    CheckFaild = Percentage_Random ( Check_A )
                                    
            elseif Baoshi_NeedLv == 6 then
                    Check_A = 0.6
                    CheckFaild = Percentage_Random ( Check_A )              
                    
            elseif Baoshi_NeedLv == 7 then
                    Check_A = 0.5
                    CheckFaild = Percentage_Random ( Check_A )      
                    
            elseif Baoshi_NeedLv == 8 then
                    Check_A = 0.4
                    CheckFaild = Percentage_Random ( Check_A )
                    
            elseif Baoshi_NeedLv == 9 then
                    Check_A = 0.3
                    CheckFaild = Percentage_Random ( Check_A )
            end
    
            if CheckFaild == 1 then
                    Check_Jinglian_Item = Jinglian_Item ( Item_Jinglian , Item_Stone1 , Item_Stone2 )
            else
                    local cha_name = GetChaDefaultName ( role )
                    local Item_Jinglian_name = GetItemName ( ItemID_Jinglian )
                    LG( "JingLian_ShiBai" , "Player ["..cha_name.."] Forging of equipment failed. Equipment is not damaged - "..Item_Jinglian_name )
                    SystemNotice ( role , "Sorry, forging has failed! Luckily equipment is not damaged..." )
            end
    
    ------------------
    
    
    	local ItemID_Stone1 = GetItemID ( Item_Stone1 )
    	local ItemID_Stone2 = GetItemID ( Item_Stone2 )
    
    	local Stone1_Lv = Get_StoneLv ( Item_Stone1 )
    	local Stone2_Lv = Get_StoneLv ( Item_Stone2 )
    	local Jinglianshi_Lv = 0
    	if Stone1_Lv > Stone2_Lv then
    		Jinglianshi_Lv = Stone1_Lv
    	else
    		Jinglianshi_Lv = Stone2_Lv
    	end
    
    	local Jinglian_Lv = GetItem_JinglianLv ( Item_Jinglian )
    
    	local R1 = 0
    	local R2 = 0
    
    	R1 = RemoveChaItem ( role , ItemID_Stone1 , 1 , 2 , ItemBag [1] , 2 , 1 , 0 )		--移除宝石1
    	R2 = RemoveChaItem ( role , ItemID_Stone2 , 1 , 2 , ItemBag [2] , 2 , 1 , 0 )		--移除宝石2
    
    	if R1 == 0 or R2 == 0 then
    		LG( "Jinglian" , "Gem deletion failed" )
    	end
    	
    	if CheckFaild == 0 then
    		return 2
    	end
    
    	check_item_final_data ( Item_Jinglian )
    	
    
    	
    --	SystemNotice(role , "Return failed")
    	
    	
    
    
    --	local a = 0.75
    	local b = Check_CG_Jinglian ( Jinglian_Lv , Jinglianshi_Lv , Sklv )
    	if b == 0 then
    		i = RemoveChaItem ( role , ItemID_Jinglian , 1 , 2 , ItemBag [0] , 2 , 1 , 0)		--移除宝石	
    		if i == 0 then
    			LG( "Hecheng_BS" , "Delete item failed" )
    		end
    		local cha_name = GetChaDefaultName ( role )
    		local Item_Jinglian_name = GetItemName ( ItemID_Jinglian )
    		LG( "JingLian_ShiBai" , "Player ["..cha_name.."] Forging of equipment failed - "..Item_Jinglian_name )
    		SystemNotice( role , "Very sorry! Forging has failed. Item was destroyed!")
    		return 2	
    	end
    
    --	Notice("Forging completed")
    	local cha_name = GetChaDefaultName ( role )
    	local Item_Jinglian_name = GetItemName ( ItemID_Jinglian )
    	LG( "JingLian_ShiBai" , "Player ["..cha_name.."] Forging successful - "..Item_Jinglian_name )
    	return 1
    end

     


  6. 6 hours ago, Onioni said:

    I'll try find but I'm with phone so it's hard to look from big Lua file.. 

     

     

    Well now I found better Lua app.. Here, nothing special in it ofc u need check variables. In my variable for STATE_JLGLJB =107

     

    function ItemUse_GJJLHYS ( role , Item )
        local statelv = 11
        local statetime = 60
        local Cha_Boat = 0
        Cha_Boat = GetCtrlBoat ( role )
    --    SystemNotice( role , Cha_Boat )
        if Cha_Boat ==  nil then
            AddState( role , role , STATE_JLBYS , statelv , statetime )
            CALCULATE_ITEMEFFECT_LUA_000783 = GetResString("CALCULATE_ITEMEFFECT_LUA_000783")
            SystemNotice( role , CALCULATE_ITEMEFFECT_LUA_000783 )
                    
        else
            
            SystemNotice( role , "Cannot use while sailing" )
            UseItemFailed ( role )
            return
        end
    end

     

     

    function ItemUse_GJHCHYS ( role , Item )
        local statelv = 10
        local statetime = 60
        local Cha_Boat = 0
        Cha_Boat = GetCtrlBoat ( role )
    --    SystemNotice( role , Cha_Boat )
        if Cha_Boat ==  nil then
            AddState( role , role , STATE_HCBYS , statelv , statetime )
            CALCULATE_ITEMEFFECT_LUA_000785 = GetResString("CALCULATE_ITEMEFFECT_LUA_000785")
            SystemNotice( role , CALCULATE_ITEMEFFECT_LUA_000785 )        
        else
            
            SystemNotice( role , "Cannot use while sailing" )
            UseItemFailed ( role )
            return
        end
    end

     

    but thats what i posted on my first post, but it doesnt work lol

×
×
  • Create New...