Jump to content
!-->
  • Join-Us

    https://metin2.dev is the 1st international community on Metin2 development. Join us to develop your skills and share your knowledge with the community, respectful and ethical forum.

  • 0

Drop table


MrAkroMenToS

Question

3 answers to this question

Recommended Posts

  • 0

Here is one quest with table:

quest hdf begin
    state start begin
        function ab()
            local ju = {
                --mob-id--min-level--max-level---item-count---percentage---item-id's----percentage change per level
                {101,     1,         10,             3,        50,30,20,    19, 20, 21,        1},
            }
            return ju
        end
        when kill with not npc.is_pc() begin
            local boni,lck,per,luck,bsp = 0,0,0,0,hdf.ab()
            for i = 1, table.getn(bsp)+1, 1 do
                if npc.get_race() == bsp[i][1] then
                    if pc.get_level() >= bsp[i][2] and pc.get_level() <= bsp[i][3] then
                        boni = (bsp[i][2] - pc.get_level()) * (-1)
                        boni = boni * bsp[i][bsp[i][4]*2+5]
                        luck = number(1,bsp[i][4])
                        luck = luck + 4 + bsp[i][4]
                        lck = luck - bsp[i][4]
                        per = 100 - bsp[i][lck] + boni
                        lck = number(1,100)
                        if lck > per then
                            pc.give_item2(bsp[i][luck], 1)
                        end
                    end
                end
            end
        end
    end
end  
  • Love 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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