Jump to content

All Activity

This stream auto-updates

  1. Today
  2. I am not sure if I am posting in the correct category. I apologize if not. Only included here are sprites inside the Classes folder that has gibberish characters on it. This does not include 4th jobs and some jobs that has an English name. This also does not include weapons, NPCs and mobs. I also removed the “_³²” and “_¿©” for male and female respectively after each names. The list also does not follow the order inside the folder. Classes Path: data.grf > data > sprite > Àΰ£Á· > ¸öÅë ³² - Male ¿© - Female Novices: Ãʺ¸ÀÚ - Novice ½´ÆÛ³ëºñ½º - Super Novice / Expanded Super Novice 1st Jobs: ¼ºÁ÷ÀÚ - Acolyte ¼ºÁ÷ÀÚ_h - Acolyte ±Ã¼ö - Archer ¸¶¹ý»ç - Magician »óÀÎ - Merchant °Ë»ç - Swordsman µµµÏ - Thief 2-1 Jobs: ÇÁ¸®½ºÆ® - Priest ÇÁ¸®½ºÆ®_h - Priest ¼ºÅõ»ç - Priest ÇåÅÍ - Hunter ÇåÅÍ_h - Hunter À§Àúµå - Wizard À§Àúµå_h - Wizard Á¦Ã¶°ø - Blacksmith Á¦Ã¶°ø_h - Blacksmith ±â»ç - Knight ±â»ç_h - Knight ¾î¼¼½Å - Assassin ¾î¼¼½Å_h - Assassin 2-2 Jobs: ¸ùÅ© - Monk ¸ùÅ©_h - Monk ¹Ùµå - Bard ¹Ùµå_h - Bard ¹«Èñ - Dancer ¹«Èñ_h - Dancer ¼¼ÀÌÁö - Sage ¼¼ÀÌÁö_h - Sage ¿¬±Ý¼ú»ç - Alchemist ¿¬±Ý¼ú»ç_h - Alchemist Å©·ç¼¼ÀÌ´õ - Crusader Å©·ç¼¼ÀÌ´õ_h - Crusader ·Î±× - Rogue ·Î±×_h - Rogue Transcendent 2-1 Jobs: ÇÏÀÌÇÁ¸® - High Priest ¼ºÅõ»ç2 - High Priest ½º³ªÀÌÆÛ - Sniper ÇÏÀÌÀ§Àúµå - High Wizard È­ÀÌÆ®½º¹Ì½º - Whitesmith ·Îµå³ªÀÌÆ® - Lord Knight ¾î½Ø½ÅÅ©·Î½º - Assassin Cross Transcendent 2-2 Jobs: èÇÇ¿Â - Champion Ŭ¶ó¿î - Clown Áý½Ã - Gypsy ÇÁ·ÎÆä¼­ - Professor Å©¸®¿¡ÀÌÅÍ - Creator Æȶóµò - Paladin ½ºÅäÄ¿ - Stalker 3-1 Jobs: ¾ÆÅ©ºñ¼ó - Archbishop ·¹ÀÎÁ® - Ranger ¿ö·Ï - Warlock ¹ÌÄÉ´Ð - Mechanic ·é³ªÀÌÆ® - Rune Knight ±æ·Îƾũ·Î½º - Guillotine Cross 3-2 Jobs: ½´¶ó - Sura ¹Î½ºÆ®·² - Minstrel ¿ø´õ·¯ - Wanderer ¼Ò¼­·¯ - Sorcerer Á¦³×¸¯ - Genetic °¡µå - Royal Guard ½¦µµ¿ìüÀ̼­ - Shadow Chaser Expanded Jobs: °Ç³Ê - Gunslinger ´ÑÀÚ - Ninja űǼҳâ - Taekwon ±Ç¼º - Star Gladiator ¼Ò¿ï¸µÄ¿ - Soul Linker ¼ºÁ¦ - Star Emperor ¼Ò¿ï¸®ÆÛ - Soul Reaper -------------------------------------------------- Cash Mounts Novices: ³ëºñ½ºÆ÷¸µ - Poring Novice ½´ÆÛ³ëºñ½ºÆ÷¸µ - Poring Super Novice / Expanded Super Novice 1st: º¹»ç¾ËÆÄÄ« - Alpaca Acolyte ŸÁ¶±Ã¼ö - Ostrich Archer ¿©¿ì¸¶¹ý»ç - Nine Tail Magician »óÀθäµÅÁö - Savage Merchant ÆäÄÚ°Ë»ç - Peco Peco Swordsman Ä̺£·Î½ºµµµÏ - Galleon Thief 2-1: ÇÁ¸®½ºÆ®¾ËÆÄÄ« - Alpaca Priest ŸÁ¶ÇåÅÍ - Ostrich Hunter ¿©¿ìÀ§Àúµå - Nine Tail Wizard Á¦Ã¶°ø¸äµÅÁö - Savage Blacksmith »çÀÚ±â»ç - King Lion Knight Ä̺£·Î½º¾î½ê½Å - Galleon Assassin 2-2: ¸ùÅ©¾ËÆÄÄ« - Alpaca Monk ŸÁ¶¹Ùµå - Ostrich Bard ŸÁ¶¹«Èñ - Ostrich Dancer ¿©¿ì¼¼ÀÌÁö - Nine Tail Sage ¿¬±Ý¼ú»ç¸äµÅÁö - Savage Alchemist »çÀÚÅ©·ç¼¼ÀÌ´õ - King Lion Crusader Ä̺£·Î½º·Î±× - Galleon Rogue T2-1: ÇÏÀÌÇÁ¸®½ºÆ®¾ËÆÄÄ« - Alpaca High Priest ŸÁ¶½º³ªÀÌÆÛ - Ostrich Sniper ¿©¿ìÇÏÀÌÀ§Àúµå - Nine Tail High Wizard È­ÀÌÆ®½º¹Ì½º¸äµÅÁö - Savage Whitesmith »çÀڷε峪ÀÌÆ® - King Lion Lord Knight Ä̺£·Î½º¾î½ê½ÅÅ©·Î½º - Galleon Assassin Cross T2-2: èÇǿ¾ËÆÄÄ« - Alpaca Champion ŸÁ¶Å©¶ó¿î - Ostrich Clown ŸÁ¶Â¤½Ã - Ostrich Gypsy ¿©¿ìÇÁ·ÎÆä¼­ - Nine Tail Professor Å©¸®¿¡ÀÌÅ͸äµÅÁö - Savage Creator »çÀÚÆȶóµò - King Lion Paladin Ä̺£·Î½º½ºÅäÄ¿ - Galleon Stalker 3-1: ¾ÆÅ©ºñ¼ó¾ËÆÄÄ« - Alpaca Archbishop ŸÁ¶·¹ÀÎÁ® - Ostrich Ranger ¿©¿ì¿ö·Ï - Nine Tail Warlock ¹ÌÄɴиäµÅÁö - Savage Mechanic »çÀڷ鳪ÀÌÆ® - King Lion Rune Knight Ä̺£·Î½º±æ·Îƾũ·Î½º - Galleon Guillotine Cross 3-2: ½´¶ó¾ËÆÄÄ« - Alpaca Sura ŸÁ¶¹Î½ºÆ®·² - Ostrich Minstrel ŸÁ¶¿ø´õ·¯ - Ostrich Wanderer ¿©¿ì¼Ò¼­·¯ - Nine Tail Sorcerer Á¦³×¸¯¸äµÅÁö - Savage Genetic »çÀڷξⰡµå - King Lion Royal Guard Ä̺£·Î½º½¦µµ¿ìüÀ̼­ - Galleon Shadow Chaser Expanded: űǼҳâÆ÷¸µ - Poring Taekwon µÎ²¨ºñ´ÑÀÚ - Poison Toad Ninja ÆäÄÚ°Ç³Ê - Bike Gunslinger (Peco Peco in older version) ±Ç¼ºÆ÷¸µ - Poring Star Gladiator µÎ²¨ºñ¼Ò¿ï¸µÄ¿ - Poison Toad Soul Linker ÇØżºÁ¦ - Haetae Star Emperor ÇØżҿ︮ÆÛ - Haetae Soul Reaper -------------------------------------------------- Skill/Combat Mounts ÆäÄÚÆäÄÚ_±â»ç - Peco Peco Knight ÆäÄÚÆäÄÚ_±â»ç_h - Peco Peco Knight ·ÎµåÆäÄÚ - Armored Peco Peco Lord Knight ·é³ªÀÌÆ®»Ú¶ì - Ferus Rune Knight ·é³ªÀÌÆ®»Ú¶ì2 - Black Ferus Rune Knight ·é³ªÀÌÆ®»Ú¶ì3 - White Ferus Rune Knight ·é³ªÀÌÆ®»Ú¶ì4 - Blue Ferus Rune Knight ·é³ªÀÌÆ®»Ú¶ì5 - Red Ferus Rune Knight ·¹ÀÎÁ®´Á´ë - Warg Ranger ¸¶µµ±â¾î - Magic Gear Mechanic ¸¶µµ¾Æ¸Ó - Magic Gear Mechanic (jRO) ±¸ÆäÄÚÅ©·ç¼¼ÀÌ´õ - Peco Peco Crusader ½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ - Grand Peco Crusader ½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ_h - Grand Peco Crusader ÆäÄÚÆȶóµò - Armored Grand Peco Paladin ±×¸®Æù°¡µå - Gryphon Royal Guard -------------------------------------------------- Others: ¹«Èñ_¿©_¹ÙÁö - Pants Dancer ±Ç¼ºÀ¶ÇÕ - Floating Star Gladiator ¼ºÁ¦À¶ÇÕ - Floating Star Emperor Costumes: »êŸ - Christmas ¿©¸§ - Summer ¿©¸§2 - Summer 2 °áÈ¥ - Wedding Åνõµ - Wedding ÇѺ¹ - Hanbok ¿ÁÅä¹öÆнºÆ® - Oktoberfest GMs: ¿î¿µÀÚ - Gamemaster ¿î¿µÀÚ2 - Gamemaster 2 Mercenaries: °Ë¿ëº´ - Mercenary Fencer (Male) â¿ëº´ - Mercenary Spearman (Male) È°¿ëº´ - Mercenary Bowman (Female) ================================================== Hairstyles Path (Norman): data.grf > data > sprite > Àΰ£Á· > ¸Ó¸®Åë Doram Path (Classes): data.grf > data > sprite > µµ¶÷Á· > ¸öÅë Doram Path (Hairstyles): data.grf > data > sprite > µµ¶÷Á· > ¸Ó¸®Åë
  3. I had to make a number of changes to the script, otherwise it didn't work correctly. src/map/map.cpp Change @@ -2829,6 +2835,27 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) if (map_getmapflag(m, MF_MOBITEMADDER)) { for (const auto& it : mapdata->mobitemadder_droplist) { if (it.mob_id == md->mob_id) { struct s_mob_drop mobdrop; drop_rate = it.item_per; mobdrop.nameid = it.item_id; if (rand() % 10000 > drop_rate) continue; - if (!ditem || !itemdb_exists(it.item_id)) + if (!itemdb_exists(it.item_id)) continue; ditem = mob_setdropitem(&mobdrop, 1, it.mob_id); mob_item_drop(md, dlist, ditem, 0, it.item_per, homkillonly); } } } src/map/npc.cpp new code case MF_MOBITEMADDER: { if (state) { // Copy the string so as not to modify the original string char* droplist = strdup(w4); if (droplist) { char* checkdroplist = strtok(droplist, ", "); if (checkdroplist) { union u_mapflag_args args = {}; args.mobitemadder.mob_id = atoi(checkdroplist); // Clearing the current item data of a mob before adding new ones map_setmapflag(m, MF_MOBITEMADDER, false); // Create a temporary array to store added items int added_items[50]; // Assume no more than 50 items per monster int num_added_items = 0; // Number of items added // Process the string and add the items while ((checkdroplist = strtok(NULL, ", "))) { args.mobitemadder.item_id = atoi(checkdroplist); if ((checkdroplist = strtok(NULL, ", "))) { args.mobitemadder.item_per = atoi(checkdroplist); // Check to see if the mob already has the item. bool already_added = false; for (int i = 0; i < num_added_items; ++i) { if (added_items[i] == args.mobitemadder.item_id) { already_added = true; break; } } // If the item is not already present on the mob, add it if (!already_added) { map_setmapflag_sub(m, MF_MOBITEMADDER, true, &args); added_items[num_added_items++] = args.mobitemadder.item_id; } } } } free(droplist); // Freeing the allocated memory } } else { map_setmapflag(m, MF_MOBITEMADDER, false); } break; } The only problem I have not been able to solve is the duplicate drop if @reloadscript is produced on the server That is, if you did reloadscript 10 times, the drop will drop in 10 instances.
  4. So I heard that in kRO, 3rd jobs from non-trans 2nd job cannot change to 4th job. They would need to change from a non-trans 3rd job to a transcendent 3rd job to be able to change to a 4th job as 4th jobs has access to trans stats and skills. I also heard that there is an NPC or option in kRO to change reg 3rd to trans 3rd. I guess my question is how to change from non-trans 3rd to trans 3rd so that you can change to 4th job? Like what are the requirements and process? Thank you for answering and God Bless =>
  5. Now that I have completed a Dual Diploma Program, I must acknowledge it was one of the most fulfilling experiences of my academic journey. This program offers the opportunity to achieve two diplomas at the same time, enhancing your multidisciplinary knowledge and giving you a competitive advantage in the work market. By means of this program, I have gained exposure to diverse domains, aiding my personal and professional growth. It's provided me a broader perspective on how different domains interact and can combine towards better results. For those seeking to enhance their academic opportunity and job opportunities, embarking upon a dual diploma program would be an brilliant choice. You’ll secure a significant understanding of two individual disciplines, which can be crucial for job roles that require knowledge across different disciplines. It's not only about securing two diplomas; it's about increasing your point of view and boosting your intellectual prowess. However, it's appropriate to mention that this program requires commitment and endeavor. Managing two degree programs can be a tough task, so get ready to devote adequate time and resources to your academics. In case you feel motivated to broaden your horizons with a Dual Diploma Program, I encourage you to explore more about it. Consult with your academic advisors and investigate the opportunities. The better informed you are, the more appropriate decisions you can make regarding your education. [url=https://k12dualdiplomaprogram5.com]https://k12dualdiplomaprogram5.com[/url]
  6. #EXCOOLDOWN = gettimetick(2) + 86400 I just skimmed the script, and saw both quest are using the same variable, any quest finished will have the same cooldown for both since both are using the same variable cooldown.
  7. ever tried using this? *bonus_script "<script code>",<duration>{,<flag>{,<type>{,<status_icon>{,<char_id>}}}}; This command will attach a script to a player for a given duration, in seconds. After that time, the script will automatically expire. The same bonus cannot be stacked. By default, this bonus will be stored on `bonus_script` table when player logs out. Flags (bitmask): 1 : Remove when dead. 2 : Removable by Dispell. 4 : Removable by Clearance. 8 : Remove when player logs out. 16 : Removeable by Banishing Buster. 32 : Removable by Refresh. 64 : Removable by Lux Anima. 128 : Remove when Madogear is activated or deactivated. 256 : Remove when receive damage. 512 : Script is permanent, cannot be cleared by bonus_script_clear. 1024: Force to replace duplicated script by expanding the duration. 2048: Force to add duplicated script. This flag cannot be stacked with 1024, if both are defined, 1024 will be checked first and ignore this flag.
  8. Yesterday
  9. It working. But it walk like a dumb. Anyone can modify it to make it walk straight until it stuck and then try another path? Or make it choose more further point. Not random walking around same point. This is my diff for last rA I just pull yesterday. I'm not a coder. Just combined everything I read from this topic and read the code then apply it manually. I just googled how to made this patch file and want to share. I can read the code to analysis how it work but can't write the code by myself. xD @tack.patch
  10. When i finish 1 quest, the script reads as a whole, which means i cant take quest 2 or quest 3, even i have never done quest 2 or quest 3, i have only done quest 1, so how to make each quest individual? and if anymore can make this script more simplify and cleaner, i would be very much appricate it, please send help thanks for your time helping me.
  11. how to solve this after woe end i got this error and no mail sent on my RODEX
  12. Hi May I ask all of you kindhearted fellow if anyone could share this kind of standing portal sprite or anything alike. I really need a kind of portal like this for the feature I'm working on. I would greatly appreciate it. Thank you!
  13. @kanecharles,Thanks for the advice, I'll try to maneuver through it, thanks again for your contribution!
  14. im not asking for spoon feed, i was asking if there was an alternative ways for me to simplfy the script for save point feature instend of re write the script line by line for each individual npc, i was thinking about using function but kinda clueles on how should i write em
  15. This is the reason save_point: clear; soundeffect "menu.wav",0; mes "^ce7e00 === FARIDAH === ^000000"; mes "Your respawn point has been saved to Veil. Thank you."; savepoint "veil",120,104; <--------------------------------------- close; You specifically put the map name with coordinates . Instead of doing that just put return to save point script . Im not gonna spoon feed you anymore so you will learn
  16. thanks, but some of the mes overlap, but i fix that by adding clear; but the only problem now is save point feature, if im in amatsu town example, and choose to save, it would only save to veil town (custom main town), is there a way that i can make the save feature for all npc arcoding to which city player currently are? or the only option is to make idividual npc with diffrent save point ..??
  17. I go that to my github. but here is your request i added a boss chance too . The code is user friendly so you can customize it with your desire . If it helps make sure to up my response so other player will know that the post is solve prontera,155,185,5 script Random Card NPC 100,{ .@zeny_cost = 1000000; // Zeny cost per roll .@normal_chance = 89; // Normal monster card chance (89%) .@mini_chance = 10; // Mini monster card chance (10%) .@boss_chance = 1; // Boss card chance (1%) menu "Welcome to the Random Card NPC! What would you like to do?", "Roll for a random card (" + .@zeny_cost + " Zeny)", Roll, "Nevermind", Quit; OnInit: setarray .@normal_cards, 4001, 4002, 4003; // Example normal monster card IDs (You can add or remove as needed) setarray .@mini_cards, 4004, 4005, 4006; // Example mini monster card IDs (You can add or remove as needed) setarray .@boss_cards, 4007, 4008, 4009; // Example boss monster card IDs (You can add or remove as needed) end; Roll: if (countitem(zeny) < .@zeny_cost) { mes "[Random Card NPC]"; mes "You don't have enough Zeny."; close; } delitem zeny, .@zeny_cost; .@roll = rand(100); // Roll a random number between 0 and 99 if (.@roll < .@normal_chance) { // Player gets a normal monster card .@card_id = .@normal_cards[rand(getarraysize(.@normal_cards))]; getitem .@card_id, 1; mes "[Random Card NPC]"; mes "Congratulations! You got a normal monster card."; close; } else if (.@roll < .@normal_chance + .@mini_chance) { // Player gets a mini monster card .@card_id = .@mini_cards[rand(getarraysize(.@mini_cards))]; getitem .@card_id, 1; mes "[Random Card NPC]"; mes "Congratulations! You got a mini monster card."; close; } else if (.@roll < .@normal_chance + .@mini_chance + .@boss_chance) { // Player gets a boss monster card .@card_id = .@boss_cards[rand(getarraysize(.@boss_cards))]; getitem .@card_id, 1; mes "[Random Card NPC]"; mes "Congratulations! You got a boss monster card."; close; } else { // Player gets nothing mes "[Random Card NPC]"; mes "Sorry, you didn't get any card this time."; close; } Quit: mes "[Random Card NPC]"; mes "Come back anytime if you want to try your luck again!"; close; }
  18. Try this i made // Gold Room Entrance NPC firstcity,100,100,4 script Gold Room Entrance 857,{ mes "[Gold Room NPC]"; mes "Welcome to the Gold Room!"; mes "Do you want to enter the Gold Room?"; if(select("Yes:No") == 2) { mes "[Gold Room NPC]"; mes "Alright, come back if you change your mind."; close; } if (checkweight(969, 1)) { // Ensure the player has at least 1 weight free to collect Gold Bars warp "gold_room", 50, 50; // Replace "gold_room" with your actual Gold Room map name close; } else { mes "[Gold Room NPC]"; mes "You are carrying too much weight!"; close; } } // Exchange Gold Bars for Coins NPC gold_room,50,50,4 script Exchange NPC 858,{ mes "[Exchange NPC]"; mes "I can exchange your Gold Bars for coins."; mes "What would you like to do?"; switch(select("Exchange Gold Bars for Coins:Exchange Coins for Zeny:Cancel")) { case 1: callfunc("exchange_goldbars"); break; case 2: callfunc("exchange_coins"); break; case 3: mes "[Exchange NPC]"; mes "Come back if you change your mind."; close; } close; } function script exchange_goldbars { mes "[Exchange NPC]"; mes "How many Gold Bars do you want to exchange?"; input .@goldbars; if (countitem(969) < .@goldbars) { mes "You don't have that many Gold Bars."; close; } mes "Which coin do you want to receive?"; switch(select("Platinum Coin:Gold Coin:Bronze Coin:Cancel")) { case 1: delitem 969, .@goldbars; getitem 671, .@goldbars / 10; // Example exchange rate: 10 Gold Bars = 1 Platinum Coin break; case 2: delitem 969, .@goldbars; getitem 673, .@goldbars / 5; // Example exchange rate: 5 Gold Bars = 1 Gold Coin break; case 3: delitem 969, .@goldbars; getitem 672, .@goldbars / 1; // Example exchange rate: 1 Gold Bar = 1 Bronze Coin break; case 4: mes "Alright, come back if you change your mind."; close; } mes "Thank you! Here are your coins."; close; } function script exchange_coins { mes "[Exchange NPC]"; mes "Which coin do you want to exchange for Zeny?"; switch(select("Platinum Coin:Gold Coin:Bronze Coin:Cancel")) { case 1: mes "How many Platinum Coins do you want to exchange?"; input .@platinum; if (countitem(671) < .@platinum) { mes "You don't have that many Platinum Coins."; close; } delitem 671, .@platinum; set zeny, zeny + (.@platinum * 1000000); // Example exchange rate: 1 Platinum Coin = 1,000,000 Zeny break; case 2: mes "How many Gold Coins do you want to exchange?"; input .@gold; if (countitem(673) < .@gold) { mes "You don't have that many Gold Coins."; close; } delitem 673, .@gold; set zeny, zeny + (.@gold * 100000); // Example exchange rate: 1 Gold Coin = 100,000 Zeny break; case 3: mes "How many Bronze Coins do you want to exchange?"; input .@bronze; if (countitem(672) < .@bronze) { mes "You don't have that many Bronze Coins."; close; } delitem 672, .@bronze; set zeny, zeny + (.@bronze * 10000); // Example exchange rate: 1 Bronze Coin = 10,000 Zeny break; case 4: mes "Alright, come back if you change your mind."; close; } mes "Thank you! Here is your Zeny."; close; }
  19. The script you provided is close to being functional, but there are some issues that need to be addressed to ensure it works correctly. Below is the corrected script with explanations for the changes: Here is the corrected script firstcity,229,87,4 script Salvage NPC 856,{ mes "[Salvage NPC]"; mes "Hello! I can salvage your old weapons and armor."; mes "In return, I'll give you a special item based on the weapon's level."; next; mes "[Salvage NPC]"; mes "Would you like to proceed?"; switch(select("Yes:No")) { case 1: callfunc("salvage_item"); break; case 2: mes "[Salvage NPC]"; mes "Alright, come back if you change your mind."; close; } close; } function script salvage_item { mes "[Salvage NPC]"; mes "Please show me the items you want to salvage."; next; // Fetch player's inventory getinventorylist; // Collect all weapons and armor in the player's inventory set .@item_count, 0; for (.@i = 0; .@i < @inventorylist_count; .@i++) { set .@type, getiteminfo(@inventorylist_id[.@i], ITEMINFO_TYPE); if ((.@type == IT_WEAPON || .@type == IT_ARMOR) && @inventorylist_equip[.@i] == 0) { // Type 4 = Weapon, Type 5 = Armor, and not equipped set .@salvageable_items[.@item_count], @inventorylist_id[.@i]; set .@salvageable_items_qty[.@item_count], @inventorylist_amount[.@i]; set .@item_count, .@item_count + 1; } } if (.@item_count == 0) { mes "[Salvage NPC]"; mes "You don't have any salvageable items."; close; } mes "[Salvage NPC]"; mes "Here is a summary of the items you can salvage:"; for (.@i = 0; .@i < .@item_count; .@i++) { mes "^0000FF" + getitemname(.@salvageable_items[.@i]) + "^000000 x" + .@salvageable_items_qty[.@i]; } next; if (select("Proceed with Salvage:Cancel") == 2) { mes "[Salvage NPC]"; mes "Alright, come back if you change your mind."; close; } // Call the shop callshop "salvage_shop", 1; npcshopattach "salvage_shop"; close; } // Shop definition with placeholder items (you need to fill this with the actual items you want to allow for salvage) - shop salvage_shop -1,501:10000,502:10000,503:10000,504:10000,505:10000,506:10000,507:10000,508:10000,509:10000,510:10000 OnSellItem: // Rewards based on weapon level setarray .@reward_common, 501, 502; // Example common loot item IDs setarray .@reward_rare, 503, 504; // Example rare loot item IDs setarray .@reward_unique, 505, 506; // Example unique loot item IDs setarray .@reward_legendary, 507, 508; // Example legendary loot item IDs setarray .@reward_ancient, 509, 510; // Example ancient loot item IDs set .@item_id, @sold_nameid; set .@weapon_level, getiteminfo(.@item_id, ITEMINFO_WEAPONLV); switch (.@weapon_level) { case 1: // Reward common item/points getitem .@reward_common[rand(getarraysize(.@reward_common))], 1; break; case 2: // Reward rare item/points getitem .@reward_rare[rand(getarraysize(.@reward_rare))], 1; break; case 3: // Reward unique item/points getitem .@reward_unique[rand(getarraysize(.@reward_unique))], 1; break; case 4: // Reward legendary item/points getitem .@reward_legendary[rand(getarraysize(.@reward_legendary))], 1; break; case 5: // Reward ancient item/points getitem .@reward_ancient[rand(getarraysize(.@reward_ancient))], 1; break; default: dispbottom "This item cannot be salvaged."; } dispbottom "Thank you! Here is your reward."; end; The OnSellItem label should be properly defined and hooked into the shop functionality. The shop definition needs to include the items that are eligible for sale. The getiteminfo function needs to fetch the correct item information. Some logic and flow improvements. Key Changes and Fixes: Item Info Fetching: Changed getiteminfo(.@item_id, ITEMINFO_WEAPONLEVEL) to getiteminfo(.@item_id, ITEMINFO_WEAPONLV) to correctly fetch the weapon level. Shop Definition: The salvage_shop now includes example items with prices. Adjust these item IDs and prices according to your server's item database. Shop Invocation: Adjusted callshop "salvage_shop", 1; to make sure the shop is called correctly. Reward Logic: getiteminfo uses ITEMINFO_WEAPONLV to fetch the weapon level correctly. Item Type Constants: Added constants IT_WEAPON and IT_ARMOR for better readability. Make sure the items you want to allow for salvage are included in the salvage_shop definition. Adjust the item IDs and the rewards as per your server's requirements. This should make the script functional and enable the salvage NPC to work correctly.
  20. Your script has the core logic to spawn a monster and handle its death, but there are some adjustments needed to ensure that the monster respawns correctly. Specifically, the issue seems to stem from not correctly transitioning from the monster's death event back to the initial spawning logic. Here is an improved version of your script with these adjustments: function script BossniaHP { .@monsterID = getarg(0,0); .@monsterName$ = getarg(1,""); .@amount = getarg(2,0); .@map$ = getarg(3,""); .@hp = getarg(4,0); OnInit: // Spawn the monster and store its ID $@Cheffenia_ID = bg_monster("BossniaHP::OnMyMobDead", .@map$, 192, 99, .@monsterName$, .@monsterID, .@amount); setunitdata $@Cheffenia_ID, UMOB_HP, .@hp; // Set the monster's HP end; OnMyMobDead: // Initiate the timer to respawn the monster after a delay initnpctimer; end; OnTimer500: // Stop the timer stopnpctimer; // Respawn the monster by calling the OnInit label donpcevent "BossniaHP::OnInit"; end; } Ensure the OnMyMobDead event properly respawns the monster. Correctly initialize the timer to control the respawning of the monster. Explanation: OnInit: This section is called to initially spawn the monster. It uses the bg_monster function to spawn the monster and stores its ID in the variable $@Cheffenia_ID. The setunitdata function sets the HP of the monster. OnMyMobDead: This section is called when the monster dies. The initnpctimer function starts the timer which will eventually trigger the OnTimer500 event. OnTimer500: This section is called when the timer started by OnMyMobDead reaches 500 milliseconds. The stopnpctimer function stops the timer. The donpcevent "BossniaHP::OnInit" function calls the OnInit label, which respawns the monster. Common Issues to Check: Ensure that the timer duration (500 milliseconds in this case) is appropriate for your needs. You can adjust this value if you need a different respawn delay. Verify that the monster ID and other parameters passed to the bg_monster function are correct and that the monster can be spawned without issues. Ensure there are no other script conflicts that might prevent the OnMyMobDead event from triggering. This should ensure that the monster respawns correctly after it is killed.
  21. Try this if you encounter error let me know send the cmd part too i dont have time to test it write now. - script Durengo Kafra Service FAKE_NPC,{ soundeffect "menu.wav",0; mes "^ce7e00 === FARIDAH === ^000000"; mes "Hello, how can I be of service?"; next; switch(select("Save:Use Storage:Teleport Service:Cancel")) { case 1: goto save_point; case 2: goto storage; case 3: goto teleport_service; case 4: close; } save_point: soundeffect "menu.wav",0; mes "^ce7e00 === FARIDAH === ^000000"; mes "Your respawn point has been saved to Veil. Thank you."; savepoint "veil",120,104; close; storage: soundeffect "menu.wav",0; mes "^ce7e00 === FARIDAH === ^000000"; mes "Here is your storage vault."; openstorage; close; teleport_service: soundeffect "menu.wav",0; mes "^ce7e00 === FARIDAH === ^000000"; mes "Please select your destination:"; switch(select("Town:Resource Ground:Cancel")) { case 1: goto town_teleport; case 2: goto resource_teleport; case 3: close; } resource_teleport: soundeffect "menu.wav",0; mes "^ce7e00 === FARIDAH === ^000000"; mes "Please select your level range:"; switch(select("Level 1 to 60:Level 60 to 99:Cancel")) { case 1: if (BaseLevel > 60) { mes "Sorry, your level is above the requirement."; close; } warp "spl_fild01",78,249; close; case 2: if (BaseLevel < 60) { mes "Sorry, your level is below the requirement."; close; } warp "spl_fild02",30,198; close; case 3: close; } town_teleport: soundeffect "menu.wav",0; mes "^ce7e00 === FARIDAH === ^000000"; mes "Select your destination:"; switch(select( "Main Town:Alberta:Aldebaran:Amatsu:Ayothaya:Comodo:Einbech:Einbroch:Geffen:Hugel:Izlude:Jawaii:Juno:Gonryun:Lighthalzen:Louyang:Lutie:Morocc:Moscovia:Nameless Island (Day):Nameless Island (Night):Niflheim:Payon:Prontera:Rachel:Splendide:Thor Camp:Umbala:Veins:Cancel")) { case 1: warp "veil",120,104; close; case 2: warp "alberta",28,234; close; case 3: warp "aldebaran",140,131; close; case 4: warp "amatsu",198,84; close; case 5: warp "ayothaya",208,166; close; case 6: warp "comodo",209,143; close; case 7: warp "einbech",63,35; close; case 8: warp "einbroch",64,200; close; case 9: warp "geffen",119,59; close; case 10: warp "hugel",96,145; close; case 11: warp "izlude",128,108; close; case 12: warp "jawaii",251,132; close; case 13: warp "yuno",157,51; close; case 14: warp "gonryun",160,120; close; case 15: warp "lighthalzen",158,92; close; case 16: warp "louyang",217,100; close; case 17: warp "xmas",147,134; close; case 18: warp "morocc",156,93; close; case 19: warp "moscovia",223,184; close; case 20: warp "nameless_i",256,215; close; case 21: warp "nameless_n",256,215; close; case 22: warp "niflheim",202,174; close; case 23: warp "payon",179,100; close; case 24: warp "prontera",155,183; close; case 25: warp "rachel",130,110; close; case 26: warp "splendide",201,147; close; case 27: warp "thor_camp",246,68; close; case 28: warp "umbala",97,153; close; case 29: warp "veins",216,123; close; case 30: close; } } veil,120,114,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#veil 10041 alb2trea,57,70,6 duplicate(Durengo Kafra Service) Durengo Kafra Service#alb2trea 10041 alberta,28,240,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#alberta 10041 aldebaran,145,118,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#aldebaran 10041 amatsu,203,87,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#amatsu 10041 ayothaya,209,169,6 duplicate(Durengo Kafra Service) Durengo Kafra Service#ayothaya 10041 comodo,194,158,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#comodo 10041 einbech,59,38,6 duplicate(Durengo Kafra Service) Durengo Kafra Service#einbech 10041 einbroch,69,202,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#einbroch 10041 gef_fild10,71,339,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#gef_fild10 10041 geffen,124,72,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#geffen 10041 glast_01,372,308,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#glast_01 10041 gonryun,162,122,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#gonryun 10041 hugel,101,151,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#hugel 10041 izlu2dun,110,92,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#izlu2dun 10041 izlude,134,150,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#izlude 10041 jawaii,253,138,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#jawaii 10041 lighthalzen,162,102,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#lighthalzen 10041 louyang,208,103,6 duplicate(Durengo Kafra Service) Durengo Kafra Service#louyang 10041 manuk,274,146,6 duplicate(Durengo Kafra Service) Durengo Kafra Service#manuk 10041 mid_camp,216,288,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#mid_camp 10041 mjolnir_02,85,364,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#mjolnir_02 10041 moc_ruins,64,164,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#moc_ruins 10041 morocc,159,97,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#morocc 10041 moscovia,229,191,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#moscovia 10041 nameless_n,259,213,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#nameless_n 10041 niflheim,205,179,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#niflheim 10041 pay_arche,42,134,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#pay_arche 10041 payon,182,108,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#payon 10041 prontera,159,192,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#prontera 10041 prt_fild05,279,223,6 duplicate(Durengo Kafra Service) Durengo Kafra Service#prt_fild05 10041 rachel,135,116,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#rachel 10041 splendide,205,153,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#splendide 10041 thor_camp,249,76,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#thor_camp 10041 umbala,106,150,3 duplicate(Durengo Kafra Service) Durengo Kafra Service#umbala 10041 veins,214,123,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#veins 10041 xmas,150,136,6 duplicate(Durengo Kafra Service) Durengo Kafra Service#xmas 10041 yuno,162,47,4 duplicate(Durengo Kafra Service) Durengo Kafra Service#yuno 10041 Changes Made: Simplified Dialogue: Reduced unnecessary dialogue and made the conversation more concise. Structured Switches: Improved readability by aligning cases directly under their respective switches. Merged Common Operations: Combined repeated soundeffect and message commands into logical sections. Removed Redundant Labels: Removed unused labels to streamline the code. Optimized Condition Checks: Simplified level checks with direct if conditions. Consistent Formatting: Ensured consistent indentation and formatting for better readability.
  22. I need help with this script, please. It spawns the monster but doesn't respawn it. I'm not sure why. This is the only way it works; if I place "BossniaHP::OnMyMobDead" at the end of the line, the script doesn't work. The only problem is that it's not calling OnMyMobDead. function script BossniaHP { .@monsterID = getarg(0,0); .@monsterName$ = getarg(1,""); .@amount = getarg(2,0); .@map$ = getarg(3,""); .@hp = getarg(4,0); OnInit: $@Cheffenia_ID = bg_monster("BossniaHP::OnMyMobDead", .@map$, 192, 99, .@monsterName$, .@monsterID, .@amount); setunitdata $@Cheffenia_ID,UMOB_HP,10; // Make Crystal immune to damage until Guardians are defeated end; OnMyMobDead: initnpctimer; end; OnTimer500: stopnpctimer; donpcevent "BossniaHP::OnInit"; end; }
  23. this is the default 175, 125. I'll upload later if I get to see a difference Desktop 2024.06.01 - 07.52.59.01.mp4
  24. Yeah that explains "[Error]: buildin_getcharid: fatal error ! player not attached!" I thought it was unrelated to the NPC haha I understant now that On Init "speaks" from the NPC Context not the player Thank You it works
  1. Load more activity
×
×
  • Create New...