quest ridereittier begin
state start begin
function Ride(vnum, remain_time)
ride_info = {
[71114] = { 20110, 5*60, apply.NONE, 0, 75, false },
[71115] = { 20110, 5*60, apply.NONE, 0, 75, false },
[71116] = { 20111, 5*60, apply.NONE, 0, 80, false },
[71117] = { 20111, 5*60, apply.NONE, 0, 80, false },
[71118] = { 20112, 5*60, apply.NONE, 0, 85, false },
[71119] = { 20112, 5*60, apply.NONE, 0, 85, false },
[71120] = { 20113, 5*60, apply.NONE, 0, 85, false },
[71121] = { 20113, 5*60, apply.NONE, 0, 85, false },
[71124] = { 20114, 5*60, apply.NONE, 0, 85, false },
[71171] = { 20227, 5*60, apply.NONE, 0, 1, false },
[71172] = { 20226, 5*60, apply.NONE, 0, 1, false },
[52106] = { 20228, 5*60, apply.NONE, 0, 1, false },
[52107] = { 20228, 5*60, apply.NONE, 0, 1, false },
[52108] = { 20228, 5*60, apply.NONE, 0, 1, false },
[52109] = { 20228, 5*60, apply.NONE, 0, 1, false },
[52110] = { 20228, 5*60, apply.NONE, 0, 1, false },
[52111] = { 20229, 5*60, apply.NONE, 0, 1, false },
[52112] = { 20229, 5*60, apply.NONE, 0, 1, false },
[52113] = { 20229, 5*60, apply.NONE, 0, 1, false },
[52114] = { 20229, 5*60, apply.NONE, 0, 1, false },
[52115] = { 20229, 5*60, apply.NONE, 0, 1, false },
[52116] = { 20230, 5*60, apply.NONE, 0, 1, false },
[52117] = { 20230, 5*60, apply.NONE, 0, 1, false },
[52118] = { 20230, 5*60, apply.NONE, 0, 1, false },
[52119] = { 20230, 5*60, apply.NONE, 0, 1, false },
[52120] = { 20230, 5*60, apply.NONE, 0, 1, false },
[71161] = { 20219, 5*60, apply.NONE, 0, 1, false },
[71124] = { 20114, 5*60, apply.NONE, 0, 1, false },
[71125] = { 20115, 5*60, apply.NONE, 0, 1, false },
[71126] = { 20116, 5*60, apply.NONE, 0, 1, false },
[71127] = { 20117, 5*60, apply.NONE, 0, 1, false },
[71128] = { 20118, 5*60, apply.NONE, 0, 1, false },
[71224] = { 20114, 5*60, apply.NONE, 0, 1, false },
[71225] = { 20115, 5*60, apply.NONE, 0, 1, false },
[71226] = { 20116, 5*60, apply.NONE, 0, 1, false },
[71227] = { 20117, 5*60, apply.NONE, 0, 1, false },
[71228] = { 20118, 5*60, apply.NONE, 0, 1, false },
[71137] = { 20120, 5*60, apply.NONE, 0, 1, false },
[71138] = { 20121, 5*60, apply.NONE, 0, 1, false },
[71139] = { 20122, 5*60, apply.NONE, 0, 1, false },
[71140] = { 20123, 5*60, apply.NONE, 0, 1, false },
[71141] = { 20124, 5*60, apply.NONE, 0, 1, false },
[71142] = { 20125, 5*60, apply.NONE, 0, 1, false },
[71176] = { 20231, 5*60, apply.NONE, 0, 1, false },
[71177] = { 20232, 5*60, apply.NONE, 0, 1, false },
[71131] = { 20119, 5*60, apply.NONE, 0, 1, false },
[71132] = { 20119, 5*60, apply.NONE, 0, 1, false },
[71133] = { 20119, 5*60, apply.NONE, 0, 1, false },
[71134] = { 20119, 5*60, apply.NONE, 0, 1, false },
[71161] = { 20219, 5*60, apply.NONE, 0, 1, false },
[52001] = { 20110, 5*60, apply.NONE, 0, 1, false },
[71265] = { 20110, 5*60, apply.NONE, 0, 1, false },
[71256] = { 20114, 5*60, apply.NONE, 0, 1, false },
}
if pc.level < ride_info[vnum][5] then
syschat("Your level is too low to use this mount.")
else
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 0 != vnum then
ridereittier.Ride(vnum, remain_time)
end
end
when 71114.use or 71115.use or 71116.use or 71117.use or
71118.use or 71119.use or 71120.use or 71121.use or 71124.use or
71125.use or 71126.use or 71127.use or 71128.use or
71225.use or 71226.use or 71227.use or 71228.use or
71131.use or 71132.use or 71133.use or 71134.use or 71161.use or 71137.use or 71138.use or 71139.use or 71256.use or 71265.use begin
if pc.is_polymorphed() then
syschat("You can´t ride if you´re polymorphed!")
elseif false == pc.is_riding() then
if true == horse.is_summon() then
horse.unsummon()
end
ridereittier.Ride(item.vnum, 0)
else
pc.unmount()
end
end
when 52001.use or 52002.use or 52003.use or 52004.use or 52005.use or 52006.use or 52007.use or 52008.use or 52009.use or 52010.use or 52011.use or 52012.use or 52013.use or 52014.use or 52015.use or
52016.use or 52017.use or 52018.use or 52019.use or 52020.use or 52021.use or 52022.use or 52023.use or 52024.use or 52025.use or 52026.use or 52027.use or 52028.use or 52029.use or 52030.use or
52031.use or 52032.use or 52033.use or 52034.use or 52035.use or 52036.use or 52037.use or 52038.use or 52039.use or 52040.use or 52041.use or 52042.use or 52043.use or 52044.use or 52045.use or
52046.use or 52047.use or 52048.use or 52049.use or 52050.use or 52051.use or 52052.use or 52053.use or 52054.use or 52055.use or 52056.use or 52057.use or 52058.use or 52059.use or 52060.use or
52061.use or 52062.use or 52063.use or 52064.use or 52065.use or 52066.use or 52067.use or 52068.use or 52069.use or 52070.use or 52071.use or 52072.use or 52073.use or 52074.use or 52075.use or
52076.use or 52077.use or 52078.use or 52079.use or 52080.use or 52081.use or 52082.use or 52083.use or 52084.use or 52085.use or 52086.use or 52087.use or 52088.use or 52089.use or 52090.use or 71164.use or
52091.use or 52092.use or 52093.use or 52094.use or 52095.use or 52096.use or 52097.use or 52098.use or 52099.use or 52100.use or 52101.use or 52102.use or 52103.use or 52104.use or 52105.use begin
if pc.is_polymorphed() then
syschat("You can´t ride if you´re polymorphed!")
elseif false == pc.is_riding() then
if true == horse.is_summon() then
horse.unsummon()
end
ridereittier.Ride(item.vnum, 0)
else
pc.unmount()
end
end
end
end