Merhabalar , development istek kategorinde bir arkadaş böyle bir talep de bulunmuş. Bende paylaşmak istedim.
Kod:
local start_time = nil local rewards = { {time = 10800, vnum = "item_vnum_1", count = 1}, {time = 21600, vnum = "item_vnum_2", count = 2}, {time = 43200, vnum = "item_vnum_3", count = 3}, {time = 86400, vnum = "item_vnum_4", count = 4} } function CevrimdisiPazarSure_OnLogin(char) if start_time ~= nil then local elapsed_time = os.time() - start_time for i, reward in ipairs(rewards) do if elapsed_time >= reward.time then char:pc_give_item2(reward.vnum, reward.count) table.remove(rewards, i) break end end start_time = nil end local remaining_time = 0 for i, reward in ipairs(rewards) do remaining_time = remaining_time + reward.time end char:quest_info("Çevrimdışı Market Hediye", string.format("Kalan Süre: %d saniye", remaining_time)) end function CevrimdisiPazarSure_OnLogout(char) start_time = os.time() end
item_vunum yerlerine eşya kodlarını yazın.
time = 10800 - saniye cinsinden süre
Bu quest'de görev sekmesinden hediye almak için kalan süreyide görebileceksiniz.
Metin2'de Quest Sistemi: Çevrimdışı Pazar Açık Olduğu Sürece Hediye Eşya Verme
Metin2 oyununda quest sistemleri, oyuncuların oyun içinde gelişim göstermesini sağlayan en önemli unsurlardan biridir. Bu sistemler, hem oyunun hikayesine katkı sağlar hem de oyuncuya eşya, tecrübe veya para gibi ödüller sunar. Bu yazıda, Metin2 quest sisteminde, 'çevrimdışı pazar açık olduğu sürece hediye eşya verme' konseptine odaklanacağız. Bu konu özellikle Metin2 quest geliştirme ile ilgilenen geliştiriciler için oldukça değerlidir.
Quest Nedir?
Quest, Metin2'de belirli görevleri tamamlayarak ödüller kazanmaya yarayan sistemdir. Oyuncular, belirli NPC'lerden quest alabilir, görevleri yerine getirerek ödül kazanabilirler. Quest sistemi genellikle Lua dili ile yazılır ve Metin2 quest script olarak adlandırılır. Quest sistemleri, oyun içinde timer, trigger, flag, state gibi birçok farklı yapıyı kullanır.
Çevrimdışı Pazar Sistemi Nedir?[/BR][/BR]Çevrimdışı pazar, oyuncuların oyun kapalıyken bile eşya satababileceği, alabileceği bir sistemdir. Bu sistem sayesinde oyuncular, aktif olmasalar bile gelir elde edebilirler. Bu yazıda ele alınan quest, oyuncunun çevrimdışı pazarı açık olduğu sürece belirli aralıklarla hediye eşya vermektedir. Bu, oyuncunun sistemden sürekli faydalanmasını teşvik eder.
Quest Script Yapısı[/BR][/BR]Bu quest, Metin2 quest lua[/BR] yapısına göre hazırlanmıştır. Öncelikle questin başlangıç komutları olan quest begin ve sonlandırıcı komutlar olan quest end tanımlanır. Ardından, timer yardımıyla belirli aralıklarla kontrol yapılır. Eğer oyuncunun çevrimdışı pazarı açık ise, item verilir. Bu işlem sırasında flag ve state kontrolleri yapılır.
Quest Kodları ve Açıklamalar[/BR][/BR]Metin2 quest dosyası şu şekilde olabilir:
Yukarıdaki kodda:
- login ile oyuncu giriş yaptıktan sonra quest başlatılır.
- set_timer ile belirli aralıklarla pazar açık mı diye kontrol yapılır.
- pc.is_open_offline_shop() fonksiyonu, pazarın açık olup olmadığını kontrol eder.
- game.drop_item_with_ownership ile hediye eşya verilir.
Quest Hata Ayıklama ve Debug[/BR][/BR]Metin2 quest hata ayıklama işlemleri sırasında, log dosyaları kontrol edilmelidir..quest debug[/COLOR] işlemleri sırasında, questin doğru çalışıp çalışmadığı, timer'ların çalışıp çalışmadığı test edilmelidir. Hatalar genellikle Lua syntax hatalarıdır veya flag eksikliğinden kaynaklanabilir.
Özel ve Günlük Questler[/BR][/BR]Bu quest, Metin2 daily quest olarak da uyarlanabilir. Günlük görev sistemi ile birleştirilirse, oyuncular daha fazla teşvik edilebilir. Ayrıca, custom quest olarak özelleştirilip, sunucuya özel özellikler eklenebilir.
Sonuç[/BR][/BR]Metin2 quest sistemleri[/BR], oyun deneyimini zenginleştiren güçlü yapılardır. Bu yazıda anlatılan 'çevrimdışı pazar açık olduğu sürece hediye eşya verme' quest'i, oyuncuların sistemi daha fazla kullanmasını sağlar. Metin2 quest yazma ve quest edit konularında daha fazla bilgi almak isterseniz, Metin2Lobby sitemizi ziyaret edebilirsiniz.
Metin2 Quest System: Gift Item Giving While Offline Market Is Open
In Metin2, quest systems are among the most important elements that allow players to progress within the game. These systems contribute to the game's story and provide rewards such as items, experience points, or money. In this article, we will focus on the concept of 'gift item giving while offline market is open' in Metin2 quests. This topic is particularly valuable for developers interested in Metin2 quest development.
What is a Quest?[/BR][/BR]Quests in Metin2 refer to missions that allow players to earn rewards by completing specific tasks. Players can receive quests from certain NPCs, complete them, and earn rewards. Quest systems are typically written in Lua and are known as Metin2 quest scripts. These systems utilize structures like timers, triggers, flags, and states.
What is the Offline Market System?[/BR][/BR]The offline market allows players to sell and buy items even when they are not logged into the game. Thanks to this system, players can earn income even while offline. The quest discussed here gives gift items at regular intervals as long as the player's offline market is open, encouraging continuous use of the system.
Quest Script Structure[/BR][/BR]This quest is built according to the Metin2 quest Lua structure. First, the starting commands quest begin and ending commands quest end are defined. Then, a timer is used to perform checks at specific intervals. If the player’s offline market is open, an item is given. During this process, flag and state checks are performed.
Quest Codes and Explanations[/BR][/BR]The Metin2 quest file might look like this:
In the code above:
- login starts the quest when the player logs in.
- set_timer performs checks at regular intervals to see if the market is open.
- pc.is_open_offline_shop() checks whether the market is open.
- game.drop_item_with_ownership gives the gift item.
Quest Debugging[/BR][/BR]Debugging Metin2 quests requires checking log files. During quest debug operations, ensure the quest runs correctly and timers function properly. Errors often stem from Lua syntax errors or missing flags.
Custom and Daily Quests[/BR][/BR]This quest can also be adapted as a Metin2 daily quest. Combined with a daily mission system, players can be incentivized more. Moreover, it can be customized as a custom quest to add server-specific features.
Conclusion[/BR][/BR]Metin2 quest systems are powerful tools that enrich the gaming experience. The 'gift item giving while offline market is open' quest described in this article encourages players to use the system more frequently. For more information on Metin2 quest writing and quest editing, visit our website Metin2Lobby.
time = 10800 - saniye cinsinden süre
Bu quest'de görev sekmesinden hediye almak için kalan süreyide görebileceksiniz.
Metin2'de Quest Sistemi: Çevrimdışı Pazar Açık Olduğu Sürece Hediye Eşya Verme
Metin2 oyununda quest sistemleri, oyuncuların oyun içinde gelişim göstermesini sağlayan en önemli unsurlardan biridir. Bu sistemler, hem oyunun hikayesine katkı sağlar hem de oyuncuya eşya, tecrübe veya para gibi ödüller sunar. Bu yazıda, Metin2 quest sisteminde, 'çevrimdışı pazar açık olduğu sürece hediye eşya verme' konseptine odaklanacağız. Bu konu özellikle Metin2 quest geliştirme ile ilgilenen geliştiriciler için oldukça değerlidir.
Quest Nedir?
Quest, Metin2'de belirli görevleri tamamlayarak ödüller kazanmaya yarayan sistemdir. Oyuncular, belirli NPC'lerden quest alabilir, görevleri yerine getirerek ödül kazanabilirler. Quest sistemi genellikle Lua dili ile yazılır ve Metin2 quest script olarak adlandırılır. Quest sistemleri, oyun içinde timer, trigger, flag, state gibi birçok farklı yapıyı kullanır.
Çevrimdışı Pazar Sistemi Nedir?[/BR][/BR]Çevrimdışı pazar, oyuncuların oyun kapalıyken bile eşya satababileceği, alabileceği bir sistemdir. Bu sistem sayesinde oyuncular, aktif olmasalar bile gelir elde edebilirler. Bu yazıda ele alınan quest, oyuncunun çevrimdışı pazarı açık olduğu sürece belirli aralıklarla hediye eşya vermektedir. Bu, oyuncunun sistemden sürekli faydalanmasını teşvik eder.
Quest Script Yapısı[/BR][/BR]Bu quest, Metin2 quest lua[/BR] yapısına göre hazırlanmıştır. Öncelikle questin başlangıç komutları olan quest begin ve sonlandırıcı komutlar olan quest end tanımlanır. Ardından, timer yardımıyla belirli aralıklarla kontrol yapılır. Eğer oyuncunun çevrimdışı pazarı açık ise, item verilir. Bu işlem sırasında flag ve state kontrolleri yapılır.
Quest Kodları ve Açıklamalar[/BR][/BR]Metin2 quest dosyası şu şekilde olabilir:
Kod:
[B]quest offline_market_gift begin[/B][BR][/BR][B] state start begin[/B][BR][/BR][B] when login with pc.get_level() >= 50 begin[/B][BR][/BR][B] set_timer('check_market', 300) -- 5 dakikada bir kontrol[/B][BR][/BR][B] end[/B][BR][/BR][B] when check_market.timer begin[/B][BR][/BR][B] if pc.is_open_offline_shop() then[/B][BR][/BR][B] game.drop_item_with_ownership(71035, 1) -- Hediye item[/B][BR][/BR][B] chat('Pazar açık olduğu için hediye eşya verildi!')[/B][BR][/BR][B] end[/B][BR][/BR][B] end[/B][BR][/BR][B] end[/B][BR][/BR][B]end[/B]
Yukarıdaki kodda:
- login ile oyuncu giriş yaptıktan sonra quest başlatılır.
- set_timer ile belirli aralıklarla pazar açık mı diye kontrol yapılır.
- pc.is_open_offline_shop() fonksiyonu, pazarın açık olup olmadığını kontrol eder.
- game.drop_item_with_ownership ile hediye eşya verilir.
Quest Hata Ayıklama ve Debug[/BR][/BR]Metin2 quest hata ayıklama işlemleri sırasında, log dosyaları kontrol edilmelidir..quest debug[/COLOR] işlemleri sırasında, questin doğru çalışıp çalışmadığı, timer'ların çalışıp çalışmadığı test edilmelidir. Hatalar genellikle Lua syntax hatalarıdır veya flag eksikliğinden kaynaklanabilir.
Özel ve Günlük Questler[/BR][/BR]Bu quest, Metin2 daily quest olarak da uyarlanabilir. Günlük görev sistemi ile birleştirilirse, oyuncular daha fazla teşvik edilebilir. Ayrıca, custom quest olarak özelleştirilip, sunucuya özel özellikler eklenebilir.
Sonuç[/BR][/BR]Metin2 quest sistemleri[/BR], oyun deneyimini zenginleştiren güçlü yapılardır. Bu yazıda anlatılan 'çevrimdışı pazar açık olduğu sürece hediye eşya verme' quest'i, oyuncuların sistemi daha fazla kullanmasını sağlar. Metin2 quest yazma ve quest edit konularında daha fazla bilgi almak isterseniz, Metin2Lobby sitemizi ziyaret edebilirsiniz.
Metin2 Quest System: Gift Item Giving While Offline Market Is Open
In Metin2, quest systems are among the most important elements that allow players to progress within the game. These systems contribute to the game's story and provide rewards such as items, experience points, or money. In this article, we will focus on the concept of 'gift item giving while offline market is open' in Metin2 quests. This topic is particularly valuable for developers interested in Metin2 quest development.
What is a Quest?[/BR][/BR]Quests in Metin2 refer to missions that allow players to earn rewards by completing specific tasks. Players can receive quests from certain NPCs, complete them, and earn rewards. Quest systems are typically written in Lua and are known as Metin2 quest scripts. These systems utilize structures like timers, triggers, flags, and states.
What is the Offline Market System?[/BR][/BR]The offline market allows players to sell and buy items even when they are not logged into the game. Thanks to this system, players can earn income even while offline. The quest discussed here gives gift items at regular intervals as long as the player's offline market is open, encouraging continuous use of the system.
Quest Script Structure[/BR][/BR]This quest is built according to the Metin2 quest Lua structure. First, the starting commands quest begin and ending commands quest end are defined. Then, a timer is used to perform checks at specific intervals. If the player’s offline market is open, an item is given. During this process, flag and state checks are performed.
Quest Codes and Explanations[/BR][/BR]The Metin2 quest file might look like this:
Kod:
[B]quest offline_market_gift begin[/B][BR][/BR][B] state start begin[/B][BR][/BR][B] when login with pc.get_level() >= 50 begin[/B][BR][/BR][B] set_timer('check_market', 300) -- Check every 5 minutes[/B][BR][/BR][B] end[/B][BR][/BR][B] when check_market.timer begin[/B][BR][/BR][B] if pc.is_open_offline_shop() then[/B][BR][/BR][B] game.drop_item_with_ownership(71035, 1) -- Gift item[/B][BR][/BR][B] chat('Gift item given because the market is open!')[/B][BR][/BR][B] end[/B][BR][/BR][B] end[/B][BR][/BR][B] end[/B][BR][/BR][B]end[/B]
In the code above:
- login starts the quest when the player logs in.
- set_timer performs checks at regular intervals to see if the market is open.
- pc.is_open_offline_shop() checks whether the market is open.
- game.drop_item_with_ownership gives the gift item.
Quest Debugging[/BR][/BR]Debugging Metin2 quests requires checking log files. During quest debug operations, ensure the quest runs correctly and timers function properly. Errors often stem from Lua syntax errors or missing flags.
Custom and Daily Quests[/BR][/BR]This quest can also be adapted as a Metin2 daily quest. Combined with a daily mission system, players can be incentivized more. Moreover, it can be customized as a custom quest to add server-specific features.
Conclusion[/BR][/BR]Metin2 quest systems are powerful tools that enrich the gaming experience. The 'gift item giving while offline market is open' quest described in this article encourages players to use the system more frequently. For more information on Metin2 quest writing and quest editing, visit our website Metin2Lobby.
