Jump to content

Welcome Quest


TyWin

Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Hello guys, first of all I have to say that this quest is not even perfect and I think, there is a way that make this quest easier, but who cares?

 
It works as it is.
quest zacatek_hry begin
	state start begin
		when login begin
			if pc.getqf("privitani") == 0 then
				pc.setqf("privitani", 1)

				local pohlavi = pc.get_sex()
				local prezdivka = pc.get_name()
				
				if pc.job == 0 and pohlavi == 0  then
					notice_all("Please welcome new male warrior "..prezdivka.."!")
					char_log(0, "NEW_CHARACTER", "WARRIOR_MALE")
					
				elseif pc.job == 0 and pohlavi == 1  then
					notice_all("Please welcome new female warrior "..prezdivka.."!")
					char_log(0, "NEW_CHARACTER", "WARRIOR_FEMALE")
					
				elseif pc.job == 1 and pohlavi == 0  then
					notice_all("Please welcome new male assasin "..prezdivka.."!")
					char_log(0, "NEW_CHARACTER", "ASSASIN_MALE")
					
				elseif pc.job == 1 and pohlavi == 1  then
					notice_all("Please welcome new female assasin "..prezdivka.."!")
					char_log(0, "NEW_CHARACTER", "ASSASIN_FEMALE")
					
				elseif pc.job == 2 and pohlavi == 0  then
					notice_all("Please welcome new male sura "..prezdivka.."!")
					char_log(0, "NEW_CHARACTER", "SURA_MALE")

				elseif pc.job == 2 and pohlavi == 1  then
					notice_all("Please welcome new female sura "..prezdivka.."!")
					char_log(0, "NEW_CHARACTER", "SURA_FEMALE")
					
				elseif pc.job == 3 and pohlavi == 0  then
					notice_all("Please welcome new male mage "..prezdivka.."!")
					char_log(0, "NEW_CHARACTER", "MAGE_MALE")
					
				elseif pc.job == 3 and pohlavi == 1  then
					notice_all("Please welcome new female mage "..prezdivka.."!")
					char_log(0, "NEW_CHARACTER", "MAGE_FEMALE")

				end

				if pc.countitem(item) == 0 and pc.weapon != item then
					say_title("NEW CHARACTER")
					say("UR TEXT")
					pc.give_item2(50187, 1)
				end
			end
		end
	end
end
  • Metin2 Dev 12
  • Cry 1
  • Scream 1
  • Good 3
  • Love 16
Link to comment
Share on other sites

  • Premium
local race = {"warrior", "ninja", "sura", "mage"}
local sex = { "male", "female" }
notice_all("Please welcome new "..sex[pc.get_sex()+1].." "..race[pc.job+1].." "..pc.get_name())
char_log(0, "NEW_CHARACTER", race[pc.job+1].."_"..sex[pc.get_sex()+1])

This instead of all your checks.

Also, what's the purpose of last check? (the one with countitem)

Link to comment
Share on other sites

  • Premium

quest zacatek_hry begin
    state start begin
        when login begin
            if pc.getqf("privitani") == 0 then
                pc.setqf("privitani", 1)
 
                local prezdivka = pc.get_name()
                local race = {
                    [0] = "Warrior",
                    [1] = "Assasin",
                    [2] = "Sura",
                    [3] = "Shamen",
            
                local sex = {
                    [0] = "Male",
                    [1] = "Female",
                }
                 
                notice_all("Please welcome new "..sex[pc.get_sex()].." "..race[pc.job].." "..pc.get_name())
                char_log(0, "NEW_CHARACTER", ""..race[pc.job].."_"..sex[pc.get_sex()].."")
                
                    say_title("NEW CHARACTER")
                    say("UR TEXT")
                    pc.give_item2(50187, 1)
            end
        end
    end
end
  • Love 2

If you're going to do something, then do it right.

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.