Jump to content

Emistry

Forum Moderator
  • Posts

    10015
  • Joined

  • Days Won

    396

Community Answers

  1. Emistry's post in block enemy clan in castle was marked as the answer   
    - script Sample -1,{ OnInit: .map$ = "prtg_cas01"; setmapflag(.map$, MF_LOADEVENT); end; OnPCLoadMapEvent: if (.map$ == strcharinfo(3) && !(agitcheck() || agitcheck2() || agitcheck3()) { .@castle_guild_id = getcastledata(.map$, CD_GUILD_ID); if (.@castle_guild_id && getcharid(2) != .@castle_guild_id) { mes "You aren't allow to enter this area."; close2; warp "SavePoint", 0, 0; } } end; }  
  2. Emistry's post in about isequippedcnt was marked as the answer   
    if (isequippedcnt(4318) == 1) { bonus3 bAutoSpell,"WZ_STORMGUST",2,20; bonus2 bAddEff,Eff_Freeze,100; } warp the script together.
  3. Emistry's post in item preview NPC was marked as the answer   
    input @itemid; if (getiteminfo(@itemid, ITEMINFO_ID) <= 0) { mes @itemid+" has failed!"; next; goto INTRO; }  
  4. Emistry's post in Help! MVP KIll by pajodex was marked as the answer   
    OnNPCKillEvent: if (getgmlevel() >= .gm ) end; // If gm = event wont happen if ( getmonsterinfo( killedrid, MOB_MVPEXP )) { for (.@a = 0; .@a < getarraysize(.t_maps$); .@a++) { if ( strcharinfo(3) == instance_mapname("06guild_01") ) end; if ( strcharinfo(3) == instance_mapname("force_1-1") ) end; if ( strcharinfo(3) == .t_maps$[.@a]) { if (rand(100) < .chance) getitem .s_rwd[0], .s_rwd[1]; announce "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" alone at "+ strcharinfo(3), bc_all; MVPKills = MVPKills+1; dispbottom "---------------------------------------------------"; dispbottom "You killed a total of "+MVPKills+" MVP"+((MVPKills == 1)?"":"s")+"."; dispbottom "---------------------------------------------------"; end; } } end; }  
  5. Emistry's post in How to Enable KOE Point shop was marked as the answer   
    https://rathena.org/board/topic/90173-item-and-point-shop/
    just add your item list
    //ADD YOUR ITEMS HERE - pointshop KOEPOINTS -1,#KOEPOINTS,501:1 and please use codebox to wrap your code next time.
     
  6. Emistry's post in guild storage log descending instead of extending upward was marked as the answer   
    SELECT .... FROM .... ORDER BY <column_name> update your SQL query to sort the ordering, or remove the ORDER BY ... DESC
  7. Emistry's post in showscript quest was marked as the answer   
    default come with the Quest System, not showscript(...)
  8. Emistry's post in Error on callfunction random box [ null ] was marked as the answer   
    function script specialbox { .@chance = rand(100); if (.@chance == 1) { // Super Rare Item 1% .@item_id = F_Rand(2199,1599); } else if (.@chance <= 2 && .@chance >= 11) { // Rare Items .@item_id = F_Rand(911,912); } else { // Common Items .@item_id = F_Rand(909,910); } announce "["+strcharinfo(0)+"] won a ["+getitemname(.@item_id)+"] from the Special Box.",0; return; } a simpler and more appropriate approach.
    you shouldn't create/declare a npc variable  within a function ....
    because it shared the value with everyone .. when you declare anything inside the function, it keep repeating the unnecessary process when other player access it again
  9. Emistry's post in Newbie question: how get an item ID by item name, in script? was marked as the answer   
    mes "What item are you looking for?"; input .@name$; .@qty = searchitem(.@matches[0],.@name$); mes "I found " + .@qty + " items:"; for (.@i = 0; .@i < .@qty; .@i++) // Display name (eg: "Apple[0]") mes getitemname(.@matches[.@i]) + "[" + getitemslots(.@matches[.@i]) + "]"; or better 
    getiteminfo("<item name>", ITEMINFO_ID)  
  10. Emistry's post in MOTD for specific party members was marked as the answer   
    addrid(2,0,getcharid(1)); dispbottom "[Monster of the Day]: Experience Gained Base:"+strmobinfo(6,.mobid)+" Job:"+strmobinfo(7,.mobid)+""; set BaseExp,(BaseExp+strmobinfo(6,.mobid)); set JobExp,(JobExp+strmobinfo(7,.mobid)); end; change into
    getpartymember getcharid(1), 2; .@mob_bexp = (getmonsterinfo(killedrid, MOB_BASEEXP) / $@partymembercount); .@mob_jexp = (getmonsterinfo(killedrid, MOB_JOBEXP) / $@partymembercount); .@current_level = BaseLevel; for (.@i = 0; .@i < $@partymembercount; .@i++) { if (attachrid($@partymemberaid[.@i])) { .@gap = (BaseLevel - .@current_level); if (.@gap >= -15 && .@gap <= 15) { dispbottom "[Monster of the Day]: Experience Gained Base:"+F_InsertComma(.@mob_bexp)+" Job:"+F_InsertComma(.@mob_jexp)+""; BaseExp += .@mob_bexp; JobExp += .@mob_jexp; } detachrid; } } end;  
  11. Emistry's post in SE Castle or WOE2 Emp breaker Announcer was marked as the answer   
    npc/guild2/agit_main_se.txt#L623
    change to
    announce strcharinfo(0)+" from the ["+getguildname(.@GID)+"] guild conquered the ["+.@region$+" "+charat(strnpcinfo(2),3)+"] stronghold of "+getcastlename(strnpcinfo(4))+"!",bc_all|bc_woe;  
  12. Emistry's post in Guild Pack NPC which can activate during WOE days was marked as the answer   
    OnInit: OnClock1700: OnClock1830: hideonnpc strnpcinfo(3); if (gettime(DT_DAYOFWEEK) == TUESDAY || gettime(DT_DAYOFWEEK) == THURSDAY || gettime(DT_DAYOFWEEK) == SUNDAY ) { if (gettime(DT_HOUR) == 17 || (gettime(DT_HOUR) == 18 && gettime(DT_MINUTE) <= 30)) hideoffnpc strnpcinfo(3); } end;  
  13. Emistry's post in dispbottom not correct - Edited Mining Script was marked as the answer   
    dispbottom "You've successfully mined the ore."; if (MineExp < 100000) { if (@minechance >= 12) .@mine_exp = 3; else if (@minechance >= 7) .@mine_exp = 2; else if (@minechance >= 1) .@mine_exp = 1; } if (.@mine_exp) { MineExp += .@mine_exp; dispbottom "You've gained "+.@mine_exp+" Mining Exp."; }  
  14. Emistry's post in Donate once a day only was marked as the answer   
    when player try to donate, add this validation
    if (#motd_daily_limit == gettime(DT_YYYYMMDD)) { mes "[Monster Of The Day]"; mes "You have already donated today. Come back again tomorrow."; close; } when they success donate, add this
    mes "[Monster Of The Day]"; mes "Zeny has succesfully transfered."; Zeny -= .@motd_zeny; $motd_zeny += .@motd_zeny; $motd_diff -= .@motd_zeny; #motd_daily_limit = gettime(DT_YYYYMMDD); // <----- THIS LINE  
  15. Emistry's post in Guild Pack NPC which can activate during WOE days was marked as the answer   
    prontera,155,181,5 script Sample 757,{ if (getcharid(2) && #GUILD_PACK_CD != gettime(DT_YYYYMMDD)) { #GUILD_PACK_CD = gettime(DT_YYYYMMDD); getitem 30005, 1; } end; OnInit: OnHour00: if (gettime(DT_DAYOFWEEK) != TUESDAY && gettime(DT_DAYOFWEEK) != THURSDAY && gettime(DT_DAYOFWEEK) != SUNDAY ) { hideonnpc strnpcinfo(3); } end; } - Id: 30005 AegisName: G-Pack Script: | rentitem 1201, 86400; rentitem 1202, 86400; rentitem 1203, 86400;  
  16. Emistry's post in GOLD ROOM POINTS NOT WORKING 2018 CLIENT was marked as the answer   
    if (getmapxy(@mapname$,@mapx,@mapy,0) == -1) goto L_Finish; change to
    if (getmapxy(@mapname$, @mapx, @mapy, BL_PC) == -1) goto L_Finish;  
  17. Emistry's post in Input amount on vote npc was marked as the answer   
    try change
    mes "Proceed?"; if(select("Yes:No")==1) { set .@points,getPoints(getcharid(3)); if(.@points>=.@rpoints) { next; mes .npcname$; updatePoints(getcharid(3),.@rpoints); getitem .@ritemid,.@rquantity; mes "Here you go!. Thank you for voting. Don't forget to vote again. :D"; } else mes "Sorry, you do not have enough points for this item."; } into
    mes "Enter an Amount and proceed:"; input .@amount, 1; if(select("Yes:No")==1) { set .@points,getPoints(getcharid(3)); if(.@points>= (.@rpoints * .@amount)) { next; mes .npcname$; updatePoints(getcharid(3),(.@rpoints * .@amount)); getitem .@ritemid,(.@rquantity * .@amount); mes "Here you go!. Thank you for voting. Don't forget to vote again. :D"; } else mes "Sorry, you do not have enough "+(.@rpoints * .@amount)+" points for this item."; }  
  18. Emistry's post in Tournament Team DB Registration was marked as the answer   
    if( query_sql( "SELECT `team_name` FROM `tournament` WHERE `team_name` = '"+escape_sql( .@team_name$ )+"'", .@team_name$ ) ){ you need to assign a variable to store the data you query from database.
  19. Emistry's post in can you chang script was marked as the answer   
    prontera,164,173,3 script Refiner 826,{ mes "^3355FF[%100 Refiner]^000000"; mes "This Lets you refine your item to the max"; mes " You Need "+.amount+"x "+getitemname(.item_id)+" to use my Service"; next; mes "Choose the item to refine"; mes "Choose Wisely"; mes "Dont Ask For refine"; mes "On GameMasters"; mes "Think Before you refine an item"; next; for (.@i = 0; .@i < .eqi_size; .@i++) { if (getequipid(.eqi[.@i]) != -1) .@menu$ = .@menu$ + F_getpositionname(.eqi[.@i]) + " - " +getitemname(getequipid(.eqi[.@i])); .@menu$ += ":"; } .@i = select(.@menu$) - 1; .@refine = getequiprefinerycnt(.eqi[.@i]); if (countitem(.item_id) < .amount) { mes "You didnt have enough "+.amount+"x "+getitemname(.item_id); } else if (.@refine >= 20) { mes "Your item already reached max refine."; } else { delitem .item_id, .amount; if (.@refine < 10) { successrefitem .eqi[.@i], (10 - .@refine); } else { successrefitem .eqi[.@i]; } announce "["+strcharinfo(0)+"], Thanks for using my great service :)).", bc_self; } close; OnInit: .item_id = 7179; .amount = 10; setarray .eqi, EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R; .eqi_size = getarraysize(.eqi); end; }  
  20. Emistry's post in Reset Stats per status was marked as the answer   
    may try something like this
    prontera,155,181,5 script Sample 757,{ for (.@stat = bStr; .@stat <= bLuk; .@stat++) .@param[.@stat - bStr] = readparam(.@stat); mes "Select the stats to reset to 1."; do { .@menu$ += "Str - "+ .@param[0] + ":"; .@menu$ += "Vit - "+ .@param[1] + ":"; .@menu$ += "Int - "+ .@param[2] + ":"; .@menu$ += "Agi - "+ .@param[3] + ":"; .@menu$ += "Dex - "+ .@param[4] + ":"; .@menu$ += "Luk - "+ .@param[5] + ":"; .@menu$ += "Reset"; .@i = select(.@menu$); .@param[.@i] = 1; } while (.@i <= 6); resetstatus; for (.@stat = bStr; .@stat <= bLuk; .@stat++) { while (readparam(.@stat) < .@param[.@stat - bStr]) statusup .@stat; } end; }  
  21. Emistry's post in Help Ticket Gambler was marked as the answer   
    https://pastebin.com/f4hQEXX2
    you didnt add the announcement at the part it get the reward.
  22. Emistry's post in for()+deletearray, confusion question! was marked as the answer   
    there exists another way for you, in case you afraid to mess up with the index value. 
    for (.@i = getarraysize(.@tmp_magic_shop) - 1; .@i >= 0; .@i--) if(!.@tmp_magic_shop[.@i]) deletearray .@tmp_magic_shop[.@i],1; start looping from the end of the array to the front...
  23. Emistry's post in atcommand @request modification for improvement was marked as the answer   
    can try something like this too.
    https://pastebin.com/DWbvRkhi
  24. Emistry's post in Rathena 2014 files was marked as the answer   
    browse and find the commit in year 2014 

  25. Emistry's post in Respawn for MVP time was marked as the answer   
    just find all your mvp respawn script and replace with each of these
    abbey03,0,0,0,0 boss_monster Beelzebub 1873,1,7200000,0,1 abyss_03,0,0,0,0 boss_monster Detardeurus 1719,1,7200000,0,0 ama_dun03,0,0,0,0 boss_monster Samurai Specter 1492,1,7200000,0,0 anthell02,0,0,0,0 boss_monster Maya 1147,1,7200000,0,1 ayo_dun02,150,90,15,30 boss_monster Lady Tanee 1688,1,7200000,0,0 beach_dun,0,0,0,0 boss_monster Tao Gunka 1583,1,7200000,0,0 ein_dun02,0,0,0,0 boss_monster RSX-0806 1623,1,7200000,0,0 gef_dun01,0,0,0,0 boss_monster Dracula 1389,1,7200000,0,1 gef_dun02,0,0,0,0 boss_monster Doppelganger 1046,1,7200000,0,1 gl_chyard,0,0,0,0 boss_monster Dark Lord 1272,1,7200000,0,1 gld_dun01,0,0,0,0 boss_monster Eddga 1115,1,7200000,0,1 gld_dun02,0,0,0,0 boss_monster Doppelganger 1046,1,7200000,0,1 gld_dun03,0,0,0,0 boss_monster Maya 1147,1,7200000,0,1 gld_dun04,0,0,0,0 boss_monster Dark Lord 1272,1,7200000,0,1 gon_dun03,0,0,0,0 boss_monster Evil Snake Lord 1418,1,7200000,0,0 in_sphinx5,0,0,0,0 boss_monster Pharaoh 1157,1,7200000,0,1 jupe_core,0,0,0,0 boss_monster Vesper 1685,1,7200000,0,1 kh_dun02,0,0,0,0 boss_monster Kiel D-01 1734,1,7200000,7200000,0 lhz_dun02,0,0,0,0 boss_monster Egnigem Cenia 1658,1,7200000,0,1 lou_dun03,0,0,0,0 boss_monster White Lady 1630,1,7200000,0,1 moc_pryd04,0,0,0,0 boss_monster Osiris 1038,1,7200000,0,0 moc_pryd06,102,85,1,1 boss_monster Amon Ra 1511,1,7200000,0,0 mosk_dun03,207,221,5,5 boss_monster Gopinich 1885,1,7200000,0,1 odin_tem03,0,0,0,0 boss_monster Valkyrie Randgris 1751,1,7200000,0,1 pay_dun04,120,115,0,0 boss_monster Moonlight Flower 1150,1,7200000,0,1 prt_maze03,0,0,0,0 boss_monster Baphomet 1039,1,7200000,0,1 prt_sewb4,0,0,0,0 boss_monster Golden Thief Bug 1086,1,7200000,0,1 ra_san05,0,0,0,0 boss_monster Gloom Under Night 1768,1,7200000,0,0 thor_v03,0,0,0,0 boss_monster Ifrit 1832,1,7200000,0,0 treasure02,101,151,8,8 boss_monster Drake 1112,1,7200000,0,1 tur_dun04,99,93,20,20 boss_monster Turtle General 1312,1,7200000,0,0 xmas_dun02,0,0,0,0 boss_monster Stormy Knight 1251,1,7200000,0,0 gef_fild02,0,0,0,0 boss_monster Orc Hero 1087,1,7200000,0,1 gef_fild10,0,0,0,0 boss_monster Orc Lord 1190,1,7200000,0,0 gef_fild14,0,0,0,0 boss_monster Orc Hero 1087,1,7200000,0,1 xmas_fild01,0,0,0,0 boss_monster Garm 1252,1,7200000,0,1 mjolnir_04,0,0,0,0 boss_monster Mistress 1059,1,7200000,0,1 moc_fild17,0,0,0,0 boss_monster Phreeoni 1159,1,7200000,0,1 pay_fild11,0,0,0,0 boss_monster Eddga 1115,1,7200000,0,1 ra_fild02,0,0,0,0 boss_monster Atroce 1785,1,7200000,0,1 ra_fild03,0,0,0,0 boss_monster Atroce 1785,1,7200000,0,1 ra_fild04,0,0,0,0 boss_monster Atroce 1785,1,7200000,0,1 ve_fild01,0,0,0,0 boss_monster Atroce 1785,1,7200000,0,0 ve_fild02,120,55,50,50 boss_monster Atroce 1785,1,7200000,0,0 abbey02,236,78,21,18 boss_monster Fallen Bishop 1871,1,7200000,0,1 abbey03,0,0,0,0 boss_monster Beelzebub 1873,1,7200000,0,1 abyss_03,0,0,0,0 boss_monster Detardeurus 1719,1,7200000,0,0 ama_dun03,0,0,0,0 boss_monster Samurai Specter 1492,1,7200000,0,0 anthell02,0,0,0,0 boss_monster Maya 1147,1,7200000,0,1 ayo_dun02,150,90,15,30 boss_monster Lady Tanee 1688,1,7200000,0,0 beach_dun,0,0,0,0 boss_monster Tao Gunka 1583,1,7200000,0,0 bra_dun02,0,0,0,0 boss_monster Boitata 2068,1,7200000,0,1 c_tower3_,0,0,0,0 boss_monster Time Holder 3074,1,7200000,0,0 dew_dun01,0,0,0,0 boss_monster Leak 2156,1,7200000,0,0 dic_dun02,0,0,0,0 boss_monster Scaraba Queen 2087,1,7200000,0,0 dic_dun03,0,0,0,0 boss_monster Gold Queen Scaraba 2165,1,7200000,0,0 ein_dun02,0,0,0,0 boss_monster RSX-0806 1623,1,7200000,0,0 gef_dun01,0,0,0,0 boss_monster Dracula 1389,1,7200000,0,1 gef_dun02,0,0,0,0 boss_monster Doppelganger 1046,1,7200000,0,1 gl_chyard,0,0,0,0 boss_monster Dark Lord 1272,1,7200000,0,1 gld_dun01,0,0,0,0 boss_monster Moonlight Flower 1150,1,7200000,0,1,1 gld_dun01_2,0,0,0,0 boss_monster Eddga 1115,1,7200000,0,1,1 gld2_pay,0,0,0,0 boss_monster General Daehyun 2253,1,7200000,0,1,1 gld_dun02,0,0,0,0 boss_monster Mistress 1059,1,7200000,0,1,1 gld_dun02_2,0,0,0,0 boss_monster Maya 1147,1,7200000,0,1,1 gld2_ald,0,0,0,0 boss_monster Gioia 2251,1,7200000,0,1,1 gld_dun03,0,0,0,0 boss_monster Baphomet 1039,1,7200000,0,1,1 gld_dun03_2,0,0,0,0 boss_monster Atroce 1785,1,7200000,0,1,1 gld2_prt,0,0,0,0 boss_monster Pyuriel 2249,1,7200000,0,1,1 gld_dun04,0,0,0,0 boss_monster Doppelganger 1046,1,7200000,0,1,1 gld_dun04_2,0,0,0,0 boss_monster Dark Lord 1272,1,7200000,0,1,1 gld2_gef,0,0,0,0 boss_monster Dead Guardian Kades 2255,1,7200000,0,1,1 gon_dun03,0,0,0,0 boss_monster Evil Snake Lord 1418,1,7200000,0,0 in_sphinx5,0,0,0,0 boss_monster Pharaoh 1157,1,7200000,0,1 iz_dun05,0,0,0,0 boss_monster Kraken 2202,1,7200000,1800000,0 jupe_core,0,0,0,0 boss_monster Vesper 1685,1,7200000,0,1 kh_dun02,0,0,0,0 boss_monster Kiel D-01 1734,1,7200000,0,0 lhz_dun02,0,0,0,0 boss_monster Egnigem Cenia 1658,1,7200000,0,1 lou_dun03,0,0,0,0 boss_monster White Lady 1630,1,7200000,0,1 moc_pryd04,0,0,0,0 boss_monster Osiris 1038,1,7200000,0,0 moc_pryd06,102,85,1,1 boss_monster Amon Ra 1511,1,7200000,0,0 moc_prydn2,102,85,1,1 boss_monster Nightmare Amon Ra 2362,1,7200000,0,0 mosk_dun03,207,221,5,5 boss_monster Gopinich 1885,1,7200000,0,1 odin_tem03,0,0,0,0 boss_monster Valkyrie Randgris 1751,1,7200000,0,1 pay_dun04,120,115,0,0 boss_monster Moonlight Flower 1150,1,7200000,0,1 prt_maze03,0,0,0,0 boss_monster Baphomet 1039,1,7200000,0,1 prt_sewb4,0,0,0,0 boss_monster Golden Thief Bug 1086,1,7200000,0,1 ra_san05,0,0,0,0 boss_monster Gloom Under Night 1768,1,7200000,0,0 thor_v03,0,0,0,0 boss_monster Ifrit 1832,1,7200000,0,0 treasure02,101,151,8,8 boss_monster Drake 1112,1,7200000,0,1 tur_dun04,99,93,20,20 boss_monster Turtle General 1312,1,7200000,0,0 xmas_dun02,0,0,0,0 boss_monster Stormy Knight 1251,1,7200000,0,0 gef_fild03,0,0,0,0 boss_monster Orc Hero 1087,1,7200000,0,1 gef_fild10,0,0,0,0 boss_monster Orc Lord 1190,1,7200000,0,0 xmas_fild01,0,0,0,0 boss_monster Garm 1252,1,7200000,0,1 mjolnir_04,0,0,0,0 boss_monster Mistress 1059,1,7200000,0,1 moc_fild17,0,0,0,0 boss_monster Phreeoni 1159,1,7200000,0,1 moc_fild22,0,0,0,0 boss_monster Wounded Morroc 1917,1,7200000,0,0 pay_fild10,0,0,0,0 boss_monster Eddga 1115,1,7200000,0,1 ra_fild03,0,0,0,0 boss_monster Atroce 1785,1,7200000,0,1 ra_fild04,0,0,0,0 boss_monster Atroce 1785,1,7200000,0,1 ve_fild01,0,0,0,0 boss_monster Atroce 1785,1,7200000,0,0 ve_fild02,120,55,50,50 boss_monster Atroce 1785,1,7200000,0,0  
×
×
  • Create New...