Jump to content

Tokei

Members
  • Posts

    666
  • Joined

  • Last visited

  • Days Won

    91

Everything posted by Tokei

  1. It's a silly error either way. A signed value is converted to an unsigned value in this scenario, and since there is a comparison of n > -1 right prior the other check, then the comparison cannot fail (as both values are positive). Plus it's not like a string length would be 2B+ in length to begin with... you'd probably have to be more concerned about memory usage at this point. As @Chaos92 mentioned, the issue is on rAthena. It'll get fixed eventually.
  2. That is... a strange issue, I'm not able to reproduce it. If you opened GRF Editor without the "Always reopen latest opened GRF", you will get a template GRF as such: As you can see, the window title is "GRF Editor - new *", with a star at the end, meaning it hasn't been saved yet. It also has a "data" folder in it. In your screenshot, you have neither. That means you've opened an actual GRF, but that also doesn't make sense since an opened GRF will display the full path in the title. As much as I'd like to fix this issue, it doesn't seem possible to reproduce. The error shows that the magic string is empty instead of "Master of Magic". That looks like an empty file...? That also doesn't make much sense. I would need additional information (well, assuming that error is worth fixing since it doesn't seem to trigger normally at all).
  3. Fixed in 1.8.7.3. The issue comes from selecting "red objects/textures", objects/textures that cannot normally be selected because their resources aren't found in your current GRF(s). But by clicking on the "guildhall.gnd" node, it selects everything anyway. If you want to extract everything, I'd recommend adding more resource GRFs: (Version 1.8.7.3 also allows to read Alpha GRFs, for anyone interested...)
  4. Please use "Copy exception" and paste the result here; I'm unable to reproduce.
  5. A few things to note: "next" always comes before the switch/select statement, not after the "case" branches. If you absolutely want to do this, then you might want to use "clear" before your "mes" dialogues instead. When you use delitem, you should always change the status right afterwards. Be it a quest or a variable, something needs to be done after a delitem. Here's a very likely scenario in your case: the player registers, but then the script ends there or the player uses "cancel" in the next menu. He'll then have to pay with the coin again. While that's probably not a huge deal in this particular situation, that's something you should look out for. It could lead to some serious issues later on. The usage of labels is a tad excessive. You'd normally only want to use labels if the code is repeated. Otherwise it doesn't make much sense to make things more complicated. "countitem(id) > 1" means that will only trigger if the player has 2 items in his inventory. You wanted > 0 there. The "mastery" variable doesn't work well here; that's a permanent player variable and it's way too easy to break out of the script in your case. And since the mastery amount is saved, speaking with the NPC again will cause issues since it's already set to 3 (which is the main bug you were having since you probably tested the script more than 3 times at least). I'd personally use a flag variable instead, but since you're already doing checks using a specific item, might as well use that. Well, I'd still recommend using a flag, but I don't know how this script will be used. Since the dialogues were all repeats, I added an array instead with "OnInit". That makes it easier to add more masteries later on and it's easier to read/modify. moc_para01,27,35,4 script FARHANA A 532,{ soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Hello, welcome to GUILD HALL,"; mes "how may i help you ?"; next; switch(select("- Benefit become a member ?:- I wish to register as guild member:- Nothing")){ case 1: soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Becoming a member of GUILD HALL"; mes "will enable you to boost your"; mes "MASTERY, take guild quest, and"; mes "many more..."; next; switch(select("- MASTERY ?:- Guild Quest ?:- Nothing")) { case 1: soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Yes mastery, such as gathering,"; mes "cooking, weapon and armor Crafting"; mes "as you progress on doing more of"; mes "those activity you will gain"; mes "more points to unlock more"; mes "higher tier stuff.."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "But sadly.. you can only have"; mes "3 main mastery to choose for."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "as for the rest.."; mes "they will remain as tier 1"; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "I would highly recomend to have"; mes "friends with diffrent mastery"; mes "so you can support each others"; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "i guess that will that be all,"; mes "for now, see you soon.."; close3; case 2: soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Guild Quest is a great help,"; mes "each member start from low rank"; mes "such a [D Rank] but you can"; mes "higher rank as you completed"; mes "more quest, higher quest get's"; mes "better reward!"; close3; case 3: goto L_Cancel; } end; case 2: if (mastery_paid_price) goto L_MasteryMenuSelect2; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Ahh.. you wish to register,"; mes "sure i can do that, but i will"; mes "need 1 Durengo Coin"; next; switch(select("- I have it:- I need time")) { case 1: if (countitem(40016) < 1) { soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "I dont think you have"; mes "1 Durengo Coin..."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "You can exchange 1000 zeny"; mes "for 1 Durengo Coin from"; mes "my friend next to me"; close3; } delitem 40016, 1; mastery_paid_price = 1; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "I will take your Durengo Coin now"; mes "oh yeah even if you cancel at any"; mes "part of these process, you will not"; mes "getting back that Durengo Coin"; mes "as it is require for precess fee"; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Great, now remember you can"; mes "only select 3 Mastery"; mes "and only those Mastery will be able"; mes "to level up, and as for the rest"; mes "it will remain as Tier 1.."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Now before you pick a Mastery"; mes "if you are new to the server"; mes "i would highly sugguest to pick"; mes "GATHERING, PROCESSING and 1 of"; mes "your own pick."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "But.. if you know what you are doing"; mes "then go for it.."; next; L_MasteryMenuSelect2: soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Now please select your"; mes "1st MASTERY"; mes "desire Mastery"; next; L_MasteryMenuSelect: .@menu$ = ""; for (.@i = 0; .@i < .mastery_count; .@i++) { .@menu$ += "- " + .mastery_names$[.@i] + ":"; } .@menu$ += "- I need time"; .@midx = select(.@menu$) - 1; if (.@midx >= .mastery_count) goto L_Cancel; goto L_MasteryConfirm; end; case 2: goto L_Cancel; } end; case 3: goto L_Cancel; } end; L_Cancel: soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "I shall see you soon.."; mes "Good Bye.."; close3; L_MasteryConfirm: // The mastery count is used by checking the amount of items the player has instead of using the 'mastery' variable. .@count = 0; for (.@i = 0; .@i < .mastery_count; .@i++) { .@count += countitem(.mastery_items[.@i]); } if (.@count >= 3) { soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Great now you have 3 main"; mes "MASTERY, remember if you"; mes "in lost or need help"; mes "ask in discord"; close3; } if (countitem(.mastery_items[.@midx]) > 0) { soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "You have already picked"; mes strtoupper(.@mastery_names$[.@midx]) + " MASTERY."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Now select again.."; next; goto L_MasteryMenuSelect; } soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes strtoupper(.mastery_names$[.@midx]) + "...."; mes "nice choice, are you sure"; mes "you want to get"; mes strtoupper(.mastery_names$[.@midx]) + " MASTERY ?"; next; switch(select("- YES:- NO")){ case 2: goto L_Cancel; } soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Great pick!"; getitem .mastery_items[.@midx], 1; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Now select again.."; next; goto L_MasteryMenuSelect; OnInit: // Could just use setarray, but this is easier to read for me. .@i = 0; .mastery_names$[.@i] = "Gathering"; .mastery_items[.@i] = 40008; .@i++; .mastery_names$[.@i] = "Weapon And Tool Crafting"; .mastery_items[.@i] = 40039; .@i++; .mastery_names$[.@i] = "Armor Crafting"; .mastery_items[.@i] = 40040; .@i++; .mastery_names$[.@i] = "Cooking"; .mastery_items[.@i] = 40038; .@i++; .mastery_names$[.@i] = "Slaughter"; .mastery_items[.@i] = 40041; .@i++; .mastery_names$[.@i] = "Processing"; .mastery_items[.@i] = 40007; .@i++; .mastery_count = .@i; end; }
  6. Unfortunately, that's not an str effect. You cannot edit the Evil Land because it's a 3D ground effect. It also happens to be hard coded in the client. You can change the texture (data\texture\effect\evilland\demonground.tga), but that won't do much. I presume bRO is the official server, correct? Then it's a bit weird that you're lagging. Evil Land isn't a fancy effect at all, it's a single texture shown on the floor: I looked at rAthena's db/source and it's using Layout 1 instead of 0, which makes the effect being sent 9 times instead of 1, which is wrong of course. That would normally be the reason for your lag, but since it's bRO... then it doesn't make sense. I made a basic gray looking evil land if you want to give it a shot nonetheless. demonground.tga demonground_alpha_translucent.tga Well, unless bRO still uses a very old client, then there's really nothing you can do...
  7. Fixed in 1.8.7.1. There was an issue with UV texture coordinates being all set to 0 on new tiles.
  8. Hmm, there is an approximation that can be done which will probably be good enough. The point 2 is misleading; what is seen in the UI is a blend of the background + layers. You can't separate them as it's already a final image, if that makes sense. But you could in theory extract a transparency value by using a black and white background version of the composite image. Then do some math magic and approximate the bgra values. I've added the option in 1.1.0, though it's a bit awkward to use (found in File > Export as PNG...).
  9. The purpose of encrypting the file table is to not be able to see the files anymore. While possible, retrieving the file listing would be... quite counter productive? Perhaps this feature is something you don't want to use as it doesn't seem to fit what your needs.
  10. There are two methods for doing that: Once you have the current frame, click on: Then add the name of the file, like "test.wav". The file should be in data\wav\test.wav You can add a bunch of sound names by editing the list instead: Then select the sound for the frame from the list. If the sound doesn't play when testing the sprite, then it's just because it wasn't found in the resources. That's not really important, but you can add more resources from File > Settings > Sound:
  11. Hmm, you'd definitely want to add more checks on this, but here: - script Mob Helper -1,{ OnNPCKillEvent: // Fixed improper usage of rand for "chance" if (500 < rand(10000)) end; if (mkTimed && gettimetick(2) <= mkTimed) end; // Don't use "set" anymore, that's way outdated. // Using getmonsterinfo isn't a bad idea, but it's somewhat useless/broken now. You'd have to expand on it in the source to make it useful. getunitdata(killedgid, .@mobdata); // There's no reason to use player variables in this case, the variable has no purpose outside of the NPC block code. Therefore it should be a NPC variable. .@MobMode = .@mobdata[UMOB_MODE]; .@MobClass = .@mobdata[UMOB_CLASS]; if (!(.@MobMode & MD_CANMOVE)) end; if (!(.@MobMode & MD_CANATTACK)) end; // MD_BOSS/32 isn't a thing anymore either, so that code won't work. if (.@MobClass == CLASS_BOSS) end; // Too much wrong with these lines. //set @WoE[0],1288|1285|1830|1949|1950|1286|1287|1899|1829; //WoE IDs //for(set @n,0; @n < getarraysize(@WoE); set @n,@n+1){ if(@WoE[@n] == killedrid){ end; } } //WoE // You probably meant to use "setarray", and you also probably to use commas instead of separators: setarray @woe, 1288, 1285, ..; // Either way, that's inefficient considering this code runs on all killed monsters. Honestly I'd do the whole thing via the source instead since running a script everytime you kill a monster is overkill. Anyhow, use a dictionary seach: if (.badMob[killedrid]) end; .@nTime = (300 + rand(0, 120)) - getmonsterinfo(killedrid, MOB_LV); // The main reason why your script didn't work: "summon" uses miliseconds, not seconds. .@nTime *= 1000; // s to ms summon "Ajudante " + getmonsterinfo(killedrid, MOB_NAME), killedrid, .@nTime; mkTimed = gettimetick(2) + .@nTime + rand(0, 60); message strcharinfo(0), "[" + getmonsterinfo(killedrid, MOB_NAME) + "] Hello " + strcharinfo(0) + " I will help you for a few minutes!"; end; OnInit: // Define bad mobs here .badMob[1288] = 1; .badMob[1285] = 1; .badMob[1830] = 1; .badMob[1949] = 1; .badMob[1950] = 1; .badMob[1286] = 1; .badMob[1287] = 1; .badMob[1899] = 1; .badMob[1829] = 1; end; }
  12. Heya, The HP/SP bars are data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\basic_interface\gzeblue_left.bmp gzeblue_mid gzeblue_right And the AP bar is gzered_left / gzered_mid / gzered_right.
  13. I fixed the hyperlink color, along with the brush selection and the search brush (same download link as before). As for the 4 GB limit, that's a structural limit with GRF files and there's nothing that can be done about it unless Gravity updates their file format. For more context, the file table offset is defined as an unsigned integer and the entries within the file table are also defined as unsigned integers. Four bytes of data cannot go beyond 4294967295; if they do, they'll wrap back to 0 and starts corrupting data in your GRF. I'm afraid this is technically impossible. If your GRF reached 5+ GB in size, then it means you've lost data within your GRF without you knowing about it. As I mentioned above, if you go past 4 GB with your file offsets, the data wraps back to 0. The fact that your GRF loads means that the file table offset was indeed beyond the limit and is probably written right in the middle of your GRF instead of at the end of it. The file table has overwritten some of your files within your GRF and some indexes are linking to invalid data (and not by a small amount, about 1/5th of your GRF is unreadable). When that happens, the client won't be able to decompress the data as it won't be a valid zlib entry, and it will attempt to read from the next GRF listed.
  14. Updated to 1.8.6.6, this update mostly targets the map rendering: Added/fixed the RSM2 to RSM1 option when right-clicking a RSM2 file. The "anim" option will keep the rotation key frames, but it is not a perfect conversion; the scale/texture/offset key frames cannot be converted. The "flat" option will remove any kind of animation but will always be a perfect match with the original. I know this feature isn't that useful anymore since most clients support RSM2 files just fine, but I still hear people wanting to downgrade RSM2 files. You'll need to set the scale to (-1,1,1) in BrowEdit if you want to keep original model direction. Added the "Downgrade" option when right-clicking a RSW file. This will set the version of the RSW to 0x201 and GND to 0x107. All RSM2 files inside the RSW file will be converted to RSM1 and added to your GRF. The RSM2 models are also placed in their correct positions after conversion. Fixed the FPS counter. Added a "minimap" option to create minimaps: Added a face culling option to reflect the client's behavior more accurately. Added a copy/paste feature meant for BrowEdit 3 by using shift-left-click: Please keep your drama/trolling out of this thread, thank you. This forum is primarily dedicated towards developers, not players. I'd refer you to RMS, reddit or your own server forum instead.
  15. They shouldn't be encrypted, no. Unless Gravity revamped the rrf format, this tool should still work. You don't have to handle newer packets unless you want some information from them. For example, if there is a newer packet for displaying NPC messages, then they would simply not show up in the tool anymore until you added a parsing method for it. Anyway, you'd have to share your replay with me in private to look into what's happening. It's too vague as it is.
  16. You forgot the semi-colon after the first line: ALTER TABLE `char` ADD `achievement_points` INT to ALTER TABLE `char` ADD `achievement_points` INT; Other than that, it ran fine for me. (Also you may want to use a proper SQL editor like HeidiSQL instead of phpmyadmin...)
  17. Well that's a bit of a vague error, but usually that means either one of these two: You do not have the .net 3.5 and .net 4.0 properly installed. Or you have conflicting dlls in your folder where GRF Editor is running from (doesn't seem likely though?). So for starter, I'd recommend reinstalling .net 4.0, then .net 3.5, and go from there I suppose.
  18. That's a different issue though; rand(0, 0) doesn't make sense. You could edit the BUILDIN function to ignore such a case, since one could argue that rand(0, 0) should return 0. In the original script posted by InfectedX, it was impossible to have such a scenario so the error didn't make sense. That's why I suggested him to use an entirely different method instead.
  19. Hmm, I'm not entirely sure. My first guess would be the lack of a 1-pixel border around the image. But perhaps there's something else going on with the image itself (maybe it's a transparency image?), but I'd need to have a look at the act/spr files first.
  20. Ah no, the script I posted isn't meant to just copy paste and run. It's just if you have doubts with a mechanic or something; it's way too custom to be used and I'm too lazy to convert it to rAthena's standards.
  21. There is no issue with the code sample you've provided. It's a bit hard to read, but besides that, it works fine for me. To make your life easier though, may I suggest using a command like shufflearray instead? Like so: BUILDIN_DEF(shufflearray,"r?"), BUILDIN_FUNC(shufflearray) { map_session_data* sd = NULL; int i, j; int array_size = script_hasdata(st, 3) ? script_getnum(st, 3) : -1; struct script_data* data = script_getdata(st, 2); if (!data_isreference(data)) { ShowError("buildin_shufflearray: not a variable\n"); script_reportdata(data); script_pushnil(st); st->state = END; return SCRIPT_CMD_FAILURE; } const char* name = reference_getname(data); int32 id = reference_getid(data); if (not_server_variable(*name)) { sd = map_id2sd(st->rid); if (sd == NULL) return SCRIPT_CMD_SUCCESS; } if (array_size < 0) { array_size = script_array_highest_key(st, sd, reference_getname(data), reference_getref(data)); } // Start shuffling the array if (is_string_variable(name)) { for (i = array_size - 1; i > 0; i--) { j = rnd() % (i + 1); const char* temp_val = get_val2_str(st, reference_uid(id, i), reference_getref(data)); set_reg_str(st, sd, reference_uid(id, i), name, get_val2_str(st, reference_uid(id, j), reference_getref(data)), reference_getref(data)); set_reg_str(st, sd, reference_uid(id, j), name, temp_val, reference_getref(data)); script_removetop(st, -1, 0); script_removetop(st, -1, 0); } } else { for (i = array_size - 1; i > 0; i--) { j = rnd() % (i + 1); int64 temp_val = get_val2_num(st, reference_uid(id, i), reference_getref(data)); set_reg_num(st, sd, reference_uid(id, i), name, get_val2_num(st, reference_uid(id, j), reference_getref(data)), reference_getref(data)); set_reg_num(st, sd, reference_uid(id, j), name, temp_val, reference_getref(data)); script_removetop(st, -1, 0); script_removetop(st, -1, 0); } } return SCRIPT_CMD_SUCCESS; } Then you can simply code it like this: 1@thts,0,0,0 script #thanatos_main -1,{ OnInit: setarray .@rng_floors, 3, 4, 5, 6; shufflearray .@rng_floors; setarray 'floors, 1, 2, .@rng_floors[0], .@rng_floors[1], .@rng_floors[2], .@rng_floors[3], 7, 8; setarray 'maps$, instance_mapname("1@thts"), instance_mapname("2@thts"), instance_mapname("3@thts"), instance_mapname("4@thts"), instance_mapname("5@thts"), instance_mapname("6@thts"), instance_mapname("7@thts"), instance_mapname("8@thts"); setarray 'coords_coords, 0, 0, 0, 0, 27, 44, // 3rd floor 18, 97, 155, 100, 50, 18, 50, 18, 50, 18; // other stuff here... end; } 1@thts,32,166,0 script #setp02 45,2,2,{ end; OnTouch: .@next_floor = 3; warp 'maps$[.@next_floor], 'coords_coords[2 * .@next_floor + 0], 'coords_coords[2 * .@next_floor + 1]; end; } As you're clearly implementing Thanatos Tower, you might find some inspiration from when I wrote the script (though it uses quite a few custom script functions and it also has a custom hard mode, but it can probably still be of use). It's from kRO replay files, so the NPC coordinates should be very accurate. thanatos.txt
  22. It appears I reached the maximum messages amount (300), sorry about that. I've cleaned up my inbox, so it should be fine now.
  23. You can also use roBrowser: https://github.com/vthibault/roBrowser/blob/e4b5b53aa1f8b7e429bfa987ab321c96502ba1da/src/Loaders/Action.js Or GRF Editor: https://github.com/Tokeiburu/GRFEditor/blob/main/GRF/FileFormats/ActFormat/ActConverter.cs
  24. I would suggest to not speak nonsense on a development forum, it doesn't make you look good at all. This has absolutely nothing to do with sources being public. For that matter, the sources have been public for more than 10+ years on rAthena. Not only that, but C# is not a compiled language, it can be "decompiled" with little to no effort to begin with using tools like JetBrains. What's worse in what you said is that the encryption is applied via cps.dll, compiled in C++, which isn't released in the source at all. Even if someone didn't know the sources were public on rAthena, Act Editor has all the libraries in plain sight outside of the executable to begin with. For reference (because I've heard that comment many times already):
  25. I am aware. However this isn't a high priority for me at the moment. If someone wants to spend time on this, feel free to contact me. I'll get to this eventually, but it won't be anytime soon.
×
×
  • Create New...