Jump to content

Emistry

Forum Moderator
  • Posts

    10013
  • Joined

  • Days Won

    396

Community Answers

  1. Emistry's post in Allowing only 3 same gepard ID in a map was marked as the answer   
    if(.@j > 3) { dispbottom "Sorry, only 3 IDs with same Unique ID are allowed on this map."; sleep2 500; dispbottom "Warping you back to Savepoint now..."; sleep2 1000; warp "SavePoint",0,0; }  
  2. Emistry's post in how to make endless tower was marked as the answer   
    5@tower,82,112,2 script #102FShadowDust1 844,{ end; OnInstanceInit: donpcevent instance_npcname("#102FShadowDust")+"::OnEnable"; monster instance_mapname("5@tower"),83,85,"Entweihen Crothen",1957,1,instance_npcname("#102FShadowDust1")+"::OnMyMobDead"; end; OnMyMobDead: set .@map$, instance_mapname("5@tower"); set .@mob_dead_num,mobcount(.@map$,instance_npcname("#102FShadowDust1")+"::OnMyMobDead"); if (.@mob_dead_num < 1) { mapannounce .@map$, "Mysterious Voice: Who are you to dare intrude upon my sanctuary?!",bc_map,"0xffff00"; donpcevent instance_npcname("#102FShadowDust")+"::OnDisable"; donpcevent instance_npcname("Lucid Crystal#102")+"::OnEnable"; enablenpc "Devil Square Guardian#2"; //SetItemPartyInMap in_102floor 100 hideoffnpc instance_npcname("et_reward_npc"); // <------- ADD THIS } end; } 5@tower,83,85,4 script et_reward_npc 406,{ // rewards... end; OnInstanceInit: hideonnpc strnpcinfo(3); end; }  
  3. Emistry's post in Dispel Buffs on entering portal or warp by priest but not on teleport was marked as the answer   
    you can try something like this.
    OnPCLoadMapEvent: if (inarray(.Maps$, strcharinfo(3)) != -1 && @current_map$ != strcharinfo(3)) { //sc_end sc_spirit; sc_end sc_gospel; sc_end SC_POEMBRAGI; sc_end SC_APPLEIDUN; sc_end SC_ASSNCROS; sc_end SC_WHISTLE; //sc_end 37; // holy weapon //sc_end 38; // holy armor sc_end 187; // increase all stat sc_end 194; // increase hit sc_end 196; // increase flee sc_end 198; // max hp increase sc_end 199; // max sp increase sc_end 200; // attach strength sc_end 202; // increase def sc_end 214; // SC_SCRESIST sc_end 175; // POEMBRAGI sc_end 181; // SERVICE4U //specialeffect2 235; @current_map$ = strcharinfo(3); addtimer 3000, strnpcinfo(3)+"::OnCheck"; } end; OnCheck: if (@current_map$ != "") { if (@current_map$ == strcharinfo(3)) addtimer 3000, strnpcinfo(3)+"::OnCheck"; else @current_map$ = ""; } end;  
  4. Emistry's post in Information about the quest_warpra script was marked as the answer   
    using the left/right shift operators to binary mathematical operations as they have two important qualities: Left-shifting a bitmask once multiplies by two. Right-shifting once divides by two.
    assuming the following scenario
    1 = map_1 2 = map_2 4 = map_3 8 = map_4 16 = map_5 32 = map_6 64 = map_7 when you sum up the value for 1 + 2 + 4 + 8 = 15 (you have access to map1 , map2, map3, map4)
    when you sum up the value for 4 + 16 + 64 = 84 (you have access to map3, map5, map7)
    when you sum up all the values , then you have access to all map above.
    you could only store up to total value of 2147483647
  5. Emistry's post in Error Function cloaknpc was marked as the answer   
    replace with the new cloakonnpc/cloakoffnpc instead.
    https://github.com/rathena/rathena/commit/de80c5aab61eff6996a5e4c94d4a5a868eb18ca4
  6. Emistry's post in Apprentice Craftsman was marked as the answer   
    change into these if you want to keep the random item bonus.
    *getitem3 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>{,<account ID>}; *getitem3 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>{,<account ID>};  
  7. Emistry's post in MVP Doesn't Spawn in different map was marked as the answer   
    // Add the maps for your world boss event here. If you only want one, just add one. setarray .WBMAPS$, "prontera"; read the configuration part
  8. Emistry's post in Anti MVP Portal Lure was marked as the answer   
    try this
    - script Sample -1,{ end; OnTouchNPC: .@gid = getattachedrid(); if (.@gid) { getunitdata .@gid, .@array; if (getmonsterinfo(.@array[UMOB_CLASS], MOB_MVPEXP)) unitwarp 0,"this", -1, -1; } end; }  
  9. Emistry's post in Would it be possible to create an npc to see how many mvps cards have already been dropped on the server? was marked as the answer   
    may try something like this.
    update the sql to retrieve from the correct table and fields.
  10. Emistry's post in Disable Homunculus was marked as the answer   
    - 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
  11. Emistry's post in R> Sql Mall was marked as the answer   
    @joelolopez
    Just add the remaining item type under the OnInit label.. and duplicate more of the shop npcs ....
     
     
    Example 
    https://pastebin.com/2MmTzS7X
     
    Results :
    [Debug]: script debug : 0 110023607 : Loaded NPC Shop for Item Type 0 - 433 Item(s) [Debug]: script debug : 0 110023607 : Loaded NPC Shop for Item Type 2 - 1071 Item(s) [Debug]: script debug : 0 110023607 : Loaded NPC Shop for Item Type 3 - 1970 Item(s) [Debug]: script debug : 0 110023607 : Loaded NPC Shop for Item Type 4 - 1123 Item(s) [Debug]: script debug : 0 110023607 : Loaded NPC Shop for Item Type 5 - 3456 Item(s) [Debug]: script debug : 0 110023607 : Loaded NPC Shop for Item Type 6 - 1107 Item(s) [Debug]: script debug : 0 110023607 : Loaded NPC Shop for Item Type 7 - 162 Item(s) [Debug]: script debug : 0 110023607 : Loaded NPC Shop for Item Type 8 - 139 Item(s) [Debug]: script debug : 0 110023607 : Loaded NPC Shop for Item Type 10 - 208 Item(s) [Debug]: script debug : 0 110023607 : Loaded NPC Shop for Item Type 11 - 276 Item(s) [Debug]: script debug : 0 110023607 : Loaded NPC Shop for Item Type 18 - 1156 Item(s) adjust the NPC coordinate yourself.
  12. Emistry's post in R> Sql Mall was marked as the answer   
    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
  13. Emistry's post in Storage npc was marked as the answer   
    try
    query_sql( "SELECT `account_id`,COUNT( `nameid` ) AS `total` FROM `storage` WHERE `total` >= 400 GROUP BY `account_id` ORDER BY `total` DESC",.@aid,.@total ); .@aid_size = getarraysize( .@aid ); for ( .@i = 0; .@i < .@aid_size; .@i++ ) mes .@aid[.@i]+" - "+.@total[.@i]+" items"; close;
  14. Emistry's post in Shop Items Using Item was marked as the answer   
    this ?
    https://rathena.org/board/topic/90173-item-and-point-shop/
    or
    https://github.com/rathena/rathena/pull/6508
  15. Emistry's post in Show player map on npc was marked as the answer   
    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; }  
  16. Emistry's post in Endless Tower was marked as the answer   
    if (instance_create(.@md_name$) < 0) { mes "Party Name: "+ getpartyname(.@party_id); mes "Party Leader: "+strcharinfo(0); mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!"; close; } try change to
    if (.instance_id) { if (instance_live_info(ILI_MODE, .instance_id) != -1) { mes "Someone already started before you."; mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!"; close; } } .@instance_id = instance_create(.@md_name$); if (.@instance_id < 0) { mes "Party Name: "+ getpartyname(.@party_id); mes "Party Leader: "+strcharinfo(0); mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!"; close; } .instance_id = .@instance_id;  
  17. Emistry's post in How to set kill quest? was marked as the answer   
    OnNPCKillEvent: if(!dagger) end; Change to
    OnNPCKillEvent: if(!dagger || dagger_quest2 == 1) end;  
  18. Emistry's post in SQL DB Error need help pls was marked as the answer   
    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
  19. Emistry's post in Euphy's quest npc was marked as the answer   
    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.
  20. Emistry's post in Help with Drop chance, modified arena was marked as the answer   
    if (rand(100) < 10) getitem 512, 100; // 10%  
  21. Emistry's post in Repair 1 broken item from menu. was marked as the answer   
    *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);  
  22. Emistry's post in how to make when open item [ like egg gatcha ] will announche what user get the item ? was marked as the answer   
    .@item_id = groupranditem(IG_Taming); getitem .@item_id, 1; announce "["+strcharinfo(0)+" obtained "+getitemname(.@item_id)+"]", bc_all;  
  23. Emistry's post in Unknown Column: account_id in field list was marked as the answer   
    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
     
  24. Emistry's post in Help with KOE Auto reward, reward script not working was marked as the answer   
    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
     
     
  25. Emistry's post in Autopots was marked as the answer   
    start with readying the info inside the script.
    npc/custom/etc/autopot.txt#L25-L36
    all the info is there.
×
×
  • Create New...