Jump to content

Emistry

Forum Moderator
  • Posts

    10015
  • Joined

  • Days Won

    396

Everything posted by Emistry

  1. something like this ? prontera,155,181,5 script Sample 757,{ mes "You need 20 "+getitemname(501); mes "You need "+F_InsertComma(10000000)+" Zeny"; if (select("Confirm", "Cancel") == 1) { if (countitem(501) >= 20 && Zeny >= 10000000) { delitem 501, 20; Zeny -= 10000000; // random assign 200 stats for (.@i = 0; .@i <= 200; .@i++) { .@stat = rand(bStr, bLuk); .@stats[.@stat - bStr]++; } // 5% to get 100 stats each. for (.@i = bStr; .@i <= bLuk; .@i++) { if (rand(100) < 5) .@stats[.@stat - bStr] = 100; } for (.@i = bStr; .@i <= bLuk; .@i++) sc_start (SC_STRFOOD + .@i - 1), 1200000, .@stats[.@stat - bStr]; } } close; }
  2. for your reference, in case anyone having similar issue. https://rathena.org/board/topic/130787-black-heads/?do=findComment&comment=405696
  3. - script Samepl -1,{ OnInit: bindatcmd "test",strnpcinfo(3) + "::OnAtcommand"; end; OnAtcommand: if (getmapusers(.@atcmd_parameters$[0]) != -1) { message strcharinfo(0), "Map not found."; } else if (getmapflag(.@atcmd_parameters$[0], MF_NOWARPTO) && getgmlevel() < 99) { message strcharinfo(0), "You are not authorized to warp to this map."; } else if (getmapflag(.@atcmd_parameters$[0], MF_NOWARP) && getgmlevel() < 99) { message strcharinfo(0), "You are not authorized to warp from your current map."; } else { message strcharinfo(0), "Warped to " + .@atcmd_parameters$[0]; warp .@atcmd_parameters$[0], 0, 0; } end; } just add the mapflag MF_NOWARPTO to any map that you want prevent player to warp into those maps. or change the warp atcommand to enforce random warp https://github.com/rathena/rathena/blob/master/src/map/atcommand.cpp#L600 mapindex = mapindex_name2idx(map_name, nullptr); x = 0; y = 0;
  4. View File Super Convex Mirror Description : The NPC are capable to search for MVP in the whole server or specific maps. Back in eAthena, there exists a script command (forgotten the name, perhaps a mobcount(...) with parameter changed) which allow us to check for specific monster id exists in the map or not, but it was removed. Then we could use mobcount(...) script command to get similar results, but we need to manually append an NPC event to each monster. Now, we could also do the same by using getunits(...) / getmapunits(...) script commands. Of course there are pro and cons for each version, I'll just leave it to you to decide for yourself whether to use it or not. The origin of script came from @Brian Preview : Settings : // Enable player to warp to MVP? // 0 = disabled // 1 = enabled // 2 = enabled + SC_BOSSMAPINFO .warp_to_mvp = 2; Enable this setting if you wish to allow NPC to warp into the monster map. // enable this setting to fully utilize the NPC script. (use at your own risk) // read more info at /conf/battle/monster.conf setbattleflag("dynamic_mobs", 0); By default, the dynamic_mobs configuration are set to yes. This help you save some server resources if the maps aren't access by any players recently by saving the monster data into the cache. The downside of using dynamic_mobs, monsters are cached, NPC can't search for the monster data if they are cached. FYI, monsters that spawned by NPC scripts aren't cached. // list of MVP map. setarray .map$, // enable this if you want it search whole server. (unable to use warp to mvp option) // "all", Enable this if you wish to enable to NPC to search the whole server, incase you missed what other maps have MVP (including showing mvp from restricted areas, like Guild Dungeon) FYI, searching the whole server would take a longer time, use at your own risk. Notes : The NPC are capable to search any MVP monsters in the map, including monster summoned by Bloody Branch, or Class Change Skill (from Sage's Abracadabra), as long as the monster have MVP EXP. Why do we need this if we already have Convex Mirror Item? I am sure everyone has used Convex Mirror before, but there are few reason that its frustrating to use it: Each convex mirror only can search current map of player. Convex mirror are wasted if the map doesn't have any MVP or killed. Convex mirror can't search for monster that summoned by NPC script. This NPC could serve as compensation for player, imagine the use case where you spend a Convex Mirror to know which MVPs are still alive instead of letting it go wasted knowing that the MVP in current map is dead or not found. Submitter Emistry Submitted 04/24/2022 Category Utilities Video Content Author Brian, Emistry  
  5. Version 2.0.0

    473 downloads

    Description : The NPC are capable to search for MVP in the whole server or specific maps. Back in eAthena, there exists a script command (forgotten the name, perhaps a mobcount(...) with parameter changed) which allow us to check for specific monster id exists in the map or not, but it was removed. Then we could use mobcount(...) script command to get similar results, but we need to manually append an NPC event to each monster. Now, we could also do the same by using getunits(...) / getmapunits(...) script commands. Of course there are pro and cons for each version, I'll just leave it to you to decide for yourself whether to use it or not. The origin of script came from @Brian Preview : Settings : // Enable player to warp to MVP? // 0 = disabled // 1 = enabled // 2 = enabled + SC_BOSSMAPINFO .warp_to_mvp = 2; Enable this setting if you wish to allow NPC to warp into the monster map. // enable this setting to fully utilize the NPC script. (use at your own risk) // read more info at /conf/battle/monster.conf setbattleflag("dynamic_mobs", 0); By default, the dynamic_mobs configuration are set to yes. This help you save some server resources if the maps aren't access by any players recently by saving the monster data into the cache. The downside of using dynamic_mobs, monsters are cached, NPC can't search for the monster data if they are cached. FYI, monsters that spawned by NPC scripts aren't cached. // list of MVP map. setarray .map$, // enable this if you want it search whole server. (unable to use warp to mvp option) // "all", Enable this if you wish to enable to NPC to search the whole server, incase you missed what other maps have MVP (including showing mvp from restricted areas, like Guild Dungeon) FYI, searching the whole server would take a longer time, use at your own risk. Notes : The NPC are capable to search any MVP monsters in the map, including monster summoned by Bloody Branch, or Class Change Skill (from Sage's Abracadabra), as long as the monster have MVP EXP. Why do we need this if we already have Convex Mirror Item? I am sure everyone has used Convex Mirror before, but there are few reason that its frustrating to use it: Each convex mirror only can search current map of player. Convex mirror are wasted if the map doesn't have any MVP or killed. Convex mirror can't search for monster that summoned by NPC script. This NPC could serve as compensation for player, imagine the use case where you spend a Convex Mirror to know which MVPs are still alive instead of letting it go wasted knowing that the MVP in current map is dead or not found.
    Free
  6. if (query_sql(.@selectIfKillExistQuery$) > 0) { // Exist a kill of that MVP so +1 to kill count change to if (query_sql(.@selectIfKillExistQuery$, .@charid, .@kills, .@name$) > 0) { // Exist a kill of that MVP so +1 to kill count
  7. try getinventorylist; for(.@i = @inventorylist_count - 1; .@i >= 0; .@i--) { if (@inventorylist_identify[.@i]) continue; if (getiteminfo(@inventorylist_id[.@i], ITEMINFO_LOCATIONS) != EQP_ARMOR) continue; deletearray .@opt; deletearray .@val; deletearray .@indx; // first enchant if (rand(100) < 30) { .@indx[0] = 0; .@opt[0], F_rand(3, 4, 5, 6, 7, 8, 9, 10, 11, 12); if (.@opt[0] == 9 || .@opt[0] == 10) .@val[0] = rand(3, 7); else if(.@opt[0] == 11 || .@opt[0] == 12) .@val[0] = rand(1, 20); else .@val[0] = rand(1, 4); } // second enchant if (rand(100) < 30) { .@indx[1] = 1; .@opt[1], F_rand(3, 4, 5, 6, 7, 8, 9, 10, 11, 12); if (.@opt[1] == 9 || .@opt[1] == 10) .@val[1] = rand(3, 7); else if(.@opt[1] == 11 || .@opt[1] == 12) .@val[1] = rand(1, 20); else .@val[1] = rand(1, 4); } delitemidx @inventorylist_idx[.@i]; getitem3 @inventorylist_id[.@i], 1, 1, 0, 0, 0, 0, 0, 0, .@opt, .@val, .@indx; }
  8. isequipped(...) change to isequippedcnt(...)
  9. mapannounce "p_track01"," Congratulations! "+ strcharinfo(0) +" has won!",1,0xFFAB54; already have it. if you meant a server broadcast announce " Congratulations! "+ strcharinfo(0) +" has won!", bc_all, 0xFFAB54;
  10. prontera,181,157,0 warp prace_warp_portal 1,1,p_track01,52,41 OnClock2100: //if( gettime(3)%2 ) end; set .access_Prace, 1; announce "Poring Race is now open!",0,0xFFAB54; setnpctimer 100000,"Bidder#prace0"; startnpctimer "Bidder#prace0"; enablenpc "prace_warp_portal"; // <--- ADD THESE sleep 60000; // <--- ADD THESE disablenpc "prace_warp_portal"; // <--- ADD THESE end; and also OnInit: disablenpc "prace_warp_portal"; // <--- ADD THESE end;
  11. OnReset: query_sql("UPDATE `char_reg_num` SET `value` = 0 WHERE `key` = 'Mission_Total'"); addrid(0); Mission_Total = 0; end; then trigger this action by executing this line. donpcevent "YOUR_NPC_NAME::OnReset";
  12. OnUpdate: if (checkvending() & 2) end; // <--- add this line
  13. npc/custom/etc/floating_rates.txt
  14. You didnt grant the access privilege for the database user.
  15. Guide: https://www.youtube.com/watch?v=4c50g_RXPZo Files https://github.com/rathena/rathena https://github.com/rathena/FluxCP
  16. remove the mail command from them, why would they need it if they aren't allow to trade anything. If these is a need to transfer items to player, just use an NPC script that allow GM to send item to players (or previously also known as itemizer script) or enable to log to trace them.
  17. announce "Alon Event Employee: Well done. All the monster are dead!",bc_map; change to mapannounce "pvp_n_7-5", "Alon Event Employee: Well done. All the monster are dead!", bc_map;
  18. Emistry

    error

    check what you have added recently, missing client files, or spirte, or sound etc, could trigger the gravity error.
  19. perhaps consider to use db/re/produce_db.txt ? there are also other tricks like .... 1. sum all ingredient's item id, use that as an identifier to search which items to craft. (as long as the number you sum up doesn't repeat, everything should be fine) 2. or sort the numbers, then store into a variables and use it to compare the item list. (you probably need to write a sorting method) etc
  20. a simple google search would have solved your questions. https://sqlyogkb.webyog.com/article/46-executing-sql-queries https://sqlyogkb.webyog.com/article/117-execute-sql-script it stored as account variable, so its the acc_reg_num table.
  21. CopyFlags: Skill: Plagiarism: true add to each transclass skills
  22. if (checkweight(969,gold) == 0) goto L_OverWeight; getitem 969, gold;x set gold, 0; change to input .@amount, 0, gold; if (!.@amount) close; if (checkweight(969,.@amount) == 0) goto L_OverWeight; gold -= .@amount; getitem 969, .@amount;
  23. you are probably connected to a wrong database, or you setup new database in a wrong server.
  24. shutdown the server and run the SQL script. UPDATE `char` SET `zeny` = 0; UPDATE `mail` SET `zeny` = 0; UPDATE `acc_reg_num` SET `value` = 0 WHERE `key` LIKE '#BANKVAULT';
  25. your value shouldn't exceed NPC_RANGE3_END JT_NEW_NPC_3RD_END = 19999, JT_gprecruit = 20100, NPC_RANGE3_END, // Officia: JT_NEW_NPC_3RD_END=20101 now you have set the NPC ID at 20100, and you have 100 free slot in front to cater official server adding more NPC in future. its not recommend to jump to a high number since it wasting your server memory or ... just adjust this if you are confident. //Checks if a given id is a valid npc id. [Skotlex] //Since new npcs are added all the time, the max valid value is the one before the first mob (Scorpion = 1001) #define npcdb_checkid(id) ( ( (id) > NPC_RANGE1_START && (id) < NPC_RANGE1_END ) || (id) == JT_HIDDEN_WARP_NPC || ( (id) > NPC_RANGE2_START && (id) < NPC_RANGE2_END ) || (id) == JT_INVISIBLE || ( (id) > NPC_RANGE3_START && (id) < NPC_RANGE3_END ) || ( (id) >= 30000 && (id) <= 31000)) then you can use id between 30000 ~ 31000.
×
×
  • Create New...