Leaderboard
Popular Content
Showing content with the highest reputation on 08/14/23 in Posts
-
As per a user's request, I added the possibility to modify the chance to catch certain fish based on the rod used. sec_in02, 150, 165, 0 script Fishing Hole 10065,{ Fish: for(.@i = 0; .@i < .rods_size; .@i += .next_rod_step) { if(isequipped(.rods[.@i])) { .@rod_equipped = 1; .@rod_type = .@i; break; } } if(.@rod_equipped == 0 || countitem(.lure) == 0) { dispbottom("[Fishing] You need a Rod and Lure."); end; } specialeffect(EF_BUBBLE, "Fishing Hole"); soundeffect("fishingrod.wav", 0); dispbottom("[Fishing] Casting..."); .@fishing_cast_time = .default_fishing_cast_time; for(.@i = 0; .@i < .fishing_items_size; .@i += 2) if (isequipped(.fishing_items[.@i])) .@fishing_cast_time += .fishing_items[.@i + 1]; progressbar("ffffff", .@fishing_cast_time); delitem(.lure, 1); .@chance_sum = 0; cleararray(.@current_chances[0], 0, .chances_size); for(.@i = 0; .@i < .chances_size; .@i++) { .@modifier = .chances[.@i] * .rods[.@rod_type + (.@i + 1)]; .@current_chances[.@i] += .chances[.@i] * 100 + .@modifier; .@chance_sum += .@current_chances[.@i]; } .@pull = rand(1, .@chance_sum); .@catch = 0; for(.@i = 0; .@i < .chances_size; .@i++) { .@pull -= .@current_chances[.@i]; if(.@pull <= 0) { switch(.@i) { case 0: .@catch = .rare_catches[rand(.rare_catches_size)]; mapannounce(strcharinfo(3), strcharinfo(0) + " has caught a " + getitemname(.@catch) + "!", bc_map, "0x33CC00"); break; case 1: .@catch = .magic_fish; mapannounce(strcharinfo(3), strcharinfo(0) + " has caught a Magical Fish!", bc_map, "0xff77ff"); break; case 2: .@catch = .normal_catches[rand(.normal_catches_size)]; break; case 3: break; } break; } } if(.@catch == 0) { dispbottom("[Fishing] Nothing was caught..."); specialeffect2(EF_TEMP_FAIL); if(.auto_fail == 1) goto Fish; end; } getitem(.@catch, 1); specialeffect2(EF_TEMP_OK); if(.auto == 1) goto Fish; end; OnInit: // Fishing rod <id, rare, magic fish, normal, nothing> // + 1 = 1% increase // - 1 = 1% decrease setarray(.rods, 2764, 0, 0, 0, -25, 2763, 0, 0, 0, -50); // Fishing Lure .lure = 2775; // Auto-Fish .auto = 1; // Auto-Fish on Fail .auto_fail = 1; // Default Cast Time .default_fishing_cast_time = 15; // Chances for catch rarities: <rare>, <magic fish>, <normal>, <nothing> setarray(.chances[0], 5, 3, 55, 37); // Fishing Items setarray(.fishing_items, 2550, -2, 2443, -2, 2764, -3, 2775, -1); // Magic Fish .magic_fish = 6096; // Catches setarray(.normal_catches[0], 579, 908, 909, 963, 956, 6049, 918, 960, 910, 938, 624); // Rare Catches setarray(.rare_catches[0], 644, 603, 617); // CONFIG END // .chances_size = getarraysize(.chances); .rods_size = getarraysize(.rods); .fishing_items_size = getarraysize(.fishing_items); .normal_catches_size = getarraysize(.normal_catches); .rare_catches_size = getarraysize(.rare_catches); .next_rod_step = .chances_size + 1; } sec_in02,153,165,0 duplicate(Fishing Hole) Fishing Hole#1 10065 sec_in02,156,165,0 duplicate(Fishing Hole) Fishing Hole#2 10065 sec_in02,159,165,0 duplicate(Fishing Hole) Fishing Hole#3 10065 sec_in02,162,165,0 duplicate(Fishing Hole) Fishing Hole#4 10065 sec_in02,153,168,0 duplicate(Fishing Hole) Fishing Hole#5 10065 sec_in02,156,168,0 duplicate(Fishing Hole) Fishing Hole#6 10065 sec_in02,159,168,0 duplicate(Fishing Hole) Fishing Hole#7 10065 sec_in02,162,168,0 duplicate(Fishing Hole) Fishing Hole#8 10065 sec_in02,150,168,0 duplicate(Fishing Hole) Fishing Hole#9 10065 sec_in02,153,162,0 duplicate(Fishing Hole) Fishing Hole#10 10065 sec_in02,156,162,0 duplicate(Fishing Hole) Fishing Hole#11 10065 sec_in02,159,162,0 duplicate(Fishing Hole) Fishing Hole#12 10065 sec_in02,150,162,0 duplicate(Fishing Hole) Fishing Hole#14 10065 sec_in02,153,159,0 duplicate(Fishing Hole) Fishing Hole#15 10065 sec_in02,156,159,0 duplicate(Fishing Hole) Fishing Hole#16 10065 sec_in02,159,159,0 duplicate(Fishing Hole) Fishing Hole#17 10065 sec_in02,150,159,0 duplicate(Fishing Hole) Fishing Hole#18 10065 sec_in02,153,156,0 duplicate(Fishing Hole) Fishing Hole#19 10065 sec_in02,156,156,0 duplicate(Fishing Hole) Fishing Hole#20 10065 sec_in02,159,156,0 duplicate(Fishing Hole) Fishing Hole#21 10065 sec_in02,162,156,0 duplicate(Fishing Hole) Fishing Hole#22 10065 sec_in02,150,156,0 duplicate(Fishing Hole) Fishing Hole#23 100653 points
-
I added that every item picked up from the mvp does expire and as long as you have one of the items in your inventory and are on the same map as the event mvp is, a buff is applied. There are a few things to note though: The script is really resource heavy due to 3 loops, of which 2 run as long as the mob lives and one that runs infinite. The buff will not immediately disappear once you leave the map or the item expires. It will run out with its normal expiration time. Since there is no way to make rentals drop on the floor, the picked up item gets deleted and replaced by a rental version, that means it will seem as if a player picked up 2 items, even though he will have only one in the inventory, of course. - script MVP_EVENT FAKE_NPC,{ OnInit: // Mobinfo .mob = 1159; .map$ = "morocc"; .x = 154; .y = 92; .respawn_time = 15; // Respawntime in minutes .percent = 10; // Item drop every x hp percent. // <x, y>.. setarray(.path, 158, 87, 162, 90, 166, 87, 161, 91, 156, 90); // Dropiteminfo .item = 6797; .repetition = 25; // How often the item drops per x hp percent .expiration_time = 15; // Expiration time in minutes // Buffinfo .skill_effect = 34; // The id of the buff skill .skill_effect_value = 0; // The value the skill effect shows, for example when the skill is heal. .status_effetc_type = SC_BLESSING; .status_ticks = 240000; .status_value1 = 10; .status_value2 = 0; .status_value3 = 0; .status_value4 = 0; // CONFIG END // .move_count = getarraysize(.path) - 2; donpcevent("MVP_EVENT::OnBuffcheck"); .respawn_time *= 1000 * 60; .expiration_time *= 60; OnSpawn: monster(.map$, .x, .y, strmobinfo(1, .mob), .mob, 1); .gid = $@mobid[0]; setunitdata(.gid, UMOB_DMOTION, 0); setunitdata(.gid, UMOB_MODE, MD_CANMOVE | MD_NORANDOMWALK | MD_MVP | MD_KNOCKBACKIMMUNE | MD_STATUSIMMUNE | MD_TELEPORTBLOCK); .curr_pointer = -2; donpcevent("MVP_EVENT::OnDestinationReached"); .@next_drop_percent = 100 - .percent; .@last_hp_percent = 100; freeloop(1); while(unitexists(.gid)) { getunitdata(.gid, .@mvp_data); .@curr_hp_percent = .@mvp_data[UMOB_HP] * 100 / .@mvp_data[UMOB_MAXHP]; if(.@curr_hp_percent == .@last_hp_percent) { sleep(100); continue; } if(.@curr_hp_percent > .@last_hp_percent) .@next_drop_percent = (.@curr_hp_percent / .percent) * .percent; .@last_hp_percent = .@curr_hp_percent; if(.@next_drop_percent >= .@curr_hp_percent) { donpcevent("MVP_EVENT::OnDrop"); .@next_drop_percent -= .percent; } sleep(100); } freeloop(0); sleep(.respawn_time); donpcevent("MVP_EVENT::OnSpawn"); end; OnDrop: for(.@i = 0; .@i < .repetition; .@i++) { getunitdata(.gid, .@mvp_data); makeitem(.item, 1, mapid2name(.@mvp_data[UMOB_MAPID]), .@mvp_data[UMOB_X], .@mvp_data[UMOB_Y], 1); sleep(100); } end; OnDestinationReached: if(!unitexists(.gid)) end; if(.move_count == .curr_pointer) .curr_pointer = 0; else .curr_pointer += 2; unitwalk(.gid, .path[.curr_pointer], .path[.curr_pointer + 1], "MVP_EVENT::OnDestinationReached"); end; OnBuffcheck: freeloop(1); while(true) { addrid(5, 0, .map$); .@item_count = countitem(.item); if(.@item_count > 0) { getinventorylist(getcharid(0)); for(.@i = 0; .@i < @inventorylist_count; .@i++) { if(@inventorylist_id[.@i] == .item && @inventorylist_expire[.@i] == 0) { delitemidx(@inventorylist_idx[.@i], @inventorylist_amount[.@i]); break; } } for(.@i = 0; .@i < .@item_count; .@i++) rentitem(.item, .expiration_time); } if(rentalcountitem(.item) > 0 && getstatus(.status_effetc_type) == 0) { sc_start4(.status_effetc_type, .status_ticks, .status_value1, .status_value2, .status_value3, .status_value4); skilleffect(.skill_effect, .skill_effect_value); } detachrid; sleep(100); } freeloop(0); }2 points
-
Hello everyone, few days ago i finished my custom instance - Poring Hell. Since i put some time into it i don't want to keep it just for myself. But it's a lots of adjustments on server-side and client-side too. Right know i'm making this topic just to show it. But, if anyone will be interested, please let me know and i will edit the post and provide all of the files i used along with the readme file how to make it work and which files need to be edited etc. Some more info about it: - NPCs are briefly dubbed using AI, i used soundeffect command there (so it really talks to you a bit if you have sound effects ON)! - There are custom BGM music (the music in the video is the actual music used for maps not a stream music). - I added few 4th class skills to monsters, created stats for them, made the whole story, NPC scripts, etc... - The maps i used are existing RO maps. - Skills need definitely a bit adjustment (lots of Dragon Breath and Gale Storm spam as you can see on the video lol) - I used illustrations found on the internet (from Honkai, manga etc..). I'm not owner nor creator of these materials! - Since it is my first (and probably last) RO custom instance i made, i used instance tutorial by Skorm (thank you) and some of sprites that i found on rAthena or Hercules forums for download. I just edited some sprites little bit but i did not create them by myself. So i also thanks to people who created them. - The instance is made for 2022+ Renewal client (and rAthena) like an end-game instance by default. So mobs are strong in general - but this can be adjusted as needed by changing in the DB of course. Requirements: - Instance is made for 2022+ Renewal client and rAthena (4th jobs included). My own server was PACKETVER 20220331. - Using SQL Client (like HeidiSQL or MySQL Workbench) and SQL DB. - Custom sprites provided by other users which you have to download. Download them here (step 16. in the install instructions): Poring Collection by Emistry: https://rathena.org/board/files/file/2987-poring-collection/ Teeth Poring by Wurg: https://rathena.org/board/files/file/4249-chattering-teeth-poring/ Blazering: https://board.herc.ws/files/file/463-blazering/ Custom Pack by Mihael: https://rathena.org/board/files/file/4335-400-custons-20-custom-weapons-by-mihael/ NPC Collection by Syouji: https://rathena.org/board/files/file/2388-configurations-npcs-100-different-npcs/ - Mapcache editor: https://rathena.org/board/files/file/3858-mapcache-editor - GRF Editor: https://rathena.org/board/files/file/2766-grf-editor/ - Act Editor if you want to edit sprites in the future: https://rathena.org/board/files/file/3304-act-editor/ Update: Version 2.0.0 - Added also custom cards and MVP cards (without illustrations - maybe in the future if i'll be in mood ^^) Version 2.1.0 - Removed sprites already provided by other users. Added instructions to download and import them after that instead. Version 2.1.1- Fixed player attachment error in instance script. Merged cards into common ZIP. NOTE: Don't forget to add cards to the monsters drop in DB! Custom cards are not in the drop of monsters by default. So once again, if anyone will like it and want it, let me know and i'll add sources here - for free of course. ^^ EDIT: I added sources with install instructions into downloads section: Enjoy.^^ poring_hell_full_v2.1.1.rar1 point
-
Diff your client and remove the Add support for preview button in cash shop Then check again.1 point
-
U can create a Status Effect like SC_FISHING and when ur using the item the status effect start for a few minutes or else. On unequip sc_end SC_FISHING; But it's need SRC modification. It's not complicated. Rynbef~1 point