-
Posts
10017 -
Joined
-
Days Won
407
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Emistry
-
-
-
1
-
-
you can't, perhaps just consider use a newer client that lifted this limit.
-
in the mob_dead(...)
search for
drop_rate = mob_getdroprate(src, md->db, md->db->dropitem[i].rate, drop_modifier);
replace with
if (it->type == IT_CARD) drop_rate = md->db->dropitem[i].rate; else drop_rate = mob_getdroprate(src, md->db, md->db->dropitem[i].rate, drop_modifier);
hmm... nvm this actually removed all modifier.
it probably better if you pass the item type into
drop_rate = mob_getdroprate(src, md->db, md->db->dropitem[i].rate, drop_modifier, it);
then
int mob_getdroprate(struct block_list *src, std::shared_ptr<s_mob_db> mob, int base_rate, int drop_modifier,struct item_data it)
then add the item type checking to skip if its card and is vip
if (pc_isvip(sd) && it->type != IT_CARD) { // Increase item drop rate for VIP.
-
1
-
-
return randomly between 1~100% ?
rdamage += damage * cap_value(rnd() % 100, 1, 100) / 100;
-
Another updated version to cover most of the renewal items.
https://pastebin.com/0FR1BaMT (v1.5)
- added more npc to cover all the new items released.
- added shadow gear category
- fix newer sql db structure, and script commands
-
just change it to
if (checkhomcall() == 0) {
-
1
-
-
rAthena doesn't release content by episodes or following the KRO release schedules.
There is no way to tell which commits in the history consists of all these changes.
You would have to go through each of the commits and undo one by one.
-
9 hours ago, jackel2013 said:
Hi is there any updated version that work on 2022 emulators work for yaml project?
it read your SQL database, not YAML, as long as you keep your SQL table data updated, then it should work fine.
-
-
On 10/17/2022 at 5:44 PM, GM Winter said:
how to add more maps
- script Sample -1,{ OnInit: setarray .@map$, "prt_fild01", "prt_fild02", "prt_fild03"; .@map$ = getarraysize(.@map$); for (.@i = 0; .@i < .@size; .@i++) { setmapflag .@Map$,mf_loadevent; setd(".m_"+.@map$[.@i], 1); } end; OnPCLoadMapEvent: if (!getd(".m_"+strcharinfo(3))) end; if (checkhomcall() == 0) { mes "Sorry, Homunculus are not allowed in this Map. Please remove it."; close2; warp "SavePoint",0,0; } end; }
and disable the rest of the skills from gvg
-
prontera,157,178,5 script dedoduro 757,{ if ( getgmlevel() < 80 ) end; mes "Input Player Name"; if ( input( .@input$, 4, 23 ) ) { mes "invalid name length"; close; } .@size = query_sql("SELECT `name`, `online` FROM `char` WHERE `name` LIKE '%"+ escape_sql(.@input$) +"%' ) ORDER BY `online`", .@name$, .@online); if (.@size) { for (.@i = 0; .@i < .@size; .@i++) { mes .@name$[.@i]+" ("+(.@online[.@i] ? "^00FF00[Online]":"^FF0000[Offline]")+"^000000)"; if (.@online[.@i]) { if (!getmapxy(.@map$, .@x, .@y, BL_PC, .@name$[.@i])) mes "coordinate: ("+.@map$+", "+.@x+", "+.@y+")"; } } } else { mes "player '"+.@input$+"' not found."; } close; }
-
stop the current script execution or wait until it reached destination only to trigger next unitwalk
-
may refer this post for guide to fix the account_id issue.
https://rathena.org/board/topic/131467-need-help-sql-db-error-pls-thanks/#comment-407968
-
currency that display in shop cant be change by NPC script, you need custom client hex modification.
for multiple items purchase, it doesn't work if the item is equipment.
-
1
-
-
if (rand(100) < 10) getitem 512, 100; // 10%
-
*repair <broken item number>{,<char_id>}; This command repairs a broken piece of equipment, using the same list of broken items as available through 'getbrokenid'.
repair(1);
-
ensure you have the correct image file, and configured the file path correctly with appropriate encoding.
-
switch(select("^000088Visit Shop^000000", "Information")){ case 1: switch(select("^000088Use Event Points^000000", "Use Event Coins")){ case 1: close; callshop "eventpoints",1; end; case 2: close; callshop "eventpoints",1; end; } break; case 2: switch(select("^000088Castle Drops^000000","Cards","Cancel")){ case 1: callshop "eventcastle",1; end; case 2: callshop "eventcards",1; end; } break; }
your usage of switch() and select() isn't correct
-
if (abcde$ == "") abcde$ = "____"; // initialize with a dummy character if (compare(abcde$, "_")) { .@length = getstrlen(abcde$); do { .@index = rand(.@length); } while (charat(abcde$, .@index) != "_"); // search for it abcde$ = setchar(abcde$, .word$[.@index], .@index); // replace it } message strcharinfo(0), "Letter's Collected : "+ abcde$; end;
-
you are probably not using rathena.
/* ai */ export_constant(AI_NONE); export_constant(AI_ATTACK); export_constant(AI_SPHERE); export_constant(AI_FLORA); export_constant(AI_ZANZOU); export_constant(AI_LEGION); export_constant(AI_FAW); export_constant(AI_GUILD); export_constant(AI_WAVEMODE); export_constant(AI_ABR); export_constant(AI_BIONIC);
your emulator doesn't detect these constants, either you didnt have it, or you removed it, or you somehow changed it.
make sure your emulator have these constants value defined.
-
you can disable the SECURE_NPCTIMEOUT
or
add this to your warper npc
*ignoretimeout <flag>{,<char_id>}; Disables the SECURE_NPCTIMEOUT function on the character invoking the script, or by the given character ID/character name. Valid flag: 0 - Enabled SECURE_NPCTIMEOUT. 1 - Disable SECURE_NPCTIMEOUT. Note: SECURE_NPCTIMEOUT must be enabled for this to work.
-
just find
dispbottom "You earned 1 Arena Points";
and change it to
dispbottom "You earned 1 Arena Point. Total "+F_InsertComma(arenapoint)+" Points";
same goes for other arena points display message.
-
prontera,132,168,3 script Branch Hunt Challenge 78,{ mes .Npc_Name$; if (Hunter) { for (.@i = 0; .@i < 3; .@i++) mes "You have killed ^880000"+HuntCount[.@i]+"^000000/^0000FF"+Amt[.@i]+"^000000 "+getmonsterinfo(Hunt[.@i],0)+"s, keep it up!"; close; } if(gettimetick(2) < HuntDelay) { mes "You can only do this quest once every 4 hours!"; mes "You have "+(((HuntDelay) - (gettimetick(2)))/60)+" minutes left until the next quest."; close; } mes "Hello "+strcharinfo(0)+", do you want to take on the Branch Hunting Challenge?","If you manage to kill them, you'll receive a reward!"," "+.RewAmt+" x ^880000"+DispLink(.Reward)+"^000000"; if (.c_RewAmt > 0) { mes "and a bonus of up to "+.c_RewAmt+" ^880000"+DispLink(.c_Reward)+"^000000 for every challenge."; } else if (.z_RewAmt > 0) { mes "and a bonus of up to "+callfunc( "F_InsertComma",.z_RewAmt)+"z."; } else { mes "for every challenge."; } next; mes .Npc_Name$; mes "Do not forget to loot all the monster drops, they are part of the ^880000Dead Branch Quest^000000."; if(select("Bring it on!:How about no?")==2) { next; mes .Npc_Name$; mes "Fine!"; close; } next; mes .Npc_Name$; .@size = getarraysize(.Mob_List); deletearray Hunt; deletearray HuntCount; deletearray Amt; for (.@i = 0; .@i < 3; .@i++) { do { .@mob = .Mob_List[rand(.@size)]; } while (inarray(Hunt, .@mob) != -1); Hunt[.@i] = .@mob; Amt[.@i] = rand (50,100); //Amount of mob to hunt mes "You have to hunt ^0000FF"+Amt[.@i]+" "+getmonsterinfo(Hunt[.@i],0)+"^000000!"; } atcommand "@alootid -7201"; atcommand "@alootid -7189"; atcommand "@alootid -1019"; atcommand "@alootid -7222"; atcommand "@alootid +7201"; atcommand "@alootid +7189"; atcommand "@alootid +1019"; atcommand "@alootid +7222"; Hunter++; next; mes .Npc_Name$; mes "Go go go!"; close2; HuntDelay = gettimetick(2)+1; //every 1 sec. end; //----------Config---------- OnInit: .Npc_Name$ = "[^0000FF Daily Hunt ^000000]"; setarray .Mob_List[0],1497,1495,1880,1400,1151,1010,1277,1269,1503; //Mobs to hunt .Reward = 12103; //Reward ID .RewAmt = 10; //Reward Amount .c_Reward = 50000; //Reward ID .c_RewAmt = 0; //Reward Amount .z_RewAmt = 1000000; //Zeny Reward end; OnNPCKillEvent: sleep2 200; if(Hunter > 0) { .@index = inarray(Hunt, killedrid); if(.@index != -1) { HuntCount[.@index]++; dispbottom "You have killed "+HuntCount[.@index]+"/"+Amt[.@index]+" "+getmonsterinfo(Hunt[.@index],0)+"s, keep it up!"; if (rand(1,100) > rand(1,100)) { getitem 7850,1; } for (.@i = 0; .@i < 3; .@i++) { if(HuntCount[.@i] >= Amt[.@i]) .@completed++; } if(.@completed >= 3) { dispbottom strnpcinfo(1)+": Congratulations! You did it!"; dispbottom strnpcinfo(1)+": "+getitemname(.Reward)+" x "+.RewAmt+"!"; getitem .Reward,.RewAmt; if (.c_RewAmt > 0) { getitem .c_Reward,rand(1,.c_RewAmt); // Edit to the reward that you would be giving dispbottom strnpcinfo(1)+": "+getitemname(.c_Reward)+" x "+.c_RewAmt+"!"; } if (.z_RewAmt > 0) { Zeny = Zeny + .z_RewAmt; // Edit to the zeny that you would be giving dispbottom strnpcinfo(1)+": "+callfunc( "F_InsertComma",.z_RewAmt)+"z!"; } Hunter = 0; deletearray Hunt; deletearray HuntCount; deletearray Amt; } } } end; }
this should give you 3 random monster to hunt per quests.
-
find the successrefitem(...) script commands
and add these
sd->inventory.u.items_inventory[i].option[index].id = id; sd->inventory.u.items_inventory[i].option[index].value = value; sd->inventory.u.items_inventory[i].option[index].param = param;
set the index, id, value, param to whatever random item bonus you want.
Index (idx=0) out of range (nargs=0) and no default value found
in Scripting Support
Posted
that is because you call the function without pass in any parameters/arguments or set a defeault value for each of getarg(...)
getarg(0, "default_value")
function script SC_MOVEARM { movenpc getarg(0, strnpcinfo(3)),rand(2,390),rand(2,390); getmapxy(.@map$,.@x,.@y, BL_NPC,getarg(0, strnpcinfo(3))); if( !checkcell(.@map$,.@x,.@y,cell_chkreach) ){ return 0; } if( !checkcell(.@map$,.@x,.@y,cell_chkpass) ){ return 0; } return 1; }
but as sader mentioned, your label with SC_MOVEARM name isn't suitable, you shouldn't name any label start with SC_ since its predefined for status change constants.
and learn to use duplicate(...) npc instead of copy all npcs like that