Jump to content
×
×
  • Create New...
  • 0

solved


unchnoun

Question

  • Answers 8
  • Created
  • Last Reply

Top Posters For This Question

8 answers to this question

Recommended Posts

  • 0
  • Premium

This is what i insert in my code, in your case it can be different but it gives you the idea:

 

		when login begin
			local vnum, remain_time = pc.get_special_ride_vnum()
			if vnum <= 52000 or vnum >=520120 then
			pc.unmount(vnum,remain_time)
        		return
				end

 

Link to comment
  • 0
On 11.12.2016 at 0:56 PM, Fleon said:

This is what i insert in my code, in your case it can be different but it gives you the idea:

 

		when login begin
			local vnum, remain_time = pc.get_special_ride_vnum()
			if vnum <= 52000 or vnum >=520120 then
			pc.unmount(vnum,remain_time)
        		return
				end

 

Didn't work. I forgot to say that the mount icon isn't going in that slot, on my server it's going in normall slot like Vent Boots. Any help?

Link to comment
  • 0
14 hours ago, Fleon said:

link your mount quest

Spoiler
quest ride begin
	state start begin
		function Ride( vnum, remain_time )
			ride_info = {
				[71124] = { 20114,	item.get_socket(2)*60,	apply.EXP_DOUBLE_BONUS,	30,	1,	false	},
				[71125] = { 20115,	item.get_socket(2)*60,	apply.ATTBONUS_MONSTER,	50,	1,	false	},
				[71126] = { 20116,	item.get_socket(2)*60,	apply.CRITICAL_PCT, 	10,	1,	false	},
				[71127] = { 20117,	item.get_socket(2)*60,	apply.CRITICAL_PCT,	10,	1,	false	},
				[71128] = { 20118,	item.get_socket(2)*60,	apply.MALL_DEFBONUS,	10,	1,	false	},
				[71161] = { 20125,	item.get_socket(2)*60,	apply.MALL_DEFBONUS,	10,	1,	false	},
				}

			if pc.level < ride_info[vnum][5] then
				say("")
				say("test")
				say("")
			else
				if 112 == pc.get_map_index() then
					return
				end
				if ride_info[vnum][2] == 0 and remain_time != 0 then
					pc.mount( ride_info[vnum][1], remain_time*60 )
					pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], remain_time*60 )
				else
					pc.mount( ride_info[vnum][1], ride_info[vnum][2] )
					pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], ride_info[vnum][2] )
				end

				if true == ride_info[vnum][6] then
					pc.remove_item(vnum, 1)
				end	
			end	
		end

		when login begin
			local vnum, remain_time = pc.get_special_ride_vnum()
			if  vnum != 71124 and vnum != 71125 and vnum != 71126 and vnum != 71127 and vnum != 71128 and vnum != 71161 then
				return
			end
			if 0 != vnum then
				ride.Ride(vnum, remain_time)
			end
		end

		when 71124.use or 71125.use or 71126.use or 71127.use or 71128.use or 71137.use or 71138.use or 71139.use or 71140.use  or 71141.use or 71142.use begin
			 if pc.is_polymorphed() then
				 say("")
				 say("test")
				 say("")
			elseif false == pc.is_riding() then
			 	if true == horse.is_summon() then
					horse.unsummon()
				end
				 ride.Ride(item.vnum, 0)
			 else
				say("")
				 say("test")
				 say("")
			 end
		end
	end
end

 

 

Link to comment
  • 0
  • Premium
	
quest ride begin
    state start begin
        function Ride( vnum, remain_time )
            ride_info = {
                [71124] = { 20114,    item.get_socket(2)*60,    apply.EXP_DOUBLE_BONUS,    30,    1,    false    },
                [71125] = { 20115,    item.get_socket(2)*60,    apply.ATTBONUS_MONSTER,    50,    1,    false    },
                [71126] = { 20116,    item.get_socket(2)*60,    apply.CRITICAL_PCT,     10,    1,    false    },
                [71127] = { 20117,    item.get_socket(2)*60,    apply.CRITICAL_PCT,    10,    1,    false    },
                [71128] = { 20118,    item.get_socket(2)*60,    apply.MALL_DEFBONUS,    10,    1,    false    },
                [71161] = { 20125,    item.get_socket(2)*60,    apply.MALL_DEFBONUS,    10,    1,    false    },
                }
	            if pc.level < ride_info[vnum][5] then
                say("")
                say("test")
                say("")
            else
                if 112 == pc.get_map_index() then
                    return
                end
                if ride_info[vnum][2] == 0 and remain_time != 0 then
                    pc.mount( ride_info[vnum][1], remain_time*60 )
                    pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], remain_time*60 )
                else
                    pc.mount( ride_info[vnum][1], ride_info[vnum][2] )
                    pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], ride_info[vnum][2] )
                end
	                if true == ride_info[vnum][6] then
                    pc.remove_item(vnum, 1)
                end    
            end    
        end
	        when login begin
            local vnum, remain_time = pc.get_special_ride_vnum()
            if  vnum != 71124 and vnum != 71125 and vnum != 71126 and vnum != 71127 and vnum != 71128 and vnum != 71161 then
                return
            end
            if 0 != vnum then
                pc.unmount(vnum, remain_time)
                ride.Ride(vnum, remain_time)
            end
        end
	        when 71124.use or 71125.use or 71126.use or 71127.use or 71128.use or 71137.use or 71138.use or 71139.use or 71140.use  or 71141.use or 71142.use begin
             if pc.is_polymorphed() then
                 say("")
                 say("test")
                 say("")
            elseif false == pc.is_riding() then
                 if true == horse.is_summon() then
                    horse.unsummon()
                end
                 ride.Ride(item.vnum, 0)
             else
                say("")
                 say("test")
                 say("")
             end
        end
    end
end
	



Compile again this quest and try this:

If it doesnt work use


 

            if 0 != vnum then
                ride.unride(vnum, remain_time)
                ride.Ride(vnum, remain_time)
            end
        end

 

Try both of them (ride or unmount) if this doesnt do the trick lemme know

Link to comment
  • 0
On 14.12.2016 at 3:28 PM, Fleon said:
	
quest ride begin
    state start begin
        function Ride( vnum, remain_time )
            ride_info = {
                [71124] = { 20114,    item.get_socket(2)*60,    apply.EXP_DOUBLE_BONUS,    30,    1,    false    },
                [71125] = { 20115,    item.get_socket(2)*60,    apply.ATTBONUS_MONSTER,    50,    1,    false    },
                [71126] = { 20116,    item.get_socket(2)*60,    apply.CRITICAL_PCT,     10,    1,    false    },
                [71127] = { 20117,    item.get_socket(2)*60,    apply.CRITICAL_PCT,    10,    1,    false    },
                [71128] = { 20118,    item.get_socket(2)*60,    apply.MALL_DEFBONUS,    10,    1,    false    },
                [71161] = { 20125,    item.get_socket(2)*60,    apply.MALL_DEFBONUS,    10,    1,    false    },
                }
	            if pc.level < ride_info[vnum][5] then
                say("")
                say("test")
                say("")
            else
                if 112 == pc.get_map_index() then
                    return
                end
                if ride_info[vnum][2] == 0 and remain_time != 0 then
                    pc.mount( ride_info[vnum][1], remain_time*60 )
                    pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], remain_time*60 )
                else
                    pc.mount( ride_info[vnum][1], ride_info[vnum][2] )
                    pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], ride_info[vnum][2] )
                end
	                if true == ride_info[vnum][6] then
                    pc.remove_item(vnum, 1)
                end    
            end    
        end
	        when login begin
            local vnum, remain_time = pc.get_special_ride_vnum()
            if  vnum != 71124 and vnum != 71125 and vnum != 71126 and vnum != 71127 and vnum != 71128 and vnum != 71161 then
                return
            end
            if 0 != vnum then
                pc.unmount(vnum, remain_time)
                ride.Ride(vnum, remain_time)
            end
        end
	        when 71124.use or 71125.use or 71126.use or 71127.use or 71128.use or 71137.use or 71138.use or 71139.use or 71140.use  or 71141.use or 71142.use begin
             if pc.is_polymorphed() then
                 say("")
                 say("test")
                 say("")
            elseif false == pc.is_riding() then
                 if true == horse.is_summon() then
                    horse.unsummon()
                end
                 ride.Ride(item.vnum, 0)
             else
                say("")
                 say("test")
                 say("")
             end
        end
    end
end
	



Compile again this quest and try this:

If it doesnt work use


 

            if 0 != vnum then
                ride.unride(vnum, remain_time)
                ride.Ride(vnum, remain_time)
            end
        end

 

Try both of them (ride or unmount) if this doesnt do the trick lemme know

I used the both of them but : 

In the first one, when I was teleported I was still on my mount and the second one doesn't work. Thank you for ur first quest. I solved problem by keep standing on the mount when I get teleported. Ty again.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.