Jump to content
  • 0

[QUEST] Add Bonus for skillgroups


MOLOCKI

Question

Hello !

I'm a noob with no LUA expierence. I have a teaching quest, that User can collect her skill group without visit the npc.

I want to add an bonus on all races excepted body warrior and weaponary sura.

 

The Bonus is: affect.add_collect(99, 2, 60*60*24*365*60) -- Metins = 99

I already tryed it with:

if a == 1 then
	affect.add_collect(99, 2, 60*60*24*365*60) -- Metins = 99
end

but I need something like

if ((skill == 0 and a == 2) or (skill == 1) or (skill == 2 and a == 2) or (skill == 3)) then
	affect.add_collect(99, 2, 60*60*24*365*60) -- Metins = 99
end

 

But that doesn't works because skill is an local variable so I can't call them in the last part.

Idk  maybe it's a better way to make it with pc.get_skill_group and pc.get_job but I  don't know.. I'm too nooby :D
 

Maybe someone can help me? would be very friendly ! thanks in advance

 

here's the quest:

quest directskills begin
	state start begin
		when login or levelup with pc.level >= 5 begin
			if pc.get_skill_group() == 0 and pc.getqf("skills", 0) then
				syschat("You have reached level 5, you can now choose your teaching. ")
				syschat("Click on the quest on the left ")
				set_state(run)
			end
		end
	end
	state run begin
		when letter with pc.getqf("skills") == 0 begin
			send_letter(gameforge[LC()][8077])
		end
		when button or info with pc.getqf("skills") == 0 begin
			local all = {
				[0] = {gameforge[LC()][8094], gameforge[LC()][8111]},
				[1] = {gameforge[LC()][8116], gameforge[LC()][8124]},
				[2] = {gameforge[LC()][8129], gameforge[LC()][8136]},
				[3] = {gameforge[LC()][8141], gameforge[LC()][8148]},
			}
		--------------------------------------------		
			local skill = {
				[0]={
					[1]={1, 2, 3, 4, 5},
					[2]={16, 17, 18, 19, 20},
				},
				[1]={
					[1]={31, 32, 33, 34, 35},
					[2]={46, 47, 48, 49, 50},
				},
				[2]={
					[1]={61, 62, 63, 64, 65, 66},
					[2]={76, 77, 78, 79, 80, 81},
				},
				[3]={
					[1]={91, 92, 93, 94, 95, 96},
					[2]={106, 107, 108, 109, 110, 111}
				},
			}
		---------------------------------------------
			say_title(gameforge[LC()][8077])
			local a = select(all[pc.get_job()][1], all[pc.get_job()][2], gameforge[LC()][11735])
			if a == 1 or a == 2 then
				pc.set_skill_group(tonumber(a))
				pc.clear_skill()
				clear_letter()
				for i = 1, table.getn(skill[pc.get_job()][pc.get_skill_group()]) do
					pc.set_skill_level (skill[pc.get_job()][pc.get_skill_group()], 40)
				end
				pc.setqf("skills", 1)
			elseif a == 3 then
				return
			end
		end
	end
end 

 

Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Activity

    1. 0

      Sash bug +19% absorb

    2. 1

      TRANSMUTATION WITH BLESSING SCROLL AND MAGIC STONE 100%

    3. 1

      [HowTo] The "hello world" of metin2

    4. 1

      TRANSMUTATION WITH BLESSING SCROLL AND MAGIC STONE 100%

    5. 0

      Sash absorb bug

    6. 0

      Debug DB vanilla Core

    7. 0

      Give item after kill monster [c++]

    8. 6

      Current Peer host names...

  • Recently Browsing

    No registered users viewing this page.

Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

×
×
  • 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.