Mount bónusz hiba!

Indította DareDevil15, 2020-09-04, 22:21:20

Üdv.
Beraktam a következő két questet, hogy megadja leltárból is a mount hívó a bónuszt.

quest mountbonus begin
    state start begin
        when login or enter with pc.getqf("mount_bonus") != 1 begin
            if pc.count_item(40009)>=1 then
                  pc.mount_bonus(1, 5000, 60*60*24*365)
                  pc.setqf("mount_bonus", 1)
            end
        end
        when logout or disconnect with pc.getqf("mount_bonus") == 1 begin
                      pc.setqf("mount_bonus", 0)
        end
    end
end


quest mount begin
state start begin
when 40009.use or 71165.use or 71166.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 71137.use or 71138.use or 71139.use or 71140.use or 71141.use or 71142.use or 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 with
not pc.is_polymorphed() begin
mount.ride(item.get_vnum())
end
when login begin
if item.select_cell(97) then
if 40009 <= item.vnum and item.vnum <= 71142 then
pc.unmount()
mount.ride(item.vnum)
end
end
if item.select_cell(98) then
if 40009 <= item.vnum and item.vnum <= 71142 then
pc.unmount()
mount.ride(item.vnum)
end
end
end
function ride(vnum)
if pc.is_mount() then
pc.unmount()
return
end
local time = mount.info(vnum, 8)
local bon1id = mount.info(vnum, 2) bon1val = mount.info(vnum, 3)
local bon2id = mount.info(vnum, 4) bon2val = mount.info(vnum, 5)
local bon3id = mount.info(vnum, 6) bon3val = mount.info(vnum, 7)

if pc.get_armor() == 11901 or pc.get_armor() == 11902 then
say("")
say_title(pc.get_name().."...")
say("Zdejmij swoj¹ sukniê i ponownie za³o¿ pieczêæ!")
return
elseif pc.get_armor() == 11903 or pc.get_armor() == 11904 then
say("")
say_title(pc.get_name().."...")
say("Zdejmij swój garnitur i ponownie za³o¿ pieczêæ!")
return
end

time = time*60
pc.mount(mount.info(vnum, 1), time)
if bon1id !=0 and bon1val !=0 then
pc.mount_bonus(bon1id, bon1val, time)
end
if bon2id !=0 and bon2val !=0 then
pc.mount_bonus(bon2id, bon2val, time)
end
if bon3id !=0 and bon3val !=0 then
pc.mount_bonus(bon3id, bon3val, time)
end
end
function info(vnum, index)
mount_list={ --  mount  bon1  bon2  bon3  czas (min.)
[52001] = {20223, 0, 0, 0, 0, 0, 0, 60*24*7},
[52002] = {20224, 0, 0, 0, 0, 0, 0, 60*24*7},
[52003] = {20225, 0, 0, 0, 0, 0, 0, 60*24*7},
[52004] = {20226, 0, 0, 0, 0, 0, 0, 60*24*7},
[52005] = {20227, 0, 0, 0, 0, 0, 0, 60*24*7},
[52006] = {20228, 0, 0, 0, 0, 0, 0, 60*24*7},
[52007] = {20229, 0, 0, 0, 0, 0, 0, 60*24*7},
[52008] = {20204, 0, 0, 0, 0, 0, 0, 60*24*7},
[52009] = {20205, 0, 0, 0, 0, 0, 0, 60*24*7},
[52010] = {20206, 0, 0, 0, 0, 0, 0, 60*24*7},
[52011] = {20207, 0, 0, 0, 0, 0, 0, 60*24*7},
[52012] = {20208, 0, 0, 0, 0, 0, 0, 60*24*7},
[52013] = {20209, 0, 0, 0, 0, 0, 0, 60*24*7},
[52014] = {20210, 0, 0, 0, 0, 0, 0, 60*24*7},
[52015] = {20211, 0, 0, 0, 0, 0, 0, 60*24*7},
[52016] = {20212, 0, 0, 0, 0, 0, 0, 60*24*7},
[52017] = {20213, 0, 0, 0, 0, 0, 0, 60*24*7},
[52018] = {20214, 0, 0, 0, 0, 0, 0, 60*24*7},
[52019] = {20215, 0, 0, 0, 0, 0, 0, 60*24*7},
[52020] = {20216, 0, 0, 0, 0, 0, 0, 60*24*7},
[52021] = {20217, 0, 0, 0, 0, 0, 0, 60*24*7},
[52022] = {20218, 0, 0, 0, 0, 0, 0, 60*24*7},
[52023] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52024] = {20111, 0, 0, 0, 0, 0, 0, 60*24*7},
[52025] = {20112, 0, 0, 0, 0, 0, 0, 60*24*7},
[52026] = {20113, 0, 0, 0, 0, 0, 0, 60*24*7},
[52027] = {20114, 0, 0, 0, 0, 0, 0, 60*24*7},
[52028] = {20115, 0, 0, 0, 0, 0, 0, 60*24*7},
[52029] = {20116, 0, 0, 0, 0, 0, 0, 60*24*7},
[52030] = {20117, 0, 0, 0, 0, 0, 0, 60*24*7},
[52031] = {20118, 0, 0, 0, 0, 0, 0, 60*24*7},
[52032] = {20119, 0, 0, 0, 0, 0, 0, 60*24*7},
[52033] = {20120, 0, 0, 0, 0, 0, 0, 60*24*7},
[52034] = {20121, 0, 0, 0, 0, 0, 0, 60*24*7},
[52035] = {20122, 0, 0, 0, 0, 0, 0, 60*24*7},
[52036] = {20123, 0, 0, 0, 0, 0, 0, 60*24*7},
[52037] = {20124, 0, 0, 0, 0, 0, 0, 60*24*7},
[52038] = {20125, 0, 0, 0, 0, 0, 0, 60*24*7},
[52039] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52040] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52041] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52042] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52043] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52044] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52045] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52046] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52047] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52048] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52049] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52050] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52051] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52052] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52053] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52054] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52055] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52056] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52057] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52058] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52059] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52060] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52061] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52062] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52063] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52064] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52065] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52066] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52067] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52068] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52069] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52070] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52071] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52072] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52073] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52074] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52075] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52076] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52077] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52078] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52079] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52080] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52081] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52082] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52083] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52084] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52085] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52086] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52087] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52088] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52089] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[52090] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[40009] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[71115] = {20110, 0, 0, 0, 0, 0, 0, 60*24*7},
[71116] = {20111, 0, 0, 0, 0, 0, 0, 60*24*7},
[71117] = {20111, 0, 0, 0, 0, 0, 0, 60*24*7},
[71118] = {20112, 0, 0, 0, 0, 0, 0, 60*24*7},
[71119] = {20112, 0, 0, 0, 0, 0, 0, 60*24*7},
[71120] = {20113, 0, 0, 0, 0, 0, 0, 60*24*7},
[71121] = {20113, 0, 0, 0, 0, 0, 0, 60*24*7},
[71124] = {20114, 0, 0, 0, 0, 0, 0, 60*24*7},
[71125] = {20115, 0, 0, 0, 0, 0, 0, 60*24*7},
[71126] = {20116, 0, 0, 0, 0, 0, 0, 60*24*7},
[71127] = {20117, 0, 0, 0, 0, 0, 0, 60*24*7},
[71128] = {20118, 0, 0, 0, 0, 0, 0, 60*24*7},
[71137] = {20120, 0, 0, 0, 0, 0, 0, 60*24*7},
[71138] = {20121, 0, 0, 0, 0, 0, 0, 60*24*7},
[71139] = {20122, 0, 0, 0, 0, 0, 0, 60*24*7},
[71140] = {20123, 0, 0, 0, 0, 0, 0, 60*24*7},
[71141] = {20124, 0, 0, 0, 0, 0, 0, 60*24*7},
[71142] = {20125, 0, 0, 0, 0, 0, 0, 60*24*7},
[71165] = {20221, 0, 0, 0, 0, 0, 0, 60*24*7},
[71166] = {20222, 0, 0, 0, 0, 0, 0, 60*24*7},
}
return mount_list[vnum][index]
end
end
end


Előhívom a mountot, felülök rá, nem adja meg a bónuszt csak relog után.
Relog után megadja a bónuszt, viszont ha visszaülök rá megint elveszi a bónuszt.
Kliens sysser:
0904 23:20:14524 :: CActorInstance::__RunNextCombo(wComboType=0, wComboIndex=1) - m_pkCurRaceData->GetComboDataPointer(m_wcurMotionMode=9, &pComboData) == NULL


Mi lehet a probléma?

Minek túlbonyolítani

quest hatas_bonuszok begin
state start begin
when login begin
if pc.count_item(85225)>=1 then
affect.add_collect(apply.MOV_SPEED,10,60*60*24*365*60)  --- oroszlán
pc.setqf("85225", 1)
end
end


when logout or disconnect begin
if pc.getqf("85225") == 1 then
pc.setqf("85225", 0)
affect.remove_collect(apply.MOV_SPEED,10,60*60*24*365*60)  --- oroszlán
end
end
end
end

Nagyon szépen köszönöm !
Továbbá lenne 1-2 kérdésem ezzel kapcsolatban.
Bővíthető a quest további hívókkal vagy mindegyik hívóra kell külön quest.Ha bővíthető, akkor hogyan?
Másik kérdésem pedig az, hogy csak akkor írja jóvá a bónuszt ha relog/teleportolok, ez nem oldható meg úgy, hogy ha felülök rá akkor írja jóvá?
+ 60*60*24*365*60 gondolom ez az idejét jelzi, elég kitörölni, hogy kiszedjem?

Előre is köszönöm.

Bővítéshez  adj hozza új feltételt (when alatt) cseréld le mindenhol a kódot,  és a bónuszokat is , lehívód relogolsz és már megfogja adni ,ha eldobod  akkor halál után vagy teleport után eltűnik a bónusz, 
Mivel azt úgy lehetne megoldani hogy pc mounttal  de viszont az el is veszi ha leszállsz ezáltal ez így egyszerűbb.  Vagy adj hozzá timert  5mp  ellenőrző hogy van e ha van adja oda
Az időt ne szedd ki az kb vegetelen idő

Köszönöm szépen !