New action menu item at territory trader opens input box to set a password?

4 posts in this topic

Man I really hope this is in the right spot, I apologize if it is not.  

I am wondering someone might be able to help me create this function, if its possible. I would love to learn how this would be accomplished because I want to be able to build my own scripts, share them with others and not have to be dependent on others if not absolutely required.

Basically I would like to be able to go up to the territory trader, scroll on him and see an option to set account password. An input box would open with a small blurb of text and the player can type in an alphanumeric 8 character password. That password is then added to a new MySQL table in the database (playerpass), not touching any core tables. The columns would be uid (automatically inserted) and password. If they scroll on the trader again, they can enter their password again if they want and it will update the password in MySQL if one already exists. That's pretty much it.

Is this something that can be done in game? I'd love to work with someone on this side by side so I can learn from doing. I have skype, a teamspeak server, vent whatever. I figure this would help me learn how to manipulate the database, create input boxes, add to action menus and pull player information. Then I could utilize this knowledge when attacking other scripting tasks.



Edited by Omen

Share this post

Link to post
Share on other sites

Yeah, it's doable.

Sounds like you want to add an action (research addAction on the BIS wiki).

That action will take user input (look in Exile files for unlock scripts for guidance on how they did it).

Then save that into the database (don't really need a new table, just add it into the account table as playerpw or whatever). You'll need to come up with the SQL query to modify your database.

Then you need to add some queries to the db .ini file for setting and getting the playerpw value stored in the DB so you can use them for whatever you intend to use them with. (See Exile.ini, ExileServer_system_database_query_fireAndForget, and ExileServer_system_database_query_selectSingleField for inspiration).

And you'll have to mess with the GUI to make it look nice.

It's more work than it sounds, but maybe that will help you get started. Going through the code folders in the Exile client PBO and the Exile server PBO is a goldmine. :)

  • Like 2

Share this post

Link to post
Share on other sites

I will have a look but since I am so new to all of this it's kind of looking for something you don't know is there. I will definitely check out the files you have mentioned and the 'addAction' as well. Thanks!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.