Jump to content

Tokei

Members
  • Posts

    662
  • Joined

  • Last visited

  • Days Won

    90

Everything posted by Tokei

  1. Ah, I misunderstood your issue, my bad. The resurrection skill is blocked if your PVP points are below zero, which happens everytime you die too often in PVP. Change the condition in skill.cpp for the "case ALL_RESURRECTION:" diff --git a/src/map/skill.cpp b/src/map/skill.cpp index b48373392..f19c80142 100755 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -7170,7 +7170,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui break; } - if (map_getmapflag(bl->m, MF_PVP) && dstsd && dstsd->pvp_point < 0) + if (map_getmapflag(bl->m, MF_PVP) && dstsd && dstsd->pvp_point < 0 && !map_getmapflag(bl->m, MF_MAPMVP)) break; switch(skill_lv){
  2. Hmm, can you show the flags of the map with "@mapflag"? There aren't many possible issues left beyond the ones posted above, so you'll probably need to set a breakpoint to see what is going on directly.
  3. Did you correctly apply the diff file? - if( sd->pvp_point < 0 ) { + if( sd->pvp_point < 0 && !mapdata->flag[MF_MAPMVP] ) { sd->respawn_tid = add_timer(tick+1000, pc_respawn_timer,sd->bl.id,0); return 1|8; } This is the part that respawns a character when they die on a PVP map. So a few possible options here: Your map doesn't have the mapmvp flag (MF_MAPMVP). You do need to add those manually. You can see if the map has the mapflag with @mapflag while in-game. The code "!mapdata->flag[MF_MAPMVP]" wasn't added to the pc_dead function from the diff file. You didn't recompile your server.
  4. Heya, The original script can be opened with Scripts > Open scripts folder > script5_remove_unused_sprites.cs. In your case, you'd want something like this: foreach (var actPath in Directory.GetFiles(@"C:\Test\", "*.act")) { var sprPath = actPath.ReplaceExtension(".spr"); if (!File.Exists(sprPath)) continue; var actFile = new Act(actPath, sprPath); for (int i = actFile.Sprite.Images.Count - 1; i >= 0; i--) { if (actFile.FindUsageOf(i).Count == 0) { actFile.Sprite.Remove(i, actFile, EditOption.AdjustIndexes); } } actFile.SaveWithSprite(actPath, sprPath); }
  5. Heya, Well, the first step would be converting your SQL database to CSV/text format. You can do that by querying the following: // for db/re/item_db.txt select `id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk:matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, CONCAT('{', IFNULL(`script`, ''), '}'), CONCAT('{', IFNULL(`equip_script`, ''), '}'), CONCAT('{', IFNULL(`unequip_script`, ''), '}') from `item_db_re` I'm using HeidiSQL, but from there... right-click a row > Export grid rows > - Output format: Delimited text - Row selection: Complete - Options: - Uncheck "Include column names" - Field separator: "," - NULL value: "" (leave empty) Then you should have a normal item_db.txt output. Paste the output to your item_db.txt file in the db folder, do the same for the import folder using the other SQL table. From there, you can run the csv2yaml tool (just make sure there is no item_db.yml files, otherwise it won't actually attempt to do the conversion).
  6. Finally got around to do some upgrades: Fixed a bunch of missing shortcuts. Fixed issues with the bias values not being saved. Added bezier curves (Edit > Add/Delete bezier curve). Added detection for bezier curves for str files. This feature also impact the time a file takes to load as there are many calculations required for this. If you're having issues, you can always disable this option via File > Settings > Attempt to recover lost str information. To move a single control point of the bezier curve, hold the Ctrl key down. It will now draw the entire path of the layer instead of only the current interpolation path. You can now navigate through the nodes in the path by clicking on the red-ish dot. You can now change the origin of the layer by moving the cyan dot in the image above. You can reset the origin from Edit > Center origin. Added a scaling option for ease of use, via Edit > Scale. For scaling down by 80%, use 0.2; likewise, for scaling up by 250%, use 2.5. Fixed a bug with the zoom selection when using the mouse wheel and not being able to select a predefined value. Added a visibility option to the layers. There are more options when right-clicking the layer. Added a gif saving option from File > Save as Gif. The feature is far from perfect, but it can help some. Added specific paste options. After copying a keyframe with Ctrl-C, you'll be able to paste which property you are looking for: As with any shortcut, these can be changed from File > Settings > Shortcuts. The texture paste currently only copies the index, not the actual texture. Will fix some other day... Fixed a bug where closing a popup window wouldn't focus the main window afterwards. Fixed a bug when saving a file with texture animations mixed with bias/bezier. Not entirely sure what you mean there. If the issue isn't fixed in this version, please explain it again.
  7. Well, you're mixing up || and &&. You must have all items, so you need: if (countitem(7830) > 0 && countitem(7831) > 0 && countitem(6151) > 0 && countitem(969) > 999 && countitem(60003) > 199) { (Also the "next;" below that line shouldn't be there.)
  8. Never knew this one existed, thank you Emistry! This is much simpler.
  9. Heya, You should use a function instead for items calling script code. So your script would become: function script F_AtBonus { mes "Kitsune Fox Blessings"; mes "..."; next; switch(select("...")) { } end; } - script atcmd_bonus -1,{ end; OnInit: bindatcmd "bonus", strnpcinfo(0) + "::OnCommand"; end; OnCommand: callfunc("F_AtBonus"); end; } And your item script would be: { specialeffect2 549; soundeffectall "moonlight_move.wav",0; callfunc("F_AtBonus"); } Alternatively, you can use doevent directly. So your code would be: { specialeffect2 549; soundeffectall "moonlight_move.wav",0; doevent "bonus_atcmd::OnCommand";} Though... doevent is a tricky script command and usually isn't something I'd recommend using if you can avoid it. But, it will work in your case.
  10. Long story short, you need to restart your server. As for why... that is due to how SQL data is used on the map-server. When the map-server starts, it reads all the variables in the mapreg table and loads them into memory. This way, when you want to access the variable in-game (when you use @set $variable), the value is easily accessible without having to look it up with your SQL server. This is done for various other features, like your character inventory, quests, achievements, player stats, etc. In either case, when you edit or delete the entry in SQL while it is still being loaded in memory, it will not have any impact in-game because that is not where the data is being read from. Doing so can actually cause issues as well if you're not careful. So you need to close your server, truncate the table, and then restart your server.
  11. Hmm, it's hard to phrase it differently. Your events, OnPCDieEvent and OnPCKillEvent, are on a NPC (Deathmatch PvP Warper) which is duplicated. As a result of duplicating your NPCs, the events trigger for each one of those NPCs as well. You've probably figured this out already if you've looked at the error messages. Your duplicated NPCs in your case are: moscovia,213,182,6 duplicate(Deathmatch PvP Warper) DM PvP Warper#mos 823 morocc,170,87,3 duplicate(Deathmatch PvP Warper) DM PvP Warper#moc 823 comodo,180,150,6 duplicate(Deathmatch PvP Warper) DM PvP Warper#com 823 mid_camp,216,280,3 duplicate(Deathmatch PvP Warper) DM PvP Warper#mid 823 prontera,43,210,3 duplicate(Deathmatch PvP Warper) DM PvP Warper#prt2 823 lighthalzen,166,93,3 duplicate(Deathmatch PvP Warper) DM PvP Warper#lhz 823 prontera,263,209,6 duplicate(Deathmatch PvP Warper) DM PvP Warper#prt02 823 rachel,121,112,6 duplicate(Deathmatch PvP Warper) DM PvP Warper#rac3 823 dicastes01,188,188,6 duplicate(Deathmatch PvP Warper) DM PvP Warper#dic 823 mora,44,147,6 duplicate(Deathmatch PvP Warper) DM PvP Warper#mora 823 malangdo,146,119,3 duplicate(Deathmatch PvP Warper) DM PvP Warper#mal 823 ayothaya,157,111,3 duplicate(Deathmatch PvP Warper) DM PvP Warper#ayo 823 So when someone dies, the first event is queued: Deathmatch PvP Warper::OnPCDieEvent But since the NPC is duplicated, these events are also queued and will trigger: DM PvP Warper#mos::OnPCDieEvent DM PvP Warper#moc::OnPCDieEvent DM PvP Warper#com::OnPCDieEvent etc... Now obviously that's not what you wanted and that's causing you issues. You can easily fix the problem by moving the events to another NPC that is not duplicated. So simply create a new NPC, add your events to this one instead, and that's it. So something like this: - script do_not_duplicate -1,{ end; OnPCDieEvent: // ... end; OnPCKillEvent: // ... end; } (And remove the event labels from Deathmatch PvP Warper as well, of course.)
  12. Yes, you... repeated what I said. Therefore, move the events to a NPC that is not duplicated.
  13. Heya, You should only have a single copy of OnPCKillEvent and OnPCDieEvent in all your scripts, in a single NPC that is not duplicated. Right now, you placed the event on your warper NPC, which is duplicated numerous times and that is your problem. The event is being triggered as many times as you have copies of said NPC.
  14. The error you received, "Server received crash signal! Attempting to save all online characters!", is a generic error that means absolutely nothing besides "your server crashed". You will always get this same error. You most likely have two unrelated crashes there. As cook1e said above, you want to run your server with gdb (there is a link provided in his post that explains how to use it). Gdb is a debugging tool that will give you a stack trace. You will get the crash reason, followed by the line in your source code that crashed the server, followed by the functions that called your code step by step. To print the stack trace, you will want to use "bt full" after the crash. You should also always run your server with gdb as you can't predict when a crash will happen. Once you have the stack trace, you can share it here and people can tell you how to fix your code. Or they'll ask you to provide the code surrouding the crash. Or, if the error is obvious, you might be able to fix it yourself. But either way, we can't help you without a gdb stack trace. Goodluck!
  15. Well, JT_MD_Airboat_Poring JT_MD_AIRBOAT_PORING are not the same. If anything, you can also just set it directly: [jobtbl.JT_MD_AIRBOAT_PORING] = 1.2, or [20887] = 1.2,
  16. Heya, Don't use SDE to connect to your server via SFTP. I'll be removing the feature as it's bad practice to do that in the first place. Use a git service like github or gitlab and then use SDE locally if you want.
  17. No on all questions. Full disclosure, I forgot this feature even existed and I'm really tempted to simply nuke it. I'd say it's not a good practice to generate patches using this tool.
  18. Heya, If you are following the recommended setup, then the only required files are main.sql and logs.sql. The item_cash SQL file is the alternative to db/(pre-)re/item_cash_db.txt. Seeing are you're using the text/yaml version of the databases, you don't need it. As for roulette_default_data.sql, that's optional. If you plan on setting your own values in it, then you don't need the default values from the file. If you want pre-made values for it, then yes, use the file. The roulette system has not been converted to a text/yaml version for some reason. That seems like a forgotten feature. The other SQL files are not meant for performance. You will most likely be using them for your website though, since it will want to know your item/mob data from somewhere.
  19. Heya, That's intended, surprisingly. When you are editing the hat sprite, you are viewing the world from the perspective of the hat. So if you set all the XY offsets the same, from... the perspective of the hat, nothing seems to be moving. That makes sense. But that doesn't work in-game because the body sprite has anchors points, which decides where the hat will be drawn. This position moves depending of the body's orientation. To "recreate" this, you'd have to use Anchors > Use body as base (this essentially attaches the current sprite to the body instead). In other words, this will set the perspective from the body. Though, in the end, that's not really that helpful to you because you'd have to set the offsets one by one. Plus, that's not possible to fully match those offsets, it will never work. Instead, do the following: Align all the hat's anchors points with the base body. Set all the offsets to a fixed value. This is not really possible by hand, so the following should do the trick (it uses the default body as reference, but it should be good enough): // Change to ref_body_f.act for the female anchor points var body = new Act(ApplicationManager.GetResource("ref_body_m.act")); for (int aid = 0; aid < act.Actions.Count; aid++) { var action = act[aid]; for (int fid = 0; fid < action.Frames.Count; fid++) { var frame = action[fid]; var frameReference = body.TryGetFrame(aid, fid); if (frameReference != null) { frame.Anchors[0].OffsetX = frameReference.Anchors[0].OffsetX; frame.Anchors[0].OffsetY = frameReference.Anchors[0].OffsetY; } } } // Uncomment below if you want to set the same offsets for all your layers //foreach(var action in act.Actions) { // foreach(var frame in action.Frames) { // foreach(var layer in frame.Layers) { // layer.OffsetY = -38; // layer.OffsetX = 0; // } // } //} This will achieve what you're looking for. And yes, anchors points are quite confusing. Without using a script, this could also be done via Anchors > Set anchors > Set from file... > Select a base body sprite for reference.
  20. Heya, The last line is correct and should work as you want. Did you perhaps keep both lines? If so, when the mob goes through its skills it will execute them in order and since the first line has a 100% chance, it will always spawn the 1149 mobs. You have to comment it out or remove it. Otherwise, it could be a matter of not having reloaded your mob skills properly via @reloadmobdb (or a server restart I guess). Besides that, I do not see what could be the problem.
  21. Alright, there's been some updates...! Texture names will be displayed over the keyframes. Re-organized the UI to clear up the right-sided panel. The Play button has been moved on the menu bar itself, with the Space shortcut. Adding a Snap option which is set to 1 pixel by default. Added an experiemental feature to retrieve the bias values from str files (does not recognize bezier nor uvbias). Can load and save with some EZV files (currently only tested with version 0.94 and 0.95). I haven't seen newer versions (not in RO anyway). It currently saves as version 0.94. Added background selection via Edit > Select background. (There are some unused buttons added, will clean up later.) I do plan on supporting bezier curves, but there aren't for now.
  22. It zooms at your cursor position, that is intended.
  23. Heya, I missed quite a few posts there, sorry. I didn't know this format was used on other platforms. The Ez2Visual tool was quite interesting actually, it almost feels like it could be the original tool for this file format. There are however issues with the conversion between STR and EZV. As @intron pointed out, there is an easing method used on some RO animations and that information is lost in the STR files. It's possible to retrieve it, to a degree, with some magic and guessing. The layer 0 now makes more sense. RO never uses it, so I simply skipped its visual in my tool instead. Though... what are you supposed to be able to do with the layer 0 exactly? Does it have restrictions? Is it simply another layer? I'm not sure about what its properties are meant to be. The UV parameters can be shown via File > Settings > Show texture coordinates fields. Though it only shows the first set of UV coordinates. The "uv2=0.0000,0.0000" and "uvs2=1.0000,1.0000" do not appear to be used in RO and I do not know what their purpose is. So I've hidden those fields entirely. The UVs in RO are pretty much always static and never used, so this option is hidden by default. It appears that the easing method used is r = time ^ (1 + bias / 5). I do see a field for "bezier=0.0000,0.0000 0.0000,0.0000", but I have not... found where this is used Ez2Visual. Where is this setting at? What does it actually do? STR files also lose the scale value in the process. I haven't played enough to see what can be done about this one, but that might be possible to retrieve. The ez2on link was not working for me, so I... have no idea what this tool is. So all in all, it would be possible to convert STR to EZV and vice versa. I'll have a bit more time to continue this tool in the following days.
  24. A few things were updated: Zoom in and zoom out for the timeline preview panel. When playing back the animations, the speed will now actually match the FPS. Fixed a bug where frames would not show if they didn't explicitly have the interpolated markers.
  25. Heya, I've been working on a tool for a few weeks now and I believe it is in a ready enough state to be shown. This software is meant to edit str files, which are mostly used to display skill animations in-game. There may still be bugs left in the tool; reporting them here would be appreciated. You can download the software here: https://www.mediafire.com/file/epu1pr9xjdneupi Generic Ctrl-Z/Ctrl-Y to undo and redo an action. You can edit most shortcuts via File > Settings > Shortcuts. Transformations for the preview panel (same shortcuts as Act Editor) Translate: Left Mouse Button on the selected frame. Rotate: Shift-Left Mouse Button on the selected frame. Preview panel move: Right Mouse Button. Horizontal/vertical scaling: Ctrl-Shift-Left Mouse Button. Uniform scaling: Ctrl-Alt-Left Mouse Button. Unbound scaling: Ctrl-Left Mouse Button. Transformations for the edition panel Each layer can have multiple textures. To add a new one, click the texture combo box and select "Add new...". It will bring you to where the file is currently loaded from. While you can browse elsewhere, the textures must be in the same folder as your str file will be in. You can edit textures more rapidly with the gear button next to it. You can edit some fields by clicking the text before them. If you hold down the Left Mouse Button on this field (P1XY), you will be able to move it freely without moving the entire texture. This is especially handy when dealing with angles as those can give you unwanted results if you are editing them via the preview panel. The FPS property can be changed and saved. However, the client appears to completely ignore it and runs your animations at 60 FPS regardless. Editing an interpolated key frame will automatically create a new key frame on the timeline. Timeline panel A dot represents an existing key frame. An arrow represents an interpolated animation from the left key frame to the right key frame. You can right-click a key frame to bring up options: You can also copy the frame and move it elsewhere. The texture indexes are not re-adjusted. It copies the key frame as is. You can select multiple key frames by holding down the Left Shift key and holding down the Left Mouse Button. The traditional windows shortcuts can also be used for selection. These include: Arrow Key: move to the desired next frame. Ctrl-Arrow Key: move to the next key frame block in the wanted direction. Shift-Arrow Key: move to the next key frame for selection. Ctrl-Shift-Arrow Key: move to the next frame block while selecting what's inbetween. Double-Left Mouse Button: selects an entire frame and its interpolated section. Ctrl-A: selects the entire layer. You can move a key frame by selecting the key frame, clicking on the dot and then moving the key frame to the desired location. The operation above can also be done by selecting multiple rows at the same time. You can do a quick preview of the animation by moving the timeline selector. You can move a layer up and down by holding down the Left Mouse Button and moving it where you want it to. Right-clicking a layer also brings up more options. And I believe that's it! The next "feature" I wanted to implement was editing multiple frames at the same time, but unfortunately this project needs a small break from my end...! Hopefully some of you may have an use for it. Edit: I am most certainly not an animator and I do not know the real needs of those who will actually use the software. That is why it's being posted as a work in progress rather than a finished tool. If you have requests, feel free to post them below and I'll add as much as I can.
×
×
  • Create New...