Jump to content


  • Content Count

  • Avg. Content Per Day

  • Joined

  • Last visited

  • Days Won


Tokei last won the day on February 25

Tokei had the most liked content!

Community Reputation

408 Excellent

About Tokei

  • Rank

Profile Information

  • Gender
  • Location

Recent Profile Visitors

14,093 profile views
  1. Heya, You can use mob_drop.txt in your db folder, and make drops protected from steal: // Monster Drop Database // Add drop item to monster // // Structure: // <mobid>,<itemid>,<rate>{,<randopt_groupid>,<flag>} // // <mobid> : Monster ID. See db/[pre-]re/mob_db.txt // <itemid> : Item ID. // <rate> : 1 = 0.01% // 100 = 1% // 10000 = 100% // Just like rate in mob_db.txt, adjusted by battle_config. // To remove original drop from monster, use 0 as rate. // Optional: // <randopt_groupid> : If set, the dropped item will be modified by Random Option Group based on db/[pre-]re/item_randomopt_group.txt // <flag> : 1 - The item is protected from steal. // 2 - As MVP Reward 1063,1102,100,RDMOPTG_None,1
  2. ? is used for regex searches, such as *col??ction* That's why you can't do a search for this symbol. Try searching for this instead: 뮜* Or *collection\뮜*
  3. Heya, If the server host is on your machine, this won't work. You'll need to connect to your server using your local IP regardless of your settings. Others will be able to connect to your server through your WAN IP though.
  4. Well the group is being chosen there: int rnd_value = rnd() % (randomopt_group->total_weight); Using a debugger would show you where the issue is. Otherwise, you can add debug lines, I suppose: int rnd_value = rnd() % (randomopt_group->total_weight); int total = 0; int j; ShowDebug("itemdb_add_randomopt: total_weight '%d', total '%d', rnd_value '%d'\n", randomopt_group->total_weight, randomopt_group->total, rnd_value); If the total_weight isn't 4, then it wasn't read properly and something's missing near g->total_weight += rate; g->total++;
  5. Right-click the sprite you want to start at and use "Replace..."
  6. What Kreustoo said will fix most of your issues. For example: prontera,156,174,3 script Event Warper 77,{ if (!$arenac_gate) { mes "The event is closed."; end; } mes "Do you want to go in?"; next; switch(select("Yes.:No.:")) { case 1: // This is where you need to add your checks if (!$arenac_gate) { mes "The event is closed."; end; } warp "que_qaru01", 0, 0; end; } end; } However this is not perfect either. A player could still enter after the event is closed because there is a delay between warping a player on the map and the player landing on the map. That delay is the time the player takes to load the map (which can vary greatly depending of the player). What you could do is add an "OnTouch" area where players are warped. For instance: que_qaru01,155,155,3 script #event_check -1,2,2,{ end; OnTouch: if (!$arenac_gate) { dispbottom "You've entered the event too late, sorry!"; warp "prontera", 160, 184; end; } end; } Another approach is to disable the entrance warper NPC a good minute prior to your event starting. Then you start your event with some dialogues, for a good minute as well. Then you start your actual event. This ensures that players who are loading slowly get on the map in time for the main event. The previous solution is safer, though. As for players getting items that they shouldn't, you could add checks there as well. Not sure how your script works though, hard to say if that's feasible or not in your case. if (!$arenac_gate) { dispbottom "The event ended, you can't get rewards!"; warp "prontera", 160, 184; end; } getitem 501, 10; ...
  7. Heya, Could you show an example of the issue? It's not normal for the color to change in-game as it would indicate a new unknown behavior with indexed images in the client (and that's not very likely). If you do not want to share the file in public, please send it privately to me. Are you building the sprite file from multiple BMP files in a folder? If so, that would be the problem as you have different palettes in each one of your BMPs. You cannot do that as it's not really possible to mix palettes. If you use Act Editor, it should give you a warning that the palettes aren't matching and it will attempt to fix the issue for you by converting the image to something as close as possible as your image. Depending of the option you select, you can retain 100% of the image quality. If you choose to find the closest color in the sprite palette instead, then it will end up picking #001000 as it's the closest color match to #001603. Ideally you want to stick with one palette and not change colors in your BMP files though. You can also choose to convert the image to Bgra32 directly and that will solve the issue, with compression loss however.
  8. Try installing all VC++ redistributables from 2010 to 2015, x86. Should do the trick.
  9. Heya, Where to start... "sd" is a variable. What you're attempting to do is similar to... int x; int y; y = x + 5; It's impossible to assign a value to y if you don't know what the value of x is first. In your code, sd is the variable, but it is never really assigned. It is set to NULL as default (which is good practice), but NULL doesn't mean anything. If you look more closely, the value is actually assigned with "sd = map_charid2sd(script_getnum(st, 3))". It is commented with the "//" in front of it; you need to remove all of those "//" in front of the code. The "write access violation" comes from you attempting to do sd->guild_invite = guild_id, which in reality corresponds to NULL->guild_invite = guild_id. Obviously NULL doesn't "exist" and you can't assign guild_id to nothing. It's called a violation because you do not have the rights to write to NULL (to keep things simple anyway). sd isn't a cache, sd is the "map session data". It's what holds the information about your player's current session. You should not be doing queries to your database to update your character (unless your server is offline), that will not work and it's a bad approach. I don't know what you're trying to update though.
  10. Heya, Your main issue is that you're using "@rdice" instead of "[email protected]". The dot in front of the variable is for npc variables, while no dot is for a player variable. As a... recommendation, you should be using a donpcevent "NPCName::OnStart" after the close2 and move all your code there instead. You're trying to run the rest of the script on the player and that's not necessary here. Since the player was no longer attached to the script or was offline, the script failed to get the variable from the player.
  11. Only one error will be displayed even if there are more; in your case, the maps are simply encrypted so it's skipping all of them. Hence the 1kb maps.grf output file.
  12. Heya, I'll have a look later; the function itself can be decompiled from the labels: -- Function #0 GetLayerPriority = function(direction, layer, acc_id) local Items_List = TB_Layer_Priority.Items_List if nil ~= Items_List then local Item_Tb = Items_List[acc_id] if nil ~= Item_Tb then if nil ~= Item_Tb.Direction and nil ~= Item_Tb.Direction[direction] then return Item_Tb.Direction[direction] elseif nil ~= Item_Tb.Default then return Item_Tb.Default end end end if 2 == layer then return TB_Layer_Priority.Default_Bottom elseif 3 == layer then return TB_Layer_Priority.Default_Top elseif 4 == layer then return TB_Layer_Priority.Default_Mid elseif 8 == layer then return TB_Layer_Priority.Default_Robe end return -1 end
  13. Try unchecking "Change the ground textures for custom ones".
  14. Hmm, your base is different than rAthena (you do not have the int64 script update applied). There's a couple of mistakes with how you assigned the integers, replace your two functions with this instead: /** * Read Item Random Option Group from db file * @author [Cydh] **/ static bool itemdb_read_randomopt_group(char* str[], int columns, int current) { int id = 0; int randid = 0; unsigned short rate = (unsigned short)strtoul(str[1], NULL, 10); struct s_random_opt_group *g = NULL; if (!script_get_constant(str[0], &id)) { // autogenerate constant, it gets annoying to define it everytime script_set_constant(trim(str[0]), add_str(trim(str[0])), false, false); if (!script_get_constant(trim(str[0]), &id)) { // Should never happen? ShowError("itemdb_read_randomopt_group: Invalid ID for Random Option Group '%s'.\n", str[0]); return false; } } if (!script_get_constant(str[2], &randid) || !itemdb_randomopt_exists(randid)) { ShowError("itemdb_read_randomopt_group: Invalid random group id '%s'!\n", str[2]); return false; } if (!(g = (struct s_random_opt_group *)uidb_get(itemdb_randomopt_group, id))) { CREATE(g, struct s_random_opt_group, 1); g->total = 0; g->entries = NULL; g->total_weight = 0; uidb_put(itemdb_randomopt_group, id, g); } RECREATE(g->entries, struct s_random_opt_group_entry, g->total + 1); memset(&g->entries[g->total], 0, sizeof(g->entries[g->total])); g->entries[g->total].option.id = randid; g->entries[g->total].option.value = (short)strtoul(str[3], NULL, 10); g->entries[g->total].option.param = (char)strtoul(str[4], NULL, 10); g->entries[g->total].weight = rate; if (columns > 5) { g->entries[g->total].max_value = max((short)strtoul(str[5], NULL, 10), g->entries[g->total].option.value); } g->total_weight += rate; g->total++; return true; } /** * Read Item Random Option Group from db file **/ static bool itemdb_read_randomopt_equip(char* str[], int columns, int current) { unsigned short nameid; int group_id = -1; struct item_data *item = NULL; int i; nameid = atoi(str[0]); for (i = 1; i < columns; i++) { if (ISDIGIT(str[i][0])) { group_id = (int)strtoul(str[i], NULL, 10); } else { if (!script_get_constant(trim(str[i]), &group_id)) { ShowError("itemdb_read_randopt_equip: Invalid constant '%s'!\n", str[i]); return false; } } if ((item = itemdb_exists(nameid)) == NULL) { ShowWarning("itemdb_read_randopt_equip: Invalid item ID %hu.\n", nameid); return false; } if (!itemdb_randomopt_group_exists(group_id)) { ShowWarning("itemdb_read_randopt_equip: Invalid random option group ID %hu.\n", group_id); return false; } item->randomopt_groupid[i - 1] = group_id; } return true; }
  15. @mawjustin Hmmm, you'd get this error because the group IDs aren't defined. That... shouldn't be the case, though. The constant for your group ID, "7934", does seem to exist. Can you show me both of your itemdb_read_randomopt_group and itemdb_read_randomopt_equip functions, in itemdb.cpp? Also please show me one item you made in item_randoopt_equips.txt with one of the group from item_randoption_group.txt that is used. The error is somewhat vague.
  • Create New...

Important Information

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