*Problemă:Mount - Nu urcă pe el.
Tipologie server:PvM-PvP
*Resursă folosită:http://just4metin.ro/serverfiles/server ... 72144.html
*ServerFiles utilizat:Nirvana V3.0 Rev 1.80
*Syserr:-
Poză:-
*Detalii suplimentare: După cum spune și titlul, nu reușesc să rezolv această problemă. Am căutat peste tot pe forum și nu numai, în speranța că voi găsii o rezolvare la acest mic bug. N-am ride.quest, am mount.lua. Am verificat în item_proto, mob_proto. Totul este în regulă, am decriptat chiar și root să verific npclist și este ok. Ideea e că, nu funcționează nici /mount_test, dar dacă pun de exemplu /m 20118 îmi apare, sub formă de mob. Am încercat să schimb în proto, type în 18, tot n-am rezolvat nimic.
[Problemă] Mount- Nu urcă pe el.
Verifica in mount.lua daca ai codul mountului respectiv la un anumit item.
- [RaffaeL]
-

- Mesaje: 3223
- Membru din: 19 Mar 2016, 12:58
- Server: ...
- Aprecieri: 15
- Mulţumiri: 2502
- Rezolvări prob.: 2
- Discord: Copiază ID
- Contact:
Pune acel "mount.lua" inThrasher scrie:*Problemă:Mount - Nu urcă pe el.
Tipologie server:PvM-PvP
*Resursă folosită:http://just4metin.ro/serverfiles/server ... 72144.html
*ServerFiles utilizat:Nirvana V3.0 Rev 1.80
*Syserr:-
Poză:-
*Detalii suplimentare: După cum spune și titlul, nu reușesc să rezolv această problemă. Am căutat peste tot pe forum și nu numai, în speranța că voi găsii o rezolvare la acest mic bug. N-am ride.quest, am mount.lua. Am verificat în item_proto, mob_proto. Totul este în regulă, am decriptat chiar și root să verific npclist și este ok. Ideea e că, nu funcționează nici /mount_test, dar dacă pun de exemplu /m 20118 îmi apare, sub formă de mob. Am încercat să schimb în proto, type în 18, tot n-am rezolvat nimic.
Cod: Selectaţi tot
[...Code...]Posibil sa fi avut(sau sa ai inca...) sistemul de "mount ca si calul"(Nu imi vine in minte o alta denumire acum) implementat.
Cod: Selectaţi tot
----------------------------------------------------
----- Server: Metin2Nirvana v3.0 -----
----- Author: [A]ivory -----
----------------------------------------------------
quest mount begin
state __FUNC__ begin
function data()
return
{
-- mounts
-- Note: Mounts have bonus from quest, make sure you remove their bonus from item_proto and they are type 18
-- [item vnum] = {first mob vnum,second mob vnum,bonus id,bonus value},
-- Note: You can find bonus variables in questlib.lua
-- Note: Second mob vnum normally is the same with first but if you have errors in server syserr with pet motions for example lion you need to fix the folder with mob like I did and put different mob vnum like i did for lion (20212 - 29212)
[71124] = {20114,20114,
{{apply.ATTBONUS_MONSTER,20},},
},
[71125] = {20115,20115,
{{apply.ATTBONUS_MONSTER,20},},
},
[71126] = {20116,20116,
{{apply.ATTBONUS_MONSTER,10},{apply.MAX_HP,1000},},
},
[71127] = {20117,20117,
{{apply.ATTBONUS_MONSTER,10},{apply.IMMUNE_STUN,1},},
},
[71128] = {20118,20118,
{{apply.ATTBONUS_MONSTER,10},{apply.STEAL_HP,10},},
},
-- pets
-- Note: pets have bonus from item_proto
-- [item vnum] = {leave this 0,mob vnum},
[53001] = {0,34001},
[53002] = {0,34002},
[53003] = {0,34003},
[53005] = {0,34004},
[53006] = {0,34009},
[53007] = {0,34010},
[53008] = {0,34011},
[53009] = {0,34012},
[53010] = {0,34008},
[53011] = {0,34007},
[53012] = {0,34005},
[53013] = {0,34006},
[53014] = {0,34013},
[53015] = {0,34014},
[53016] = {0,34015},
[53017] = {0,34016},
[53018] = {0,34019},
[53019] = {0,34020},
[53020] = {0,34017},
[53021] = {0,34018},
[53022] = {0,34021},
[53023] = {0,34022},
[53024] = {0,34023},
[53025] = {0,34024},
}
end
function get_timer_sec() return 2 end -- anti spam time
function get_ride_sec() return 1800 end -- how much seconds you want to be mounted, best time is 30 minute (1800s), after the time is finished player is unmounted automatic
function is_only_pet(arg1,arg2) if arg2 and arg1 == 0 then return true else return false end end
function run_from_far() return false end
function npc_to_item(vnum)
local found = 0
for k,v in pairs(mount.data()) do
if v[1] == vnum then
found = k
break
end
end
return found
end
function check_map()
if pc.get_map_index() == 113 then return true end
return false
end
function summon_pet(data)
if mount.check_map() then return end
if data[2] and data[1] and data[2] != data[1] then
if data[2] == 0 then return end -- fix
pet.summon(data[2], string.format("'s %s",mob_name(data[2])), mount.run_from_far())
else
if data[1] == 0 then return end -- fix
pet.summon(data[1], string.format("'s %s",mob_name(data[1])), mount.run_from_far())
end
end
function mount(itemVnum,itemId)
local data = mount.data()[itemVnum]
-- mount begins
if not mount.is_only_pet(data[1],data[2]) then
if pc.is_polymorphed() then syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hNu poţi călări în timp ce eşti transformat.|r") return end
if horse.is_riding() == true then syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hDeja călăreşti.|r") return end
if horse.is_summon() then horse.unsummon() end
if pc.is_mount(data[1]) == true then
pc.unmount()
cleartimer("bugcheck")
if mount.check_map() then return end
if pet.is_summon(data[1]) == false then
mount.summon_pet(data)
-- state save in cache
if not NEW_MOUNT_STATES[pc.get_name()] then
table.insert(NEW_MOUNT_STATES,pc.get_name())
end
NEW_MOUNT_STATES[pc.get_name()] = {{data[1],data[2]},itemId}
end
return
end
if pc.is_mount() and pc.is_mount(data[1]) == false then
--if pc.is_gm() then
syschat(string.format("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7ecccSchimbare|h|r |cFF00ff33%s|h|r |cFFf7eccc->|h|r |cFF00ff33%s|h|r",mob_name(pc.get_mount()),mob_name(data[1])))
--end
pc.unmount()
cleartimer("bugcheck")
if pet.is_summon(pc.get_mount()) == true then
pet.unsummon(pc.get_mount())
end
-- state save in cache
if NEW_MOUNT_STATES[pc.get_name()] then
NEW_MOUNT_STATES[pc.get_name()] = {{0,0},0}
end
end
if NEW_MOUNT_STATES[pc.get_name()] then
if NEW_MOUNT_STATES[pc.get_name()][1][2] and pet.is_summon(NEW_MOUNT_STATES[pc.get_name()][1][2]) == true then
pet.unsummon(NEW_MOUNT_STATES[pc.get_name()][1][2])
-- state save in cache
if NEW_MOUNT_STATES[pc.get_name()] then
NEW_MOUNT_STATES[pc.get_name()] = {{0,0},0}
end
end
end
if mount.check_map() then return end
pc.mount(data[1], mount.get_ride_sec())
-- bonus give
for each in data[3] do
pc.mount_bonus(data[3][each][1],data[3][each][2],mount.get_ride_sec())
end
cleartimer("bugcheck")
loop_timer("bugcheck", mount.get_timer_sec())
else
local limit = 0
if NEW_MOUNT_STATES[pc.get_name()] and NEW_MOUNT_STATES[pc.get_name()][1][2] and pet.is_summon(NEW_MOUNT_STATES[pc.get_name()][1][2]) then
limit = 1
end
-- pet begins
if pet.is_summon(data[2]) == false and pet.count_summoned()-limit >= 1 then
syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hNu poţi invoca mai multe animale.|r")
return
end
if pet.is_summon(data[2]) == false then
if data[2] == 0 then return end -- fix
pet.summon(data[2], string.format("'s %s",mob_name(data[2])), mount.run_from_far())
-- state save in cache
if not NEW_PET_STATES[pc.get_name()] then
table.insert(NEW_PET_STATES,pc.get_name())
end
NEW_PET_STATES[pc.get_name()] = {item.get_id(),data[2]}
return
else
pet.unsummon(data[2])
end
end
end
end
state start begin
-- add your vnums here too ...
when 71124.use or 71125.use or 71126.use or 71127.use or 71128.use or
53001.use or 53002.use or 53003.use or 53005.use or 53006.use or
53007.use or 53008.use or 53009.use or 53010.use or 53011.use or
53012.use or 53013.use or 53014.use or 53015.use or 53016.use or
53017.use or 53018.use or 53019.use or 53020.use or 53021.use or
53022.use or 53023.use or 53024.use or 53025.use with mount.data()[item.vnum] begin
-- anti spam start
if not lastPulse then lastPulse = get_time() end
if not lastPulseNumber then lastPulseNumber = 0 end
if (get_time() - lastPulse <= 1) then
if lastPulseNumber >= 2 then
syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hAnti spam blocked you my friend.|r")
return
end
lastPulseNumber = lastPulseNumber + 1
else
lastPulseNumber = lastPulseNumber - 1
end
lastPulse = get_time()
-- anti spam end
mount.mount(item.vnum,item.get_id())
end
when login begin
if mount.check_map() then return end
if NEW_MOUNT_STATES[pc.get_name()] and NEW_MOUNT_STATES[pc.get_name()][1][2] and NEW_MOUNT_STATES[pc.get_name()][2] then
local enable_timer = true
--syschat(string.format("%d %d",NEW_MOUNT_STATES[pc.get_name()][1][2],NEW_MOUNT_STATES[pc.get_name()][2]))
if not mount.is_only_pet(NEW_MOUNT_STATES[pc.get_name()][1][1],NEW_MOUNT_STATES[pc.get_name()][1][2]) then
--syschat(string.format("%d %d",NEW_MOUNT_STATES[pc.get_name()][2],NEW_MOUNT_STATES[pc.get_name()][1][2]))
item.select(NEW_MOUNT_STATES[pc.get_name()][2])
mount.summon_pet(NEW_MOUNT_STATES[pc.get_name()][1])
enable_timer = true
end
if enable_timer then
loop_timer("bugcheck", mount.get_timer_sec())
end
end
if NEW_PET_STATES[pc.get_name()] and NEW_PET_STATES[pc.get_name()][1] and NEW_PET_STATES[pc.get_name()][2] then
item.select(NEW_PET_STATES[pc.get_name()][1])
mount.summon_pet(NEW_PET_STATES[pc.get_name()])
end
end
when logout begin
if mount.check_map() then return end
if NEW_PET_STATES[pc.get_name()] then
if pet.is_summon(NEW_PET_STATES[pc.get_name()][2]) == false then
NEW_PET_STATES[pc.get_name()] = {0,0}
end
end
if NEW_MOUNT_STATES[pc.get_name()] then
if pet.is_summon(NEW_MOUNT_STATES[pc.get_name()][1][2]) == false then
NEW_MOUNT_STATES[pc.get_name()] = {{0,0},0}
end
end
end
when bugcheck.timer begin -- to check if player still have the item in inventory while mounted
--chat("checking")
if pc.is_mount() then
if pc.count_item(mount.npc_to_item(pc.get_mount())) == 0 then
pc.unmount()
cleartimer("bugcheck")
end
else
cleartimer("bugcheck")
end
end
end
end
Ai pus cumva sa citeasca serverul sql in loc de txt?
- [RaffaeL]
-

- Mesaje: 3223
- Membru din: 19 Mar 2016, 12:58
- Server: ...
- Aprecieri: 15
- Mulţumiri: 2502
- Rezolvări prob.: 2
- Discord: Copiază ID
- Contact:
Questul este ok, insa la cum este scris, seamana cumva cu stilul lui Exigo, deci banuiesc ca face parte din sistemul lui de mount, caz in care, trebuie sa ai si partea de sursa facuta.Thrasher scrie:Cod: Selectaţi tot
---------------------------------------------------- ----- Server: Metin2Nirvana v3.0 ----- ----- Author: [A]ivory ----- ---------------------------------------------------- quest mount begin state __FUNC__ begin function data() return { -- mounts -- Note: Mounts have bonus from quest, make sure you remove their bonus from item_proto and they are type 18 -- [item vnum] = {first mob vnum,second mob vnum,bonus id,bonus value}, -- Note: You can find bonus variables in questlib.lua -- Note: Second mob vnum normally is the same with first but if you have errors in server syserr with pet motions for example lion you need to fix the folder with mob like I did and put different mob vnum like i did for lion (20212 - 29212) [71124] = {20114,20114, {{apply.ATTBONUS_MONSTER,20},}, }, [71125] = {20115,20115, {{apply.ATTBONUS_MONSTER,20},}, }, [71126] = {20116,20116, {{apply.ATTBONUS_MONSTER,10},{apply.MAX_HP,1000},}, }, [71127] = {20117,20117, {{apply.ATTBONUS_MONSTER,10},{apply.IMMUNE_STUN,1},}, }, [71128] = {20118,20118, {{apply.ATTBONUS_MONSTER,10},{apply.STEAL_HP,10},}, }, -- pets -- Note: pets have bonus from item_proto -- [item vnum] = {leave this 0,mob vnum}, [53001] = {0,34001}, [53002] = {0,34002}, [53003] = {0,34003}, [53005] = {0,34004}, [53006] = {0,34009}, [53007] = {0,34010}, [53008] = {0,34011}, [53009] = {0,34012}, [53010] = {0,34008}, [53011] = {0,34007}, [53012] = {0,34005}, [53013] = {0,34006}, [53014] = {0,34013}, [53015] = {0,34014}, [53016] = {0,34015}, [53017] = {0,34016}, [53018] = {0,34019}, [53019] = {0,34020}, [53020] = {0,34017}, [53021] = {0,34018}, [53022] = {0,34021}, [53023] = {0,34022}, [53024] = {0,34023}, [53025] = {0,34024}, } end function get_timer_sec() return 2 end -- anti spam time function get_ride_sec() return 1800 end -- how much seconds you want to be mounted, best time is 30 minute (1800s), after the time is finished player is unmounted automatic function is_only_pet(arg1,arg2) if arg2 and arg1 == 0 then return true else return false end end function run_from_far() return false end function npc_to_item(vnum) local found = 0 for k,v in pairs(mount.data()) do if v[1] == vnum then found = k break end end return found end function check_map() if pc.get_map_index() == 113 then return true end return false end function summon_pet(data) if mount.check_map() then return end if data[2] and data[1] and data[2] != data[1] then if data[2] == 0 then return end -- fix pet.summon(data[2], string.format("'s %s",mob_name(data[2])), mount.run_from_far()) else if data[1] == 0 then return end -- fix pet.summon(data[1], string.format("'s %s",mob_name(data[1])), mount.run_from_far()) end end function mount(itemVnum,itemId) local data = mount.data()[itemVnum] -- mount begins if not mount.is_only_pet(data[1],data[2]) then if pc.is_polymorphed() then syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hNu poţi călări în timp ce eşti transformat.|r") return end if horse.is_riding() == true then syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hDeja călăreşti.|r") return end if horse.is_summon() then horse.unsummon() end if pc.is_mount(data[1]) == true then pc.unmount() cleartimer("bugcheck") if mount.check_map() then return end if pet.is_summon(data[1]) == false then mount.summon_pet(data) -- state save in cache if not NEW_MOUNT_STATES[pc.get_name()] then table.insert(NEW_MOUNT_STATES,pc.get_name()) end NEW_MOUNT_STATES[pc.get_name()] = {{data[1],data[2]},itemId} end return end if pc.is_mount() and pc.is_mount(data[1]) == false then --if pc.is_gm() then syschat(string.format("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7ecccSchimbare|h|r |cFF00ff33%s|h|r |cFFf7eccc->|h|r |cFF00ff33%s|h|r",mob_name(pc.get_mount()),mob_name(data[1]))) --end pc.unmount() cleartimer("bugcheck") if pet.is_summon(pc.get_mount()) == true then pet.unsummon(pc.get_mount()) end -- state save in cache if NEW_MOUNT_STATES[pc.get_name()] then NEW_MOUNT_STATES[pc.get_name()] = {{0,0},0} end end if NEW_MOUNT_STATES[pc.get_name()] then if NEW_MOUNT_STATES[pc.get_name()][1][2] and pet.is_summon(NEW_MOUNT_STATES[pc.get_name()][1][2]) == true then pet.unsummon(NEW_MOUNT_STATES[pc.get_name()][1][2]) -- state save in cache if NEW_MOUNT_STATES[pc.get_name()] then NEW_MOUNT_STATES[pc.get_name()] = {{0,0},0} end end end if mount.check_map() then return end pc.mount(data[1], mount.get_ride_sec()) -- bonus give for each in data[3] do pc.mount_bonus(data[3][each][1],data[3][each][2],mount.get_ride_sec()) end cleartimer("bugcheck") loop_timer("bugcheck", mount.get_timer_sec()) else local limit = 0 if NEW_MOUNT_STATES[pc.get_name()] and NEW_MOUNT_STATES[pc.get_name()][1][2] and pet.is_summon(NEW_MOUNT_STATES[pc.get_name()][1][2]) then limit = 1 end -- pet begins if pet.is_summon(data[2]) == false and pet.count_summoned()-limit >= 1 then syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hNu poţi invoca mai multe animale.|r") return end if pet.is_summon(data[2]) == false then if data[2] == 0 then return end -- fix pet.summon(data[2], string.format("'s %s",mob_name(data[2])), mount.run_from_far()) -- state save in cache if not NEW_PET_STATES[pc.get_name()] then table.insert(NEW_PET_STATES,pc.get_name()) end NEW_PET_STATES[pc.get_name()] = {item.get_id(),data[2]} return else pet.unsummon(data[2]) end end end end state start begin -- add your vnums here too ... when 71124.use or 71125.use or 71126.use or 71127.use or 71128.use or 53001.use or 53002.use or 53003.use or 53005.use or 53006.use or 53007.use or 53008.use or 53009.use or 53010.use or 53011.use or 53012.use or 53013.use or 53014.use or 53015.use or 53016.use or 53017.use or 53018.use or 53019.use or 53020.use or 53021.use or 53022.use or 53023.use or 53024.use or 53025.use with mount.data()[item.vnum] begin -- anti spam start if not lastPulse then lastPulse = get_time() end if not lastPulseNumber then lastPulseNumber = 0 end if (get_time() - lastPulse <= 1) then if lastPulseNumber >= 2 then syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hAnti spam blocked you my friend.|r") return end lastPulseNumber = lastPulseNumber + 1 else lastPulseNumber = lastPulseNumber - 1 end lastPulse = get_time() -- anti spam end mount.mount(item.vnum,item.get_id()) end when login begin if mount.check_map() then return end if NEW_MOUNT_STATES[pc.get_name()] and NEW_MOUNT_STATES[pc.get_name()][1][2] and NEW_MOUNT_STATES[pc.get_name()][2] then local enable_timer = true --syschat(string.format("%d %d",NEW_MOUNT_STATES[pc.get_name()][1][2],NEW_MOUNT_STATES[pc.get_name()][2])) if not mount.is_only_pet(NEW_MOUNT_STATES[pc.get_name()][1][1],NEW_MOUNT_STATES[pc.get_name()][1][2]) then --syschat(string.format("%d %d",NEW_MOUNT_STATES[pc.get_name()][2],NEW_MOUNT_STATES[pc.get_name()][1][2])) item.select(NEW_MOUNT_STATES[pc.get_name()][2]) mount.summon_pet(NEW_MOUNT_STATES[pc.get_name()][1]) enable_timer = true end if enable_timer then loop_timer("bugcheck", mount.get_timer_sec()) end end if NEW_PET_STATES[pc.get_name()] and NEW_PET_STATES[pc.get_name()][1] and NEW_PET_STATES[pc.get_name()][2] then item.select(NEW_PET_STATES[pc.get_name()][1]) mount.summon_pet(NEW_PET_STATES[pc.get_name()]) end end when logout begin if mount.check_map() then return end if NEW_PET_STATES[pc.get_name()] then if pet.is_summon(NEW_PET_STATES[pc.get_name()][2]) == false then NEW_PET_STATES[pc.get_name()] = {0,0} end end if NEW_MOUNT_STATES[pc.get_name()] then if pet.is_summon(NEW_MOUNT_STATES[pc.get_name()][1][2]) == false then NEW_MOUNT_STATES[pc.get_name()] = {{0,0},0} end end end when bugcheck.timer begin -- to check if player still have the item in inventory while mounted --chat("checking") if pc.is_mount() then if pc.count_item(mount.npc_to_item(pc.get_mount())) == 0 then pc.unmount() cleartimer("bugcheck") end else cleartimer("bugcheck") end end end end
Incearca asta:
quest mount_test begin state start begin when 71124.use begin pc.mount(21114) end end endcu 71124 pe type 18(sau QUEST pentru server pe txt), si revino cu reply.
La fel îmi face.[RaffaeL] scrie:Questul este ok, insa la cum este scris, seamana cumva cu stilul lui Exigo, deci banuiesc ca face parte din sistemul lui de mount, caz in care, trebuie sa ai si partea de sursa facuta.Thrasher scrie:Cod: Selectaţi tot
---------------------------------------------------- ----- Server: Metin2Nirvana v3.0 ----- ----- Author: [A]ivory ----- ---------------------------------------------------- quest mount begin state __FUNC__ begin function data() return { -- mounts -- Note: Mounts have bonus from quest, make sure you remove their bonus from item_proto and they are type 18 -- [item vnum] = {first mob vnum,second mob vnum,bonus id,bonus value}, -- Note: You can find bonus variables in questlib.lua -- Note: Second mob vnum normally is the same with first but if you have errors in server syserr with pet motions for example lion you need to fix the folder with mob like I did and put different mob vnum like i did for lion (20212 - 29212) [71124] = {20114,20114, {{apply.ATTBONUS_MONSTER,20},}, }, [71125] = {20115,20115, {{apply.ATTBONUS_MONSTER,20},}, }, [71126] = {20116,20116, {{apply.ATTBONUS_MONSTER,10},{apply.MAX_HP,1000},}, }, [71127] = {20117,20117, {{apply.ATTBONUS_MONSTER,10},{apply.IMMUNE_STUN,1},}, }, [71128] = {20118,20118, {{apply.ATTBONUS_MONSTER,10},{apply.STEAL_HP,10},}, }, -- pets -- Note: pets have bonus from item_proto -- [item vnum] = {leave this 0,mob vnum}, [53001] = {0,34001}, [53002] = {0,34002}, [53003] = {0,34003}, [53005] = {0,34004}, [53006] = {0,34009}, [53007] = {0,34010}, [53008] = {0,34011}, [53009] = {0,34012}, [53010] = {0,34008}, [53011] = {0,34007}, [53012] = {0,34005}, [53013] = {0,34006}, [53014] = {0,34013}, [53015] = {0,34014}, [53016] = {0,34015}, [53017] = {0,34016}, [53018] = {0,34019}, [53019] = {0,34020}, [53020] = {0,34017}, [53021] = {0,34018}, [53022] = {0,34021}, [53023] = {0,34022}, [53024] = {0,34023}, [53025] = {0,34024}, } end function get_timer_sec() return 2 end -- anti spam time function get_ride_sec() return 1800 end -- how much seconds you want to be mounted, best time is 30 minute (1800s), after the time is finished player is unmounted automatic function is_only_pet(arg1,arg2) if arg2 and arg1 == 0 then return true else return false end end function run_from_far() return false end function npc_to_item(vnum) local found = 0 for k,v in pairs(mount.data()) do if v[1] == vnum then found = k break end end return found end function check_map() if pc.get_map_index() == 113 then return true end return false end function summon_pet(data) if mount.check_map() then return end if data[2] and data[1] and data[2] != data[1] then if data[2] == 0 then return end -- fix pet.summon(data[2], string.format("'s %s",mob_name(data[2])), mount.run_from_far()) else if data[1] == 0 then return end -- fix pet.summon(data[1], string.format("'s %s",mob_name(data[1])), mount.run_from_far()) end end function mount(itemVnum,itemId) local data = mount.data()[itemVnum] -- mount begins if not mount.is_only_pet(data[1],data[2]) then if pc.is_polymorphed() then syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hNu poţi călări în timp ce eşti transformat.|r") return end if horse.is_riding() == true then syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hDeja călăreşti.|r") return end if horse.is_summon() then horse.unsummon() end if pc.is_mount(data[1]) == true then pc.unmount() cleartimer("bugcheck") if mount.check_map() then return end if pet.is_summon(data[1]) == false then mount.summon_pet(data) -- state save in cache if not NEW_MOUNT_STATES[pc.get_name()] then table.insert(NEW_MOUNT_STATES,pc.get_name()) end NEW_MOUNT_STATES[pc.get_name()] = {{data[1],data[2]},itemId} end return end if pc.is_mount() and pc.is_mount(data[1]) == false then --if pc.is_gm() then syschat(string.format("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7ecccSchimbare|h|r |cFF00ff33%s|h|r |cFFf7eccc->|h|r |cFF00ff33%s|h|r",mob_name(pc.get_mount()),mob_name(data[1]))) --end pc.unmount() cleartimer("bugcheck") if pet.is_summon(pc.get_mount()) == true then pet.unsummon(pc.get_mount()) end -- state save in cache if NEW_MOUNT_STATES[pc.get_name()] then NEW_MOUNT_STATES[pc.get_name()] = {{0,0},0} end end if NEW_MOUNT_STATES[pc.get_name()] then if NEW_MOUNT_STATES[pc.get_name()][1][2] and pet.is_summon(NEW_MOUNT_STATES[pc.get_name()][1][2]) == true then pet.unsummon(NEW_MOUNT_STATES[pc.get_name()][1][2]) -- state save in cache if NEW_MOUNT_STATES[pc.get_name()] then NEW_MOUNT_STATES[pc.get_name()] = {{0,0},0} end end end if mount.check_map() then return end pc.mount(data[1], mount.get_ride_sec()) -- bonus give for each in data[3] do pc.mount_bonus(data[3][each][1],data[3][each][2],mount.get_ride_sec()) end cleartimer("bugcheck") loop_timer("bugcheck", mount.get_timer_sec()) else local limit = 0 if NEW_MOUNT_STATES[pc.get_name()] and NEW_MOUNT_STATES[pc.get_name()][1][2] and pet.is_summon(NEW_MOUNT_STATES[pc.get_name()][1][2]) then limit = 1 end -- pet begins if pet.is_summon(data[2]) == false and pet.count_summoned()-limit >= 1 then syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hNu poţi invoca mai multe animale.|r") return end if pet.is_summon(data[2]) == false then if data[2] == 0 then return end -- fix pet.summon(data[2], string.format("'s %s",mob_name(data[2])), mount.run_from_far()) -- state save in cache if not NEW_PET_STATES[pc.get_name()] then table.insert(NEW_PET_STATES,pc.get_name()) end NEW_PET_STATES[pc.get_name()] = {item.get_id(),data[2]} return else pet.unsummon(data[2]) end end end end state start begin -- add your vnums here too ... when 71124.use or 71125.use or 71126.use or 71127.use or 71128.use or 53001.use or 53002.use or 53003.use or 53005.use or 53006.use or 53007.use or 53008.use or 53009.use or 53010.use or 53011.use or 53012.use or 53013.use or 53014.use or 53015.use or 53016.use or 53017.use or 53018.use or 53019.use or 53020.use or 53021.use or 53022.use or 53023.use or 53024.use or 53025.use with mount.data()[item.vnum] begin -- anti spam start if not lastPulse then lastPulse = get_time() end if not lastPulseNumber then lastPulseNumber = 0 end if (get_time() - lastPulse <= 1) then if lastPulseNumber >= 2 then syschat("|cFF00ff33[Metin2Nirvana] > |h|r|cFFf7eccc|hAnti spam blocked you my friend.|r") return end lastPulseNumber = lastPulseNumber + 1 else lastPulseNumber = lastPulseNumber - 1 end lastPulse = get_time() -- anti spam end mount.mount(item.vnum,item.get_id()) end when login begin if mount.check_map() then return end if NEW_MOUNT_STATES[pc.get_name()] and NEW_MOUNT_STATES[pc.get_name()][1][2] and NEW_MOUNT_STATES[pc.get_name()][2] then local enable_timer = true --syschat(string.format("%d %d",NEW_MOUNT_STATES[pc.get_name()][1][2],NEW_MOUNT_STATES[pc.get_name()][2])) if not mount.is_only_pet(NEW_MOUNT_STATES[pc.get_name()][1][1],NEW_MOUNT_STATES[pc.get_name()][1][2]) then --syschat(string.format("%d %d",NEW_MOUNT_STATES[pc.get_name()][2],NEW_MOUNT_STATES[pc.get_name()][1][2])) item.select(NEW_MOUNT_STATES[pc.get_name()][2]) mount.summon_pet(NEW_MOUNT_STATES[pc.get_name()][1]) enable_timer = true end if enable_timer then loop_timer("bugcheck", mount.get_timer_sec()) end end if NEW_PET_STATES[pc.get_name()] and NEW_PET_STATES[pc.get_name()][1] and NEW_PET_STATES[pc.get_name()][2] then item.select(NEW_PET_STATES[pc.get_name()][1]) mount.summon_pet(NEW_PET_STATES[pc.get_name()]) end end when logout begin if mount.check_map() then return end if NEW_PET_STATES[pc.get_name()] then if pet.is_summon(NEW_PET_STATES[pc.get_name()][2]) == false then NEW_PET_STATES[pc.get_name()] = {0,0} end end if NEW_MOUNT_STATES[pc.get_name()] then if pet.is_summon(NEW_MOUNT_STATES[pc.get_name()][1][2]) == false then NEW_MOUNT_STATES[pc.get_name()] = {{0,0},0} end end end when bugcheck.timer begin -- to check if player still have the item in inventory while mounted --chat("checking") if pc.is_mount() then if pc.count_item(mount.npc_to_item(pc.get_mount())) == 0 then pc.unmount() cleartimer("bugcheck") end else cleartimer("bugcheck") end end end end
Incearca asta:quest mount_test begin state start begin when 71124.use begin pc.mount(21114) end end endcu 71124 pe type 18(sau QUEST pentru server pe txt), si revino cu reply.
- [RaffaeL]
-

- Mesaje: 3223
- Membru din: 19 Mar 2016, 12:58
- Server: ...
- Aprecieri: 15
- Mulţumiri: 2502
- Rezolvări prob.: 2
- Discord: Copiază ID
- Contact:
Cu oricare vnum de item si mob aferent ai adauga in questul ala de test?(zic asta pentru ca anumite sigilii sunt pe type 16/ ITEM_UNIQUE->subtype UNIQUE_SPECIAL_RIDE pentru txt)Thrasher scrie:La fel îmi face.
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Google [Bot] și 21 vizitatori




