Jump to content

Tokei

Members
  • Content Count

    487
  • Avg. Content Per Day

    0
  • Joined

  • Last visited

  • Days Won

    51

Tokei last won the day on December 3 2020

Tokei had the most liked content!

Community Reputation

426 Excellent

About Tokei

  • Rank
    Metaling

Profile Information

  • Gender
    Male
  • Location
    Canada

Recent Profile Visitors

14,801 profile views
  1. You can also generate thor files directly with GRF Editor, which you might find easier to use. I know you already found a solution, but I thought I'd mention it...!
  2. Hello, This can happen if you have mixed DLLs where the executable is. GRF Editor uses embedded DLLs, so you can delete all other DLLs in the same folder as where you installed GRF Editor. If that doesn't solve the issue... I'd suggest to make sure you're at the latest version (currently at 1.8.3.7) and have both .NET 3.5 and 4.0 installed.
  3. Updated to 1.8.3.7: Fixed an issue where directory/uncompressed data files would not be visible when loading a GPF file.
  4. Heya, Hmmm, first of all, you can't convert a RSM2 file to RSM just by changing its extension. GRF Editor shows the model properly because it reads the file header and sees it as a RSM2 file regardless of the extension. You need to either actually downgrade the models or simply update your client to a more recent version. As for ba_lost working using this method, that is just because the client works the same; it reads the header of the file, not the extension.I don't know if 2019-06-26's client is able to read RSM2 files or not. If we assume it does, then your issue is with the RSW map format, you'd have to downgrade it (which is fairly straightforward to do). Updating the client is the easier option either way though, and a long term one at that. You'll have to do it sooner or later and then it will just work out by itself: (I need to update GRF Editor to read the newest RSW format in nif_dun02 map apparently... not that anything has really changed.) Best of luck!
  5. Well in that case it'd probably be best to limit the amount of announces to 1 per account. You'd avoid a whole bunch of issues with that. The following resolves your server restart issues, though I'm... too lazy to make a GM handling of those announces. prontera,187,210,3 script Broadcaster#1::BC 894,{ [email protected]$ = "^FF9300 Broadcaster ^000000"; [email protected]$ = "[^0000ff" + [email protected]$ + "^000000]"; mes [email protected]$; mes "Hi, I'm the Broadcaster."; mes "I can Broadcast a message for you."; mes " "; mes " "; mes " "; mes "It costs ^ff0000" + .broadcastfee + "^000000 zeny."; next; mes [email protected]$; mes "Would you like to Broadcast?"; next; switch (select("Yes:Nevermind:Auto-broadcast:")) { case 1: if (Broadcast > gettimetick(2)) { mes [email protected]$; mes "Sorry you have to wait for 1 min."; close; } if (Zeny < .broadcastfee) { goto L_NotEnoughZeny; } mes [email protected]$; mes "Please input your message."; next; input [email protected]$; Zeny -= .broadcastfee; announce "Shout from " + strcharinfo(0) + ": " + [email protected]$ + "", 0, 0x5AFF00; // Edit 5AFF00 for color code HTML Color Code Broadcast = gettimetick(2) + 60; //Timer 60 = 1 minute/s dispbottom "Broadcaster: Please wait for 1min until next broadcast to avoid flooding."; end; case 2: mes [email protected]$; mes "Suit yourself."; close; case 3: mes [email protected]$; mes "Hi, I can automatically broadcast messages for you!"; mes "It will cost you ^ff0000" + .auto_broadcastfee + "^000000 zeny per broadcast."; next; [email protected] = getcharid(3); switch(select("Proceed:Check status:Exit")) { case 1: if ($bc_announces_delay[[email protected]]) { mes [email protected]$; mes "You already have an auto announce for this account."; close; } mes [email protected]$; mes "Please input your message."; next; input [email protected]$; mes [email protected]$; mes "How many times do you want to broadcast?"; mes "Min: 1"; mes "Max: 100"; next; input [email protected], 1, 100; if ([email protected] < 1 || [email protected] > 100) { mes [email protected]$; mes "Suit yourself."; close; } [email protected] = 3; //mes [email protected]$; //mes "Delay between announces?"; //mes "Min: 3"; //mes "Max: 20"; //next; //input [email protected], 3, 20; // //if ([email protected] < 3 || [email protected] > 20) { // mes [email protected]$; // mes "Suit yourself."; // close; //} [email protected] = .auto_broadcastfee * [email protected]; mes [email protected]$; mes "You want to broadcast:"; mes "^ff0000" + [email protected]$ + "^000000"; mes "Every 3 minutes for ^00ff00" + [email protected] + "^000000 time(s)?"; mes "It will cost you a total of ^ff0000" + [email protected] + "^000000 zeny."; next; switch(select("Proceed:Cancel")) { case 2: mes [email protected]$; mes "Suit yourself."; close; } if (Zeny < [email protected]) { goto L_NotEnoughZeny; } Zeny -= [email protected]; $bc_announces_timer[[email protected]] = 0; $bc_announces_repeat[[email protected]] = [email protected]; $bc_announces_delay[[email protected]] = [email protected] * 60; $bc_announces_mes$[[email protected]] = "Shout from " + strcharinfo(0) + ": " + [email protected]$; $bc_announces_aid2idx[[email protected]] = $bc_announces_count; $bc_announces_idx2aid[$bc_announces_count] = [email protected]; $bc_announces_count++; close; case 2: if ($bc_announces_delay[[email protected]] == 0) { mes [email protected]$; mes "You currently have no auto announces."; close; } mes [email protected]$; mes "Your current announce is as follow:"; mes "^ff0000" + $bc_announces_mes$[[email protected]] + "^000000"; mes "It will be announced again in " + $bc_announces_timer[[email protected]] + " second(s)."; mes "It will repeat " + $bc_announces_repeat[[email protected]] + " more time(s)."; next; switch(select("Okay:Cancel announce:")) { case 1: mes [email protected]$; mes "..."; close; case 2: mes [email protected]$; mes "Your zeny will not be refunded, are you sure you want to cancel?"; next; switch(select("No:Yes")) { case 1: mes [email protected]$; mes "Suit yourself."; close; } if ($bc_announces_delay[[email protected]] == 0) { // It already ended? end; } callsub L_RemoveAutoAnnounce, [email protected]; mes [email protected]$; mes "All done."; close; } end; case 3: mes [email protected]$; mes "Suit yourself."; close; case 4: close; } close; } end; L_NotEnoughZeny: mes [email protected]$; mes "You don't have enough zeny."; close; OnTimer1000: freeloop(1); for ([email protected] = 0; [email protected] < $bc_announces_count; [email protected]++) { [email protected] = $bc_announces_idx2aid[[email protected]]; $bc_announces_timer[[email protected]]--; if ($bc_announces_timer[[email protected]] <= 0 && [email protected] == false) { announce $bc_announces_mes$[[email protected]], 0, 0x5AFF00; $bc_announces_repeat[[email protected]]--; $bc_announces_timer[[email protected]] = $bc_announces_delay[[email protected]]; if ($bc_announces_repeat[[email protected]] <= 0) { callsub L_RemoveAutoAnnounce, [email protected]; [email protected]; } [email protected] = true; // Prevents overlapping of announces } } freeloop(0); initnpctimer; end; L_RemoveAutoAnnounce: [email protected] = getarg(0); [email protected]x = $bc_announces_aid2idx[[email protected]]; $bc_announces_timer[[email protected]] = 0; $bc_announces_repeat[[email protected]] = 0; $bc_announces_delay[[email protected]] = 0; $bc_announces_mes$[[email protected]] = ""; [email protected]_aid = $bc_announces_idx2aid[$bc_announces_count - 1]; $bc_announces_idx2aid[[email protected]] = [email protected]_aid; $bc_announces_idx2aid[$bc_announces_count - 1] = 0; $bc_announces_aid2idx[[email protected]_aid] = [email protected]; $bc_announces_count--; return; OnInit: .broadcastfee = 3000000; .auto_broadcastfee = 500000; initnpctimer; end; }
  6. Your initial script has some oddities (regarding variable scope). Hmm, I see a few things you'd probably to worry about with the proposed solution: A player can do multiple auto announces. There is no way of tracking the active announcements. Once the auto announce is bought, it is fully detached from the player and cannot be linked back to him. The announces will get lost on script reload/server reboots. You'd probably want to use global arrays and have the announces displayed with a OnTimer1000 checks instead. With that being said, the following is probably what you're looking for. I personally prefer to have the loop on a separate event, but the end result is very similar in this case. prontera,187,210,3 script Broadcaster#1::BC 894,{ [email protected]$ = "^FF9300 Broadcaster ^000000"; [email protected]$ = "[^0000ff" + [email protected]$ + "^000000]"; mes [email protected]$; mes "Hi, I'm the Broadcaster."; mes "I can Broadcast a message for you."; mes " "; mes " "; mes " "; mes "It costs ^ff0000" + .broadcastfee + "^000000 zeny."; next; mes [email protected]$; mes "Would you like to Broadcast?"; next; switch (select("Yes:Nevermind:Auto-broadcast")) { case 1: if (Broadcast > gettimetick(2)) { mes [email protected]$; mes "Sorry you have to wait for 1 min."; close; } if (Zeny < .broadcastfee) { goto L_NotEnoughZeny; } mes [email protected]$; mes "Please input your message."; next; input [email protected]$; Zeny -= .broadcastfee; announce "Shout from " + strcharinfo(0) + ": " + [email protected]$ + "", 0, 0x5AFF00; // Edit 5AFF00 for color code HTML Color Code Broadcast = gettimetick(2) + 60; //Timer 60 = 1 minute/s dispbottom "Broadcaster: Please wait for 1min until next broadcast to avoid flooding."; end; case 2: mes [email protected]$; mes "Suit yourself."; close; case 3: mes [email protected]$; mes "Hi, I can automatically broadcast messages for you!"; mes "It will cost you ^ff0000" + .auto_broadcastfee + "^000000 zeny per broadcast."; next; switch(select("Proceed:Check status:Exit")) { case 1: mes [email protected]$; mes "Please input your message."; next; input [email protected]$; mes [email protected]$; mes "How many times do you want to broadcast?"; mes "Min: 1"; mes "Max: 100"; next; input [email protected], 1, 100; if ([email protected] < 1 || [email protected] > 100) { mes [email protected]$; mes "Suit yourself."; close; } [email protected] = .auto_broadcastfee * [email protected]; mes [email protected]$; mes "You want to broadcast:"; mes "^ff0000" + [email protected]$ + "^000000"; mes "Every 3 minutes for ^00ff00" + [email protected] + "^000000 time(s)?"; mes "It will cost you a total of ^ff0000" + [email protected] + "^000000 zeny."; next; switch(select("Proceed:Cancel")) { case 2: mes [email protected]$; mes "Suit yourself."; close; } if (Zeny < [email protected]) { goto L_NotEnoughZeny; } Zeny -= [email protected]; [email protected]_announce$ = "Shout from " + strcharinfo(0) + ": " + [email protected]$; [email protected] = [email protected]; donpcevent strnpcinfo(3) + "::OnAutoAnnounce"; close; case 2: // ?? end; case 3: mes [email protected]$; mes "Suit yourself."; close; } close; } end; L_NotEnoughZeny: mes [email protected]$; mes "You don't have enough zeny."; close; OnAutoAnnounce: [email protected] = [email protected]; [email protected]$ = [email protected]_announce$; while ([email protected] > 0) { announce [email protected]$, 0, 0x5AFF00; // Edit 5AFF00 for color code HTML Color Code sleep 180000; [email protected]; } end; OnInit: .broadcastfee = 3000000; .auto_broadcastfee = 500000; end; }
  7. 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
  8. ? 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\뮜*
  9. 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.
  10. 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++;
  11. Right-click the sprite you want to start at and use "Replace..."
  12. 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; ...
  13. 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.
  14. Try installing all VC++ redistributables from 2010 to 2015, x86. Should do the trick.
  15. 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.
×
×
  • Create New...

Important Information

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