Jump to content

Emistry

Forum Moderator
  • Posts

    10015
  • Joined

  • Days Won

    396

Community Answers

  1. Emistry's post in [Solved] H> Modified Hourly Points was marked as the answer   
    - script hourly_point_main -1,{ OnInit: .npc_name$ = strnpcinfo(3); bindatcmd "check",.npc_name$+"::OnAtcommand"; end; OnAtcommand: dispbottom "Accumulated "+#daily_minute_count; end; OnUpdate: if (checkvending()) { dispbottom "Hourly point stopped due to vending."; end; } #daily_minute_count++; deltimer .npc_name$+"::OnUpdate"; switch ( #daily_minute_count ) { default: break; case 60: // 60 minutes #CASHPOINT += 1; getitem 677,1; break; case 120: // 120 minutes #CASHPOINT += 1; getitem 677,1; break; case 180: // 180 minutes #CASHPOINT += 1; getitem 677,1; break; case 240: // 240 minutes #CASHPOINT += 1; getitem 677,1; break; case 300: // 300 minutes #CASHPOINT += 1; getitem 677,1; break; case 360: // 360 minutes #CASHPOINT += 1; getitem 677,1; break; case 420: // 420 minutes #CASHPOINT += 1; getitem 677,1; break; case 480: // 480 minutes #CASHPOINT += 1; getitem 677,1; #daily_minute_count = 0; // reset. break; } OnPCLoginEvent: addtimer ( 60 * 1000 ), .npc_name$+"::OnUpdate"; end; }  
  2. Emistry's post in [Solved] Enchanced itemshower was marked as the answer   
    bindatcmd "shower",strnpcinfo(3)+"::OnShower", 99;
  3. Emistry's post in MVPRespown was marked as the answer   
    .@map$ = "prontera"; ex: always spawn on prontera.
  4. Emistry's post in Quest Shop with +10 Weapon / EQs was marked as the answer   
    sell it as a custom item box.
    add the item box into the quest shop
    add the script that give refined item into the item_db
  5. Emistry's post in H> Last Man Standing was marked as the answer   
    change all 
    getmapxy(.@map$,.@x,.@y,0); into
    getmapxy(.@map$,.@x,.@y,BL_PC); always read the latest rAthena changelog after you updated the server revisions.
  6. Emistry's post in how to save higher value to Table rank was marked as the answer   
    total kill count per session?
    when you warp into the room, reset the initial count
    @total_emperium_count = 0; when they killed the Emperium,
    @total_emperium_count++; if (@total_emperium_count > #count) { #count = @total_emperium_count; query_sql("INSERT INTO `breaker_ladder` SET `char_id` = "+getcharid(0)+", `count` = 1 ON DUPLICATE KEY UPDATE `count` = "+#count); }  
  7. Emistry's post in Pots Converter random stuck was marked as the answer   
    vip_lounge,157,139,4 script Potion Converter 100,{ mes "Hi! I can convert your potions to your choice."; mes "Select which item you want to exchange."; next; switch(select("Segen White Potion 2x->Segen Blue Potion 1x:Segen Blue Potion 2x->Segen White Potion 1x:Siege White Potion 2x->Siege Blue Potion1x:Siege Blue Potion2x->Siege White Potion1x:Close")) { case 1: mes "How much?"; input .@num, 1, 30000; if(countitem(11503) >= .@num) { delitem 11503, .@num; getitem 11504, .@num/2; } else if ((.@weight) > 50){ mes "Hmmmm... it seems you are overweight"; } else if(countitem(11503) < .@num) { mes "Sorry You don't have the required item!"; } break; case 2: mes "How much?"; input .@num, 1, 30000; if(countitem(11504) >= .@num) { delitem 11504, .@num; getitem 11503, .@num/2; } else if ((.@weight) > 50){ mes "Hmmmm... it seems you are overweight"; } else if(countitem(11504) < .@num) { mes "Sorry You don't have the required item!"; } break; case 3: mes "How much?"; input .@num, 1, 30000; if(countitem(32007) >= .@num) { delitem 32007, .@num; getitem 32008, .@num/2; } else if ((.@weight) > 50){ mes "Hmmmm... it seems you are overweight"; } else if(countitem(32007) < .@num) { mes "Sorry You don't have the required item!"; } break; case 4: mes "How much?"; input .@num, 1, 30000; if(countitem(32008) >= .@num) { delitem 32008, .@num; getitem 32007, .@num/2; } else if ((.@weight) > 50){ mes "Hmmmm... it seems you are overweight"; } else if(countitem(32008) < .@num) { mes "Sorry You don't have the required item!"; } default: break; } close; OnInit: waitingroom "Convert pots here",0; end; } just add a default minimum value to the input or add a checking to validate the minimum input amount.
  8. Emistry's post in How to add IP Checker on this script was marked as the answer   
    offtopic:
    tbh, everyone is relying too much on the 3rd party tools data without realize that getitembound or bounded/untradeble items would have been your perfect solution to prevent any abusive behavior to redeem the rewards.
  9. Emistry's post in Fenugreek announcer was marked as the answer   
    prontera,155,181,5 script Sample 757,{ announce "Sample message", bc_all; end; }  
  10. Emistry's post in bg_monster not working was marked as the answer   
    your groups id are different than the value that stored in the variable
    $@LeagueBG1_id1  
  11. Emistry's post in How can fix Access denied for user 'ragnarok'@'localhost' (using password: YES) was marked as the answer   
    make sure you are connecting using the correct username/password.
    and granted access to the database.
    CREATE USER 'ragnarok'@'localhost' IDENTIFIED BY 'ragnarok'; GRANT ALL PRIVILEGES ON ragnarok.* to 'ragnarok'@'%' IDENTIFIED BY 'ragnarok'; https://github.com/rathena/rathena/wiki/Install-MySQL
  12. Emistry's post in Bard healing npc. was marked as the answer   
    the skill required a source target that use the skill, I dont think the NPC can actually cast the skill for you to display the effect.
    However, you can still create a similar result by duplicating some NPC which will display and hold the effect, since the effect required a immobile npc object to stick to it.
    prontera,150,180,4 script Bard 51,14,14,{ end; OnInit: .range = 5; .hp_healing_rate = 3; .sp_healing_rate = 3; getmapxy(.npc_map$, .npc_x, .npc_y, BL_NPC); initnpctimer; .@npc_count = 0; for (.@x = (.npc_x - .range); .@x <= (.npc_x + .range); .@x += 2) { for (.@y = (.npc_y - .range); .@y <= (.npc_y + .range); .@y += 2) { .@npc_count++; movenpc "Bard#effect_" + .@npc_count, .@x, .@y; } } end; OnTouch_: donpcevent "::OnIdunActivate"; playBGMall "57",.npc_map$,(.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range); // Don't Cry Baby end; OnTimer3000: initnpctimer; areapercentheal .npc_map$,(.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range), .hp_healing_rate, .sp_healing_rate; addrid(4, 0, (.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range)); if (Hp < MaxHp) { .@value = ((MaxHp * 100) / .hp_healing_rate); skilleffect "AL_HEAL", .@value; } end; } - script Bard#effect -1,{ end; OnIdunActivate: misceffect EF_BOTTOM_APPLEIDUN; end; } // add more if you enlarge the effect area. prontera,1,1,4 duplicate(Bard#effect) Bard#effect_1 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_2 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_3 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_4 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_5 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_6 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_7 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_8 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_9 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_10 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_11 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_12 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_13 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_14 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_15 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_16 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_17 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_18 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_19 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_20 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_21 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_22 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_23 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_24 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_25 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_26 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_27 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_28 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_29 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_30 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_31 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_32 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_33 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_34 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_35 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_36 139 https://imgur.com/aWiDtTb

  13. Emistry's post in Hunting Mission Need to Add Zeny reward to 500K was marked as the answer   
    change
    .@Zeny = #Mission_Count * .Quests * .@j[.@i] * .Modifier[2]; to
    .@Zeny = 500000;  
  14. Emistry's post in level and class check on freebies script was marked as the answer   
    try
    prontera,244,55,4 script Freebies 718,{ while (.rewardable_jobs[.@i] != Class && .@i < .rewardable_jobs_size) .@i++; if (.@i >= .rewardable_jobs_size) { mes "Your job class aren't eligible."; } else if (BaseLevel < .max_base || JobLevel < .max_job) { mes "Required "+.max_base+"/"+.max_job+"."; } else if (#Freebies) { mes "You have claimed the Reward already."; } else { #Freebies = 1; mes "Welcome to MyServerNameHere, Here are your start items!"; mes "You only get this once for each account!"; getitembound 31957,2,1; } close; OnInit: .max_base = 99; .max_job = 50; setarray .rewardable_jobs, Job_Knight, Job_Alchemist, Job_Assassin, Job_Bard, Job_Blacksmith, Job_Crusader, Job_Dancer, Job_Hunter, Job_Monk, Job_Priest, Job_Rogue, Job_Sage, Job_Wizard; .rewardable_jobs_size = getarraysize(.rewardable_jobs); end;  
  15. Emistry's post in Script that make you big when transformed was marked as the answer   
    autobonus "{ callfunc "F_BlackKingBar"; }",500,10000,BF_WEAPON; function script F_BlackKingBar { atcommand "@effect 123456"; // TODO: change to enlarge effect. sleep2 10000; atcommand "@effect 123456"; // TODO: repeat to end the effect. end; } i don't remember which effect allow user to growth in size. find the id and change it.
  16. Emistry's post in Event that occurs randomly twice a day was marked as the answer   
    OnInit: OnHour00: .rand_time_1 = rand(0, 11); .rand_time_2 = rand(12, 23); OnMinute00: if (gettime(DT_HOUR) == .rand_time_1 || gettime(DT_HOUR) == .rand_time_2) { // scripts. } end;  
  17. Emistry's post in Event to Trigger Two Times in Random Times was marked as the answer   
    OnInit: OnHour00: .rand_time_1 = rand(0, 11); .rand_time_2 = rand(12, 23); OnMinute00: if (gettime(DT_HOUR) == .rand_time_1 || gettime(DT_HOUR) == .rand_time_2) { // scripts. } end;  
  18. Emistry's post in loadevent mapflag event its not listed on the map list was marked as the answer   
    you have other NPC script that added the loadevent mapflag at payon map.
    all OnPCLoadMapEvent script should add extra map checking to avoid it trigger unnecessary event which come from other NPC scripts.
    It is a global event which will trigger all NPC that has this event label.
  19. Emistry's post in How do I change this script so it shows a dispbottom if the player has a particular variable? was marked as the answer   
    you can try something like this.
    - script #mvp_kill -1,{ OnInit: setarray .p_rwd, 607,1; // Party reward <item>,<amount> setarray .s_rwd, 607,1; // Solo reward <item>,<amount> .chance = 50; // Drop rate chances % // .gm = 10; // Prevents gm level and above to trigger the event // MVP Map list setarray .t_maps$[0],"moc_pryd06","lhz_dun03","gld2_prt","abbey02","ayo_dun02","lhz_dun04","ra_fild02","xmas_fild01","dic_dun02","beach_dun","iz_dun05","tur_dun04","lhz_dun02","jupe_core","moc_fild22","anthell02","odin_tem03","gon_dun03","gef_fild02","thana_boss","gef_fild10","ein_dun02","gef_fild14","moc_pryd04","dew_dun01","in_sphinx5","niflheim","moc_fild17","xmas_dun02","ice_dun03","kh_dun02","treasure02","moc_prydn2","pay_dun04","ra_san05","mosk_dun03","ama_dun03","thor_v03","gef_dun01","mjolnir_04","abyss_03","dic_dun03","prt_sewb4","pay_fild11","gef_dun02","gl_chyard","ra_fild03","ra_fild04","ve_fild01","ve_fild02","lou_dun03","prt_maze03","bra_dun02"; .t_maps_size = getarraysize(.t_maps$); end; OnNPCKillEvent: //if (getgmlevel() >= .gm) end; // If gm = event wont happen if (strcharinfo(3) == instance_mapname("06guild_01") || strcharinfo(3) == instance_mapname("force_1-1")) end; if (getmonsterinfo(killedrid, MOB_MVPEXP)) { for (.@a = 0; .@a < .t_maps_size; .@a++) { if (strcharinfo(3) == .t_maps$[.@a]) { if (getcharid(1)) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for (.@i = 0; .@i < $@partymembercount; .@i++) { if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } if (rand(100) < .chance) getitem .p_rwd[0], .p_rwd[1], .@partymemberaid[ rand(.@c) ]; .@announce_message$ = "[ System ] : Player ["+ strcharinfo(0) +"] of party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo(killedrid, MOB_NAME) +" at "+ strcharinfo(3); } else { if (rand(100) < .chance) getitem .s_rwd[0], .s_rwd[1]; .@announce_message$ = "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo(killedrid, MOB_NAME) +" alone at "+ strcharinfo(3); } MVPKills = MVPKills+1; dispbottom "---------------------------------------------------"; dispbottom "You killed a total of "+MVPKills+" MVP"+((MVPKills == 1)?"":"s")+"."; dispbottom "---------------------------------------------------"; } } addrid(0); if (#mvpon) { dispbottom .@announce_message$; } } end; } or
    - script #mvp_kill -1,{ OnInit: setarray .p_rwd, 607,1; // Party reward <item>,<amount> setarray .s_rwd, 607,1; // Solo reward <item>,<amount> .chance = 50; // Drop rate chances % // .gm = 10; // Prevents gm level and above to trigger the event // MVP Map list setarray .t_maps$[0],"moc_pryd06","lhz_dun03","gld2_prt","abbey02","ayo_dun02","lhz_dun04","ra_fild02","xmas_fild01","dic_dun02","beach_dun","iz_dun05","tur_dun04","lhz_dun02","jupe_core","moc_fild22","anthell02","odin_tem03","gon_dun03","gef_fild02","thana_boss","gef_fild10","ein_dun02","gef_fild14","moc_pryd04","dew_dun01","in_sphinx5","niflheim","moc_fild17","xmas_dun02","ice_dun03","kh_dun02","treasure02","moc_prydn2","pay_dun04","ra_san05","mosk_dun03","ama_dun03","thor_v03","gef_dun01","mjolnir_04","abyss_03","dic_dun03","prt_sewb4","pay_fild11","gef_dun02","gl_chyard","ra_fild03","ra_fild04","ve_fild01","ve_fild02","lou_dun03","prt_maze03","bra_dun02"; end; OnNPCKillEvent: //if (getgmlevel() >= .gm) end; // If gm = event wont happen if (strcharinfo(3) == instance_mapname("06guild_01") || strcharinfo(3) == instance_mapname("force_1-1")) end; if (getmonsterinfo(killedrid, MOB_MVPEXP)) { if (inarray(.t_maps$, strcharinfo(3)) != -1) { .@party_id = getcharid(1); if (.@party_id) { getpartymember .@party_id, 1; getpartymember .@party_id, 2; for (.@i = 0; .@i < $@partymembercount; .@i++) { if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } if (rand(100) < .chance) getitem .p_rwd[0], .p_rwd[1], .@partymemberaid[ rand(.@c) ]; .@announce_message$ = "[ System ] : Player ["+ strcharinfo(0) +"] of party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo(killedrid, MOB_NAME) +" at "+ strcharinfo(3); } else { if (rand(100) < .chance) getitem .s_rwd[0], .s_rwd[1]; .@announce_message$ = "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo(killedrid, MOB_NAME) +" alone at "+ strcharinfo(3); } MVPKills = MVPKills+1; dispbottom "---------------------------------------------------"; dispbottom "You killed a total of "+MVPKills+" MVP"+((MVPKills == 1)?"":"s")+"."; dispbottom "---------------------------------------------------"; addrid(2, 0, .@party_id); if (#mvpon) { dispbottom .@announce_message$; } } } end; }  
  20. Emistry's post in making the NPC hide after woe and unhide 30mins before woe was marked as the answer   
    you can try this.
    - script SupplyTrigger -1,{ OnInit: OnSat1930: OnSun1930: OnAgitEnd: OnAgitEnd2: if (gettime(DT_HOUR) == 19 && gettime(DT_MINUTE) >= 30) { hideoffnpc "Guild Supply#1"; hideoffnpc "Supply#2"; hideoffnpc "Guild Supply#3"; // hideoffnpc "Guild Supply#4"; } else { hideonnpc "Guild Supply#1"; hideonnpc "Supply#2"; hideonnpc "Guild Supply#3"; // hideonnpc "Guild Supply#4"; } end; } as long as the time is between 07:30PM to 07:59PM, the NPC will be enabled.
  21. Emistry's post in SQL Database was marked as the answer   
    your setting isn't configured correctly. conf\inter_athena.conf
    // MySQL Login server login_server_ip: 127.0.0.1 login_server_port: 3306 login_server_id: ragnarok login_server_pw: ragnarok login_server_db: ragnarok login_codepage: login_case_sensitive: no ipban_db_ip: 127.0.0.1 ipban_db_port: 3306 ipban_db_id: ragnarok ipban_db_pw: ragnarok ipban_db_db: ragnarok ipban_codepage: // MySQL Character server char_server_ip: 127.0.0.1 char_server_port: 3306 char_server_id: ragnarok char_server_pw: ragnarok char_server_db: ragnarok // MySQL Map Server map_server_ip: 127.0.0.1 map_server_port: 3306 map_server_id: ragnarok map_server_pw: ragnarok map_server_db: ragnarok // MySQL Log Database log_db_ip: 127.0.0.1 log_db_port: 3306 log_db_id: ragnarok log_db_pw: ragnarok log_db_db: ragnarok log_codepage: log_login_db: loginlog  
  22. Emistry's post in Question about @inventorylist_card[]. was marked as the answer   
    you can also use this to search for the card in a user inventory
    *checkequipedcard(<card id>) This function will return 1 if the card specified by its item ID number is inserted into any equipment they have in their inventory, currently equipped or not.  
  23. Emistry's post in @memo without having Warp skill was marked as the answer   
    https://github.com/rathena/rathena/blob/master/src/map/pc.cpp#L6300-L6305
  24. Emistry's post in Yggdrasil delay was marked as the answer   
    https://github.com/rathena/rathena/blob/master/db/re/item_db_usable.yml#L1154
    remove the delay
  25. Emistry's post in Antibot with problems please help me was marked as the answer   
    when your character are muted, it cant use command or chat.
    try replace the atcommand with these
    sc_start SC_MUTE, 10800000, 0; sc_end SC_MUTE;  
    if you want a better approach, then use the setpcblock instead.
    *setpcblock <type>,<state>{,<account ID>}; *getpcblock {<account ID>}; 'setpcblock' command prevents/allows the player from doing the given <type> of action according to the <state> during the player session (note: @reloadscript removes all <type> except PCBLOCK_IMMUNE). The <type> values are bit-masks, multiples of <type> can be added to change the player action. The action is blocked when the <state> is true, while false allows the action again. 'getpcblock' command return the bit-mask value of the currently enabled block flags. Available <type>: PCBLOCK_MOVE Prevent the player from moving. PCBLOCK_ATTACK Prevent the player from attacking. PCBLOCK_SKILL Prevent the player from using skills/itemskills. PCBLOCK_USEITEM Prevent the player from using usable items. PCBLOCK_CHAT Prevent the player from sending global/guild/party/whisper messages. PCBLOCK_IMMUNE Prevent the player from being hit by monsters. PCBLOCK_SITSTAND Prevent the player from sitting/standing. PCBLOCK_COMMANDS Prevent the player from using atcommands/charcommands. PCBLOCK_NPCCLICK Prevent the player from clicking/touching any NPC/shop/warp. PCBLOCK_EMOTION Prevent the player from using emotions. PCBLOCK_NPC Simulate NPC interaction. Useful for NPC with no mes window. Sum of PCBLOCK_MOVE|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_NPCCLICK. PCBLOCK_ALL Sum of all the flags. Examples: // Make the attached player invulnerable to monster (same as @monsterignore) setpcblock PCBLOCK_IMMUNE, true; // Prevents the attached player from attacking and using skills setpcblock PCBLOCK_ATTACK|PCBLOCK_SKILL, true; // Re-enables attack, skills and item use setpcblock PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM, false; // getpcblock related checks if (getpcblock() & PCBLOCK_IMMUNE) mes "You are invulnerable!"; if (getpcblock() & (PCBLOCK_MOVE|PCBLOCK_SITSTAND)) mes "You can't walk or sit."; if ((getpcblock() & (PCBLOCK_ATTACK|PCBLOCK_SKILL)) == 0) mes "You can attack and use skills."; if (getpcblock() & PCBLOCK_CHAT) mes "You can't chat.";  
×
×
  • Create New...