Jump to content

Adding a new button to the DragonSoul dialog


Recommended Posts

Hello devs :) can anyone show me how to add a new button to the Dragon Soul inventory window? I have my images I want to add something like the Item Shop button of the inventory page but this time I want to make a toogle button (stays at "down" state after click, until clicked again to restore to normal state). I want this button to communicate with the game and changes a quest state. This is the quest

Spoiler

quest dragon_soul_status begin
    state start begin
        when login or levelup with pc.get_level() >= 30 begin
            send_letter("Αδράνεια Δύναμης του Δρακόματου ")
        end
        when info or button begin
            say("Αυτή η ενέργεια θα ρίξει την Δύναμη του Δρακόματού[ENTER]σου σε αδράνεια ή θα την ενεργοποιήσει[ENTER]ξανά. ")
            say("Η Δύναμη του Δρακόματου είναι: "..pc.getf("dragon_soul","drop_on").."[ENTER]Ενεργή - 1[ENTER]Ανενεργή - 0 ")
            if select("Ενεργοποίηση ","Απενεργοποίηση ") == 1 then
                pc.setf("dragon_soul","drop_on",1)
                syschat("[Δρακόλιθοι] Η Δύναμη του Δρακόματου ενεργοποιήθηκε. ")
                send_letter("Αδράνεια Δύναμης του Δρακόματου ")
            else
                pc.setf("dragon_soul","drop_on",0)
                syschat("[Δρακόλιθοι] Η Δύναμη του Δρακόματου απενεργοποιήθηκε.")
                send_letter("Αδράνεια Δύναμης του Δρακόματου ")
            end
        end
    end
end

What this does is enabling/disabling the Dragon Soul drops from mobs and it comes as a letter and that's very annoying so I want to turn it into a button but I've just started to learning python and I don't even know how to position it. I appreciate any help guys.

Thanks in advance

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

Announcements



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