![]() |
(Solved!) Anyway to trick the client to skip the entire character creation process? - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: (Solved!) Anyway to trick the client to skip the entire character creation process? (/Thread-Solved-Anyway-to-trick-the-client-to-skip-the-entire-character-creation-process) Pages: 1 2 |
(Solved!) Anyway to trick the client to skip the entire character creation process? - Rayvolution - 07-23-2012 01:51 AM Does anyone know of a way to skip the entire character creation process? I have plans to do it all in-game when they login, they don't even have to name their character, or pick a gender yet. Basically, what I'm trying to do is as soon as you hit "New" on the character selection screen it launches you straight into the game. Once there, the in-sphere/game character creation GUI I'm writing will popup and they will pick their gender, skills, stats and so on and so forth. If this involves hex editing the client or changing around muls, I'm fine with that. I just can't figure out where to get started. If it helps, I'm using the 6.0.1.10 client. Alternately, another idea I had was to not allow character deletion at all, and max out their character slots with "New Character" named characters, when they login they pick a "New Character" character and once in the client, start the creation process. But this method means I have to manually create all 5 "New Character" characters every time I add an account to my server unless there's some way to tie 5 "New Character" characters to an account the moment it's created. I could take this a step further and catch the character deletion on [FUNCTION f_onchar_delete] and trick the client into thinking he deleted a character, but instead the server just reanmed his old character, wiped it's stats/skills/items and relocated it to the character creation area. But I don't even know where to get started scripting that, to be honest. ![]() RE: Anyway to trick the client to skip the entire character creation process? - Oxtar - 07-23-2012 05:25 AM It would mean you would have to hardcode the client, not just hexing it. RE: Anyway to trick the client to skip the entire character creation process? - Rayvolution - 07-23-2012 06:32 AM Well, I might have to go with my other method then, creating all 5 character slots as "New Character" and disabling the deletion and new character buttons. If I go that route, I'd like to figure out how to delete the characters still though, maybe I can write a .deletecharacter command in-game that will reset everything and teleport them to the new character creation location. Any idea if "fake" characters can be created and linked to an account via f_onaccount_login so I wouldn't be required to do it manually every time I make an account for someone? Function concept: First time they login, the server checks to see if they have ever logged in before (Some sort of TAG/Flag on their account). If they haven't, create 5 blank characters, link them to the account. So the first time they login, they see the 5 characters named "New Character". After they've logged in the first time, there on out it skips the check, and players play normally. The delete and create character buttons are completely disabled (GUI buttons deleted in the muls), and a .deletecharacter command is added in game that actually just deletes everything on the character, renames it back to "New Character" resets it's skills/stats and teleports it to the creation "room". End product completely removes the character creation screen. I know I can do everything required *but* create the characters automatically when a new account is added, other than that. I think the system will work. RE: Anyway to trick the client to skip the entire character creation process? - Anarch Cassius - 07-23-2012 07:34 AM Sounds good except you probably can't disable the client del char without a weird hack. Instead you'd catch the packet and send back one of the can't do that packets that works in context. Maybe say the char isn't old enough or is playing. New char will be disabled by the lack of slots then. RE: Anyway to trick the client to skip the entire character creation process? - Rayvolution - 07-23-2012 08:59 AM Actually, I already managed to completely remove the Delete and New Character buttons from the client, anyone using my custom gump files are physically incapable of hitting the buttons. I noticed the buttons use a transparency layer, and only activate when you highlight over the non-transparent part of the button image (Like items do, in game), so, it was a simple matter of just replacing the buttons with completely transparent images. Now they are totally unclickable. The only way someone could use them is by using the original gump files, but that shouldn't be a problem because I can deny character creation on the server side. Now, the only problem I have is figuring out how to create and link a character in game to their account. I know there has to be a way mechanics wise, for example, in game I can do .set account <Account name> and click on any NPC in the game, and whoever owns the account I set can actually log in as that NPC. I believe what I need to do is use the f_onaccount_login function and trigger it to make 5 characters (whatever I create as my generic "newbie" NPC def), ACT.P <starting location> and ACT.ACCOUNT <Account name> all 5 of them. Luckily, the f_onaccount_login triggers when you hit the Shard Selection screen, so in theory, all 5 characters should be created, moved, and linked before the account selects the shard and gets to the character creation screen. Once there, they will see 5 "New Character" slots (The characters I created/linked) and can just pick one, instantly being logged in straight to the in-game character creation system. Because I removed the "New" and "Delete" buttons on the character select menu, this entire process is transparent to them and all they think they're doing is creating a new character. They don't realize they actually "own" 5 characters named "New Character". This could even work when "deleting" characters, when they run .deletecharacter in game it could remove the character and replace it with another generic "newbie" def, link it to the account and disconnect the player. But, now I'm at a roadblock trying to figure out how to trigger a new NPC creation on f_onaccount_login, and trigger a flag on the account to register that the first time login has happened. If I can figure that out I think I'll be set. RE: Anyway to trick the client to skip the entire character creation process? - darksun84 - 07-23-2012 05:46 PM For checking if the account should "create" the new players you can use on f_onaccount_login if !<serv.account.<args>.chars> //I have 0 players, create 5 of them //code for creating the newplayers here endif Unfortunately i cannot find a way to do the linking ![]() RE: Anyway to trick the client to skip the entire character creation process? - Terrikate - 07-23-2012 08:49 PM You can create the npc and use the property ACCOUNT, is writable only if not already allocated to an account. RE: Anyway to trick the client to skip the entire character creation process? - Rayvolution - 07-23-2012 11:01 PM (07-23-2012 05:46 PM)darksun84 Wrote: For checking if the account should "create" the new players you can use on f_onaccount_login When I get home from work, I'll see if I can tackle it. I know in-game, .set account <Accountname> will set any character (NPC or otherwise) to that account's ownership. So, I imagine it would be something like: serv.add c_generic_newbie serv.act.p <Starting coords> // Move NPC to starting coords serc.act.name New Character // I guess if you just named c_generic_newbie would be able to skip this serv.act.account <ARGS> // Account name of user. serv.act.disconnect // "Disconnects" the NPC so it isn't wandering around the game world, but still exists. I'm not sure if that will work though, the trick is to create the creature via serv and I'm not sure if serv can properly use "add". A long time ago I wrote a pretty complicated paintball script in 51a, it required a UNIQUE npc ID to "run" some of the scripts (like above) but I've long lost that code, and have no clue how I did it. But basically I created a fake NPC and stuck him in a corner of GM Land. When the paintball script needed to, it called on that specific NPC's ID to run the commands. I wonder if the same could be done with this, if my method doesn't work? Any help would be great! I can't wait to get this working. I think it'll be a pretty cool way to skip the default creation process. I can provide all the tutorials needed for others when it's completed. RE: Anyway to trick the client to skip the entire character creation process? - darksun84 - 07-24-2012 12:31 AM Ok it works! As terrikate wrote, you had to use the account function on the newly created npc PHP Code: [FUNCTION f_onaccount_login] RE: Anyway to trick the client to skip the entire character creation process? - Rayvolution - 07-24-2012 04:18 AM Awesome! I'll try it when I get home, that was the syntax I was looking for. I was having trouble figuring out exactly how to "tell" the server what to do at that step within that function. I'll showoff the entire script once I have it written, and post a tutorial giving credit where due. ![]() |