Closed Znote closed 4 years ago
Version 8.3
You have to modify register.php to accept only numbers:
if (preg_match("/^[0-9]+$/", $_POST['username']) == false) { $errors[] = 'Your account name can only contain characters 0-9.'; }
Also, the best way to manage the account numbers is to generate them from the aac itself, and not get them typed by hand from the user.
I think OTHire should be renamed to ‘OLDTIBIA’ or similar because Nostalrius and OTHire share the same needs in terms of features. They only accept numbers on account ids, and the best way to manage them is to create those numbers automatically on register, instead of try to guess an empty one.
@tarantonio No, because there are other differences in the database, inconsistencies in the naming of columns. For instance: https://github.com/Znote/ZnoteAAC/blob/58e6300cf71c28b27d46f000b4b29388774896e2/characterprofile.php#L119-L135
This sample shows TFS_10 by default uses townid, TFS 0.3/4 uses town, and OTHire uses townid. (without an underscore ) Therefore, Nostalrius using a stripped down version of TFS 1.2 will not directly match OTHire, even though the protocol mandates a similar structure. (i.e the ServerEngine is different, column names and references in the database is different).
What I suggest is to use $config['client']
to determine difference in availability in the database even if the ServerEngine is the same. Thus OTHIRE is not neccesarily OLDTIBIA, its an own engine based on otserv (if I remember correctly), and it could potentially support multiple protocols depending on what the developer of that engine wants to do.
@Znote what about to generate account id with numbers automatically from the aac? That's the best way to manage in old versions, like RL Tibia did. Maybe an email sent to user with credentials should be helpful
@tarantonio Sure, will add it to config
Only to remember, no bank balance on Nostalrius so house auctions can check depot gold amount or similar.
I'm very hesitant on pushing Nostalrius support.
Maybe someone can bother @nekiro to create a 7.7 downport fork of TFS. His repo https://github.com/nekiro/forgottenserver is absolutely awesome.
Nostalrius is a TFS 1.2 backported to client version 7.72. Presumably with a good data pack that represents itself as a 7.72 clone of the good old days. The release has gotten attention and people are starting to use it.
Issue initiated: https://otland.net/threads/znote-aac-1-4-tfs-0-2-13-tfs-0-3-6-0-4.166722/page-60#post-2545051
Nostalrius release: https://otland.net/threads/nostalrius-7-7.262407/#post-2538042
Nostalrius github: https://github.com/TwistedScorpio/Nostalrius
Someone has already modified a version of Znote AAC for nostalrius (by breaking/modifying TFS_10 engine compatibility): https://otland.net/threads/znote-change-name-to-id.262497/#post-2538850
Since this is based on TFS 1.2, I don't think we need to identify it as its own server engine. Instead, we can grab client version from config.php to determine what availability we should have in the database. (client 7.72 = 772 = no name field in accounts table etc). And adjust the neccesary TFS 1.2 queries to support the backport.
Does anyone actually remember which protocol version account ids got changed into name? I can't remember the exact version.