-
Posts
10015 -
Joined
-
Days Won
396
Community Answers
-
Emistry's post in Warp/Flywing Debuff was marked as the answer
https://rathena.org/board/topic/74160-remove-buff-from-gospel-when-enter-a-map/
-
Emistry's post in help i want to make spawn mob by item was marked as the answer
monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}; may refer dead branch item for example.
-
Emistry's post in db bonus increase drop rate was marked as the answer
doc/item_bonus.txt#L424-L427
Monster drops ------------- bonus2 bDropAddRace,r,x; Adds x% to player's drop rate when killing a monster with race r. bonus2 bDropAddClass,c,x; Adds x% to player's drop rate when killing a monster with class c.
-
Emistry's post in HOW TO SCRIPT was marked as the answer
You can actually just follow the Awakening/Berserk Potion trick, which set the equip level to 50, then only level 50 and above only able to use the items.
603,Old_Blue_Box,Old Blue Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,50,,,{ getrandgroupitem(IG_BlueBox),1; },{},{} Your attempt above are workable, but it will remove your item if you character have less than 50 level.
-
Emistry's post in Card Recycle Need input and getinfo form cards was marked as the answer
change these
.Amount = countitem(7539); .Amount2 = countitem(7539)/5; for ( .i = 5; .i <= countitem((7539)); ) { delitem 7539, 5; getitem 7619, 1; } into this
input .@amount, 0, (countitem(7539)/5); if (.@amount) { delitem 7539, (.@amount * 5); getitem 7619, .@amount; }
-
Emistry's post in Lotti Girl, but i want with an announcement was marked as the answer
for ( .@i = 0; .@i < .itemsize[.@r]; ++.@i ) { getitem .@itemid[.@i], .@itemamount[.@i]; if (getd( ".p"+ .@r +"[0]" ) < 10) announce "<Lotti> "+strcharinfo(0)+" obtained "+.@itemamount[.@i]+"x "+getitemname(.@itemid[.@i]), bc_all; // <----- THIS LINE } only announce 10% or below.
for ( .@i = 0; .@i < .itemsize[.@r]; ++.@i ) { getitem .@itemid[.@i], .@itemamount[.@i]; announce "<Lotti> "+strcharinfo(0)+" obtained "+.@itemamount[.@i]+"x "+getitemname(.@itemid[.@i]), bc_all; // <----- THIS LINE } announce all items
-
Emistry's post in Unknown NPC was marked as the answer
NPC no longer exists, example: happen commonly when you talking to a NPC but someone do a reloadscript before you finish talk with the NPC.
-
Emistry's post in Use full feature of @servertime was marked as the answer
conf/battle/misc.conf#L64-L75
// Choose if server begin with night (yes) or day (no) night_at_start: no // Define duration in msec of the day (default: 7200000 = 2 hours) // Set to 0 to disable day cycle (but not @day GM command). // Except 0, minimum is 60000 (1 minute) day_duration: 0 // Define duration in msec of the night (default: 1800000 = 30 min) // Set to 0 to disable night cycle (but not @night GM command). // Except 0, minimum is 60000 (1 minute) night_duration: 0
-
Emistry's post in Script to spawn a monster was marked as the answer
//================================================== // gef_fild10 - Geffen Field //================================================== gef_fild10,0,0 monster Orc Warrior 1023,179,5000,0,"sample_npc_name::OnKill" gef_fild10,0,0 monster Orc Lady 1273,55,5000,0,"sample_npc_name::OnKill" gef_fild10,0,0 monster Orc Baby 1686,27,5000,0,"sample_npc_name::OnKill" gef_fild10,0,0,0,0 boss_monster Orc Lord 1190,1,7200000,600000,0,"sample_npc_name::OnKill" gef_fild10,46,350,5,5 monster Blue Plant 1079,3,900000,450000,"sample_npc_name::OnKill" gef_fild10,287,61,5,5 monster Blue Plant 1079,3,900000,450000,"sample_npc_name::OnKill" gef_fild10,300,253,5,5 monster Green Plant 1080,3,360000,180000,"sample_npc_name::OnKill" add a npc event to each of the monster in gef_fild10, and load the npc.
- script sample_npc_name -1,{ OnKill: if (!mobcount(strcharinfo(3), strnpcinfo(3)+"::OnBossKill")) { if (.monster_kill < 10000) { .monster_kill++; if (.monster_kill >= 10000) { monster strcharinfo(3), 0, 0, "Lord of Orcs", 1190, 1, strnpcinfo(3)+"::OnBossKill"; } } else { .monster_kill = 0; } } end; OnBossKill: // rewards end; }
-
Emistry's post in NPC for specific guild name was marked as the answer
prontera,155,3 script Sample 757,{ .@guild_id = getcharid(2); if (.@guild_id) { if (getguildname(.@guild_id) == "My_guild") { switch (select("Storage:Tool Dealer:Cashshop")) { case 1: openstorage; break; case 2: callshop "yourshop",1; break; case 3: callshop "yourshop",1; break; } } } end; }
-
Emistry's post in @whobuy for latest GIT was marked as the answer
what is the merit of still using this command when we already have better option?
https://divine-pride.net/database/search?q=Catalogue
-
Emistry's post in Reduce 100% resistance of demi humans to 80% or less was marked as the answer
src/map/pc.cpp#L3843
case SP_SUBRACE: // bonus2 bSubRace,r,x; PC_BONUS_CHK_RACE(type2,SP_SUBRACE); if(sd->state.lr_flag != 2) sd->indexed_bonus.subrace[type2]+=val; + if (type2 == RC_DEMIHUMAN && sd->indexed_bonus.subrace[type2] > 80) + sd->indexed_bonus.subrace[type2] = min(80, sd->indexed_bonus.subrace[type2]); break; you can try something like this, max 80% item bonuses reduction from equipments
-
Emistry's post in Npc with preview was marked as the answer
Items ----- You can refer to items by using HTML-like links to certain items: <ITEMLINK>Display Name<INFO>Item ID</INFO></ITEMLINK> Where <Display Name> is the name that will be displayed for your link and <Item ID> being the ID of the item you want to link to when clicked. In 2015 the tag name was changed to <ITEM> resulting in the following syntax: <ITEM>Display Name<INFO>Item ID</INFO></ITEM> The following sample will open a preview window for Red Potion: mes "Did you ever consume a <ITEMLINK>Red Potion<INFO>501</INFO></ITEMLINK>?"; // Or in 2015: mes "Did you ever consume a <ITEM>Red Potion<INFO>501</INFO></ITEM>?"; NOTE: Be aware that item links are rendered incorrectly in 2015+ clients at the moment. replace the item name display line using this format.
-
Emistry's post in Adoption NPC script was marked as the answer
try
prontera,155,181,5 script Sample 757,{ if (!ispartneron()) { mes "Your partner isn't online or not found."; } else if (getchildid()) { mes "You already has a child."; } else { mes "Would you like to adopt someone?"; next; if (select("Yes", "Cancel") == 1) { mes "Enter Child name"; input .@child_name$; switch(adopt(strcharinfo(0), .@child_name$)) { case ADOPT_ALLOWED: mes "Sent message to Baby to accept or deny."; break; case ADOPT_ALREADY_ADOPTED: mes "Character is already adopted."; break; case ADOPT_MARRIED_AND_PARTY: mes "Parents need to be married and in a party with the baby."; break; case ADOPT_EQUIP_RINGS: mes "Parents need wedding rings equipped."; break; case ADOPT_NOT_NOVICE: mes "Baby is not a Novice."; break; case ADOPT_CHARACTER_NOT_FOUND: mes "A parent or Baby was not found."; break; case ADOPT_MORE_CHILDREN: mes "You cannot adopt more than 1 child. (client message)"; break; case ADOPT_LEVEL_70: mes "Parents need to be at least level 70 in order to adopt someone. (client message)"; break; case ADOPT_MARRIED: mes "You cannot adopt a married person. (client message)"; break; } } } close; }
-
Emistry's post in Can I change the English translation back to Korean? was marked as the answer
just use the original kro files, and dont change anything.
-
Emistry's post in Warp Rotation was marked as the answer
prontera,155,181,5 script Sample 45,2,2,{ end; function func_AddWarp { .@map$ = getarg(0, ""); .@x = getarg(1, 0); .@y = getarg(2, 0); if (getmapusers(.@map$) >= 0) { .map$[.map_size] = .@map$; .x[.map_size] = .@x; .y[.map_size] = .@y; .map_size++; } return; } OnTouch: warp .map$[.index], .x[.index], .y[.index]; end; OnInit: // func_AddWarp("map", x, y); func_AddWarp("prontera", 155, 181); func_AddWarp("payon", 0, 0); func_AddWarp("izlude", 100, 100); func_AddWarp("prt_fild01", 120, 60); OnHour00: .index = rand(.map_size); end; }
-
Emistry's post in R> Add custom points in this Random Box Function was marked as the answer
function script F_RBox { // change Item ID here setarray .@i1[0],607,608; // Common Items setarray .@i2[0],512,513; // Rare Items setarray .@i3[0],514,515; // Super Rare Items set .@i1rand,rand( getarraysize(.@i1) ); // Randomize Common Items; just change max amount if you add items set .@i2rand,rand( getarraysize(.@i2) ); // Randomize Rare Items; just change max amount if you add items set .@i3rand,rand( getarraysize(.@i3) ); //Randomize Super Rare Items; just change max amount if you add items .@chance = rand(100); // Super Rare Item 1% if (.@chance == 0) { getitem .@i3[.@i3rand],1; announce "["+strcharinfo(0)+"] won a ["+getitemname(.@i3[.@i3rand])+"] from the Super Rare Box.",0; } else if (.chance <= 10) { // 10% getitem .@i2[.@i2rand],1; announce "["+strcharinfo(0)+"] won a ["+getitemname(.@i2[.@i2rand])+"] from the Rare Item Box.",0; } else if (.chance <= 15) { // 5% #pvppoints += 1; announce "["+strcharinfo(0)+"] won a [1 #pvppoints] from the Rare Item Box.",0; } else if (.chance <= 22) { // 7% #HourlyPoints += 2; announce "["+strcharinfo(0)+"] won a [2 #HourlyPoints] from the Rare Item Box.",0; } else if (.chance <= 50) { // 28% #Cashpoints += 3; announce "["+strcharinfo(0)+"] won a [3 #Cashpoints] from the Rare Item Box.",0; } // Common Items // 50% else { getitem .@i1[.@i1rand],1; } end; }
-
Emistry's post in Magic Attack Auto Spell was marked as the answer
bonus5 bAutoSpell,x,y,n,t,i; n/10% chance to cast skill x of level y when attacking (supports skill names) t: Trigger criteria: BF_SHORT: Trigger on melee attack BF_LONG: Trigger on ranged attack ( Default: BF_SHORT+BF_LONG ) BF_WEAPON: Trigger on weapon skills BF_MAGIC: Trigger on magic skills BF_MISC: Trigger on misc skills ( Default: BF_WEAPON ) BF_NORMAL: Trigger on normal attacks. BF_SKILL: Trigger on skills (Default: BF_SKILL if type is BF_MISC or BF_MAGIC, BF_NORMAL if type is BF_WEAPON) i: 0=cast on self 1=cast on enemy, not on self 2=use random skill lv in [1..y] 3=1+2 (random lv on enemy) do you meant trigger autospell on magical attack?
-
Emistry's post in Kill 100 Andre and Spawn 1 poring(Max 5 porings) script was marked as the answer
Replace original anthell spawn script with this.
anthell01,0,0 monster Andre 1095,15,5000,0,"sample::OnKill" and load this npc script
- script sample -1,{ OnKill: .mob_count++; if (.mob_count && .mob_count % 100 == 0) { .mob_count = 0; getmapxy(.@map$, .@x, .@y, BL_PC); if (mobcount(.@map$, strnpcinfo(3)+"::OnMobKill") < 5) { monster .@map$, .@x + rand(-3,3), .@y + rand(-3,3), "--ja--", 1002, 1, strnpcinfo(3)+"::OnMobKill"; } } end; OnMobKill: end; }
-
Emistry's post in Help with this Emp Breaker Test room was marked as the answer
prontera,173,176,4 script Emperium Breaker 743,{ // What Map will be used set .Map$,"job3_arch01"; // How many Top Breaker will be Recorded set .TopRank,10; // Message to Inform Players while inside the Room setarray .Instruction$[0], "Please Listen here carefully.", "This is Emperium Breaker Test Room , which is use to test your Breaking Time.", "Prepare youself...and do your best to Break it...", "Okay that's All i want to say , get Ready yourself and it will Start Soon."; while( 1 ){ mes "This is Emperium Breaker test Room. "; mes "You are able to calculate your Emperium Breaking Speed in this Room."; next; switch( select( ( getmapusers( .Map$ ) )?"^FF0000NOT Available":"^0000FFAvailable^000000", "Top ^FF0000"+.TopRank+"^000000 Breaker Ladder", ( getgmlevel() < 90 )?"":"^FF0000[GM]^000000 Reset Room", ( getgmlevel() < 90 )?"":"^FF0000[GM]^000000 Reset Ladder" )){ Case 1: if( getmapusers( .Map$ ) ){ mes "There is another player inside it now."; next; break; } warp .Map$,0,0; killmonster .Map$,"All"; // removemapflag .Map$,mf_noskill; donpcevent strnpcinfo(0)+"::OnReady"; end; Case 2: mes "^ED1ADCLatest Record^000000 : "+LatestRecord/1000+"."+LatestRecord%1000+" Seconds."; for( set .@i,0; .@i < .TopRank; set .@i,.@i + 1 ){ if( !$TopRankTime[.@i] ) break; mes "^FF0000Top "+( .@i + 1 )+" : ^0000FF"+$TopName$[.@i]+" "; mes "^FF0000Time Taken : ^ED1ADC[ "+$TopRankTime[.@i]/1000+"."+$TopRankTime[.@i]%1000+" Sec. ]^000000 "; } next; break; Case 3: mapannounce .Map$,"A GM has RESET the Breaker Test Room.",0,0x00FF00; killmonster .Map$,"All"; sleep2 3000; mapwarp .Map$,"prontera",156,175; mes "Done Reset. and Player who are inside are warped out."; next; break; Case 4: switch( select( "^0000FFAll Player^000000:^FF0000One Player^000000" ) ){ Case 1: deletearray $TopRankTime[0],getarraysize( $TopRankTime ); deletearray $TopName$[0],getarraysize( $TopName$ ); mes "RESETED WHOLE LADDER."; break; Case 2: mes "Please input the ^FF0000EXACT NAME^000000 of player you want to delete."; input .Name$; for( set .@i,0; .@i < .TopRank; set .@i,.@i + 1 ){ if( .Name$ == $TopName$[.@i] ){ deletearray $TopName$[.@i],1; deletearray $TopRankTime[.@i],1; mes "Removed ^FF0000"+.Name$+"^000000 from the List."; } } } next; break; } } OnReady: sleep 3000; for( set .@i,0; .@i < getarraysize( .Instruction$ ); set .@i,.@i + 1 ){ mapannounce .Map$,.Instruction$[.@i],0,0x00FF00; sleep 2500; } for( set .@i,5; .@i > 0; set .@i,.@i - 1 ){ mapannounce .Map$,"Count Down : "+.@i+" Seconds.",0,0x00FF00; sleep 1000; } //mapannounce .Map$,"Hit the Emperium Now and Skills Disabled.",0,0x00FF00; setmapflag .Map$,mf_noskill; monster .Map$,29,27,"Breaker Test",1288,1,strnpcinfo(0)+"::OnBreaked"; set .Record,0; sleep 500; initnpctimer; end; OnTimer600000: if( !mobcount( .Map$,strnpcinfo(0)+"::OnBreaked" ) ) end; mapannounce .Map$,"You spent too much time. i think you are AFK , so you are out.",0,0xED1ADC; sleep 3000; mapwarp .Map$,"prontera",156,175; stopnpctimer; end; OnBreaked: set .Time,getnpctimer(0); copyarray .@tempName$[0],$TopName$[0],getarraysize( $TopName$ ); copyarray .@tempRecord[0],$TopRankTime[0],getarraysize( $TopRankTime[0] ); set LatestRecord,.Time; for( set .@i,0; .@i < .TopRank; set .@i,.@i + 1 ){ if( .Time < $TopRankTime[.@i] || !$TopRankTime[.@i] ){ set $TopRankTime[.@i],.Time; set $TopName$[.@i],strcharinfo(0); copyarray $TopRankTime[.@i + 1],.@tempRecord[0],getarraysize( .@tempRecord ); copyarray $TopName$[.@i + 1],.@tempName$[0],getarraysize( .@tempName$ ); announce "[ "+strcharinfo(0)+" ] Achieved Top "+( .@i + 1 )+" in Emperium Breaking with "+.Time/1000+"."+.Time%1000+" Seconds !!!",bc_all,0xED1ADC; break; } } stopnpctimer; announce "Current Time Taken : "+.Time/1000+"."+.Time%1000+" Seconds. ",bc_self,0xED1ADC; // removemapflag .Map$,mf_noskill; sleep2 5000; mapwarp .Map$,"prontera",156,175; end; } job3_arch01 mapflag nocommand 50 job3_arch01 mapflag gvg on job3_arch01 mapflag gvg_castle job3_arch01 mapflag monster_noteleport job3_arch01 mapflag nosave SavePoint
-
Emistry's post in Guardian Stone Announcer was marked as the answer
if you're using the default script, then you shall change this instead.
npc/guild2/agit_main_se.txt#L1492-L1505
OnGuardianStoneDied: set .@num, atoi(charat(strnpcinfo(1),2)); set .@var$,"$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); setd .@var$+"["+(.@num-1)+"]",1; if (getd(.@var$+"[0]") == 1 || getd(.@var$+"[0]") == 2) set .@destroyed, .@destroyed+1; if (getd(.@var$+"[1]") == 1 || getd(.@var$+"[1]") == 2) set .@destroyed, .@destroyed+1; if (playerattached()) mapannounce strnpcinfo(2),"The "+((.@num == 1)?"1st":"2nd")+" Guardian Stone has been destroyed by "+strcharinfo(3)+"!",bc_map,"0x00ff00"; else mapannounce strnpcinfo(2),"The "+((.@num == 1)?"1st":"2nd")+" Guardian Stone has been destroyed!",bc_map,"0x00ff00"; if (.@destroyed == 2) { mapannounce strnpcinfo(2),"All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; donpcevent "RL0#"+strnpcinfo(2)+"::OnDisable"; } donpcevent "gard"+.@num+"#"+strnpcinfo(2)+"::OnReset"; initnpctimer; end;
-
Emistry's post in Killing MOB A, everyone in the map gets item was marked as the answer
- script sample -1,{ OnInit: .map$ = "prontera"; monster .map$,0,0,"--ja--",1002,1, strnpcinfo(3)+"::OnKill"; end; OnKill: addrid(5, 0, .map$); .@rate = rand(100); if (.@rate < 20) { // 20% getitem 512, 1; } else if (.@rate < 35) { // 15% getitem 909, 2; } else if (.@rate < 45) { // 10% getitem 985, 3; } end; }
-
Emistry's post in Jobmaster HELP! was marked as the answer
if ( Zeny < .costamount ) { next; mes .NPCName$; mes "You don't have ^ff0000"+.costamount+"^000000 Zeny!"; close; } change to
if ( Zeny < .costamount && getgroupid() != 5 ) { next; mes .NPCName$; mes "You don't have ^ff0000"+.costamount+"^000000 Zeny!"; close; }
Zeny -= .costamount; change to
if (getgroupid() != 5 ) { Zeny -= .costamount; }