Jump to content

Emistry

Forum Moderator
  • Posts

    9,669
  • Joined

  • Days Won

    289

Community Answers

  1. Emistry's post in disable bonus during woe was marked as the answer   
    Script: | bonus bBaseAtk,2600; if (!agitcheck() && !agitcheck2() && !agitcheck3()) bonus2 bHPDrainRate, 1000, 100; just change your item_db instead of adding another script function
  2. Emistry's post in disable bonus during woe was marked as the answer   
    Script: | bonus bBaseAtk,2600; if (!agitcheck() && !agitcheck2() && !agitcheck3()) bonus2 bHPDrainRate, 1000, 100; just change your item_db instead of adding another script function
  3. Emistry's post in Instances command for creating a new dungeon. was marked as the answer   
    instance_db.yml
    - Id: 1 Name: Endless Tower TimeLimit: 14400 Enter: Map: [email protected] X: 50 Y: 355 NPC script
    prontera,155,181,5 script Sample 757,{ [email protected]_name$ = "Endless Tower"; if (!is_party_leader()) end; switch(select( "Create", "Enter", "Destroy" )) { case 1: instance_create([email protected]_name$, IM_PARTY); break; case 2: switch(instance_enter([email protected]_name$)) { case IE_NOMEMBER: mes "ERROR: Party not found."; break; case IE_NOINSTANCE: mes "ERROR: Party does not have an instance."; break; case IE_OTHER: mes "ERROR: Unknown error."; break; default: break; } break; case 3: instance_destroy; break; } close; }  
  4. 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()) { [email protected]_guild_id = getcastledata(.map$, CD_GUILD_ID); if ([email protected]_guild_id && getcharid(2) != [email protected]_guild_id) { mes "You aren't allow to enter this area."; close2; warp "SavePoint", 0, 0; } } end; }  
  5. 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.
  6. 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; }  
  7. 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 ([email protected] = 0; [email protected] < getarraysize(.t_maps$); [email protected]++) { if ( strcharinfo(3) == instance_mapname("06guild_01") ) end; if ( strcharinfo(3) == instance_mapname("force_1-1") ) end; if ( strcharinfo(3) == .t_maps$[[email protected]]) { 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; }  
  8. 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.
     
  9. 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
  10. Emistry's post in showscript quest was marked as the answer   
    default come with the Quest System, not showscript(...)
  11. Emistry's post in Error on callfunction random box [ null ] was marked as the answer   
    function script specialbox { [email protected] = rand(100); if ([email protected] == 1) { // Super Rare Item 1% [email protected]_id = F_Rand(2199,1599); } else if ([email protected] <= 2 && [email protected] >= 11) { // Rare Items [email protected]_id = F_Rand(911,912); } else { // Common Items [email protected]_id = F_Rand(909,910); } announce "["+strcharinfo(0)+"] won a ["+getitemname([email protected]_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
  12. 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 [email protected]$; [email protected] = searchitem([email protected][0],[email protected]$); mes "I found " + [email protected] + " items:"; for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) // Display name (eg: "Apple[0]") mes getitemname([email protected][[email protected]]) + "[" + getitemslots([email protected][[email protected]]) + "]"; or better 
    getiteminfo("<item name>", ITEMINFO_ID)  
  13. 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; [email protected]_bexp = (getmonsterinfo(killedrid, MOB_BASEEXP) / [email protected]); [email protected]_jexp = (getmonsterinfo(killedrid, MOB_JOBEXP) / [email protected]); [email protected]_level = BaseLevel; for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { if (attachrid([email protected][[email protected]])) { [email protected] = (BaseLevel - [email protected]_level); if ([email protected] >= -15 && [email protected] <= 15) { dispbottom "[Monster of the Day]: Experience Gained Base:"+F_InsertComma([email protected]_bexp)+" Job:"+F_InsertComma([email protected]_jexp)+""; BaseExp += [email protected]_bexp; JobExp += [email protected]_jexp; } detachrid; } } end;  
  14. 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([email protected])+"] guild conquered the ["[email protected]$+" "+charat(strnpcinfo(2),3)+"] stronghold of "+getcastlename(strnpcinfo(4))+"!",bc_all|bc_woe;  
  15. 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;  
  16. 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) [email protected]_exp = 3; else if (@minechance >= 7) [email protected]_exp = 2; else if (@minechance >= 1) [email protected]_exp = 1; } if ([email protected]_exp) { MineExp += [email protected]_exp; dispbottom "You've gained "[email protected]_exp+" Mining Exp."; }  
  17. 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 -= [email protected]_zeny; $motd_zeny += [email protected]_zeny; $motd_diff -= [email protected]_zeny; #motd_daily_limit = gettime(DT_YYYYMMDD); // <----- THIS LINE  
  18. 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;  
  19. 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;  
  20. Emistry's post in Input amount on vote npc was marked as the answer   
    try change
    mes "Proceed?"; if(select("Yes:No")==1) { set [email protected],getPoints(getcharid(3)); if([email protected]>[email protected]) { next; mes .npcname$; updatePoints(getcharid(3),[email protected]); getitem [email protected],[email protected]; 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 [email protected], 1; if(select("Yes:No")==1) { set [email protected],getPoints(getcharid(3)); if([email protected]>= ([email protected] * [email protected])) { next; mes .npcname$; updatePoints(getcharid(3),([email protected] * [email protected])); getitem [email protected],([email protected] * [email protected]); mes "Here you go!. Thank you for voting. Don't forget to vote again. :D"; } else mes "Sorry, you do not have enough "+([email protected] * [email protected])+" points for this item."; }  
  21. 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( [email protected]_name$ )+"'", [email protected]_name$ ) ){ you need to assign a variable to store the data you query from database.
  22. 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 ([email protected] = 0; [email protected] < .eqi_size; [email protected]++) { if (getequipid(.eqi[[email protected]]) != -1) [email protected]$ = [email protected]$ + F_getpositionname(.eqi[[email protected]]) + " - " +getitemname(getequipid(.eqi[[email protected]])); [email protected]$ += ":"; } [email protected] = select([email protected]$) - 1; [email protected] = getequiprefinerycnt(.eqi[[email protected]]); if (countitem(.item_id) < .amount) { mes "You didnt have enough "+.amount+"x "+getitemname(.item_id); } else if ([email protected] >= 20) { mes "Your item already reached max refine."; } else { delitem .item_id, .amount; if ([email protected] < 10) { successrefitem .eqi[[email protected]], (10 - [email protected]); } else { successrefitem .eqi[[email protected]]; } 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; }  
  23. 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 ([email protected] = bStr; [email protected] <= bLuk; [email protected]++) [email protected][[email protected] - bStr] = readparam([email protected]); mes "Select the stats to reset to 1."; do { [email protected]$ += "Str - "+ [email protected][0] + ":"; [email protected]$ += "Vit - "+ [email protected][1] + ":"; [email protected]$ += "Int - "+ [email protected][2] + ":"; [email protected]$ += "Agi - "+ [email protected][3] + ":"; [email protected]$ += "Dex - "+ [email protected][4] + ":"; [email protected]$ += "Luk - "+ [email protected][5] + ":"; [email protected]$ += "Reset"; [email protected] = select([email protected]$); [email protected][[email protected]] = 1; } while ([email protected] <= 6); resetstatus; for ([email protected] = bStr; [email protected] <= bLuk; [email protected]++) { while (readparam([email protected]) < [email protected][[email protected] - bStr]) statusup [email protected]; } end; }  
  24. 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.
  25. 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 ([email protected] = getarraysize([email protected]_magic_shop) - 1; [email protected] >= 0; [email protected]) if([email protected]_magic_shop[.@i]) deletearray [email protected]_magic_shop[[email protected]],1; start looping from the end of the array to the front...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.