varinyc Posted December 4, 2010 Author Share Posted December 4, 2010 So I'm slowly learning a bit about Java 6, and I found out about hash-tables & vectors @_@This is new to me, so surely I googled about it to see if there was anything VB6 related (so that I can use what I learned NOW xD) and I stumbled upon "Scripting.Dictionary"This made me smile @_@ I've been trying to figure out a way to rework how a lot of eclipse works, Mainly looking up different parts of player data WITHOUT them being online >_<; . To continue the work on my mailing system.Because the way I was going at it was to see if the character exists, Charlist.txt. Then sending it if it DID exist. Next I wanted to add Mass Guild Email. Which would require me to figure out what guilds exist, and what players were in that Guild x_x which I could only think of with an INI or something time wasting.I Figured there had to be a way to create an array of ALL Guilds and attach character names on it but the only lookup method I could think of involved either numbering Guild Data in .dat files (binary) and looping through them, or the same thing with folders or some other random junk idea… then looking up accounts etc etc.But with this method it would make a LOT more sense. ._. (even if I'm not explaining it correctly or if I sound wrong, it makes sense in my head)But it seems too good to be true, so I figured I'd ask around. Is there a negative side to using this? Speed or something or Forward compatibility (XP users to Win7 users)? That and the word Scripting has always been shunned o3o Link to comment Share on other sites More sharing options...
varinyc Posted December 4, 2010 Author Share Posted December 4, 2010 Sorry for the double post But I don't know who moved this D:> (and wanted to raise attention to)I'm sorry for the improper format or wording I used but This isn't a tutorial it's a question and it Involves VB6 T_____T Link to comment Share on other sites More sharing options...
Ruins of Hell Posted December 4, 2010 Share Posted December 4, 2010 Moved it to Source Questions. Link to comment Share on other sites More sharing options...
Robin Posted December 4, 2010 Share Posted December 4, 2010 If you want to use player's data when they're not logged in, simply write a handful of systems which allow for data manipulation in offline accounts. Similar to LoadPlayer & SavePlayer. Link to comment Share on other sites More sharing options...
varinyc Posted December 4, 2010 Author Share Posted December 4, 2010 @Robin:> If you want to use player's data when they're not logged in, simply write a handful of systems which allow for data manipulation in offline accounts. Similar to LoadPlayer & SavePlayer.But what about Loading a Guild UDT at startup? I'd have to either look up all the guild names in an INI/TXT and load the files like that. Or Number the files. I thought Numbering them would just be faster. So How would I look up which file had which Guild Name other than Going through all of them in a loop till I found it? Or better yet, say I DO Name the files by guild & load them, How Would I go about finding out What guild a Player is in? I thought It'd be much easier just to search the already loaded Guild Info for a name than it would be to look it up through another separate Offline version char file.Since Scripting.Dictionary should be able to look up a char in the Guild through it's Array.I'm sure there's many ways to skin a cat. I just dunno what way would be fastest and/or most efficient. Or if I'm overlooking another option Link to comment Share on other sites More sharing options...
Robin Posted December 4, 2010 Share Posted December 4, 2010 If you've already got a system to load a player's data, then simply get the guild name from that, then open the file with the same name. Link to comment Share on other sites More sharing options...
varinyc Posted December 4, 2010 Author Share Posted December 4, 2010 @Robin:> If you've already got a system to load a player's data, then simply get the guild name from that, then open the file with the same name.I'm Messaging a group of people, all in the confines of one guild. I cannot Load the player Data before I know what players are in it. Nor is there any way of figuring out who is in what guild Unless they're online. At least Up to ES it is this way, I haven't used EO yet.**Dictionary Method**Sending a message:Message sends to server > Server looks up Members through the Loaded Guild Array > sends messageFinding Guild Info for a certain player:Player Requests GuildInfo > Server Dictionary Searches the Loaded Guild Array for Player > Finds Player's Guild & Info on GuildOR**Index Method**Sending a message:Message sends to server > Server looks up Guild Name By looping through the index > Players Found > sends messageFinding Guild Info for a certain player:Player requests guildinfo on an offline target > Server Searches for player > Finds player > Finds Guild Name > Server looks up guild name by looping through the index > Finds Guild InfoThis is just one of the few things I'm working on. There's other examples of this I have as well.All I wanted to know is if it was a good method to try out, or if it just LOOKED good but actually ran slower. And If anyone knew if something like this would affect my game from being compatible with windows 7\. because I've never really messed with that resource menu before. Link to comment Share on other sites More sharing options...
varinyc Posted December 5, 2010 Author Share Posted December 5, 2010 The Scripting.Dictionary Thing doesn't quite do what I was thinking it did x___xThis thread is useless now xDSorry for wasting your time Robin! Link to comment Share on other sites More sharing options...
Robin Posted December 5, 2010 Share Posted December 5, 2010 @varinyc:> I'm Messaging a group of people, all in the confines of one guild. I cannot Load the player Data before I know what players are in it. Nor is there any way of figuring out who is in what guild Unless they're online. At least Up to ES it is this way, I haven't used EO yet.Shoulda said that in the first place. Origins doesn't have a guild system installed from scratch so I just assumed you had one set up the way you wanted it. As for whether using a random library instead of programming it yourself is faster, I highly doubt it. What you're wanting to do can easily be done through very basic code. You don't need to over-complicate it so much. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now