Jump to content

n0tttt

Members
  • Posts

    303
  • Joined

  • Days Won

    12

Community Answers

  1. n0tttt's post in donpcevent with passing rid was marked as the answer   
    Either integrate the part onto the script or use close2 + doevent.
  2. n0tttt's post in [Error]: buildin_getarg: [NPC MeowMeow-GX#1] was marked as the answer   
    Test changing:
    .@fromid = getarg(1); .@fromname$ = getarg(2); .@toid = getarg(3); .@toname$ = getarg(4); to:
    .@fromid = getarg(1); .@fromname$ = getarg(0); .@toid = getarg(3); .@toname$ = getarg(2);  
  3. n0tttt's post in adding auto warp when freebies are recived was marked as the answer   
    core1,156,123,3 script Freebies NPC 4_GEFFEN_10,{ soundeffect "freebies.wav",0; cutin "igu03",2; set .@n$, "[Freebies NPC]"; setarray .@rwd[0],22808,1,7037,200,13973,100,40105,1,4399,1,4302,1,4407,1,4419,1,4441,1,4128,1,4330,1,4047,2,4174,2,4302 ,1; // Rewards: <item id>,<item amount> query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$); if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0) { mes .@n$; mes "I'm sorry, the rewards are exclusively for new players."; close2; cutin "",255; end; } mes .@n$; mes "Welcome! Here are some free gifts"; mes "For newcomers:"; announce "Ragnarok : Please welcome [ "+strcharinfo(0)+" ] !!",0; for ( set .@size, getarraysize(.@rwd); .@i < .@size;set .@i, .@i + 2 ) mes .@rwd[.@i+1] + " x " + getitemname(.@rwd[.@i]); close2; set #NewbieGift, 1; setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1; for ( set .@size, getarraysize(.@rwd); .@i < .@size;set .@i, .@i + 2 ) getitem .@rwd[.@i], .@rwd[.@i+1]; cutin "",255; save "prontera",156,161,2,2; warp "prontera",156,161; end; OnInit: waitingroom "Freebies v2",0; end; }  
  4. n0tttt's post in Custom Enchanter was marked as the answer   
    You can try this script by Sehrentos, it's one of the most configurable enchanters I've seen:
    //===== rAthena Script ======================================= //= Enchant NPC //===== By: ================================================== //= Sehrentos //===== Current Version: ===================================== //= 1.2 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Enchant player's equipment. Support multiple enchants. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.1 Remove enchant option. //= 1.2 Added .max_enchant option. //============================================================ // shop/cashshop/itemshop/pointshop - shop enc_atk -1,501:300; - shop enc_def -1,501:300; - shop enc_stats -1,501:300; prt_in,65,68,4 script Enchant#prt1 4_M_MERCAT1,{ disable_items; switch(select("Attack:Defence:Stats:Remove")) { case 1: @shop_name$ = "enc_atk"; break; case 2: @shop_name$ = "enc_def"; break; case 3: @shop_name$ = "enc_stats"; break; case 4: callsub S_Remove; break; default: end; } callshop @shop_name$, 1; npcshopattach @shop_name$; end; OnInit: // Settings: shop names, currencies, items, prices .max_enchant = 2; // Max amount of enchants 0-4 setarray .shop_name$[0], "enc_atk", "enc_def", "enc_stats"; setarray .shop_currency$[0],"Zeny", "Zeny", "Zeny"; setarray .enc_atk_id[0], 4760, 4761, 4806, 4815, 4814, 4813, 4812, 4826, 4827, 4828, 4829, 4830, 4831, 4819, 4766, 4767,4764,4765, 4807, 4842, 4818, 4817, 4816, 4843, 4844, 4811, 4810, 4809, 4808, 4820, 4821, 4822, 4823, 4824, 4825, 4832, 4833, 4834, 4835, 4836, 4837, 4838, 4839, 4840, 4841; setarray .enc_atk_price[0],10000,20000,30000,10000,20000,30000,40000,50000,60000,70000,80000,90000,100000,10000,20000,30000,5000,7000,10000,20000,10000,20000,30000,40000,50000,10000,20000,30000,40000,50000,60000,70000,80000,90000,100000,10000,20000,30000,40000,50000,60000,70000,80000,90000,100000; setarray .enc_def_id[0], 4805, 4850, 4851, 4852,4762, 4763,4786,4787,4788,4789, 4790,4791,4792,4793, 4794,4795,4796,4797,4798,4799,4800,4801, 4802; setarray .enc_def_price[0],10000,20000,40000,60000,5000,12000,2000,4000,6000,8000,10000,3000,5000,9000,12000,1000,2000,3000,4000,5000,2500,5000,10000; setarray .enc_stats_id[0], 4700,4710,4720,4730,4740,4750, 4701,4711,4721,4731,4741,4751, 4702,4712,4722,4732,4742,4752, 4703,4713,4723,4733,4743,4753, 4704,4714,4724,4734,4744,4754, 4705,4715,4725,4735,4745,4755, 4706,4716,4726,4736,4746,4756, 4707,4717,4727,4737,4747,4757, 4708,4718,4728,4738,4748,4758, 4709, 4719, 4729, 4739, 4749, 4759; setarray .enc_stats_price[0],1500,1500,1500,1500,1500,1500, 2500,2500,2500,2500,2500,2500, 3500,3500,3500,3500,3500,3500, 4500,4500,4500,4500,4500,4500, 5500,5500,5500,5500,5500,5500, 6500,6500,6500,6500,6500,6500, 7500,7500,7500,7500,7500,7500, 8500,8500,8500,8500,8500,8500, 9500,9500,9500,9500,9500,9500, 10500,10500,10500,10500,10500,10500; // Load shop items for(.@i = 0; .@i < getarraysize(.shop_name$); .@i++) { .@npc$ = .shop_name$[.@i]; deletearray .@id[0],getarraysize(.@id); deletearray .@price[0],getarraysize(.@price); copyarray .@id[0], getd("."+.@npc$+"_id[0]"), getarraysize(getd("."+.@npc$+"_id")); copyarray .@price[0], getd("."+.@npc$+"_price[0]"), getarraysize(getd("."+.@npc$+"_price")); npcshopdelitem .@npc$,501;// Remove apple for(.@j = 0; .@j < getarraysize(.@id); .@j++) { npcshopadditem .@npc$, .@id[.@j], .@price[.@j]; } } end; OnSellItem: end; OnBuyItem: .@bought_count = getarraysize(@bought_nameid); if(.@bought_count < 1) end; // Get shop data by @shop_name$ .@shop_index = inarray(.shop_name$[0], @shop_name$); if(.@shop_index == -1 || getarraysize(.shop_name$) < 1) { message strcharinfo(0), "Shop was not found!"; debugmes "Incorrect shop array detected in '"+@shop_name$+"'! FIXME!"; end; } copyarray .@shop_id[0], getd("."+@shop_name$+"_id"), getarraysize(getd("."+@shop_name$+"_id")); copyarray .@shop_price[0], getd("."+@shop_name$+"_price"), getarraysize(getd("."+@shop_name$+"_price")); for(.@i = 0; .@i < .@bought_count; .@i++) { .@index = inarray(.@shop_id[0], @bought_nameid[.@i]); if(.@index == -1) { message strcharinfo(0), "Price was not found!"; debugmes "Incorrect price array detected in '"+@shop_name$+"'! FIXME!"; end; } setarray .@bought_cost[getarraysize(.@bought_cost)],.@shop_price[.@index]*@bought_quantity[.@i]; for (.@j = 0; .@j < @bought_quantity[.@i]; .@j++) { setarray .@enchant[getarraysize(.@enchant)],@bought_nameid[.@i]; } } // Count total cost for(.@i = 0; .@i < .@bought_count; .@i++) { .@total_cost = .@total_cost + .@bought_cost[.@i]; } // Currency check if(.shop_currency$[.@shop_index] == "Zeny" && Zeny < .@total_cost) { message strcharinfo(0), "("+.@total_cost+") Not enough "+.shop_currency$[.@shop_index]+"!"; end; } // Other currency checks... // Select equipment (EQI) mes "[ " + strnpcinfo(1) + " ]"; mes "Please select which equipment you want me to enchant."; .@position = callsub(S_SelectPosition); // Check if position has equipment if(!getequipisequiped(.@position)) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "You don't have anything equipped there!"; close; } .@item_id = getequipid(.@position); //Equipped item id .@refine = getequiprefinerycnt(.@position); //Equipped refine value .@slots = getitemslots(.@item_id); setarray .@cards[0], getequipcardid(.@position,0), getequipcardid(.@position,1), getequipcardid(.@position,2), getequipcardid(.@position,3); .@cards_count = getarraysize(.@cards); .@enchant_count = getarraysize(.@enchant); /*if(.@enchant_count > .max_enchant) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "This item has been crafted or produced and cannot be enchanted."; close; }*/ // Check for enabled refinement /*if(!getequipisenableref(.@position)) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "I don't think I can enchant this item at all."; mes "Sorry..."; close; }*/ // Add all card slots for(.@i = 0; .@i < .@slots; .@i++) { setarray .@item[getarraysize(.@item)], (.@cards[.@i] > 0 ? .@cards[.@i] : -1); } // Add previous enchants for(.@i = .@slots; .@i < .@cards_count; .@i++) { if(.@cards[.@i] > 0) { setarray .@item[getarraysize(.@item)], .@cards[.@i]; } } // Add new enchants for(.@i = 0; .@i < .@enchant_count; .@i++) { setarray .@item[getarraysize(.@item)], .@enchant[.@i]; } // Check for produced/crafted items 254,255 if(.@cards[0] == CARD0_FORGE || .@cards[0] == CARD0_CREATE) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "This item has been crafted or produced and cannot be enchanted."; close; } // Has card sockets 4 - slots if(.@enchant_count > (.max_enchant - .@slots)) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "This equipment can hold "+(.max_enchant - .@slots)+" enchant."; close; } // Has free sockets if((.@slots + .@enchant_count) > .max_enchant || getarraysize(.@item) > .max_enchant) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "This item does not have enough free sockets to enchant."; close; } // Confirm the setup clear; mes "[ " + strnpcinfo(1) + " ]^6E6E6E Setup^000000"; for(.@i = 0; .@i < .@enchant_count; .@i++) { mes "Enchant: "+ getitemname(.@enchant[.@i]); } mes "Equipment: "+ getitemname(getequipid(.@position)); mes "Cost: "+.@total_cost+" "+.shop_currency$[.@shop_index]+"."; if (select("Create enchant:Cancel") != 1) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "Farewell."; close; } // Create selected enchant clear; mes "[ " + strnpcinfo(1) + " ]^6E6E6E Done^000000"; mes "Here is your enchanted equipment!"; delequip(.@position); specialeffect2 154; if(.shop_currency$[.@shop_index] == "Zeny") { Zeny = Zeny - .@total_cost; } getitem2 .@item_id, 1, 1, .@refine, 0, (.@item[0] > 0 ? .@item[0] : 0), (.@item[1] > 0 ? .@item[1] : 0), (.@item[2] > 0 ? .@item[2] : 0), (.@item[3] > 0 ? .@item[3] : 0); close; S_Remove: // Select equipment (EQI) mes "[ " + strnpcinfo(1) + " ]"; mes "Please select which equipment you want me to work on."; .@position = callsub(S_SelectPosition); // Check if position has equipment if(!getequipisequiped(.@position)) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "You don't have anything equipped there!"; close; } .@item_id = getequipid(.@position); //Equipped item id .@refine = getequiprefinerycnt(.@position); //Equipped refine value .@slots = getitemslots(.@item_id); setarray .@cards[0], getequipcardid(.@position,0), getequipcardid(.@position,1), getequipcardid(.@position,2), getequipcardid(.@position,3); .@cards_count = getarraysize(.@cards); .@enchant_count = getarraysize(.@enchant); // Create selected item clear; mes "[ " + strnpcinfo(1) + " ]^6E6E6E Done^000000"; mes "Here is your equipment back!"; delequip(.@position); specialeffect2 169; getitem2 .@item_id, 1, 1, .@refine, 0,0,0,0,0; for(.@i=0; .@i<.@slots; .@i++) { if(.@cards[.@i] > 0) getitem .@cards[.@i], 1; } close; S_SelectPosition: setarray .@indices[1], 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; setarray .@position$[1], "Top", "Mid", "Low", "Armor", "Left Hand", "Right Hand", "Garment", "Shoes", "Accessory L", "Accessory R"; setarray .@option[1], 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; // 1=allow, 0=deny for(.@i=1; .@i<getarraysize(.@indices); .@i++) { if(.@option[.@i] && getequipisequiped(.@indices[.@i])) { .@menu$ = .@menu$ + .@position$[.@i] + "-[" + getequipname(.@indices[.@i]) + "]"; } .@menu$ = .@menu$ + ":"; } .@part = .@indices[select(.@menu$)]; return .@part; }  
  5. n0tttt's post in Anti Free Kill was marked as the answer   
    I recommend to fuse this with another OnPCKillEvent to avoid having a large event queue.
    - script Anti_FreeKill -1,{ OnPCKillEvent: if(@last_kill == killedrid) { if(++@last_killamt >= 29) { atcommand "@jailfor 1h "+strcharinfo(0); announce strcharinfo(0)+" has been cheating with "+rid2name(@last_kill)+".",bc_all; @last_killamt = 0; @last_kill = 0; end; } } else { @last_killamt = 0; } @last_kill = killedrid; end; OnPCDieEvent: @last_killamt = 0; end; }  
  6. n0tttt's post in Need help for Incrase Headgear View id was marked as the answer   
    First of all, did you try the last NEMO version? https://gitlab.com/4144/Nemo/-/archive/master/Nemo-master.zip
    You can check which clients it can work on: http://nemo.herc.ws/patches/IncreaseViewID/
  7. n0tttt's post in Add check for bounded items was marked as the answer   
    setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW; for( set .@i,1; .@i <= 10; set .@i,.@i+1 ) { if( getequipisequiped(.@indices[.@i]) ) set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + " - [ " + getequipname(.@indices[.@i]) + " ]"; set .@menu$, .@menu$ + ":"; } set .@part, .@indices[ select(.@menu$) ]; if(!getequipisequiped(.@part)) { mes "[ ^04B4AEIsaac^000000 ]"; mes "Young one... Your not wearing anything there that I can remove cards from."; end; } set .@cardcount,getequipcardcnt(.@part); if(.@cardcount == 0) { mes "[ ^04B4AEIsaac^000000 ]"; mes "Young one... There are no cards compounded on this item. I can do nothing with it, I'm afraid."; end; } if (!checkweight(1202,(.@cardcount+1))) { mes "^3355FFJust a minute!"; mes "I can't offer any of my"; mes "services to you because"; mes "you're carrying too much"; mes "stuff. Put your extra items in"; mes "Kafra Storage and come again~"; end; } countbound; .@size = getarraysize(@bound_items); .@item = getquipid(.@part); for(.@i = 0;.@i< .@size;.@i++) { if(@bound_items[.@i] == .@item) { mes "This item is bounded."; close; } }  
  8. n0tttt's post in Bug with a Buffer NPC was marked as the answer   
    There's no "Mp". You have to use SP instead.
    // https://rathena.org/board/topic/81757-full-buffs-npc/?do=findComment&comment=194862 - script Buffer -1,{ if( @delay_buff ) end; if ( rid2name(getcharid(3)) == "TestDummy" ) { .@buff_time = INFINITE_TICK; } else { .@buff_time = 600000 * 4; } skilleffect 384,0; sc_start SC_MELTDOWN,.@buff_time,5; skilleffect 383,0; sc_start SC_WINDWALK,.@buff_time,5; skilleffect 378,0; sc_start SC_EDP,.@buff_time,5; skilleffect 465,0; sc_start SC_KAITE,.@buff_time,7; skilleffect 464,0; sc_start SC_KAUPE,.@buff_time,3; skilleffect 462,0; sc_start SC_KAIZEL,.@buff_time,7; skilleffect 8,0; sc_start SC_ENDURE,.@buff_time,10; skilleffect 33,0; sc_start SC_ANGELUS,.@buff_time,10; skilleffect 45,0; sc_start SC_CONCENTRATE,.@buff_time,10; skilleffect 74,0; sc_start SC_MAGNIFICAT,.@buff_time,5; skilleffect 75,0; sc_start SC_GLORIA,.@buff_time,5; skilleffect 459,0; sc_start SC_ADRENALINE2,.@buff_time,1; skilleffect 66,0; sc_start SC_IMPOSITIO,.@buff_time,5; skilleffect 67,0; sc_start SC_SUFFRAGIUM,.@buff_time,3; skilleffect 34,0; sc_start SC_BLESSING,.@buff_time,10; skilleffect 29,0; sc_start SC_INCREASEAGI,.@buff_time,10; skilleffect 112,0; sc_start SC_WEAPONPERFECTION,.@buff_time,10; skilleffect 114,0; sc_start SC_MAXIMIZEPOWER,.@buff_time,5; skilleffect 357,0; sc_start SC_CONCENTRATION,.@buff_time,5; skilleffect 355,0; sc_start SC_AURABLADE,.@buff_time,5; skilleffect 155,0; sc_start SC_LOUD,.@buff_time,1; sc_start SC_ASPDPOTION2,.@buff_time,0; sc_start SC_STRFood,.@buff_time,30; sc_start SC_AGIFood,.@buff_time,30; sc_start SC_VITFood,.@buff_time,30; sc_start SC_INTFood,.@buff_time,30; sc_start SC_DEXFood,.@buff_time,30; sc_start SC_LUKFood,.@buff_time,30; sc_start SC_HitFood,.@buff_time,30; sc_start SC_FleeFood,.@buff_time,30; sc_start SC_BATKFood,.@buff_time,30; sc_start SC_MATKFood,.@buff_time,30; skilleffect 380,0; sc_start SC_TRUESIGHT,.@buff_time,5; skilleffect 361,0; sc_start SC_ASSUMPTIO,.@buff_time,5; if ( class == Job_Kagerou || class == Job_Oboro ) { skilleffect 3022,0; sc_start SC_IZAYOI,.@buff_time,5; } switch ( basejob ) { case Job_Alchemist: set .@spirit, 445; break; case Job_Monk: set .@spirit, 447; break; case Job_Star_Gladiator: set .@spirit, 448; break; case Job_Sage: set .@spirit, 449; break; case Job_Crusader: set .@spirit, 450; break; case Job_SuperNovice: set .@spirit, 451; break; case Job_Knight: set .@spirit, 452; break; case Job_Wizard: set .@spirit, 453; break; case Job_Priest: set .@spirit, 454; break; case Job_Bard: case Job_Dancer: set .@spirit, 455; break; case Job_Rogue: set .@spirit, 456; break; case Job_Assassin: set .@spirit, 457; break; case Job_Blacksmith: set .@spirit, 458; break; case Job_Hunter: set .@spirit, 460; break; case Job_Soul_Linker: set .@spirit, 461; break; default: if ( upper == 1 && baselevel < 70 ) { set .@spirit, 494; } } if ( .@spirit ) { sc_start4 sc_spirit, .@buff_time, 5, .@spirit,0,0; skilleffect .@spirit, 5; } percentheal 100,100; if (Hp % 2 == 1) { heal -1,0; } if (Sp % 2 == 1) { heal 0,-1; } skilleffect 3026,0; sc_start SC_ZANGETSU,.@buff_time,5; percentheal 100,100; @delay_buff++; sleep2 2000; @delay_buff = 0; end; } prontera,147,174,6 duplicate(Buffer) Buffer#prt 758 e_tower,82,108,3 duplicate(Buffer) Buffer#wtower 758  
  9. n0tttt's post in how to remove this ? was marked as the answer   
    data/luafiles514/lua files/signboardlist.lub
    I think you have to let it like this:
    IT_NONE = 0 IT_BMP = 1 IT_SPRITE = 2 IT_SIGNBOARD = 3 SignBoardList = { }
  10. n0tttt's post in itemshop and pointshop in same npc was marked as the answer   
    prontera,150,150,4, script Shop 100,{ mes "Hello player!"; mes "Would you like to buy with Cash or Items?"; switch(select("Cash","Currency","Exit")) { case 1: case 2: callshop "shop"+@menu,1; case 3: close; } } - shop1 cashshop 1234,100,1525,110 - shop2 itemshop 7720,1,1234,20,1525,25  
  11. n0tttt's post in Regarding pvp mode was marked as the answer   
    You can't with that mapflag, but if you know how to recompile then you can do this.
    pc.cpp, change:
    if( !battle_config.pk_mode && mapdata->flag[MF_PVP] && !mapdata->flag[MF_PVP_NOCALCRANK] ) { sd->pvp_point -= 5; sd->pvp_lost++; if( src && src->type == BL_PC ) { struct map_session_data *ssd = (struct map_session_data *)src; ssd->pvp_point++; ssd->pvp_won++; } if( sd->pvp_point < 0 ) { add_timer(tick+1000, pc_respawn_timer,sd->bl.id,0); return 1|8; } } to:
    if( !battle_config.pk_mode && mapdata->flag[MF_PVP] && !mapdata->flag[MF_PVP_NOCALCRANK] ) { sd->pvp_point -= 5; sd->pvp_lost++; if( src && src->type == BL_PC ) { struct map_session_data *ssd = (struct map_session_data *)src; ssd->pvp_point++; ssd->pvp_won++; } } With this change you can just use pvp mapflag instead of pvp_nocalcrank and players won't be respawned. The counter will also remain.
  12. n0tttt's post in Mob Tetra Vortex Animation was marked as the answer   
    I don't know if this will work but I don't lose anything trying...
    Change:
    case WL_TETRAVORTEX: if( sd && sc ) { // No SC? No spheres int spheres[5] = { 0, 0, 0, 0, 0 }, positions[5] = {-1,-1,-1,-1,-1 }, i, j = 0, k, subskill = 0; for( i = SC_SPHERE_1; i <= SC_SPHERE_5; i++ ) if( sc->data[i] ) { spheres[j] = i; positions[j] = sc->data[i]->val2; j++; } // Sphere Sort, this time from new to old for( i = 0; i <= j - 2; i++ ) for( k = i + 1; k <= j - 1; k++ ) if( positions[i] < positions[k] ) { SWAP(positions[i],positions[k]); SWAP(spheres[i],spheres[k]); } if(j == 5) { // If 5 spheres, remove last one and only do 4 actions (Official behavior) status_change_end(src, static_cast<sc_type>(spheres[4]), INVALID_TIMER); j = 4; } k = 0; for( i = 0; i < j; i++ ) { // Loop should always be 4 for regular players, but unconditional_skill could be less switch( sc->data[spheres[i]]->val1 ) { case WLS_FIRE: subskill = WL_TETRAVORTEX_FIRE; k |= 1; break; case WLS_WIND: subskill = WL_TETRAVORTEX_WIND; k |= 4; break; case WLS_WATER: subskill = WL_TETRAVORTEX_WATER; k |= 2; break; case WLS_STONE: subskill = WL_TETRAVORTEX_GROUND; k |= 8; break; } skill_addtimerskill(src, tick + i * 200, bl->id, k, 0, subskill, skill_lv, i, flag); clif_skill_nodamage(src, bl, subskill, skill_lv, 1); status_change_end(src, static_cast<sc_type>(spheres[i]), INVALID_TIMER); } } break; to:
    case WL_TETRAVORTEX: if( sd && sc ) { // No SC? No spheres int spheres[5] = { 0, 0, 0, 0, 0 }, positions[5] = {-1,-1,-1,-1,-1 }, i, j = 0, k, subskill = 0; for( i = SC_SPHERE_1; i <= SC_SPHERE_5; i++ ) if( sc->data[i] ) { spheres[j] = i; positions[j] = sc->data[i]->val2; j++; } // Sphere Sort, this time from new to old for( i = 0; i <= j - 2; i++ ) for( k = i + 1; k <= j - 1; k++ ) if( positions[i] < positions[k] ) { SWAP(positions[i],positions[k]); SWAP(spheres[i],spheres[k]); } if(j == 5) { // If 5 spheres, remove last one and only do 4 actions (Official behavior) status_change_end(src, static_cast<sc_type>(spheres[4]), INVALID_TIMER); j = 4; } k = 0; for( i = 0; i < j; i++ ) { // Loop should always be 4 for regular players, but unconditional_skill could be less switch( sc->data[spheres[i]]->val1 ) { case WLS_FIRE: subskill = WL_TETRAVORTEX_FIRE; k |= 1; break; case WLS_WIND: subskill = WL_TETRAVORTEX_WIND; k |= 4; break; case WLS_WATER: subskill = WL_TETRAVORTEX_WATER; k |= 2; break; case WLS_STONE: subskill = WL_TETRAVORTEX_GROUND; k |= 8; break; } skill_addtimerskill(src, tick + i * 200, bl->id, k, 0, subskill, skill_lv, i, flag); clif_skill_nodamage(src, bl, subskill, skill_lv, 1); status_change_end(src, static_cast<sc_type>(spheres[i]), INVALID_TIMER); } } else if(!sd) { int k; for( i = 0; i < 4; i++ ) { switch( i ) { case 0: subskill = WL_TETRAVORTEX_FIRE; k |= 1; break; case 1: subskill = WL_TETRAVORTEX_WIND; k |= 4; break; case 2: subskill = WL_TETRAVORTEX_WATER; k |= 2; break; case 3: subskill = WL_TETRAVORTEX_GROUND; k |= 8; break; } skill_addtimerskill(src, tick + i * 200, bl->id, k, 0, subskill, skill_lv, i, flag); clif_skill_nodamage(src, bl, subskill, skill_lv, 1); } } break;  
  13. n0tttt's post in Removing NPC was marked as the answer   
    npc/re/scripts_athena.conf
    Just change:
    to:
     
  14. n0tttt's post in Healer show cooldown time was marked as the answer   
    //===== rAthena Script ======================================= //= Healer //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Basic healer script. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.1 Aligned coordinates with @go. //============================================================ - script Healer -1,{ .@Price = 0; // Zeny required for heal .@Buffs = 0; // Also buff players? (1: yes / 0: no) .@Delay = 0; // Heal delay, in seconds if (@HD > gettimetick(2)) { message strcharinfo(0),"You need to wait "+Time2Str(@HD)+" before using this service again."; end; } if (.@Price) { message strcharinfo(0), "Healing costs " + callfunc("F_InsertComma",.@Price) + " Zeny."; if (Zeny < .@Price) end; if (select("^0055FFHeal^000000:^777777Cancel^000000") == 2) end; Zeny -= .@Price; } specialeffect2 EF_HEAL2; percentheal 100,100; if (.@Buffs) { specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,240000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10; } if (.@Delay) @HD = gettimetick(2) + .@Delay; end; } // Duplicates //============================================================ alberta,25,240,6 duplicate(Healer) Healer#alb 909 aldebaran,135,118,6 duplicate(Healer) Healer#alde 909 amatsu,200,79,4 duplicate(Healer) Healer#ama 909 ayothaya,207,169,6 duplicate(Healer) Healer#ayo 909 comodo,184,158,6 duplicate(Healer) Healer#com 909 einbech,57,36,6 duplicate(Healer) Healer#einbe 909 einbroch,57,202,6 duplicate(Healer) Healer#einbr 909 geffen,115,72,6 duplicate(Healer) Healer#gef 909 gonryun,156,122,6 duplicate(Healer) Healer#gon 909 hugel,89,150,6 duplicate(Healer) Healer#hug 909 izlude,121,150,6 duplicate(Healer) Healer#izl 909 //Pre-RE: (125,118) jawaii,250,139,4 duplicate(Healer) Healer#jaw 909 lighthalzen,152,100,6 duplicate(Healer) Healer#lhz 909 louyang,226,103,4 duplicate(Healer) Healer#lou 909 manuk,272,144,6 duplicate(Healer) Healer#man 909 mid_camp,203,289,6 duplicate(Healer) Healer#mid 909 moc_ruins,72,164,4 duplicate(Healer) Healer#moc 909 morocc,153,97,6 duplicate(Healer) Healer#mor 909 moscovia,220,191,4 duplicate(Healer) Healer#mos 909 niflheim,212,182,5 duplicate(Healer) Healer#nif 909 payon,179,106,4 duplicate(Healer) Healer#pay 909 prontera,162,193,4 duplicate(Healer) Healer#prt 909 rachel,125,116,6 duplicate(Healer) Healer#rac 909 splendide,201,153,4 duplicate(Healer) Healer#spl 909 thor_camp,249,74,4 duplicate(Healer) Healer#thor 909 umbala,105,148,3 duplicate(Healer) Healer#umb 909 veins,217,121,4 duplicate(Healer) Healer#ve 909 xmas,143,136,4 duplicate(Healer) Healer#xmas 909 yuno,164,45,4 duplicate(Healer) Healer#yuno 909 // Duplicates (Renewal) //============================================================ brasilis,194,221,6 duplicate(Healer) Healer#bra 909 dewata,195,187,4 duplicate(Healer) Healer#dew 909 dicastes01,201,194,4 duplicate(Healer) Healer#dic 909 ecl_in01,45,60,4 duplicate(Healer) Healer#ecl 909 malangdo,132,114,6 duplicate(Healer) Healer#mal 909 malaya,227,204,6 duplicate(Healer) Healer#ma 909 mora,55,152,4 duplicate(Healer) Healer#mora 909  
  15. n0tttt's post in megaphone script was marked as the answer   
    - script Megaphone -1,{ OnCommand: if(vip_status(VIP_ACTIVE)) { setarray .@color$[0],"ff0000","00ff00","0000ff"; for(.@size = getarraysize(.@color$);.@i < .@size;.@i++) .@menu$+= "^"+.@color$[.@i]+"Sample:"; .@color = select(.@menu$) - 1; input .@msg$; if(.@msg$ != " " && .@msg$ != "0") announce strcharinfo(0)+": "+.@msg$,bc_all,"0x"+.@color$[.@color]; } else { message strcharinfo(0),"This command is only avaiaible to VIPs."; } end; OnInit: bindatcmd "torpedo","Megaphone::OnCommand"; end; }  
  16. n0tttt's post in unitskillusepos don't work? was marked as the answer   
    Maybe because you're casting a targeted skill to the ground?
    payon,162,219,4 script Unit Master 101,{ .@amount = 1; for (.@i = 0; .@i < .@amount; .@i++) { monster ("payon",167,215,"Poporing",1031,.@amount); .@mid[.@i] = $@mobid[0]; setunitdata .@mid[.@i],UMOB_LEVEL,1; setunitdata .@mid[.@i],UMOB_MAXHP,10000; setunitdata .@mid[.@i],UMOB_ATKMIN,10000; setunitdata .@mid[.@i],UMOB_ATKMAX,21000; setunitdata .@mid[.@i],UMOB_MATKMIN,10000; setunitdata .@mid[.@i],UMOB_MATKMAX,21000; setunitdata .@mid[.@i],UMOB_HIT,10000; setunitdata .@mid[.@i],UMOB_ATKRANGE,5; setunitdata .@mid[.@i],UMOB_ADELAY,100; } monster ("payon",172,215,"Mandragora",1020,.@amount); .@target = $@mobid[0]; unitskilluseid .@mid[0],19,3,.@target; end; }  
  17. n0tttt's post in monsters not spawning (unknown syntax) was marked as the answer   
    Seems like there were some spaces.
    //===== rAthena Script ======================================= //= leveling quests spawn script //===== Description: ========================================= //= spawns monsters for leveling quests area. //===== Additional Comments: ================================= //= 0.1 //============================================================ //120-140 //vis_h01,0,0 monster Antler Scaraba 2085,50 vis_h01,0,0 monster Centipede 1987,50 vis_h01,0,0 monster Skeggiold 1755,50 vis_h01,0,0 monster Antler Scaraba 2085,50 //141-150 //1@md_pay,0,0 monster Antler Scaraba 2085,50 1@md_pay,0,0 monster Angra Mantis 2133,50 1@md_pay,0,0 monster Pom Spider 2132,50 1@md_pay,0,0 monster Little Fatum 2136,50 //151-160 //1@slw,0,0 monster Sky Fortress Key Keeper 3478,40 1@slw,0,0 monster Sky Fortress Key Keeper 3478,40 1@slw,0,0 monster Immortal Legionnaire 3477,40 1@slw,0,0 monster Immortal Assaulter 3479,40 //160-175 //x_prt,0,0 monster Antler Scaraba 2085,40 x_prt,0,0 monster Arc Elder 2920,40 x_prt,0,0 monster Owl Viscount 2921,40 x_prt,0,0 monster Big Bell 2917,50 Also I changed the delay because of this:
    Delay1 and delay2 control monster respawn delays - the first one is the fixed base respawn time, and the second is random variance on top of the base time. Both values are given in milliseconds (1000 = 1 second). Note that the server also enforces a minimum respawn delay of 5 seconds.  
  18. n0tttt's post in Please Help Regarding Channel System was marked as the answer   
    /** * Channel config for map channel * For the structure, see the 'channels' above **/ map: { name: "#map" alias: "[Map]" color: "Yellow" type: "CHAN_TYPE_MAP" // DO NOT CHANGE THIS VALUE delay: 1000 autojoin: false leave: true chat: true } conf/channels.conf
    autojoin: true
     
    Now, if you want to make it by script:
    - script Channel_Town -1,{ OnInit: setarray .@maps$[0], "prontera","alberta","aldebaran","amatsu","ayothaya","brasilis","comodo","dewata", "ecl_in01","einbech","einbroch","dicastes01","geffen","gonryun","hugel","izlude", "jawaii","lasagna","lighthalzen","louyang","xmas","malangdo","malaya","manuk", "mid_camp","mora","morocc","moscovia","nameless_n","niflheim","payon","rachel", "splendide","thor_camp","umbala","veins","yuno"; for(.@size = getarraysize(.@maps$);.@i < .@size;.@i++) setmapflag .@maps$[.@i],mf_loadevent; end; OnPCLoadMapEvent: if(getmapflag(strcharinfo(3),mf_town)) atcommand "@join #map"; end; }  
  19. n0tttt's post in Requesting for item script effect. was marked as the answer   
    bonus bMatkRate,5 + getrefine()/2; bonus bAtkRate,10; bonus bStr,1 + getrefine(); if(readparam(bstr) >= 250) { bonus bAtkRate,20 + getrefine()/2; } bonus bMatkRate,-10; bonus bMatkRate,10 + getrefine()/2;  
  20. n0tttt's post in Monster Spawn once on any map was marked as the answer   
    - script Rand_Monster -1,{ OnSpawn: monster .maps$[rand(.map_size)],0,0,"--ja--",2950,1,"Rand_Monster::OnSpawn"; end; OnInit: setarray .maps$[0], "alb_ship", "alb2trea", "alberta", "alberta_in", "alde_dun01", "alde_dun02", "alde_dun03", "alde_dun04", "aldeba_in", "aldebaran", "anthell01", "anthell02", "arena_room", "c_tower1", "c_tower2", "c_tower3", "c_tower4", "force_1-1", "force_1-2", "force_1-3", "force_2-1", "force_2-2", "force_2-3", "force_3-1", "force_3-2", "force_3-3", "gef_dun00", "gef_dun01", "gef_dun02", "gef_dun03", "gef_fild00", "gef_fild01", "gef_fild02", "gef_fild03", "gef_fild04", "gef_fild05", "gef_fild06", "gef_fild07", "gef_fild08", "gef_fild09", "gef_fild10", "gef_fild11", "gef_fild12", "gef_fild13", "gef_fild14", "gef_tower", "geffen", "geffen_in", "gl_cas01", "gl_cas02", "gl_church", "gl_chyard", "gl_dun01", "gl_dun02", "gl_in01", "gl_knt01", "gl_knt02", "gl_prison", "gl_prison1", "gl_sew01", "gl_sew02", "gl_sew03", "gl_sew04", "gl_step", "glast_01", "hunter_1-1", "hunter_2-1", "hunter_3-1", "in_hunter", "in_moc_16", "in_orcs01", "in_sphinx1", "in_sphinx2", "in_sphinx3", "in_sphinx4", "in_sphinx5", "iz_dun00", "iz_dun01", "iz_dun02", "iz_dun03", "iz_dun04", "job_sword1", "izlu2dun", "izlude", "izlude_in", "job_thief1", "knight_1-1", "knight_2-1", "knight_3-1", "mjo_dun01", "mjo_dun02", "mjo_dun03", "mjolnir_01", "mjolnir_02", "mjolnir_03", "mjolnir_04", "mjolnir_05", "mjolnir_06", "mjolnir_07", "mjolnir_08", "mjolnir_09", "mjolnir_10", "mjolnir_11", "mjolnir_12", "moc_castle", "moc_fild01", "moc_fild02", "moc_fild03", "moc_fild04", "moc_fild05", "moc_fild06", "moc_fild07", "moc_fild08", "moc_fild09", "moc_fild10", "moc_fild11", "moc_fild12", "moc_fild13", "moc_fild14", "moc_fild15", "moc_fild16", "moc_fild17", "moc_fild18", "moc_fild19", "moc_pryd01", "moc_pryd02", "moc_pryd03", "moc_pryd04", "moc_pryd05", "moc_pryd06", "moc_prydb1", "moc_ruins", "monk_in", "morocc", "morocc_in", "new_1-1", "new_1-2", "new_1-3", "new_1-4", "new_2-1", "new_2-2", "new_2-3", "new_2-4", "new_3-1", "new_3-2", "new_3-3", "new_3-4", "new_4-1", "new_4-2", "new_4-3", "new_4-4", "new_5-1", "new_5-2", "new_5-3", "new_5-4", "orcsdun01", "orcsdun02", "ordeal_1-1", "ordeal_1-2", "//ordeal_1-3", "//ordeal_1-4", "ordeal_2-1", "ordeal_2-2", "//ordeal_2-3", "//ordeal_2-4", "ordeal_3-1", "ordeal_3-2", "//ordeal_3-3", "//ordeal_3-4", "pay_arche", "pay_dun00", "pay_dun01", "pay_dun02", "pay_dun03", "pay_dun04", "pay_fild01", "pay_fild02", "pay_fild03", "pay_fild04", "pay_fild05", "pay_fild06", "pay_fild07", "pay_fild08", "pay_fild09", "pay_fild10", "pay_fild11", "payon", "payon_in01", "payon_in02", "priest_1-1", "priest_2-1", "priest_3-1", "prontera", "prt_are_in", "prt_are01", "pvp_room", "prt_castle", "prt_church", "prt_fild00", "prt_fild01", "prt_fild02", "prt_fild03", "prt_fild04", "prt_fild05", "prt_fild06", "prt_fild07", "prt_fild08", "prt_fild09", "prt_fild10", "prt_fild11", "prt_in", "prt_maze01", "prt_maze02", "prt_maze03", "prt_monk", "prt_sewb1", "prt_sewb2", "prt_sewb3", "prt_sewb4", "pvp_2vs2", "pvp_c_room", "pvp_n_1-1", "pvp_n_1-2", "pvp_n_1-3", "pvp_n_1-4", "pvp_n_1-5", "pvp_n_2-1", "pvp_n_2-2", "pvp_n_2-3", "pvp_n_2-4", "pvp_n_2-5", "pvp_n_3-1", "pvp_n_3-2", "pvp_n_3-3", "pvp_n_3-4", "pvp_n_3-5", "pvp_n_4-1", "pvp_n_4-2", "pvp_n_4-3", "pvp_n_4-4", "pvp_n_4-5", "pvp_n_5-1", "pvp_n_5-2", "pvp_n_5-3", "pvp_n_5-4", "pvp_n_5-5", "pvp_n_6-1", "pvp_n_6-2", "pvp_n_6-3", "pvp_n_6-4", "pvp_n_6-5", "pvp_n_7-1", "pvp_n_7-2", "pvp_n_7-3", "pvp_n_7-4", "pvp_n_7-5", "pvp_n_8-1", "pvp_n_8-2", "pvp_n_8-3", "pvp_n_8-4", "pvp_n_8-5", "pvp_n_room", "pvp_y_1-1", "pvp_y_1-2", "pvp_y_1-3", "pvp_y_1-4", "pvp_y_1-5", "pvp_y_2-1", "pvp_y_2-2", "pvp_y_2-3", "pvp_y_2-4", "pvp_y_2-5", "pvp_y_3-1", "pvp_y_3-2", "pvp_y_3-3", "pvp_y_3-4", "pvp_y_3-5", "pvp_y_4-1", "pvp_y_4-2", "pvp_y_4-3", "pvp_y_4-4", "pvp_y_4-5", "pvp_y_5-1", "pvp_y_5-2", "pvp_y_5-3", "pvp_y_5-4", "pvp_y_5-5", "pvp_y_6-1", "pvp_y_6-2", "pvp_y_6-3", "pvp_y_6-4", "pvp_y_6-5", "pvp_y_7-1", "pvp_y_7-2", "pvp_y_7-3", "pvp_y_7-4", "pvp_y_7-5", "pvp_y_8-1", "pvp_y_8-2", "pvp_y_8-3", "pvp_y_8-4", "pvp_y_8-5", "pvp_y_room", "sword_1-1", "sword_2-1", "sword_3-1", "treasure01", "treasure02", "wizard_1-1", "wizard_2-1", "wizard_3-1", "xmas", "xmas_dun01", "xmas_dun02", "xmas_fild01", "xmas_in", "beach_dun", "beach_dun2", "beach_dun3", "cmd_fild01", "cmd_fild02", "cmd_fild03", "cmd_fild04", "cmd_fild05", "cmd_fild06", "cmd_fild07", "cmd_fild08", "cmd_fild09", "cmd_in01", "cmd_in02", "comodo", "quiz_00", "quiz_01", "g_room1-1", "g_room1-2", "g_room1-3", "g_room2", "tur_dun01", "tur_dun02", "tur_dun03", "tur_dun04", "tur_dun05", "tur_dun06", "alde_gld", "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05", "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05", "gld_dun01", "gld_dun02", "gld_dun03", "gld_dun04", "guild_room", "guild_vs1", "guild_vs2", "guild_vs3", "guild_vs4", "guild_vs5", "guild_vs1-1", "guild_vs1-2", "guild_vs1-3", "guild_vs1-4", "guild_vs2-1", "guild_vs2-2", "job_hunte", "job_knt", "job_prist", "job_wiz", "pay_gld", "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05", "prt_gld", "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05", "alde_alche", "in_rogue", "job_cru", "job_duncer", "job_monk", "job_sage", "mag_dun01", "mag_dun02", "monk_test", "quiz_test", "yuno", "yuno_fild01", "yuno_fild02", "yuno_fild03", "yuno_fild04", "yuno_in01", "yuno_in02", "yuno_in03", "yuno_in04", "yuno_in05", "ama_dun01", "ama_dun02", "ama_dun03", "ama_fild01", "ama_in01", "ama_in02", "ama_test", "amatsu", "gon_dun01", "gon_dun02", "gon_dun03", "gon_fild01", "gon_in", "gon_test", "gonryun", "sec_in01", "sec_in02", "sec_pri", "umbala", "um_dun01", "um_dun02", "um_fild01", "um_fild02", "um_fild03", "um_fild04", "um_in", "niflheim", "nif_fild01", "nif_fild02", "nif_in", "yggdrasil01", "valkyrie", "himinn", "lou_in01", "lou_in02", "lou_dun03", "lou_dun02", "lou_dun01", "lou_fild01", "louyang", "siege_test", "n_castle", "nguild_gef", "nguild_prt", "nguild_pay", "nguild_alde", "jawaii", "jawaii_in", "gefenia01", "gefenia02", "gefenia03", "gefenia04", "new_zone01", "new_zone02", "new_zone03", "new_zone04", "payon_in03", "ayothaya", "ayo_in01", "ayo_in02", "ayo_fild01", "ayo_fild02", "ayo_dun01", "ayo_dun02", "que_god01", "que_god02", "yuno_fild05", "yuno_fild07", "yuno_fild08", "yuno_fild09", "yuno_fild11", "yuno_fild12", "alde_tt02", "turbo_n_1", "turbo_n_4", "turbo_n_8", "turbo_n_16", "turbo_e_4", "turbo_e_8", "turbo_e_16", "turbo_room", "airplane", "airport", "einbech", "einbroch", "ein_dun01", "ein_dun02", "ein_fild06", "ein_fild07", "ein_fild08", "ein_fild09", "ein_fild10", "ein_in01", "que_sign01", "que_sign02", "ein_fild03", "ein_fild04", "lhz_fild02", "lhz_fild03", "yuno_pre", "lhz_fild01", "lighthalzen", "lhz_in01", "lhz_in02", "lhz_in03", "lhz_que01", "lhz_dun01", "lhz_dun02", "lhz_dun03", "lhz_cube", "juperos_01", "juperos_02", "jupe_area1", "jupe_area2", "jupe_core", "jupe_ele", "jupe_ele_r", "jupe_gate", "y_airport", "lhz_airport", "airplane_01", "jupe_cave", "quiz_02", "hu_fild07", "hu_fild05", "hu_fild04", "hu_fild01", "yuno_fild06", "job_soul", "job_star", "que_job01", "que_job02", "que_job03", "abyss_01", "abyss_02", "abyss_03", "thana_step", "thana_boss", "tha_scene01", "tha_t01", "tha_t02", "tha_t03", "tha_t04", "tha_t07", "tha_t05", "tha_t06", "tha_t08", "tha_t09", "tha_t10", "tha_t11", "tha_t12", "auction_01", "auction_02", "hugel", "hu_in01", "que_bingo", "que_hugel", "p_track01", "p_track02", "odin_tem01", "odin_tem02", "odin_tem03", "hu_fild02", "hu_fild03", "hu_fild06", "ein_fild01", "ein_fild02", "ein_fild05", "yuno_fild10", "kh_kiehl02", "kh_kiehl01", "kh_dun02", "kh_dun01", "kh_mansion", "kh_rossi", "kh_school", "kh_vila", "force_map1", "force_map2", "force_map3", "job_hunter", "job_knight", "job_priest", "job_wizard", "ve_in02", "rachel", "ra_in01", "ra_fild01", "ra_fild02", "ra_fild03", "ra_fild04", "ra_fild05", "ra_fild06", "ra_fild07", "ra_fild08", "ra_fild09", "ra_fild10", "ra_fild11", "ra_fild12", "ra_fild13", "ra_san01", "ra_san02", "ra_san03", "ra_san04", "ra_san05", "ra_temin", "ra_temple", "ra_temsky", "que_rachel", "ice_dun01", "ice_dun02", "ice_dun03", "ice_dun04", "que_thor", "thor_camp", "thor_v01", "thor_v02", "thor_v03", "veins", "ve_in", "ve_fild01", "ve_fild02", "ve_fild03", "ve_fild04", "ve_fild05", "ve_fild06", "ve_fild07", "poring_c01", "poring_c02", "que_ng", "nameless_i", "nameless_n", "nameless_in", "abbey01", "abbey02", "abbey03", "poring_w01", "poring_w02", "que_san04", "moscovia", "mosk_in", "mosk_ship", "mosk_fild01", "mosk_fild02", "mosk_dun01", "mosk_dun02", "mosk_dun03", "mosk_que", "force_4-1", "force_5-1", "06guild_r", "06guild_01", "06guild_02", "06guild_03", "06guild_04", "06guild_05", "06guild_06", "06guild_07", "06guild_08", "z_agit", "que_temsky", "itemmall", "bossnia_01", "bossnia_02", "bossnia_03", "bossnia_04", "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05", "sch_gld", "cave", "moc_fild20", "moc_fild21", "moc_fild22", "que_ba", "que_moc_16", "que_moon", "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05", "aru_gld", "bat_room", "bat_a01", "bat_a02", "bat_b01", "bat_b02", "que_qsch01", "que_qsch02", "que_qsch03", "que_qsch04", "que_qsch05", "que_qaru01", "que_qaru02", "que_qaru03", "que_qaru04", "que_qaru05", "1@cata", "2@cata", "e_tower", "1@tower", "2@tower", "3@tower", "4@tower", "5@tower", "6@tower", "mid_camp", "mid_campin", "man_fild01", "man_fild03", "spl_fild02", "spl_fild03", "moc_fild22b", "que_dan01", "que_dan02", "schg_que01", "schg_dun01", "arug_que01", "arug_dun01", "1@orcs", "2@orcs", "1@nyd", "2@nyd", "nyd_dun01", "nyd_dun02", "manuk", "man_fild02", "man_in01", "splendide", "spl_fild01", "spl_in01", "spl_in02", "bat_c01", "bat_c02", "bat_c03", "moc_para01", "job3_arch01", "job3_arch02", "job3_arch03", "job3_guil01", "job3_guil02", "job3_guil03", "job3_rang01", "job3_rang02", "job3_rune01", "job3_rune02", "job3_rune03", "job3_war01", "job3_war02", "jupe_core2", "brasilis", "bra_in01", "bra_fild01", "bra_dun01", "bra_dun02", "dicastes01", "dicastes02", "dic_in01", "dic_fild01", "dic_fild02", "dic_dun01", "dic_dun02", "job3_gen01", "s_atelier", "job3_sha01", "//evt_zombie", "//evt_coke", "//ac_sl_area", "//ac_cl_hall", "//ac_cl_room", "//jp_s_dun11", "mora", "bif_fild01", "bif_fild02", "1@mist", "dewata", "dew_in01", "dew_fild01", "dew_dun01", "dew_dun02", "que_house_s", "malangdo", "mal_in01", "mal_in02", "mal_dun01", "1@pump", "2@pump", "1@cash", "iz_dun05", "evt_mobroom", "alde_tt03", "dic_dun03", "//mjolnir_04_1", "1@lhz", "lhz_dun04", "que_lhz", "evt_swar_b", "evt_swar_r", "evt_swar_s", "evt_swar_t", "gld2_ald", "gld2_gef", "gld2_pay", "gld2_prt", "gld_dun01_2", "gld_dun02_2", "gld_dun03_2", "gld_dun04_2", "malaya", "job_ko", "ma_scene01", "1@ma_b", "1@ma_c", "1@ma_h", "ma_in01", "ma_dun01", "ma_fild01", "ma_fild02", "ma_zif01", "ma_zif02", "ma_zif03", "ma_zif04", "ma_zif05", "ma_zif06", "ma_zif07", "ma_zif08", "ma_zif09", "new_event", "eclage", "ecl_fild01", "ecl_tdun01", "ecl_tdun02", "ecl_tdun03", "ecl_tdun04", "que_avan01", "1@ecl", "ecl_in01", "ecl_in02", "ecl_in03", "ecl_in04", "ecl_hub01", "moc_prydn1", "moc_prydn2", "iz_ac01", "iz_ac02", "treasure_n1", "treasure_n2", "iz_int", "iz_ng01", "iz_int01", "iz_int02", "iz_int03", "iz_int04", "iz_ac01_a", "iz_ac02_a", "iz_ac01_b", "iz_ac02_b", "iz_ac01_c", "iz_ac02_c", "iz_ac01_d", "iz_ac02_d", "te_prtcas01", "te_prtcas02", "te_prtcas03", "te_prtcas04", "te_prtcas05", "te_aldecas1", "te_aldecas2", "te_aldecas3", "te_aldecas4", "te_aldecas5", "prt_fild08a", "prt_fild08b", "prt_fild08c", "prt_fild08d", "izlude_a", "izlude_b", "izlude_c", "izlude_d", "te_prt_gld", "te_alde_gld", "teg_dun01", "teg_dun02", "1@gl_k", "2@gl_k", "gl_chyard_", "gl_cas02_", "evt_bomb", "1@def01", "1@def02", "1@def03", "1@gef", "1@face", "1@sara", "1@gef_in", "dali", "dali02", "1@ge_st", "1@spa", "1@tnm1", "1@tnm2", "1@tnm3", "1@dth1", "1@dth2", "1@dth3", "1@eom", "1@jtb", "1@rev", "1@xm_d", "moro_cav", "moro_vol", "silk_lair", "c_tower2_", "c_tower3_", "1@mcd", "ver_eju", "ver_tunn", "verus03", "verus04", "job_gun", "1@air1", "1@air2", "1@glast", "lhz_dun_n", "lhz_d_n2", "1@gl_kh", "2@gl_kh", "1@lab", "1@uns", "un_bk_q", "un_bunker", "un_myst", "verus01", "verus02", "paramk", "1@infi", "1@ffp", "1@mir", "2@mir", "1@sthb", "1@sthc", "1@sthd", "prt_cas", "prt_cas_q", "prt_prison", "prt_lib", "prt_lib_q", "prt_q", "prt_pri00", "int_land", "int_land01", "int_land02", "int_land03", "int_land04", "lasagna", "lasa_fild01", "lasa_fild02", "lasa_dun01", "lasa_dun02", "lasa_dun03", "conch_in", "lasa_in01", "lasa_dun_q", "1@pop1", "1@pop2", "1@pop3", "1@slw", "1@swat", "que_swat", "slabw01", "rebel_in", "1@md_gef", "1@md_pay", "har_in01", "harboro1", "harboro2", "rockmi1", "rockmi2", "rockrdg1", "rockrdg2", "1@gl_k2", "2@gl_k2", "1@xm_d2", "pay_d03_i", "gef_d01_i", "ice_d03_i", "1@tre", "1@begi", "tur_d03_i", "tur_d04_i", "1@crd", "ordeal_a00", "ordeal_a02", "pprontera", "niflxmas", "sch_lab", "nakhyang", "lasa_sea", "1@drdo", "x_lhz", "x_prt", "x_ra", "prt_evt_in", "vis_h01", "vis_h02", "vis_h03", "vis_h04", "ein_d02_i", "com_d02_i", "1@soul", "star_frst", "star_in", "2009rwc_01", "2009rwc_02", "2009rwc_03", "2009rwc_04", "2009rwc_05", "2009rwc_06", "2009rwc_07", "2009rwc_08", "2009rwc_f01", "2012rwc_01", "2012rwc_02", "2012rwc_03", "2012rwc_04", "2012rwc_05", "2012rwc_06", "2012rwc_07", "2012rwc_08"; .map_size = getarraysize(.maps$); freeloop true; for(;.@i < .map_size;.@i++) { if(getmapusers(.maps$[.@i]) >= 0) { if(!getmapflag(.maps$[.@i],mf_nowarpto)) continue; } deletearray .maps$[.@i],1; .@i--; .map_size--; } freeloop false; monster .maps$[rand(.map_size)],0,0,"--ja--",2950,1,"Rand_Monster::OnSpawn"; end; }  
  21. n0tttt's post in Tool Dealers Cant put enter was marked as the answer   
    - script Tool Dealer::Tool Dealer 900,{ mes "What do you like to buy?"; .@s = select( "^FF0000~~Sell^000000","Consumable", "Miscellaneous","Arrow/Ammunition","^009900Taming Pet^000000","^009900Pet Armor^000000", "Nothing" ); if(.@s < 7) close2; switch(.@s) { case 1: callshop "sell",2; end; case 2: callshop "Consumable",1; end; case 3: callshop "Miscellaneous",1; end; case 4: callshop "Arrow/Ammunition",1; end; case 5: callshop "TamingPet",1; end; case 6: callshop "Pet Armor",1; end; case 7: mes "Okay, have a nice day"; close; } } - shop Tool Dealer#shop::Consumable -1,611:-1,1750:-1,501:-1,502:-1,503:-1,504:-1,506:-1,568:-1,533:-1,645:-1,656:-1,657:-1,601:-1,602:-1,1065:-1,610:-1 - shop Tool Dealer#shop::Miscellaneous -1,713:-1,717:-1,716:-1,715:3000,12020:-1,523:-1,993:-1,992:-1,991:-1,990:-1,12042:25000,12057:25000,12052:25000,12047:25000,12062:25000,12067:25000 - shop Tool Dealer#shop::Arrow/Ammunition -1,1750:-1,1751:-1,1752:-1,1753:-1,1754:-1,1755:-1,1756:-1,1772:-1,1757:-1,1767:-1,13200:-1,13201:-1,13202:-1,13203:-1,13207:-1,13204:-1,13250:-1,13251:-1,13252:-1,13253:-1,13254:-1 - shop sell -1,512:-1 - shop Tool Dealer#shop::TamingPet -1,643:-1,639:100000,621:100000,642:100000,12373:100000,12365:100000,12340:100000,641:100000,12361:100000,630:100000,623:100000,632:100000,12363:100000,660:100000,12366:100000,12370:100000,14572:100000,12374:100000,12367:100000,626:100000,637:100000,620:100000,635:100000,622:100000,624:100000,640:100000,638:100000,629:100000,661:100000,627:100000,633:100000,634:100000,619:100000,14574:100000,12359:100000,628:100000 - shop Tool Dealer#shop::Pet Armor -1,10013:-1,10017:500000,10010:500000,10037:500000,10024:500000,10016:500000,10023:500000,10015:500000,10025:500000,10038:500000,10029:500000,10034:500000,10018:500000,10002:500000,10004:500000,10027:500000,10008:500000,10006:500000,10019:500000,10031:500000,10014:-1,10007:500000,10001:500000,10011:500000,10012:500000,10003:500000,10005:500000,10009:500000 prontera,154,196,5 duplicate(Tool Dealer) Tool Dealer#pront 900 guild_base,49,375,4 duplicate(Tool Dealer) Barman#guildbase1 61 guild_base,49,241,4 duplicate(Tool Dealer) Barman#guildbase2 61 guild_base,49,105,4 duplicate(Tool Dealer) Barman#guildbase3 61 guild_base,171,105,4 duplicate(Tool Dealer) Barman#guildbase4 61 guild_base,171,241,4 duplicate(Tool Dealer) Barman#guildbase5 61 guild_base,171,375,4 duplicate(Tool Dealer) Barman#guildbase6 61 guild_base,289,375,4 duplicate(Tool Dealer) Barman#guildbase7 61 guild_base,287,241,4 duplicate(Tool Dealer) Barman#guildbase8 61 guild_base,287,105,4 duplicate(Tool Dealer) Barman#guildbase9 61  
  22. n0tttt's post in @duel with character delection was marked as the answer   
    Does your mapserver tells you it loaded x entries from import/skill_nocast_db?
    - script Duel_Death -1,{ OnCommand: if(.duel) { message strcharinfo(0),"There is a duel going on right now. Wait for it to finish."; } else if(.duel_delay > gettimetick(2)) { message strcharinfo(0),"There's a global delay between duels. You have to wait "+Time2Str(.duel_delay)+"."; } else if(@wait_duelaid) { message strcharinfo(0),"You're already waiting for a confirmation. Relog to cancel."; } else { set .@player$,strcharinfo(0); set .@oid,getcharid(3); set .@enemy$,implode(.@atcmd_parameters$," "); set .@aid,getcharid(3,.@enemy$); set .@cid,getcharid(0,.@enemy$); if(!.@aid) { message strcharinfo(0),"That character is not online."; } else if(getvar(@duel,.@cid)) { message strcharinfo(0),"That character is already in a duel."; } else if(.@oid == .@aid) { message strcharinfo(0),"You can't duel yourself."; } else { set @duel_creator,1; set @wait_duelaid,.@aid; set @wait_duelaid,.@cid; message strcharinfo(0),"Proposition sent. Wait for him/her to accept or reject."; attachrid .@aid; set @wait_duelaid,.@oid; set @wait_duelcid,getcharid(0,.@player$); message strcharinfo(0),.@player$+" wants to have a Death Duel with you. Use @acceptdd to accept it or @rejectdd to reject it."; } } end; OnAccept: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You are the creater of the duel. Wait for the other player's answer."; } else if(@wait_duelaid) { set .@oid,getcharid(3); set .@cid,getcharid(0); if(isloggedin(@wait_duelaid,@wait_duelcid)) { // Player 2. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("No.","Yes.") == 2) { message strcharinfo(0),"You accepted the duel. Prepare yourself."; close2; attachrid @wait_duelaid; // Player 1. mes "Are you really sure about this duel? ^ff0000Your character will be deleted^000000"; if(prompt("Não","Sim") == 2) { if(isloggedin(.@oid,.@cid)) { if(!.duel) { message strcharinfo(0),rid2name(.@oid)+" has accepted the duel."; announce strcharinfo(0)+" e "+rid2name(.@oid)+" gonna make a Death Duel where the loser get's his character deleted!",bc_all|bc_blue; announce "If you want to spectate use @spectatedd",bc_all|bc_blue; set .duel,true; set .cancel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; setmapflag .duel_map$,mf_restricted,9; set .@first_id,getcharid(3); explode .@xy$,.duel_xy$,","; set .@r,rand(2); set @duel,.@oid; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@first_id,1; message strcharinfo(0),"You will not be able to move until the duel starts."; attachrid .@oid; set @duel,.@first_id; set .@r,!.@r; warp .duel_map$,atoi(.@xy$[2*.@r]),atoi(.@xy$[2*.@r + 1]); setoption 0x40,0; pcblockmove .@oid,1; message strcharinfo(0),"You will not be able to move until the duel starts."; detachrid; set .@i,30; while(.@i > 0 && !.cancel) { if(!(.@i % 10) || .@i < 6) announce .@i+" seconds for the duel between "+rid2name(.@first_id)+" vs "+rid2name(.@oid)+"!",bc_all|bc_blue; sleep 1000; set .@i,.@i - 1; } pcblockmove .@first_id,0; pcblockmove .@oid,0; removemapflag .duel_map$,mf_restricted,9; if(.@i || .cancel) { announce "The Death Duel has been cancelled!",bc_all|bc_blue; } else { announce "The Death Duel has just started!",bc_all|bc_blue; setmapflag .duel_map$,mf_pvp; setmapflag .duel_map$,mf_pvp_nocalcrank; set .@i,0; while(.@i < .time && !.cancel && .duel) { sleep 5000; set .@i,.@i + 5; } if(.@i >= .time) announce "Death Duel time is over. There was no winner.",bc_all|bc_blue; } sleep 1000; if(.logout && .duel) { announce "One of the participants logged out.",bc_all|bc_blue; set .logout,false; } if(.cancel) set .cancel,false; set .duel,false; removemapflag .duel_map$,mf_pvp; removemapflag .duel_map$,mf_pvp_nocalcrank; addrid 5,0,.duel_map$; setoption 0x40,0; if(!@duel) { atcommand "@rmvperm disable_pvp"; } else { set @duel,0; set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; } set .@i,5; while(.@i) { message strcharinfo(0),.@i+" second"+((.@i > 1)? "s" : "")+" to warp you out."; sleep2 1000; set .@i,.@i - 1; } warp "prontera",156,161; pcblockskill getcharid(3),0; end; } else { message strcharinfo(0),"I'm sorry but a duel started a few moments ago."; message strcharinfo(0,.@cid),"I'm sorry but a duel started a few moments ago."; end; } } else { message strcharinfo(0),"The other player disconnected."; } } else { message strcharinfo(0,.@cid),"The challenger changed his mind. The Death Duel is cancelled."; } } else { message strcharinfo(0,@wait_duelcid),strcharinfo(0)+" has rejected the duel."; } set .duel,false; set .cancel,false; if(playerattached()) { message strcharinfo(0),"The duel has been cancelled."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),"The duel has been cancelled."; set @duel_creator,0,@wait_duelcid; set @wait_duelaid,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; set @duel,0,@wait_duelcid; } set @duel_creator,0; set @wait_duelaid,0; set @wait_duelcid,0; set @duel,0; close; } } else { message strcharinfo(0),"The character who challenged you is now offline."; set @wait_duelaid,0; set @wait_duelcid,0; } } else { message strcharinfo(0),"There is no death duel invite for you right now."; } end; OnReject: if(@duel) { message strcharinfo(0),"You're already in a duel."; } else if(@duel_creator) { message strcharinfo(0),"You have to wait for your opponent to choose."; } else if(@wait_duelaid) { message strcharinfo(0),"You rejected the duel."; if(isloggedin(@wait_duelaid,@wait_duelcid)) { message strcharinfo(0,@wait_duelcid),strcharinfo(0)+" has rejected the duel."; set .@id,@wait_duelaid; } set @wait_duelaid,0; set @wait_duelcid,0; if(.@id) { attachrid .@id; set @wait_duelaid,0; set @wait_duelcid,0; } set .cancel,true; awake "Duel_Death"; } else { message strcharinfo(0),"You haven't been challenged to a duel."; } end; OnSpectate: if(@duel) { message strcharinfo(0),"You're part of the duel."; } else if(.duel) { if(strcharinfo(3) == .duel_map$) { message strcharinfo(0),"You're already in the map."; } else { setoption 0x40,1; atcommand "@addperm disable_pvp"; pcblockskill getcharid(3),1; warp .duel_map$,0,0; } } else { message strcharinfo(0),"There isn't a duel right now."; } end; OnFixDuel: set .duel,false; set .cancel,false; set .logout,false; set .duel_delay,false; message strcharinfo(0),"Every variable has been cleared successfully."; addrid 0; set @duel,0; set @wait_duelaid,0; set @wait_duelcid,0; set @duel_creator,0; end; OnPCKillEvent: if(@duel && killedrid == @duel) { set .duel_delay,gettimetick(2) + 5*60; set .duel,false; set .@oid,getcharid(3); announce strcharinfo(0)+" has won a Death Duel against "+rid2name(@duel)+"!",bc_all|bc_blue; announce rid2name(@duel)+" was deleted.",bc_all|bc_blue; attachrid @duel; setarray .@char_delete$[0],"bonus_script","char","cart_inventory","elemental","friends","global_reg_value","guild","guild_member","homunculus","hotkey","inventory","memo","mercenary","mercenary_owner","pet","quest","sc_data","skill","skillcooldown"; set .@deadplayer,getcharid(0); message strcharinfo(0),"Game Over"; atcommand "@kick "+strcharinfo(0); set .@j, getarraysize( .@char_delete$ ); for (.@i = 0; .@i < .@j; .@i++) { query_sql("DELETE FROM `"+ .@char_delete$[.@i] +"` WHERE `char_id` = '"+ .@deadplayer +"'"); } query_sql "DELETE FROM `party` WHERE `leader_char` = '"+.@deadplayer+"'"; } end; OnPCLogoutEvent: if(@wait_duelaid) { message strcharinfo(0,@wait_duelcid),"The other player disconnected."; set @wait_duelaid,0,@wait_duelcid; set @creator_duel,0,@wait_duelcid; set @wait_duelcid,0,@wait_duelcid; } if(@duel) { set .cancel,true; set .logout,true; awake "Duel_Death"; } end; OnPCLoginEvent: if(checkoption(0x40) && getgmlevel() < 60) setoption 0x40,0; end; OnInit: // Map set .duel_map$,"deathduel"; // Coordinates set .duel_xy$, "95,100,"+ // x,y first player "103,100"; // x,y second player bindatcmd "deathduel","Duel_Death::OnCommand"; bindatcmd "acceptdd","Duel_Death::OnAccept"; bindatcmd "rejectdd","Duel_Death::OnReject"; bindatcmd "spectatedd","Duel_Death::OnSpectate"; bindatcmd "fixduel","Duel_Death::OnFix",60; // Max duration of a duel (seconds). set .time,20; end; } deathduel mapflag pvp deathduel mapflag pvp_nocalcrank deathduel mapflag noreturn deathduel mapflag nowarp deathduel mapflag nocommand 99 deathduel mapflag nowarpto deathduel mapflag nosave SavePoint deathduel mapflag nomemo deathduel mapflag notrade deathduel mapflag nodrop deathduel mapflag nobranch deathduel mapflag nochat deathduel mapflag novending deathduel mapflag restricted 9  
  23. n0tttt's post in bindatcmd question was marked as the answer   
    Sorry.
    .@str$ = strtolower(.@atcmd_parameter$[0]); Change to:
    .@str$ = strtolower(.@atcmd_parameters$[0]);
  24. n0tttt's post in Marchand Quest little bug. was marked as the answer   
    I fused your 4 scripts, since this is how the shop should be used.
    Tell me how it goes.
    https://pastebin.com/raw/nvfjMCTn
  25. n0tttt's post in I need help for Multiple Quest shop please. was marked as the answer   
    Change:

    to:
     
    And don't forget to put the name here:
    Something like [Rental] Headgears
×
×
  • Create New...