Gelişmiş Banka Sistemi

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 70

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Yabancı Bir forumdan alıntıdır.
Size kısa tanıtımını yapayım.

Oyuncular bir şifre yazarak, bir güvenlik sorusu seçerek ve cevabını seçerek banka hesabını oluşturabilirler.
Parolalarıyla oturum açabilirler veya hatırlamazlarsa, sıfırlayabilirler, ancak yalnızca güvenlik sorularının cevabına sahiplerse.
Ayrıca verilerini değiştirebilirler.

Oyuncu giriş yaparken şifresini 5 kez geçemezse veya güvenlik sorusuna cevap verirse, 2 saat boyunca giriş yapamaz veya şifresini sıfırlayamaz.

Öncelikle bu fonksiyonları ve değişkenleri questlib.lua dosyanıza eklemelisiniz:

Kod:
bank_path = '/game/bank' function readline(path, x)     local linetable = {}     for line in io.lines(path..'/'..pc.name) do         table.insert(linetable, line)     end     return linetable[x] end      function write_in_file(path, text)     if string.find(text, "%[ENTER%]") then         text = string.gsub(text, "%[ENTER%]", "n")     end     local file = io.open(path..'/'..pc.name, 'w')     file:write(text)     file:close() end

Bir sonraki adım, banka adında bir klasör oluşturmaktır veya isterseniz ad istediğiniz gibidir, ancak bu klasörün yolunu banka_yolu içinde yazmanız gerekir . Bu klasörde oyuncunun banka hesabıyla ilgili tüm bilgiler kaydedilecektir. (Banka şifresi, güvenlik sorusu, güvenlik sorusunun cevabı ve sonunda kaydedilen altın gibi şeyler).

Ve şimdi görev: (quest yabancı bir forumdan alıntı olduğu için düzenlemeniz gerek yerleri sizler için belirteceğim)

Kod:
quest advanced_bank begin     state start begin         when 20090.chat.'Bank' begin             local question = {'Your moms name?', 'Your fathers name', 'Your pets name', 'Other'} ==> Düzeltebilirsiniz             say_title'Bank'             if pc.getqf('has_bank_acc') == 0 then                 say'Hello! Welcome to our City Bank.[ENTER]I guess you havent an account here.'                 say'Let me explain you how this works:' ==> Düzeltebilirsiniz                 say_reward'You have to write a password for your account[ENTER]a security question and a security answer.' ==> Düzeltebilirsiniz                 say_reward'This will increase your security.[ENTER]No one can access your account unless they[ENTER]have your password.[ENTER]' ==> Düzeltebilirsiniz                 say'You just need to pay 1.000.000 Gold[ENTER]to get your bank account.[ENTER]But always, remember:' ==> Düzeltebilirsiniz                 say_reward'Do not use other games password.[ENTER]This would make easier to know your pw.[ENTER]And also because' ==> Düzeltebilirsiniz                 say_reward'admins can see your password.[ENTER]The same is for your question and answer.[ENTER]' ==> Düzeltebilirsiniz                 say'So.. you wanna continue, and get a[ENTER]bank account?' ==> Düzeltebilirsiniz                 if select('Yes, of course.', 'Nah, forget it.') == 1 then                     if pc.get_gold() < 1000000 then                         say'Sorry, you dont have enough Gold.[ENTER]Come back when you get 1.000.000 Gold.' ==> Düzeltebilirsiniz                         return                     end                     say'Okay, please write your bank acc pw.' ==> Düzeltebilirsiniz                     local pw = input()                     if pw == '' then                         say'Did you change your mind?' ==> Düzeltebilirsiniz                         return                     end                     say'Next step is choose your security question.[ENTER]You can also write one if you want to.' ==> Düzeltebilirsiniz                     local sqt = select_table(question)                     if sqt == 4 then                         say'Okay, please write your question:' ==> Düzeltebilirsiniz                         local myquestion = input()                         if myquestion == '' then                             say'Did you change your mind?' ==> Düzeltebilirsiniz                             return                         end                         question = myquestion                     else                         question = question[sqt]                     end                     say'Oh right, we are almost finishing.[ENTER]Now enter the answer to your question.' ==> Düzeltebilirsiniz                     say_reward(question)                     local answ = input()                     if answ == nil then                         say'Did you change your mind?' ==> Düzeltebilirsiniz                         return                     end                     advanced_bank.set_pc_bank_infos(pw, question, answ, 0)                     say'Great! You are now registered in our bank.[ENTER]Welcome! :)' ==> Düzeltebilirsiniz                     pc.change_gold(-1000000)                 end             else                 local mainmenu = select('Log in into my account','I forgot my password','Cancel')                 if mainmenu == 2 then                     if pc.getqf('tries') == 5 then                         say'Sorry, you have tried too many times.[ENTER]Please, try later.' ==> Düzeltebilirsiniz                         pc.setqf('tries', get_time()+60*60*2)                         pc.setqf('is_delayed', 1)                         return                     elseif get_time() <= pc.getqf('tries') then                         say'Since you failed 5 times your password[ENTER]you have to wait 2 hours to try again.[ENTER]Too bad!' ==> Düzeltebilirsiniz                         return                     end                     if pc.getqf('is_delayed') == 1 then pc.delqf('is_delayed') pc.delqf('tries') end                     say'Wow what the hell![ENTER]If you at least know your[ENTER]security answer, we can generate a new pw 4 you.' ==> Düzeltebilirsiniz                     say'Please, write the RIGHT answer.' ==> Düzeltebilirsiniz                     if input() ~= readline(bank_path, 3) then                         say'Wrong, sorry dude..'                         pc.setqf('tries', pc.getqf('tries')+1)                     else                         say'Okay, wait a minute.[ENTER]A number password is being generated.' ==> Düzeltebilirsiniz                         wait()                         local random = number(1000, 9999)                         say('Your new password is '..tostring(random)..'.') ==> Düzeltebilirsiniz                         advanced_bank.set_pc_bank_infos(random, readline(bank_path, 2), readline(bank_path, 3), readline(bank_path, 4))                     end                     return                 end                 if pc.getqf('tries_to_login') == 5 then                     say'Sorry, you have tried to log in too many times.[ENTER]Please try later.' ==> Düzeltebilirsiniz                     pc.setqf('tries_to_login', get_time()+60*60*2)                     pc.setqf('is_login_delayed', 1)                     return                 elseif get_time() <= pc.getqf('tries_to_login') then                     say'Since you failed 5 times your password[ENTER]you have to wait 2 hours to try again.[ENTER]Too bad!' ==> Düzeltebilirsiniz                     return                 end                 if pc.getqf('is_login_delayed') == 1 then pc.delqf('is_login_delayed') pc.delqf('tries_to_login') end                 say'Yô dawg[ENTER]Welcome back.[ENTER]Please write your password to log in.' ==> Düzeltebilirsiniz                 local login = input()                 say_title('Bank')                 if login ~= readline(bank_path,1) then                     say('Sorry, your password is wrong.')                     pc.setqf('tries_to_login', pc.getqf('tries_to_login')+1)                     return                 end                 say'Welcome to Clients Panel.[ENTER]What do you want to do?' ==> Düzeltebilirsiniz                 say_reward('Currently you have '..readline(bank_path, 4)..' Gold saved.') ==> Düzeltebilirsiniz                 local sel = select('Take Gold', 'Save Gold', 'Change data', 'Nothing')                 if sel ~= 4 then                     say_title('Bank')                     if sel ~= 3 then                         say_reward('Currently you have '..readline(bank_path,4)..' Gold saved.') ==> Düzeltebilirsiniz                     end                 end                 if sel == 1 then                     say'You have to write how much Gold[ENTER]you want to receive.[ENTER]If you want to cancel, please write 0[ENTER]or do not write nothing.' ==> Düzeltebilirsiniz                     local qt = tonumber(input())                     if qt == nil or qt == 0 then                         say'Did you change your mind?' ==> Düzeltebilirsiniz                         return                     end                     say('So you want to receive '..qt..' Gold. Isnt it?') ==> Düzeltebilirsiniz                     if select('Yes, it is.', 'Hmm, no') == 1 then advanced_bank.give_money(qt) end ==> Düzeltebilirsiniz                 elseif sel == 2 then                     say'How much Gold you want to save?' ==> Düzeltebilirsiniz                     local whatiwant = tonumber(input())                      if whatiwant ~= nil then                         say('So do you really want to save '..whatiwant..' Gold?') ==> Düzeltebilirsiniz                         if select('Yes, I want to', 'No, no sorry.') == 1 then ==> Düzeltebilirsiniz                             if pc.get_gold() < whatiwant then                                 say('You dont have that Gold to save..') ==> Düzeltebilirsiniz                                 return                             end                             advanced_bank.save_money(whatiwant)                             pc.change_gold(-whatiwant)                             say('Done.[ENTER]Now you have more '..whatiwant..' Gold in your account.') ==> Düzeltebilirsiniz                         end                     end                 elseif sel == 3 then                     local new                     say'What do you want to change?' ==> Düzeltebilirsiniz                     local change = select('Password', 'Security data (Question & Answer)', 'Nothing')                     if change ~= 3 then                         say'Please, write your password.' ==> Düzeltebilirsiniz                         if input() ~= readline(bank_path,1) then say'The password you entered is wrong.' return end                         say'Please, write the Answer to your security question:'                         say_reward(readline(bank_path, 2))                         if input() ~= readline(bank_path,3) then say'The answer you entered is wrong.' return end                         if change == 1 then                             say'Write your new password:' ==> Düzeltebilirsiniz                             local newpw = input()                             if newpw == '' then say'Did you change your mind?' return end ==> Düzeltebilirsiniz                             advanced_bank.set_pc_bank_infos(newpw, readline(bank_path, 2), readline(bank_path, 3), readline(bank_path,4))                             say'Your password has been changed.' ==> Düzeltebilirsiniz                         else                             say'Okay, choose your new Security Question:'==> Düzeltebilirsiniz                             local newquestion = select_table(question)                             if newquestion == table.getn(question) then                                 say'Write the security question you want:' ==> Düzeltebilirsiniz                                 local newq = input()                                 if newq == '' then say'Did you change your mind?' return end ==> Düzeltebilirsiniz                                 newquestion = newq                             else                                 newquestion = question[newquestion]                             end                             say'Oh right, one more step left.[ENTER]Write the answer to your question:' ==> Düzeltebilirsiniz                             local newanswer = input()                             if newanser == '' then say'Did you changed your mind?' return end ==> Düzeltebilirsiniz                             advanced_bank.set_pc_bank_infos(readline(bank_path,1), newquestion, newanswer, readline(bank_path,4))                             say'Your Security data has been changed.'                         end                     end                 end             end         end         function set_pc_bank_infos(pw, question, answer, money)             write_in_file(bank_path, pw..'[ENTER]'..question..'[ENTER]'..answer..'[ENTER]'..money..'[ENTER]')             pc.setqf('has_bank_acc', 1)         end         function give_money(value)             if pc.get_gold() + value >= 2000000000 then                 say'You cant take that value. It will bug!' ==> Düzeltebilirsiniz                 return             elseif tonumber(readline(bank_path ,4)) < value then                 say'You dont have that much Gold in your bank acc.' ==> Düzeltebilirsiniz                 return             end             pc.change_gold(value)             advanced_bank.save_money(tonumber(readline(bank_path,4))-value)         end         function save_money(value)             write_in_file(bank_path, readline(bank_path, 1)..'[ENTER]'..readline(bank_path, 2)..'[ENTER]'..readline(bank_path, 3)..'[ENTER]'..value)         end     end end

Gelişmiş Banka Sistemi Nedir?
Metin2 sunucularında oynarken kullanıcılar için önemli olan sistemlerden birisi de banka sistemidir. Bu sistem, oyuncuların eşyalarını güvenli bir şekilde saklamasına, ihtiyaç duyduklarında kolayca erişmesine olanak tanır. Ancak standart banka sistemlerinin ötesine geçen gelişmiş banka sistemleri, oyunculara daha fazla esneklik ve işlevsellik sunar. Özellikle Metin2 quest sistemleriyle entegre çalışan banka sistemleri, oyuncuların deneyimini ciddi anlamda artırabilir.

Gelişmiş Banka Sisteminin Özellikleri
Gelişmiş banka sistemleri, sadece eşya depolamakla kalmaz; aynı zamanda quest süreçlerinde aktif rol alabilir. Örneğin, bir Metin2 quest tamamlandığında ödül olarak verilen eşyalar doğrudan bankaya yönlendirilebilir. Ayrıca bazı gelişmiş sistemlerde, banka envanteri sınırlarının artırılması gibi özellikler yer alır. Bu sayede oyuncular daha fazla eşyayı güvenli şekilde saklayabilirler.

Quest ve Banka Sistemi Entegrasyonu[/BR]Metin2 oyununda quest sistemleri, oyuncuların oyun içi görevleri tamamlayarak ödüller kazanmasına olanak tanır. Eğer bir Metin2 quest script geliştiricisiyseniz, bu görevlerin ödüllerini doğrudan bankaya göndermek büyük avantaj sağlar. Böylece oyuncuların envanterini dolduran gereksiz eşyaların önüne geçilir ve deneyim daha akıcı hale gelir. Lua quest geliştirme konusunda uzman olan geliştiriciler, banka sistemini kendi.quest dosyalarına entegre edebilir.

Banka Sistemi İçin Gerekli Scriptler ve Yapılandırma
Bir Metin2 quest geliştirici olarak, banka sistemine entegre olacak bir görev yazarken Lua dilini kullanmanız gerekir. Metin2 quest lua dosyalarında tanımlanan fonksiyonlar aracılığıyla banka işlemleri yapılabilir. Örneğin, bir görev sonunda verilen item doğrudan oyuncunun bankasına aktarılabilir. Bu işlem, sadece teknik olarak gelişmiş sunucularda mümkündür ve doğru yapılmazsa quest hata alabilir. Hataları düzeltmek için Metin2 quest debug yöntemleri kullanılmalıdır.

Banka Sistemi ile Güvenlik
Oyuncular için en büyük endişelerden biri, eşyaların çalınmasıdır. Gelişmiş banka sistemleri, Metin2 quest sırasında kazanılan değerli eşyaların doğrudan bankaya gönderilmesiyle bu riski azaltır. Aynı zamanda, bazı sistemlerde şifre korumalı banka kutuları da bulunur. Bu, özellikle yüksek seviye oyuncular için büyük önem taşır. Quest ödülleri bankaya yönlendirildiğinde, oyuncu bu eşyalardan emin olabilir.

Özel Banka ve Quest Kombinasyonları
Sunucular, oyuncuları motive etmek için özel Metin2 quest sistemleri geliştirebilir. Bu görevlerin ödülleri, doğrudan bankaya yönlendirilen özel itemler olabilir. Bu tür sistemlerde, custom quest yapıları kullanılır. Oyuncular, günlük veya haftalık görevleri tamamladıklarında, eşyalar bankaya otomatik olarak gönderilir. Bu, Metin2 daily quest gibi sistemlerle harmanlandığında kullanıcı sadakati artar.


What is an Advanced Banking System?
In Metin2 servers, one of the important systems for players is the bank system. This system allows players to securely store their items and easily access them when needed. However, advanced banking systems that go beyond standard ones offer players more flexibility and functionality. Especially banking systems integrated with Metin2 quest systems can significantly enhance the player experience.

Features of the Advanced Banking System
Advanced banking systems not only store items but can also actively participate in quest processes. For instance, upon completion of a Metin2 quest, rewards can be directly sent to the player's bank. Additionally, some advanced systems feature expanded bank inventory limits, allowing players to securely store more items.

Integration of Quest and Banking Systems
In Metin2, quest systems[/COORD] allow players to complete in-game missions and earn rewards. If you are a Metin2 quest script developer, directing rewards directly into the bank can provide significant advantages. This prevents unnecessary items from filling up the player's inventory, resulting in a smoother gameplay experience. Developers skilled in Lua quest development can integrate banking functions into their own .quest files.

Scripts and Configuration Required for Banking System
As a Metin2 quest developer, you need to use the Lua language when writing a mission that integrates with the banking system. Through functions defined in Metin2 quest lua files, banking operations can be performed. For example, items rewarded after completing a quest can be sent directly to the player's bank. This process is only possible on technically advanced servers and may cause quest errors if not done correctly. To fix such errors, Metin2 quest debug methods should be applied.

Security with Banking System
One of the main concerns for players is item theft. Advanced banking systems reduce this risk by directing valuable items earned during quests directly to the bank. Additionally, some systems include password-protected bank boxes, which are especially important for high-level players. When quest rewards are automatically sent to the bank, players can feel secure about their items.

Custom Banking and Quest Combinations
Servers can develop special Metin2 quest systems to motivate players. The rewards of these quests can be special items sent directly to the bank. Such systems utilize custom quest structures. When players complete daily or weekly missions, items are automatically sent to their banks. Combined with systems like Metin2 daily quest, this increases user loyalty.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Geri
Üst Alt