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

balliztik1

Members
  • Posts

    2052
  • Joined

  • Last visited

    Never

Everything posted by balliztik1

  1. When did this happen? =o *checks main.txt* Well, it's not 2.7, and it hasn't been in earlier releases. You might be thinking of the OnClick sub. That's totally different. I even say that in the first post. > making the OnClick tile, which blocks, a thing of the past Nah, this is different.
  2. @Marsh: > dim penis as long? *buh dum ching* Ladies and gentleman, it's Marsh!
  3. Boolean. Most definitely. Or most definitely not. I forget.
  4. I can haz character? 1\. Balliztik 2\. http://fireemblemblog.files.wordpress.com/2007/10/matthew_thief.gif Something like that, maybe? Arms concealed inside cape, and such. 3\. Magic 4\. Heart! No, but seriously…umm...light, I guess. 5\. Only magic. Uses energy as a blade or so. 6\. Arcana
  5. Oh jeez. Sorry for the double post, but I just realized a huge error in this tutorial. I say "three places" but only list two. I left out an entire section of the tutorial! O.o It's the part where you have to set the property equal to 0 upon item creation. I no longer have the source, so I'll have to dig a bit, but I should have this fixed soon.
  6. Ah. PutVar has 4 arguments. You'll need one more. My suggestion is, maybe, have the header be "buddies" and the variable be a number, and the value be Parse(2). For instance, let's assume BudNum is the number of buddies that player has (and BudNum + 1, would, therefore be the next available slot). BudNum would, of course, have to be defined, though. Call PutVar(App.Path & "\Accounts\" & Parse(1) & ".ini", "Buddies", CStr(BudNum + 1), Parse(2))
  7. Oh. That's my bad. Call SendData("add_buddy" & "," & MyIndex & "," & BUDDYNAME) It's just one argument. My bad.
  8. 1\. There are tons of resources for games over in the resources section. Give that a look-see. 2\. I haven't used Eclipse in ages, but from what I've read, it sounds like it's a current engine bug that is fixed in the next version. You could always use scripted damage spells until then, however. 3\. You mean like getting your server online? Or making a decent game? There's plenty of tutorials to get a server online over in the tutorial section. If you're looking to make a good game that attracts people, take a look at some of the successful games. Learn from their success and try to offer similar features in your game. Don't blatantly copy, though.
  9. I originally had a tutorial on how to add MAGI as a requirement for an item. This will take the ideas there and apply them to any and all item edits you may want to do. NOTE: If you can grasp the concepts here, you can extend them into NPC editing, Map editing, Player editing and more. Source editing is all about applying concepts to situations. **Server Side** 1\. First thing's first: we need to make up the new item property. For the example, I'll use MagiReq, just because it's been requested so many times (and I lost my tutorial, so this will serve 2 purposes). The first thing we'll need to do is locate the type. All the type declarations are in modTypes, so head there and look for "Type ItemRec". You'll see a list of item attributes that you should recognize. It doesn't matter where you put the new property, as long as it's within the type boundaries, but add this somewhere: ``` MagiReq as Long ``` NOTE: IMPORTANT!!! Adding MagiReq here assigns a new property to items. If you remember, in the "Bridging the Gap" tutorial I introduced properties. Now, you can use "Item(Num).MagiReq" to find the new property of any item. Whenever you add a property to an object like that, you can use it in the same way as above. 2\. Now that we have the property established, we need to assign it value in three places. Find "Sub ClearItems" in modTypes. You'll see all the properties of an item being set to their lowest values. We'll want MagiReq to become 0 when clearing the item, so throw this line in the sub: ``` Item(index).MagiReq = 0 ``` Again, you'll notice that as you type, MagiReq popped up as a property of Item. Now that we've established that, we can change the editing process. Find " 'update the item " under " Case "saveitem" " in modServerTCP. Again, you'll find a list of properties. You have 2 options here. You can place MagiReq as Parse(26) at the end, or as Parse(11) with all the other requirements. I advise to use 26 unless you want to alter a lot of subs in order to move each property up by 1\. So, add this: ``` Item(n).MagiReq = Val(Parse(26)) ``` You'll notice some send commands under the properties. Recalling the previous tutorial, we must track their source. I'll save you the trouble and tell you to go to "Sub SendUpdateItemToAll" in modServerTCP. There are three consecutive subs there that you will need to edit. In each, find the line: ``` Packet = Packet & SEP_CHAR & END_CHAR ``` and change it to: ``` Packet = Packet & SEP_CHAR & Item(itemnum).MagiReq & SEP_CHAR & END_CHAR ``` Make sure to do that all three times. 3\. Last, we need to make the number actually do something. Find this line: ``` Dim n1 As Long, n2 As Long, n3 As Long, n4 As Long, n5 As Long ``` And change it to this: ``` Dim n1 As Long, n2 As Long, n3 As Long, n4 As Long, n5 As Long, n6 as Long ``` Under that, add this line: ``` n6 = Item(GetPlayerInvItemNum(index, InvNum)).MagiReq ``` Further under there, you will find several instances of the following that you will need to change (one for each item type that will need MagiReq). Find these lines: ``` ElseIf Int(GetPlayerSPEED(index)) < n3 Then Call PlayerMsg(index, "Your speed is too low to equip this item! Required Speed (" & n3 & ")", BrightRed) Exit Sub End If ``` Change each of them to look like this: ``` ElseIf Int(GetPlayerSPEED(index)) < n3 Then Call PlayerMsg(index, "Your speed is too low to equip this item! Required Speed (" & n3 & ")", BrightRed) Exit Sub ElseIf Int(GetPlayerMagi(index)) < n6 Then Call PlayerMsg(index, "Your magic is too low to equip this item! Required magic (" & n6 & ")", BrightRed) Exit Sub End If ``` I believe there are 7 places where you have to change that. That should be all for the server side. **Client Side** 1\. Follow steps 1 and 2 (up to Sub ClearItem) from the server section, except do it this time on the client side. 2\. Now, we have to alter the item editor. Open frmItemEditor in Object view. Move stuff around in the item editor so you have room for a new HScrollBar. Name it scrlMagiReq. Add two labels above it, like the other bars. I named mine Label32 and Label33 to go along with the current theme of things. Double click the new scroll bar and make this sub in the form's code: ``` Private Sub scrlMagiReq_Change() Label33.Caption = scrlMagiReq.Value End Sub ``` 3\. Now, we need to change the code that sets the actual values in two places: Find "Sub ItemEditorInit" in modGameLogic. Find this line: ``` frmItemEditor.scrlSpeedReq.Value = Item(EditorIndex).SpeedReq ``` And add this right under it: ``` frmItemEditor.scrlMagiReq.Value = Item(EditorIndex).MagiReq ``` That changed when the editor starts. Scroll down to the next sub, "ItemEditorOk" to change the saving. Do the same as before, basically, except backwards. Find this line: ``` Item(EditorIndex).SpeedReq = frmItemEditor.scrlSpeedReq.Value ``` And add this right under it: ``` Item(EditorIndex).MagiReq = frmItemEditor.scrlMagiReq.Value ``` Scroll down a bit, and find this line several times: ``` Item(EditorIndex).SpeedReq = 0 ``` Underneath each instance of this line, add this: ``` Item(EditorIndex).MagiReq = 0 ``` That will assign the values whenever you edit the item now. 4\. The last thing is to make sure the server and client are communicating properly with the new data. Find "Sub SendSaveItem" in modClientTCP. Change the second to last line to this, like from above: ``` Packet = Packet & SEP_CHAR & Item(ItemNum).MagiReq & SEP_CHAR & END_CHAR ``` Now that it sends the right value, we need it to read the right value. Find " 'Update the Item " in "Sub HandleData" of modClientTCP. Add this line with the rest of them: ``` Item(n).MagiReq = Val(Parse(26)) ``` And there you have it. Hopefully you've not just idly followed these steps, but rather realized what each step did to help complete the whole code. The order in which we did things can be used to make other edits to items, or even to other types. It's just a matter of conceptual learning, like I said previously.
  10. First of all, MyIndex is a client-side variable. As such, it needs to be sent over. ``` Call SendData("add_buddy", MyIndex) ``` Then, you'll also need the name of who they are adding. Depending on how that is entered, that value will change, but it will be something like this. ``` Call SendData("add_buddy", MyIndex & "," & NAME) ``` NAME, of course, will change. Server-side, you use the Parse() array to dictate which variables do what. Since MyIndex is the first parameter and NAME is the second, MyIndex is Parse(1), and NAME is Parse(2). ``` Call PutVar(App.Path & "\Accounts\" & Parse(1) & ".ini", Parse(2)) ``` I'm sure you know that this won't make a buddy system, though, as it is. This merely gets the data from one place to another. However, it is a good start.
  11. I decided to finally move this over from my old forum, as it's kinda dead. Here it is for Eclipse to enjoy. =) I couldn't figure out what was wrong with calling a script from speaking, until I realized that I'd have to model it after the Commands sub. This is what I came up with. In the client, find procedure HandleKeyPresses in modGameLogic. Under the line "Call SayMsg(MyText)", add this: ``` Call SendData("speak" & SEP_CHAR & MyIndex & SEP_CHAR & MyText & SEP_CHAR & END_CHAR) ``` Now, under the second Select Case in modServerTCP's HandleData procedure, add this: ``` Case "speak" Call PutVar(App.Path & "\Scripts\Speak.ini", "Spoken Strings", Parse(1), Parse(2)) MyScript.ExecuteStatement "Scripts\Main.txt", "PlayerSpeak " & Parse(1) Exit Sub ``` Now, add this sub to your main.txt. ``` Sub PlayerSpeak(index) SpeakString = GetVar("scripts\speak.ini", "Spoken Strings", CStr(index)) If Lcase(Mid(SpeakString, 1, 11)) = "my name is " Then name = Lcase(Mid(SpeakString, 12, Len(SpeakString) - 11)) If Lcase(GetPlayerName(index)) = name Then Call PlayerMsg(index, "Why, yes it is.", 15) Else Call PlayerMsg(index, "You'se a liar!", 4) End If End If End Sub ``` The only parameter is index, but SpeakString is a derivative. SpeakString works the same as the Command sub's Textsay variable, except the string won't have a / in front of it. In fact, the Command sub becomes useless after adding this, as this has much more versatility.
  12. This has been setting on my old forum for a while now. I know I posted something similar as a reply to someone's script request, but here it is in tutorial form. I've been thinking of adding something like this for a while now. I needed a script trigger that allows you to pinpoint which tile a player clicks, making the OnClick tile, which blocks, a thing of the past. So, after a bit of observation, here's what I came up with. Add this case to the "Select Case Parse(0)" of prodecure HandleData of modServerTCP: ``` Case "clicked" MyScript.ExecuteStatement "Scripts\Main.txt", "PlayerClick " & Parse(1) & "," & Parse(2) & "," & Parse(3) & "," & Parse(4) Exit Sub ``` Then, add this under "If Button = 1 And InEditor = False Then" in procedure picUber_MouseDown of frmMirage in the client: ``` Call SendData("Clicked" & SEP_CHAR & MyIndex & SEP_CHAR & X & SEP_CHAR & Y & SEP_CHAR & Shift & SEP_CHAR & END_CHAR) ``` Then, throw this in your main.txt: ``` Sub PlayerClick(index, x, y, Shift) tilex = x \ 32 tiley = y \ 32 If IsScrolling = 1 Then px = GetPlayerX(index) py = GetPlayerY(index) If px = 11 Then tilex = tilex + px - 10 x = x + 32 * (px - 10) ElseIf px >= 22 Then tilex = tilex + 11 x = x + 352 End If If py = 8 Then tiley = tiley + py - 7 y = y + 32 * (py - 7) ElseIf py >= 24 Then tiley = tiley + 16 y = y + 512 End If End If If shift = 1 Then Call PlayerMsg(index, "You are holding shift!", 15) End If Call playermsg(index, "You clicked the tile with the coordinates: x - " & tilex & " y - " & tiley, 15) Call playermsg(index, "More specifically, you just clicked the pixel with the coordinates: x - " & x & " y - " & y, 15) End Sub ``` Whew. Now for an explanation of the new sub's parameters. index - The player's index number. Nothing new here. x - The x-coordinate of the pixel clicked. You can use this to pinpoint exact pixels, if you so choose. y - The y-coordinate of the pixel clicked. You can use this to pinpoint exact pixels, if you so choose. shift - Whether or not shift is held. You can use this to add more versatility to your scripts. Then, we have derivatives of those parameters. tilex - The x-coordinate of the tile clicked. tiley - The y-coordinate of the tile clicked. You'll want to add any scripting down where I called the PlayerMsgs. That's basically it. The only thing that may have to change is the formula for the scrolling offset in the sub itself, and I can tell you how to do that via PM if you use a different sized scrolling map than 31x31.
  13. Hmm, it doesn't seem I have a literal one. I do, however, have a couple where I implement features that use server/client packets. I'll post links to those to see if they help. You'll just have to read them with a conceptual mindset, rather than a literal one. http://sadscript.freeforums.org/speaking-script-trigger-t48.html http://sadscript.freeforums.org/clicking-script-trigger-t47.html Here's two that use client input to trigger server scripts.
  14. Data Sending from client to server is pretty simple. Let me see if I have a tutorial lying around. If not, I'll make a quick one.
  15. If GetPlayerWeaponSlot(index) 0 Then If GetPlayerInvItemNum(index, GetPlayerWeaponSlot(index)) = 2 Then End If End If The script will bug out if you just use GetPlayerWeaponSlot and it returns a null value (unless that's been fixed…)
  16. *headdesk* ElseIf GetPlayerInvItemNum(index, weapon) = #3# Then Call GoFishing(index, #4#, #10#, "#Trout") No need to concatenate those with pound signs. Simple numbers will suffice. Also, make sure you don't have duplicate copies of the ScriptedTile sub. It looks like a direct copy/paste, so you might already have a ScriptedTile sub. You can't have two. You'd need to transfer the script case over to the other.
  17. Lots of unended ifs and messy handling. This should work a lot better for you. ``` Sub PlayerLevelUp(Index) Do While GetPlayerExp(Index) >= GetPlayerNextLevel(Index) TotalExp = GetPlayerExp(Index) - GetPlayerNextLevel(Index) Call SetPlayerLevel(Index, GetPlayerLevel(Index) + 1) Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) + 1) Call SetPlayerExp(Index, TotalExp) Loop Call BattleMsg(Index, "You have " & GetPlayerPOINTS(Index) & " stat points.", BRIGHTBLUE, 0) If GetPlayerLevel(index) = 16 Then Select Case GetPlayerClass(index) Case 10 sprite = 28 Case 11 sprite = 29 Case 12 sprite = 30 Case 13 sprite = 32 Case 14 sprite = 40 Case 15 sprite = 39 Case 16 sprite = 41 Case 17 sprite = 43 Case 18 sprite = 44 End Select Call SetPlayerClass(index, GetPlayerClass(index) + 10) Call SetPlayerSprite(Index, sprite) Call SendPlayerData(Index) Call PlayerMsg(index, "Congratulations, you are now a " & GetPlayerClassName(index) & "!", WHITE) End If End Sub ``` @unnown: > GetPlayerExp(Index) > GetPlayerNextLevel(Index) > > find those functions and post them plox Silly Unnown, those are hardcoded functions. ;P
  18. Isn't there some property of an object in VB that determines the depth? I can't recall, specifically.
  19. @Dr.: > i dont have one i just want to see you. I NEED UR LAST NAME!!!! i found a rick marsh… =P You do realize that Marsh's name isn't Marsh, right?
  20. =o Oooo. Nice idea. The only thing is it'd be a pain to code the map switchovers if map sizes were independent of one another. :-\
  21. Godlord has a tutorial on this. Basically, find the dx7vb.dll file on the internet and use it with regsrv32\. He goes into more detail. You can find the tutorial in the tutorials section. I think it's stickied.
  22. @Godlord: > An run-time error occurs and there's nobody to press on OK for you. > > Regards, > Godlord. OMG, that's so sad. =( The power will go out. Because we all know Goddie's a computer. ;P (Bah, late post. Oh well, I feel the need to say it =P)
  23. In 2.7, the sub name changed. It's now: Sub Hotscript(index, Script) You have HotScript(index, 1). Constants are never used as parameters. Change it to HotScript(index, script) and it should work.
×
×
  • Create New...