Jump to content
Maintenance : Final step ×

Chest Drop by lua quest faulty


Recommended Posts

Hey guys.. i want to configure my Chest Drop in a lua script that i found online, but it doesnt really work. I already removed the associated drops and even the entire group from special_item_group.txt. When i click on the chest, my Server just crashes. 

Can anyone say whats wrong and what i have to do to make it working? 

Thanks 🙂

Quote

        when 50186.use begin
            --Truhe des Azrael
            item.remove()
            local waffen = {190, 180, 1130, 2170, 3160, 5120}
            if number(1, 20)==1 then game.drop_item_with_ownership(waffen[number(1, 6)], 1) end --75er Waffe+0: Chance 10%
            local armor = {11290, 11490, 11690, 11890}
            for i=1, table.getn(armor) do
                if number(1, 5)==1 then game.drop_item_with_ownership(armor[i]+number(1,2), 1) end --66er Rüstungen+1-2: Chance 1/2
            end    
            local weapon = {3152, 172, 252, 1122, 2182, 7152}
            for i=1, table.getn(weapon) do
                if number(1, 7)==1 then game.drop_item_with_ownership(weapon[i], 1) end --70er Waffen+4: Chance 1/2
            end    
            local schmuck = {14203, 16203, 17203}
            for i=1, table.getn(schmuck) do
                if number(1, 2)==1 then game.drop_item_with_ownership(schmuck[i]+number(1,3), 1) end --Schmuck+4-6: Chance 1/2
            end
            local schmuck2 = {14220, 16220, 17220}
            for i=1, table.getn(schmuck2) do
                if number(1, 5)==1 then game.drop_item_with_ownership(schmuck2[i], 1) end --Schmuck+0: Chance 1/5
            end
            local helme = {12260, 12280, 12670, 12680, 12530, 12540, 12390, 12400, 13140}
            for i=1, table.getn(helme) do
                if number(1, 4)==1 then game.drop_item_with_ownership(helme[i], 1) end --Helme+0 und +4: Chance 1/4
            end                        
        end

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



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.