Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

tehl33tjim

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

tehl33tjim's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. This could be an interesting addition to my game. I wouldn't want to use it as descriptions, but maybe for small random bits of info. Like the known minerals in the area, or something. Hmmm…this definitely has potential.
  2. Sorry for not clearing this up earlier. I did get it to work, the major problem being a stupid one (forgetting to specify the form at one end.) Thank you guys for your help regardless. :)
  3. I do have SAnnouncements under the ModEunumerators ServerPackets list (on both Client and Server) At the bottom of Server's modPlayer I have: ``` Public Sub sendAnnouncements(ByVal text As String) Dim buffer As clsBuffer Set buffer = New clsBuffer buffer.WriteLong SAnnouncements buffer.WriteString frmServer.txtAnnouncements.text SendDataToAll buffer.ToArray() Set buffer = Nothing End Sub ``` On frmServer I have a new tab for announcements, with txtAnnouncements and cmdSendAnnouncements. When I went to compile I would get the "Argument not Optional" error, highlighting "Call sendAnnouncements" until I changed it to what I have below: ``` Public Sub cmdSendAnnouncement_Click() Call sendAnnouncements(frmServer.txtAnnouncements.text) End Sub ``` Now it works perfectly. But I agree that it should not require that argument.
  4. I think I have the logic down, but I'm terrible at figuring out the correct syntax for this stuff. What I want to accomplish: Have a simple label on the Client (maybe even a picture box in the future) - normally this will have a (lblAnnouncement.caption = "No Announcements"), but I want to make a txtAnnounce text box and button (on the server form) that upon pressing will change the lblAnnouncement.caption.Client = txtAnnounce.text.Server for all players. I understand the basics of putting the actual pieces onto the windows (the txtBox and labels, etc). But I have no idea how the whole sending packets works. I assume I would also need something on form_load for the client's frmMain, but again - I don't know how to send stuff from the server to the clients. Can anybody point me in the right direction for that? I would appreciate it greatly, and it would be great to learn.
  5. No I don't, and at the moment have no interest in it. I appreciate the help, but I'd rather not somebody else just fix my code. I want to learn why it's acting the way it is, otherwise I won't get any better. I just want to know why that variable keeps getting flooded as it is. There has to be some reason. The NPC version has an almost identical structure (sans replacing Item with NPC), and it works perfectly. It can't be that the scroll-bar's maximum value is set to 1, why would that overflow the variable? That doesn't make sense - mostly because it should only go up to 1 - but also because I have another scroll-bar with a maximum value set to 1, and that works. [Edit]I figured it out. Everything is working now, and I'm pretty sure I understand why too.[/edit]
  6. But that makes no sense, because I have another scrlbar for NPC's Armor, and that works perfectly with the max value set to 1. And I'd like to learn this stuff myself, instead of having somebody do it for me.
  7. I have since changed the Pierce and Armor variables to Long, and now to Byte. My Armor works on NPCs, not errors at all. But my variables for Pierce always give me an error. Now I get one constantly. I get error 380: ``` frmEditor_Item.scrlPierce.Value = .Pierce ```is highlighted within ModGameEditors Mouseover the first half gives me: ``` frmEditor_Item.scrlPierce.Value = 0 ``` Mouseover .Pierce gives me: ``` .Pierce = 255 ``` When it was a Long variable, it gave me an overflow with .Pierce = 66555 or whichever specific number it was. So what is causing this to happen? I now have a scrlPierce, min = 0, max = 1 ``` Private Sub scrlPierce_Change() ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If EditorIndex = 0 Or EditorIndex > MAX_ITEMS Then Exit Sub If scrlPierce.Value = 0 Then lblPierce.Caption = "Pierce: No" ElseIf scrlPierce.Value = 1 Then lblPierce.Caption = "Pierce: Yes" End If Item(EditorIndex).Pierce = scrlPierce.Value ' Error handler Exit Sub errorhandler: HandleError "scrlPierce_Change", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` Anything look suspicious to anyone?
  8. Well in [at least the early] final fantasy games, there were usually certain weapons that dealt more damage to certain types of monsters, without specifically stating it. Silver weapons could do extra damage to undead, or werewolf types. Stuff like that. It's not difficult at all to add resistance values as well, or even absorb so that when you cast Fire on that FlameTurtle it will get healed instead. ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons//wink.png)
  9. See, if 0 = unchecked/false, and 1 = checked/true, there shouldn't be any error, right? The checkbox value is never set to 2/grayed by the user. This also only happened AFTER I had checked an item with the .armor (piercing) attribute. After that, upon selecting it from the list it gives me the error. I can still select and view the info/change the info for all other items. I can even change the state of the checkbox. But if it is checked, and I go back to check it, I get the 380. I wonder if order I place the code in, under the ModGameEditor module, is the issue?
  10. > Yea that will work. > > Checkboxes have 3 values. 0 = grayed, 1 = unchecked, 2 = checked. So setting a value of greater than 1 to a boolean value will generate an error. You can use a select case and check if the value of the checkbox is 1 or 2 and subtract the value with 1 and save it as a boolean (since false = 0 and true = 1) Or you can just change the boolean to a byte and the rest will be done for you. I thought that grayed=2\. So that's why. Gonna try it out in a bit. Well wait, that can't be. Because I did the same thing for NpcRec, added as a Boolean. I did everything the same, and there are no errors for that…hmmm....
  11. Should I just swap out the chkbox for a scrlbar? .Min = 0 and .Max=1? That should still work with a boolean, right?
  12. I get a Runtime Error 380, and it highlights this in ModGameEditors: ``` frmEditor_Item.chkPierce.Value = .Armor ``` I have that declared in ModTypes, under the ItemRec as a Boolean on both the client and the server. This happens when I am in game when I access the item editor for the one item that I had checked (true'd) the chkbox for. And the code for that chkbox is as follows: ``` Private Sub chkPierce_Click() ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If chkPierce.Value = 0 Then chkPierce.Caption = "Pierce: No" ElseIf chkPierce.Value = 1 Then chkPierce.Caption = "Pierce: Yes" End If Item(EditorIndex).Armor = chkPierce.Value errorhandler: HandleError "chkPierce_Click", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` Although I can't see that being the problem - it does only happen when this chkbox and it's _Click code is present on the form. What am I missing?
  13. ~~How, uh…do I do that?~~ Nevermind. Didn't realize I had to pop into full editor.
  14. I was going to work on that this morning, actually. Theoretically, it should be very similar. Add a new variable to SpellRec, and then add the appropriate code under SpellEditInit in the ModGameEditors module. Add a scrollbar/label to the spell editor, set it up like we did for items and npcs. If the ModCombat sub is similar to regular combat, it should just require that last if-statement [ if spell(player).element = npc(npcnum).element then damage = damage * 2 ] If I get time to mess around with it, I'll update the main post.
×
×
  • Create New...