zade_o Posted December 4, 2008 Author Share Posted December 4, 2008 How can I check the ini file that's in the server upon loading frmMirage so that as soon as the form loads you can already see your icons? cus atm they only show up if you double click the spell in your spell book Link to comment Share on other sites More sharing options...
Baron Posted December 4, 2008 Share Posted December 4, 2008 in your login script, the same point where sadscript onjoingame or whatever it is gets run, send the packet with the information about whats in their spell bar. Link to comment Share on other sites More sharing options...
zade_o Posted December 4, 2008 Author Share Posted December 4, 2008 I don't understand how to do a command that sends information from the server to the client… if you're calling the command from the client. Link to comment Share on other sites More sharing options...
Baron Posted December 4, 2008 Share Posted December 4, 2008 packets are very simple:server decides something needs to happen. it makes a new string.gives it a headeriemysuperspellbarholdsthen give it the dataie1,5,8,2,5,4,0,0with it all seperated using sep_char and finished with an end_char.so your string packet might look like this:packet = mysuperspellbarholds & sep_char & spelldata1variableloadedfromini & sep_char & spelldata2variableloadedfromini & sep_char …. etc etcthe client then gets a new case in modhandletcp for the headermysuperspellbarholdsthat tells it what to do with the info it recieves, in this case update the images in the spellbar. Link to comment Share on other sites More sharing options...
zade_o Posted December 4, 2008 Author Share Posted December 4, 2008 right I got packets …somewhat...that's how i've been building the action bar, but i don't know how to make the packets send automatically when the form loads..``` If casestring = "getspell7" Then s = parse(1) frmMirage.Label14(7).Caption = s frmMirage.Image13.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & s & ".gif") End If```This is an example of one of the packets in my client, and this is what's in my server``` Case "setspell7" Call WriteINI("SK7", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell7" FileData = ReadINI("SK7", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell7" & SEP_CHAR & FileData & END_CHAR) Exit Sub```I don't know how to mold this to update all 10 slots when frmMirage loads. Link to comment Share on other sites More sharing options...
Baron Posted December 4, 2008 Share Posted December 4, 2008 find where the server sends the motd, add after it> FileData = ReadINI("SK7", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString)> Call SendDataTo(Index, "getspell7" & SEP_CHAR & FileData & END_CHAR)for each action slot is the fastest and dirtiest way. Link to comment Share on other sites More sharing options...
zade_o Posted December 4, 2008 Author Share Posted December 4, 2008 ohhh. sounds good. i'll try that out real fastEDIT-Worked like a charm.progress:(DONE)- add in the code for the other 7 slots(actually not done….see below...lol)- put a check in that keeps you from putting the same spell in spell bar more than once- copy the codes from left clicking to hitting numbers(DONE)- figure out how to make your icons load when you load the formOk so, my method of checking to see if you already have the spell was gonna be to check if the image of sayyyImage7 = App.Path & "\GUI\SpellIcons\" & spellname & ".gif" Thenexists = truebut doesn't work? any ideas on how to check to see if it exists in any of the slots? Link to comment Share on other sites More sharing options...
Baron Posted December 4, 2008 Share Posted December 4, 2008 (actually not done….see below...lol)- put a check in that keeps you from putting the same spell in spell bar more than oncei dont get whats wrong with having the same spell in many slots? Link to comment Share on other sites More sharing options...
zade_o Posted December 4, 2008 Author Share Posted December 4, 2008 I guess nothing is rofl. I'll move on. Source should be released tonight after some testing !!! 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