Jump to content

Tokei

Members
  • Posts

    545
  • Joined

  • Last visited

  • Days Won

    66

Community Answers

  1. Tokei's post in C# -> PHP -> MYSQL or C# -> Emulator was marked as the answer   
    Ah, no, I thought this was for 'personal' use. You can't use this method in a launcher because the security risk is way too high. You have two options...
     
    Create a new packet to communicate with the server
    What you would have to do is create a connection with the server itself, probably read the clientinfo.xml, and then send the information you want to the server. In packets.h you would add a new packet that you can treat yourself. This is similar to what a WPE tool would do I guess.
     
    Keep using SQL
    You could stick with SQL... Create a new user with very limited access (only grant them the insert command). That way you could use the code above but by using that restricted account, they wouldn't be able to do anything even if they found out your connection username/password. The only abuse I can think of is that someone might end up spamming the DB with insert commands, but... this can happen with any other solution you come up with anyway.
  2. Tokei's post in Japanese filenames was marked as the answer   
    950 is "Chinese", what you're looking for is 932 (Japanese).
     
    To convert the file names with GRF Editor, set your encoding to 932, create a new empty GRF, add your files in it, save it, then go back in the encoding and put it back to whichever you prefer.
     
    Edit : don't use an existing GRF when changing to japanese's encoding; if you have some Korean characters in it they may not get translated properly when saving.
  3. Tokei's post in The problem about act was marked as the answer   
    You can't resize sprites just by changing their scale. For starter, this character will appear like it's floating in the air (she's above the horizontal line) and the frames have anchors/reference positions to connect with other sprites (like the head, the hat, etc) together. If you look at your sprite :

     
    I'd advise you to base your sprite using these ACTs instead : http://www.mediafire.com/download/nfsklh6ct88bax2/bighead2.grf, which have already been resized correctly (just copy and rename the body ACT that corresponds to your current sprite).
  4. Tokei's post in Crashed at Prontera Map was marked as the answer   
    It's been discussed 3 months ago xD, here :
     
     
    It supports clients from 2010ish onwards.
  5. Tokei's post in Help Actor switch color ? was marked as the answer   
    Yes, the color component can be modified :
    foreach (var action in act) { foreach (var frame in action) { foreach (var layer in frame) { if (layer.Color == "#760ED1F4") { layer.Color = "#763D0EF4"; } } } } You could also go for...
    foreach (var action in act) { foreach (var frame in action) { foreach (var layer in frame) { var c = layer.Color; layer.Color = GrfColor.FromHsv(0.76f, c.Saturation, c.Brightness, c.A); } } } On a side note, this is Act Editor, not Actor ;O.
  6. Tokei's post in [Warning] Overflow Detected was marked as the answer   
    I'm... confused with your script to be fair. You get the warning because 91260000 * 35 = 3194100000, which is greater than 2147483648. If you want to give 0.35% exp, you could use the following instead :
     
    BaseExp += NextBaseExp / 10000 * 35;
  7. Tokei's post in having error on my iteminfo.lua was marked as the answer   
    Either one of those is correct.
     
    The item 25022 doesn't have its closing tag. Right above [25023], you're missing "},".
  8. Tokei's post in Understanding GRF Structure was marked as the answer   
    The GRF format, for version 0x200, goes pretty much as you mentionned above. Something to always keep in mind is that the byte 0x78 is generally the zlib compression header (and the byte 0x00 is the unofficial lzma compression header). If you see some bytes starting with that value, it most likely means it needs to be uncompressed (which is always the case for the GRF's content).
     
    Just as an example, if you take the entry "data\test1.txt" and read the offset, you'll get 16. The entries' offsets are relative to the data offset, so you have to add 46 (GRF header size). You'll get 62 which is the 'absolute' offset, and reading the content you'll get "78 01 01 05 00 FA FF 31 74 73 65 54 05 41 01 D2". After uncompressing this with zlib, you'll get "1tseT".
     
    {zlib header} {compressed data} {int checksum} - simplified version for zlib compressed data.
     
    The 'issue' is that... 0x78 0x01 is the zlib header for non-compressed data. That means when you made your GRF, you compressed it with the lowest compression level possible and that is the only reason why you're able to see the content in plain-text. It's definitely not something you want.
     
    In the version 0x200, the file table is compressed, which is why you get the 0x78 byte after reading the table size uncompressed property. Since you know the compressed table size is 170, you pretty much read 170 bytes after you read the table size uncompressed value, and uncompressing that will give you the actual file table data.
     
    Edit : You might want to have a look into KeyWorld's project https://github.com/vthibault/roBrowser/blob/master/src/Loaders/GameFile.js or even the OpenRagnarok project http://code.openhub.net/file?fid=D9P_ZHJdGOjvzVgQOe31Wor_U1U&cid=xmpIxx6iTvE&s=&fp=92163&projSelected=true#L0 (they'll become useful if you ever want to read versions 0x100, for the DES encryption).
  9. Tokei's post in Actor color script was marked as the answer   
    Heya,
     
    If you want to change the act's color for each frame, you can use the following script :
     
    Script > Script Runner... >
    act.SetColor("#99F80909"); If that's not what you were looking for, could you please be more specific?
  10. Tokei's post in My shorcut-keys does not work . was marked as the answer   
    Your files aren't in the correct folder. Clients below ~2012-07-10a use data\lua files, not data\luafiles514\lua files.
     
    If you use the "load lua before lub" patch, then you file names must end with lua, not lub. The luatolub.bat batch file will just cause you more errors (since, as the name says, it changes the names from .lua to .lub which is what you don't want).
     
    As for the shortcuts, you may want to get a more recent hotkey.lua/lub file.
  11. Tokei's post in Sprite limit size was marked as the answer   
    From my own tests, the selection screen window as well as the equipment window cause issues with sprites depending on their location and their size. Images with more than 65536 pixels (which is around 256 by 256 pixels) have a high risk of crashing the client, especially Bgra32 images. If they're too high or too low, you can definitely expect a crash too.
     
    There are no problems when actually wearing these sprites and moving around ingame, the bugs only start when you open up these two windows. I wasn't able to confirm the actual value limits though - they are "half guessed". On a side note, monster sprites do not appear to suffer from these limitations.
     
    As for the second question, there are no limits for the amount of frames, as long as the amount is divisible by 3 for the animations 0 and 2 (Idle and Sit). This is because the client reads these two animations differently. If you have 15 frames, the first 5 will be used for the animation when the head is looking down, the next 5 are used when looking right (bottom left) and last 5 ones are for looking left (bottom right). Headgear sprites therefore have a minimum amount of 3 frames for these animations. When you said "8", I'm assuming it is actually 9 frames total, which is 3 for each head position and it should work out fine. If you want to add one more frame, you'll need 12 frames and etc.
  12. Tokei's post in Launch RO only with patcher was marked as the answer   
    This is the official behavior of the client, you simply disabled the feature when diffing it. If you're using NEMO, uncheck "Disable 1rag1 type parameters". In your patcher's configuration file, set the client's arguments to "-1rag1" and that's all.
     
    This is not a perfect protection; players can still skip your patcher if they really want to (it's good enough for most cases though).
  13. Tokei's post in About Thor Update Limit was marked as the answer   
    This option has nothing to do with the number of patches; it's about the GRF's degree of fragmentation. Everytime you patch files in a GRF, patchers will erase content and replace it with new items if possible. This operation creates wasted space in a GRF; for example, if you replace an image which had a size of 1000 bytes by a new one of 800 bytes, you'll be left with 200 unused bytes.
     
    This has the advantage of being efficient (in speed) most of the time and it's great for quick patching. The disavantage is that if you do this often, you'll get multiple 'holes' in your GRF - a fragment. When the GRF reaches 50 fragments, it will be repacked/defragmented, which is rather quick anyway. This whole process is almost exactly the same as what happens to your hard drive.
  14. Tokei's post in Custom Items problem was marked as the answer   
    Alright, the issue doesn't come from your settings, it was the drag files. Copy the files from the attached archive in this post in your ¾ÆÀÌÅÛ folder.
    brown_fox_tail_drag.zip
  15. Tokei's post in New Prontera - Client Crash was marked as the answer   
    Normally you would need a newer client, but if you download the above link it'll run fine on any version.
  16. Tokei's post in how to announce char level? was marked as the answer   
    Should have been in "Script Support"; BaseLevel is what you're looking for.
     
    announce strcharinfo(0) + ", level " + BaseLevel + ", is looking for a guild!",bc_all;
  17. Tokei's post in Added New Items Prob was marked as the answer   
    Try setting the item ID below 32768.
  18. Tokei's post in Drop and EXP Rates was marked as the answer   
    It should be : 
     
    // The rate at which cards are dropped
    item_rate_card: 100000   (100000 %, means a 1000 multiplier)
    item_rate_card_boss: 10000   (10000 %, means a 100 multiplier)
    item_drop_card_min: 1
    item_drop_card_max: 10000   (can't be above 100%, so 100000 is invalid)
     
    The drop rate of cards are normally at 0.01%. So,
    Normal card drop chance = 0.01% x 1000 = 10 % chance of getting a normal card
    MVP card drop chance = 0.01 x 100 = 1 % chance of getting a MVP card
  19. Tokei's post in Help: Multi image sprite was marked as the answer   
    Headgears only load the first layer of the frame (which is fairly annoying). There are no straightforward solutions for this, unless you don't mind remaking your act from scratch again with that into consideration.
     
    The following solution will increase your sprite file size by a lot depending on how complex your frames are. The advantage is that your work will be preserved almost perfectly. Make a backup first, just to be safe. Go in Script > Script Runner... copy paste the following code, then press Run.
    int count = act.GetAllFrames().Count + 1; int index = 0; TaskManager.DisplayTaskC("Rendering frames...", "Please wait...", () => index, count, new Action<Func<bool>>(isCancelling => { try { foreach (var action in act) { foreach (var frame in action) { if (frame.Layers.Count <= 1) { index++; continue; } if (isCancelling()) return; var image = frame.Render(act); var box = ActImaging.Imaging.GenerateFrameBoundingBox(act, frame); int relativeIndex = -1; for (int i = 0; i < act.Sprite.Images.Count; i++) { if (image.Equals(act.Sprite.Images[i])) { if (isCancelling()) return; relativeIndex = act.Sprite.AbsoluteToRelative(i, act.Sprite.Images[i].GrfImageType == GrfImageType.Indexed8 ? 0 : 1); } } if (relativeIndex < 0) { relativeIndex = act.Sprite.InsertAny(image); } int offsetX = (int) ((int) ((box.Max.X - box.Min.X + 1) / 2) + box.Min.X); int offsetY = (int) ((int) ((box.Max.Y - box.Min.Y + 1) / 2) + box.Min.Y); var layer = new Layer(relativeIndex, image); layer.OffsetX = offsetX; layer.OffsetY = offsetY; frame.Layers.Clear(); frame.Layers.Add(layer); index++; } } // Removes unused sprites - old way, older versions have a bug for (int i = act.Sprite.Images.Count - 1; i >= 0 ; i--) { if (act.FindUsageOf(i).Count == 0) { var type = act.Sprite.Images[i].GrfImageType; var relativeIndex = act.Sprite.AbsoluteToRelative(i, type == GrfImageType.Indexed8 ? 0 : 1); act.Sprite.Remove(relativeIndex, type); if (type == GrfImageType.Indexed8) { act.AllLayers(layer => { if ((layer.IsIndexed8() && type == GrfImageType.Indexed8) || (layer.IsBgra32() && type == GrfImageType.Bgra32)) { if (layer.SpriteIndex == relativeIndex) { layer.SpriteIndex = -1; } } }); } act.Sprite.ShiftIndexesAbove(act, type, -1, relativeIndex); } } } finally { index = count; } })); This script will merge all layers of your frames into one.
  20. Tokei's post in create file .STR and .TGA? was marked as the answer   
    ROStrViewer for .str ( http://www.mediafire.com/download/dx7hr0077d6vjhe )
  21. Tokei's post in Extend Chat was marked as the answer   
    Do you mean the option that, when someone pms you, opens up a new window? If it's what you're looking for, open the party window, go in your friend list and click the Friend Setup button (the search icon). Uncheck the first two options, those with 1:1 chats. If your party window is at the bottom right, you'll have to move it otherwise you won't see the friend setup window show up.
     

  22. Tokei's post in Thor Patcher Bugged? was marked as the answer   
    This usually means you picked the wrong encoding while making your Thor patch! You can verify this by opening up the Thor patches in GRF Editor. If they don't show up with their proper names then the patch is indeed invalid.
     
    While making the patch, if the files have Korean characters you have to select "Unicode". Otherwise you need to select "Ascii". Example :

     
    If that doesn't help, you could always make your patches directly with GRF Editor and see if you get different results (invalid encodings are automatically fixed). (File > Save as... > .thor; "Container options" > Patching mode > Merge into GRF > Target GRF : "server.grf" or leave empty).
     
    Hope this helps!
  23. Tokei's post in R>Recolor for this monster was marked as the answer   
    Heya,
     
    I think I have a fairly good idea for the usage of these sprites lol ;]
     
    (sprites in the attached file)
     
     
     
    Hollow_Porings.rar
  24. Tokei's post in 2013-08-07a Client Anti-shake help! was marked as the answer   
    Use Nemo's client patcher and apply the patch "Remove Quake skill effect".
  25. Tokei's post in Recolor Monster Request was marked as the answer   
    You can try that one (attached file).
     
    Before and after. I did it pretty quickly though...

    wind_ghost.rar
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.