Onforum.net - Web and gaming resource community

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members .

Quests /Python [MINI-PY]Change Help Window and add more pages

Aioria

Banned
Banned
Credits
1
Hi guys! First of all sorry for my bad english.

This is a mini-release i've done years ago, and now i'll post it here, hoping some guy can enjoy it.
This edit was done cause i've ever hate the button-config to mount on horse, and always open the help window instead, so we're gonna change them.

Unpack "root/game.py" and search:

Code:
    def    __PressHKey(self):
        if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
            net.SendChatPacket("/user_horse_ride")
        else:
            self.interface.OpenHelpWindow()

replace with:

Code:
    def    __PressHKey(self):
        if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
            self.interface.OpenHelpWindow()
        else:
            net.SendChatPacket("/user_horse_ride")

In this way you'll mount on horse by pressing "H" and open help window with "CTRL+H"
You can even disable the help window and let the horse command like always by replace:

Code:
            self.interface.OpenHelpWindow()

with "pass"

You can even add help window pages and use them like wiki or others if you're good enough (i'm not :D)

So, just open the file "root/uihelp.py" and replace:

Code:
ENABLE_HELP_MULTIPAGE = 0

with

ENABLE_HELP_MULTIPAGE = 1

then can go to "root/helpwindow2.py" and make your edits, you can add lot of pages if you want, images, ecc

This is an example without edits of helpwindow2.py

j8IKMKi.jpg



Sorry if this is just a mini release! Love you.
 
Last edited:
Hi guys! First of all sorry for my bad english.

This is a mini-release i've done years ago, and now i'll post it here, hoping some guy can enjoy it.
This edit was done cause i've ever hate the button-config to mount on horse, and always open the help window instead, so we're gonna change them.

Unpack "root/game.py" and search:

Code:
    def    __PressHKey(self):
        if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
            net.SendChatPacket("/user_horse_ride")
        else:
            self.interface.OpenHelpWindow()

replace with:

Code:
    def    __PressHKey(self):
        if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
            self.interface.OpenHelpWindow()
        else:
            net.SendChatPacket("/user_horse_ride")

In this way you'll mount on horse by pressing "H" and open help window with "CTRL+H"
You can even disable the help window and let the horse command like always by replace:

Code:
            self.interface.OpenHelpWindow()

with "pass"

You can even add help window pages and use them like wiki or others if you're good enough (i'm not :D)

So, just open the file "root/uihelp.py" and replace:

Code:
ENABLE_HELP_MULTIPAGE = 0

with

ENABLE_HELP_MULTIPAGE = 1

then can go to "root/helpwindow2.py" and make your edits, you can add lot of pages if you want, images, ecc

This is an example without edits of helpwindow2.py

j8IKMKi.jpg



Sorry if this is just a mini release! Love you.

You can even add help window pages and use them like wiki or others if you're good enough (i'm not :D)

You don't need to be overskilled to add those pages. Just:
Python:
#Second page
{
            "name" : "page_2",
            "type" : "window",

            "x" : SCREEN_WIDTH * 150 / 800,
            "y" : SCREEN_HEIGHT * START_HEIGHT / 600,
            "width" : 0,
            "height" : 0,

            "children" :
            (
                {
                    "name" : "help_02_01", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : SCREEN_HEIGHT * HEIGHT_STEP*0,
                    "text" : "Your 1st text here",
                },
                {
                    "name" : "help_02_02", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : HEIGHT_STEP*1,
                    "text" : "Your 2nd text here",
                },
                {
                    "name" : "help_02_03", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : HEIGHT_STEP*1,
                    "text" : "Your 3rd text here",
                },
            ),
        },
#3rd page
        {
            "name" : "page_3",
            "type" : "window",

            "x" : SCREEN_WIDTH * 150 / 800,
            "y" : SCREEN_HEIGHT * START_HEIGHT / 600,
            "width" : 0,
            "height" : 0,

            "children" :
            (
                {
                    "name" : "help_03_01", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : SCREEN_HEIGHT * HEIGHT_STEP*0,
                    "text" : "Your 1st text here",
                },
                {
                    "name" : "help_03_02", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : HEIGHT_STEP*1,
                    "text" : "Your 2nd text here",
                },
                {
                    "name" : "help_03_03", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : HEIGHT_STEP*1,
                    "text" : "Your 3rd text here",
                },

                ## An so on.....
            ),
        },

Then, search bellow in the same file, and add buttons for those pages. Just copy-paste the existing code, for button.
 

Similar threads


Top

Dear User!

We found that you are blocking the display of ads on our site.

Please add it to the exception list or disable AdBlock.

The advertises that you'll see aren't intrusive they just help us to keep the community alive

If you don't want to see those ads just buy an upgrade.

Thank you for understanding!

Rogue

Rogue Purchase

User upgrade! at

🔥 Upgrade Now
Baba2

Baba2 Purchase

User upgrade! at

🔥 Upgrade Now

Escanor25 Purchase

User upgrade! at

🔥 Upgrade Now