Untitled

 avatar
unknown
plain_text
a month ago
3.4 kB
6
Indexable
-- =========================
-- CREATE WINDOW
-- =========================

local form = createForm(true)
form.Caption = "Muck Visual Spawner"
form.Width = 400
form.Height = 250

-- =========================
-- SPAWN FUNCTION
-- =========================

function spawnItem(id, amount)

    local method = mono_findMethod("", "ClientSend", "DropItem")

        if not method then
                showMessage("DropItem method not found")
                        return
                            end

                                local args = {}

                                    args[1] = id
                                        args[2] = amount

                                            mono_invoke_method(nil, method, nil, args)
                                            end

                                            -- =========================
                                            -- COIN BUTTON
                                            -- =========================

                                            local coinBtn = createButton(form)

                                            coinBtn.Caption = "Spawn Coins"
                                            coinBtn.Left = 20
                                            coinBtn.Top = 20
                                            coinBtn.Width = 150
                                            coinBtn.Height = 40

                                            coinBtn.OnClick = function()
                                                spawnItem(3, 100)
                                                end

                                                -- =========================
                                                -- COAL BUTTON
                                                -- =========================

                                                local coalBtn = createButton(form)

                                                coalBtn.Caption = "Spawn Coal"
                                                coalBtn.Left = 20
                                                coalBtn.Top = 80
                                                coalBtn.Width = 150
                                                coalBtn.Height = 40

                                                coalBtn.OnClick = function()
                                                    spawnItem(2, 50)
                                                    end

                                                    -- =========================
                                                    -- FLINT BUTTON
                                                    -- =========================

                                                    local flintBtn = createButton(form)

                                                    flintBtn.Caption = "Spawn Flint"
                                                    flintBtn.Left = 20
                                                    flintBtn.Top = 140
                                                    flintBtn.Width = 150
                                                    flintBtn.Height = 40

                                                    flintBtn.OnClick = function()
                                                        spawnItem(4, 25)
                                                        end
Editor is loading...
Leave a Comment