Kite Posted June 2, 2010 Author Share Posted June 2, 2010 Ok, so I want to have a sourced quest menu/log.But I don't know how to have it get info, from a server-sided ini file.So if someone can show me how to setup it, that would be great.A re-cap:Need a client sided quest menu, to get data from a server-sided .ini file. Link to comment Share on other sites More sharing options...
balliztik1 Posted June 2, 2010 Share Posted June 2, 2010 ``` Dim f f = FreeFile Open App.Path & "Scripts\Main.txt" For Input As #f Dim text text = Input$(LOF(f), f) Close #f Call SendDataTo(index, "MAINEDITOR" & SEP_CHAR & text & SEP_CHAR & END_CHAR)```Here's a clip from the main.txt in-game editor. You can do something like this. Link to comment Share on other sites More sharing options...
Kite Posted June 2, 2010 Author Share Posted June 2, 2010 The senddata is what messes with me.I mean, I have never done anything like this before.So, I don't really understand what you posted :P Link to comment Share on other sites More sharing options...
balliztik1 Posted June 2, 2010 Share Posted June 2, 2010 ``` Dim variableName as Long variableName = FreeFile Open App.Path & "Directory\File.txt" For Input As #variableName``` This bit is used to open a file of your choosing.``` Dim theIniFile as String theIniFile = Input$(LOF(variableName), variableName) Close #variableName ```This puts the whole file's text into a string and closes the file.``` Call SendDataTo(index, "PacketHeader" & SEP_CHAR & text & SEP_CHAR & END_CHAR)```This sends a packet to the player's client. In the client, there would be a check for if the packet's first bit of data is a string that says "PacketHeader". If so, then you'll know that the second bit is the text of that file. Take a look at how something simple like a PlayerMsg is done. Follow the packets from the client to server and back until it ends. It'll give you a good idea of where to start. Link to comment Share on other sites More sharing options...
Kite Posted June 2, 2010 Author Share Posted June 2, 2010 Alright, I will take a look at it.It seems like a ton of trouble, but it's better than pure scripting it :P 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