-- for start button

function buttonon()
    current_sprite.pframe = 2
    dink.playsound(20, 22050, 0, 0, false)
end

function buttonoff()
    current_sprite.pframe = 1
    dink.playsound(21, 22050, 0, 0, false)
end

function click()
    -- lets start a new game
    dink.say_xy("`%Starting new game. Please wait.", 0, 394)
    dink.wait(1)

    -- This is where you would change the room Dink starts in!!
    global.player_map = 400

    --This is where you would change the location Dink is going to show up
    player.x = 180
    player.y = 250

    --Change dink from a mouse pointer into a human being. :)
    player.base_walk = 70
    player.base_attack = 100
    dink.set_mode(2)
    dink.reset_timer()
    player.dir = direction.SOUTH
    player.brain = brain.PLAYER
    player.que = 0
    player.noclip = false

    --set Dinks initial stats
    global.strength = 3
    global.defense = 2
    global.magic = 1
    global.gold = 25

    --lets give him fists to start out with, and arm him with the fists.
    dink.add_item("item-fst", 438, 1)
    global.cur_weapon = 1
    dink.arm_weapon()

    --Clear the screen black in preparation for the first room of the game.
    dink.fill_screen(0)

    --Turn on the status bar
    global.update_status = 1
    dink.draw_status()

    --We're done, so let's kill this task & the game will begin!
    dink.kill_this_task()
end
