<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Popular Topics]]></title><description><![CDATA[A list of topics that are sorted by post count]]></description><link>https://gamecrib.dev/popular/daily</link><generator>RSS for Node</generator><lastBuildDate>Fri, 23 Oct 2026 11:17:32 GMT</lastBuildDate><atom:link href="https://gamecrib.dev/popular/daily.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Oct 2026 22:48:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[[Quest] Talent Tree [LUa] - Choose Bonus]]></title><description><![CDATA[Summary

Upon login, the player receives a letter that sends it to the Guardian.
At NPC he can choose one of 3 specializations, different depending on the race: Warrior, Ninja, Sura or Shaman.
The specialization is confirmed and permanently saved in quest flags.
Depending on the chosen specialization, at each level up they should automatically receive bonus points on certain statistics: VIT (HT), I NT (IQ), ST (ST), DEX (DX).
Once the specialization is chosen, it cannot be chosen again. Example: → Barbarian Warrior receives at each level up +2 VIT and +2 STR.

Code
quest specialization_intro begin state start begin -- Upon player login when login begin -- Check if the player has already received the letter if pc.getqf("specialization_intro_done") == 0 then -- Send the letter to the player send_letter("Specialization - Talk to the Guardian") end end end end quest specialization_bonus begin state start begin -- Interaction with the NPC to choose specialization when 11000.chat."Choose Specialization" or 11002.chat."Choose Specialization" or 11004.chat."Choose Specialization" begin if pc.getqf("specialization_chosen") == 0 then local job = pc.get_job() local specialization_choices = { [0] = { -- Warrior {"Barbarian", "A brutal warrior with great physical strength. Bonus: Vitality and Strength."}, {"Guardian", "A solid warrior protecting others. Bonus: Vitality and Defense."}, {"Balance", "A warrior who maintains a good balance between strength and defense."} }, [1] = { -- Ninja {"Assassin", "An expert in quick and stealthy attacks. Bonus: Dexterity and Strength."}, {"Shadow Master", "An agile ninja with great precision. Bonus: Dexterity and Precision."}, {"Balance", "A ninja who maintains a good balance between agility and strength."} }, [3] = { -- Shaman {"Earth Shaman", "A shaman who uses earth magic to strengthen vitality. Bonus: Intelligence and Vitality."}, {"Water Shaman", "A shaman who uses water magic to increase mana. Bonus: Intelligence and Mana."}, {"Balance", "A shaman who maintains a good balance between magic and vitality."} }, [2] = { -- Sura {"War Sura", "A powerful sura specialized in physical attacks. Bonus: Strength and Magic."}, {"Magic Sura", "A sura who uses powerful spells to deal damage. Bonus: Strength and Magic."}, {"Balance", "A sura who maintains a good balance between strength and magic."} } } while true do if specialization_choices[job] then local choices = specialization_choices[job] local choice = select(choices[1][1], choices[2][1], choices[3][1], "Return") if choice == 4 then -- If "Return" is chosen, cancel the process say("Choice canceled.") return elseif choice then local selected_choice = choices[choice] local description = selected_choice[2] -- Display the description and ask for confirmation say("You have chosen: " .. selected_choice[1] .. ".") say(description) local confirm = select("Confirm", "Return") if confirm == 1 then -- Save the choice and exit the loop pc.setqf("temp_specialization_choice", choice) pc.setqf("temp_specialization_description", description) break else -- Return to the initial selection say("Returning to the initial choice.") end else say("Choice canceled.") return end else say("You cannot choose a specialization.") return end end -- Confirm the specialization choice if pc.getqf("temp_specialization_choice") then local choice = pc.getqf("temp_specialization_choice") local description = pc.getqf("temp_specialization_description") -- Save the chosen specialization local job = pc.get_job() local specialization_choices = { [0] = { -- Warrior "Barbarian", "Guardian", "Balance" }, [1] = { -- Ninja "Assassin", "Shadow Master", "Balance" }, [3] = { -- Shaman "Earth Shaman", "Water Shaman", "Balance" }, [2] = { -- Sura "War Sura", "Magic Sura", "Balance" } } local selected_specialization = specialization_choices[job][choice] -- Save and confirm the choice pc.setqf("specialization_chosen", 1) pc.setqf("specialization", choice) pc.setqf("specialization_name", selected_specialization) say("You have confirmed your specialization choice: " .. selected_specialization .. ".") say(description) -- Save the chosen specialization to apply the bonuses pc.setqf("specialization_intro_done", 1) pc.setqf("temp_specialization_choice", nil) pc.setqf("temp_specialization_description", nil) end else say("You have already chosen a specialization.") end end end state apply_bonus begin -- Apply bonuses when leveling up when levelup begin if pc.getqf("specialization_chosen") == 1 then local job = pc.get_job() local spec = pc.getqf("specialization") local specialization_bonus = { [0] = { -- Warrior [1] = {ht = 2, st = 2}, -- Barbarian [2] = {ht = 3, st = 1}, -- Guardian [3] = {ht = 1, st = 1, dx = 1} -- Balance }, [1] = { -- Ninja [1] = {dx = 3, st = 1}, -- Assassin [2] = {dx = 2, st = 2}, -- Shadow Master [3] = {dx = 2, st = 1, iq = 1} -- Balance }, [3] = { -- Shaman [1] = {iq = 3, ht = 1}, -- Earth Shaman [2] = {iq = 2, ht = 2}, -- Water Shaman [3] = {iq = 2, ht = 1, dx = 1} -- Balance }, [2] = { -- Sura [1] = {st = 2, iq = 1}, -- War Sura [2] = {st = 1, iq = 2}, -- Magic Sura [3] = {st = 2, iq = 1, dx = 1} -- Balance } } if specialization_bonus[job] and specialization_bonus[job][spec] then -- Apply the bonuses local bonuses = specialization_bonus[job][spec] for stat, value in pairs(bonuses) do if stat == "ht" then pc.set_ht(pc.get_ht() + value) elseif stat == "iq" then pc.set_iq(pc.get_iq() + value) elseif stat == "st" then pc.set_st(pc.get_st() + value) elseif stat == "dx" then pc.set_dx(pc.get_dx() + value) end end end end end end end


Credits: original author SCOOB. Do not remove credits.
]]></description><link>https://gamecrib.dev/topic/14/quest-talent-tree-lua-choose-bonus</link><guid isPermaLink="true">https://gamecrib.dev/topic/14/quest-talent-tree-lua-choose-bonus</guid><dc:creator><![CDATA[Nember]]></dc:creator><pubDate>Thu, 22 Oct 2026 22:48:37 GMT</pubDate></item></channel></rss>