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

Yxxe

Members
  • Posts

    1712
  • Joined

  • Last visited

    Never

Everything posted by Yxxe

  1. @Prince: > yes it is, and doesn't useful at all. > but, nice though Like I always say, if it isn't useful to you, that doesn't mean it isn't useful to someone else. @GoldSide: If you wanted to make it slightly better and have a "Global Server Time" per se, You could just transfer your code to the server instead, and just sync the time with the client when a player logs in. Doing this then makes things easier when planning in-game events. (I've found that out the hard way, as most people can't convert time zones >_>) EDIT: @7: > One word: **GetTickCount**. Yup, learn to use GetTickCount instead of timers when you are ready to make the next leap.
  2. Yxxe

    Pets

    Check my sig. Also note I do not offer help for my Pet System any more. Thanks, Lightning
  3. Like I have stated many times before, modifications 2.6 run off an ancient version of my pet system. Use the newest tutorial.
  4. @JS1: > Immorality, not immortality.
  5. @UzGo: > And Your rank is Legend ?! Stop being a dick. @Draken: modConstants: ``` ' ******************************************** ' Default starting location [Server Only] Public Const START_MAP As Long = 1 Public Const START_X As Long = 5 Public Const START_Y As Long = 5 ``` modDatabase, Sub AddChar: ``` Player(Index).Map = START_MAP Player(Index).x = START_X Player(Index).y = START_Y ``` You would just have to change that to the values in the classes configuration file, depending on class, using "Player(Index).Class". Hope this helped. Any problems, just send me a PM. EDIT: You would also most likely have to change the warping values in the procedure "OnDeath".
  6. @Murdock: > When I use this, all of my item icons become funny looking images… Whats up with that? Then you've done something horribly wrong. D:
  7. @=: > No, I mean just share other snippets of code that can be used on the Autoupdater too. Just for whoever wants to use it, it saves the need for needing to create a new thread, and maybe you could make this sort of like an index for various functions for use. I wouldn't mind helping too, I've been meaning to make a tutorial for a few updater things, for a while now. Oh, ok. Send me the tutorials via PM and I'll add them to the OP. :]
  8. @=: > Nice, I can definitely see use from this…mind if I share some of my code too for tutorial use, Lightning? I don't see the need for a separate thread, if it's on the updater... I'm guessing you are thinking of some other functions? Just send me the functions via PM and I'll code them myself thanks. ;]
  9. **Updater Add-Ons Index** Below is a list of compiled tutorials by various authors for Robin's autoupdater. **Client File Functionality** _Author: Lightning_ This tutorial allows control of the client-side files through the use of a downloaded command file. >! Seeing as I'm off to university soon, I won't be around as much as I have been. I thought I'd share this little snippet with you. It gives the autoupdater a little more functionality and control over your client files. Who knows, in the future there may be some files in the client which aren't needed any more, or need to be moved elsewhere. This is where this bit of code comes in handy. It allows you do delete files and folders, and move files to other places in the client with a few short commands. >! It's tried and tested with Yami's autoupdater, but it should work with Robins also, seeing as Yami's is based off of that. >! **The Code:** >! Go to Project > References and added "Microsoft Scripting Runtime", then click "OK". >! Place this in modMain: >! WARNING: Some filepaths will need to be changed in order for it to work for you. >! ``` Sub RunCommandFile() Dim ReadCommand As String Dim CurrentCommand() As String Dim fpath As New FileSystemObject If FileExist(App.Path & "\bin\command.txt") Then Open App.Path & "\bin\command.txt" For Input As #1 While EOF(1) = False Line Input #1, ReadCommand 'Split the command CurrentCommand = Split(ReadCommand, " ") 'First word is keyword Select Case CurrentCommand(0) Case "del" If FileExist(App.Path & CurrentCommand(1)) = True Then Call Kill(App.Path & CurrentCommand(1)) End If Case "delfolder" If fpath.FolderExists(App.Path & CurrentCommand(1)) = True Then Call fpath.DeleteFolder(App.Path & CurrentCommand(1), True) End If Case "move" 'First, copy the file If FileExist(App.Path & CurrentCommand(1)) Then If FileExist(App.Path & CurrentCommand(2)) = False Then If fpath.FolderExists(App.Path & CurrentCommand(2)) Then Call fpath.MoveFile(App.Path & CurrentCommand(1), App.Path & CurrentCommand(2)) End If End If End If End Select Wend Close #1 'Delete the command file Call Kill(App.Path & "\bin\command.txt") End If >! End Sub >! ``` Find "Public Sub RunUpdates" in modMain. At the end of the loop, above "Next": >! ``` Call RunCommandFile ``` The procedure will run every time an update is downloaded. If a command file is not present, the procedure will basically skip it. >! **How to make a command file:** >! Make a blank text document called "command.txt". Open it up. Type each command on a seperate line. They will be executed one at a time. >! ``` del test.txt delfolder \bin\old move File.exe \bin\exe\File.exe ``` In this example, test.txt is deleted. Afterwards, the folder called "old" in the "bin" folder is deleted. "File.exe" is then moved to "\bin\exe\". >! Once your command file is ready, place it in with your patch data in the RAR archive. Make sure the command file is extracted to the root location the RAR archive is downloaded to. >! **And finally:** Here is the command data: >! Deleting a file: ``` del [filepath] ``` Deleting a folder: ``` delfolder [filepath] ``` Moving a file: ``` move [source filepath] [destination filepath] ``` Enjoy, >! Lightning **Updater First-Time Use** _Author: = Not 7_ Almost identical to my code for OTLR's updater, this checks the updater for first time use. If so, it prompts the user to install the game's run-time files. >! Firstly, in config.ini, add under the options: ``` [Updater] FirstTime=0 ``` When the person first loads the updater, it calls sub main. So, we need to make a check that checks whether it's their first time loading the updater itself, and if so, exit the sub, so it doesn't carry on with the rest. >! So, we need to add…``` If GetVar((App.Path & "\bin\Data Files\config.ini"), "Updater", "FirstTime") = 0 Then Call FirstLoad Exit Sub End If ``` This checks the FirstTime, and whether it's 0\. If so, it stops the sub, as said, and instead loads a prompt. You can have whatever you wish for this prompt. In my case, I have it ask whether you have installed the library files. >! So, add…``` Public Sub FirstLoad() MsgBox "Hello. This appears to be the first time you have ran GAMENAMEHERE!", vbOKOnly, "GAMENAMEHERE" >! If MsgBox("GAMENAMEHERE requires a series of files called Dynamic Link Libraries to run! Have you installed the Eclipse Library Installer?", vbYesNo, "GAMENAMEHERE") = vbNo Then MsgBox "OK. Please install the library files!", vbOKOnly, GAMENAMEHERE Shell (App.Path & "\bin\ELI.exe") PutVar (App.Path & "\bin\Data Files\config.ini"), "Updater", "FirstTime", 1 DestroyUpdater Exit Sub Else MsgBox "OK. Have fun on Iron Prelude!", vbOKOnly, GAMENAMEHERE PutVar (App.Path & "\bin\Data Files\config.ini"), "Updater", "FirstTime", 1 Call Main End If >! End Sub ``` If the client has not installed the library files, it actually closes the updater, and runs the Eclipse Library Installer! After running for the first time, it changes the FirstTime to 1, and won't prompt again, from that point, unless if you directly change config.ini back to 0!
  10. I don't know why you just couldn't go and look for yourself…
  11. Send the class number / class name when their character data is sent on login.
  12. You mean like this? @Lightning: > After taking a small break from Origin, I've come back to it with a few new items and a new feature. "Lucky Item Chests" contain a random item selected from a list, which all have different chances of appearing. Some will be made through Alchemy (Lv10+ Alchemy) and the others will be gained by other means. Without my blabbing on much further, I present to you the first four "Lucky Item Chests": > > * * * > > **Mystery Box** > > ![](http://i801.photobucket.com/albums/yy294/Adrammelech_2009/1-1.png) > > **Random Drops:** > > * Medium Health Potion > * Medium Mana Potion > * Ruby Ring > * Iron Ring > * Necklace of Envy > * Necklace of Faith > * Spiced Beef > * Revival Weed > * Strength Leaf > * Revival Serum
  13. @Meteor: > I know, I had already done that. It didn't fix it. The CSDE libs, not the normal EO ones.
  14. Try this: ``` Dim TempName as String Dim ValidName as Boolean ValidName = False Do TempName = InputBox("Your people have come across a new herbivore! What will they call it?", "New Creature", "") For name_check = 0 to UBound(Herb_Creature) If Herb_Creature(name_check).Name = TempName then MsgBox("This Name is alredy taken.", 0, "Invalid Name") Exit For ElseIf TempName = vbNullString then MsgBox("Please enter a Creature Name", 0, "Invalid Name") Exit For End If If UBound(Herb_Creature) = i and TempName Herb_Creature(name_check).Name Then Herb_Creature(temp_index2).Name = TempName ValidName = True End If Next Loop Until ValidName = True ```
  15. @Azkabanana: > Still the same issue. Then create a temporary variable which stores the name of the creature until all the checks are done. After that, assign "Herb_Creature(temp_index2).Name" the temporary variable.
  16. Change this: ``` For name_check = 0 To UBound(Herb_Creature) ``` To this: ``` For name_check = 0 To UBound(Herb_Creature) - 1 ```
  17. @quintensky: > why would you want to do that? I've coded player dialogues, which give players a bit of knowledge about a dungeon, or whatever. They players talk to each other and "enlighten" the gamer to a particular danger. In this case, I freeze the player movement until the player dialogue has finished. ![](http://i801.photobucket.com/albums/yy294/Adrammelech_2009/Chat_System_Final.png)
  18. Write in a variable which exits out of the procedure which handles player movement. (Client side) You can also do this server side (when a specific event is triggered), but you'll have to make sure you send a packet to the client disabling the movement keys like I explained earlier. Failure to do this will keep the movement keys enabled and will make the player stutter forward and back on the spot, seeing as server side the player is frozen.
  19. Yxxe

    My logo

    @Tahnner: > Master mind are you being serious? _Sarcasm readings are off the scale!_
  20. Something I wrote in April for Shadowwulf if I remember correctly. I don't think it works, but it led Shadowwulf in the right direction to get it working. It was just sitting in a folder, so it's more use here than it is just lying there: ``` Public Function CanTarget(ByVal Index as Long, ByVal NPCNum as Long) As Boolean Dim pX As Long, pY as Long 'Player coords Dim nX As Long, nY As Long 'npc coords Dim Dist As Long 'Diagonal distance Dim LoopX As Long, LoopY As Long Dim Angle As Byte pX = Player(index).x pY = Player(index).y nX = npc(NPCNum).x nY = npc(NPCNum).y '2D Pythagoras Dist = ((nX - pX) ^ 2) + ((nY - pY) ^ 2) Dist = (Dist) ^ 1/2 'Check distance If Dist > 3 Then CanTarget = False Exit Function Else CanTarget = True Exit Function End If 'Check Blocks If nX > pX Then Angle = Math.Tan((nX - pX) / (nY - pY)) For LoopX = pX to nX If Math.Tan((nX - LoopX) / (nY - LoopY)) > Angle Then LoopY = LoopY + 1 End If 'Check the tile If Map(MapNum).Tile(LoopX, LoopY) = TILE_TYPE_BLOCKED Then CanTarget = False Exit Function End If Next ElseIf pX > nX Then Angle = Math.Tan((pX - nX) / (pY - nY)) For LoopX = pX to nX Step -1 If Math.Tan((nX - LoopX) / (nY - LoopY)) > Angle Then LoopY = LoopY - 1 End If 'Check the tile If Map(MapNum).Tile(LoopX, LoopY) = TILE_TYPE_BLOCKED Then CanTarget = False Exit Function End If Next End If End Function ```
  21. @Ryoku: > Nice edit, but not very useful. ^_^ Just because it isn't useful to you doesn't mean it won't be to someone else.
  22. Yxxe

    Question

    @MeteorRain: > Uh could you please give me the full codes. > > Like where I have to put item name and amount and where I have to put map name and coords :) You use Ctrl+F, then look at what parameters are required…
  23. Yxxe

    Question

    1\. PlayerWarp 2\. HasItem 3\. TakeInvItem
  24. @⌐Cδlorful¬: > Updater won't even LAUNCH! You're probably missing one of the graphics files.
×
×
  • Create New...