Jump to content

Skorm

Forum Moderator
  • Posts

    1,238
  • Joined

  • Last visited

  • Days Won

    28

Community Answers

  1. Skorm's post in About Miner world by Myzter script was marked as the answer   
    Fortunately for you I'm a hoarder of scripts.
     
    Minerworld By Myzter
     
    Unfortunately I never downloaded the bot killer script that or I did and deleted it not knowing what it was.
     
    I've updated the original topic.
  2. Skorm's post in About disabling certain commands! was marked as the answer   
    - script tran_res_cmd -1,{
    OnCMD:
    if( eaclass() & EAJL_UPPER )
    message strcharinfo(0), "Transcendent jobs are not allowed this command.";
    else
    atcommand "@command";
    end;
    OnInit:
    bindatcmd "command","tran_res_cmd::OnCMD";
    }

  3. Skorm's post in What's Wrong with this code? was marked as the answer   
    - script leveling_control -1,{ OnNPCKillEvent: [email protected] = BaseLevel - getmonsterinfo( killedrid, MOB_LV ); [email protected] = [email protected] < 0 ? [email protected] : [email protected]; if ( [email protected] < 10 ) { [email protected] = getmonsterinfo( killedrid, MOB_BASEEXP ); [email protected] = getmonsterinfo( killedrid, MOB_JOBEXP ); if ( [email protected] > 0 ) set BaseExp, BaseExp + [email protected] * 35 / 100; if ( [email protected] > 0 ) set JobExp , JobExp + [email protected] * 35 / 100; } end; }
  4. Skorm's post in Show Heal in Chat!? was marked as the answer   
    Try replacing ...
    if (src->type == BL_PC) { sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp); clif_displaymessage(sd->fd, str); } if (target->type == BL_PC && target->id != src->id) { sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name); clif_displaymessage(tsd->fd, str); } With:
    if (src->type == BL_PC) { if (target->type == BL_PC) { sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp); clif_displaymessage(sd->fd, str); } else { sprintf(str, "Target healed for %dhp!", hp); clif_displaymessage(sd->fd, str); } } if (target->type == BL_PC && target->id != src->id) { sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name); clif_displaymessage(tsd->fd, str); }
  5. Skorm's post in Calculating the sleep timer for npcwalkto with npcspeed and distance was marked as the answer   
    Why not just time how long it takes for the npc to travel one square... ([email protected] * [email protected]_per_square_in_miliseconds);
     
    Well if the movement speed is like iRO it's 0.15s per-square at the normal walk speed.
    [email protected] = ([email protected] * 150);
  6. Skorm's post in Requesting NPC - require x to get y with fail chance was marked as the answer   
    Maybe this will help you out enough with your script.
    prontera,100,100,1 script chance_get 101,{ mes "[ Chancy ]"; mes "Oh hello would you like to try my game?"; next; if( select( "Yes:No" ) == 2 ) { mes "[ Chancy ]"; mes "I'm sorry to hear that. Maybe next time then."; close; } mes "[ Chancy ]"; if( countitem( .gold ) < .gold_amount ) { mes "You don't have enough "+getitemname( .gold )+"."; mes "I require at least "+.gold_amount+"."; close; } else if( Zeny < .zeny ) { mes "It looks like you don't have enough zeny..."; mes "You need at least "+.zeny+"."; close; } Zeny = Zeny - .zeny; delitem .gold, .gold_amount; if( rand( 101 ) <= .chance ) { [email protected] = rand( .length ); getitem .rewards[[email protected]], .reward_amounts[[email protected]]; mes "Congratulations you got "+getitemname( .rewards[[email protected]] )+" x"+.reward_amounts[[email protected]]+"!!!"; } else mes "I'm sorry you didn't get anything. Come back and try again!"; close; OnInit: .gold = 617; .gold_amount = 100; .zeny = 10000000; .chance = 40; setarray .rewards, 501, 502, 503, 504, 506; setarray .reward_amounts, 1, 1, 1, 2, 2; .length = getarraysize( .rewards ); }
  7. Skorm's post in Autocreate party using waitingroom? HELP was marked as the answer   
    prontera,150,175,0 script testparty 521,{ npctalk "You're required to enter the waitingroom."; end; OnInit: waitingroom "test",11,"testparty::OnFull",3; end; OnFull: getmapxy [email protected]$, [email protected], [email protected], 1; warpwaitingpc [email protected]$, [email protected], [email protected]; for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) { [email protected]$ = rid2name([email protected][[email protected]]); [email protected]_id = getcharid( 0, [email protected]$ ); if ( getcharid( 1, [email protected]$ ) > 0 ) party_delmember( [email protected]_id ); sleep 100; if ( [email protected] == 0 ) { while( party_create( "party"+ rand(10000), [email protected]_id ) == -3 ); [email protected] = 1; } else if ( [email protected]_create_id ) party_addmember [email protected]_create_id, [email protected]_id; } end; OnPCLogoutEvent: [email protected] = 1; OnPCStatCalcEvent: if ( strcharinfo(3) == "prontera" && [email protected] || strcharinfo(3) != "prontera" && [email protected] || getcharid(1) == 0 ) end; [email protected]_id = getcharid(1); if ( getcharid(0) != getpartyleader( [email protected]_id, 2 ) ) party_delmember(); else { .i = 0; if ( instance_check_party([email protected]_id,2) == 0 ) party_destroy([email protected]_id); else { addrid( 2, 0, [email protected]_id ); if( !.i && [email protected]_id ) { .i = 1; party_changeleader getcharid(1), getcharid(0); } else if( [email protected]_id ) party_delmember(); } } end; } Remember to set where it says "prontera" to your map.
  8. Skorm's post in @hold commands was marked as the answer   
    Maybe like this?
     
    - script hold -1,{ OnInit: bindatcmd("hold", strnpcinfo(3)+"::OnHold"); end; OnHold: if ( [email protected] ) { set @Hold, 1; message strcharinfo(0), "Hold mode is ON."; pcblockmove getcharid(3), 1; } else { set @Hold, 0; message strcharinfo(0), "Hold mode is OFF."; pcblockmove getcharid(3), 0; } }
  9. Skorm's post in R> Items = Cash points Converter was marked as the answer   
    Just sell the items you want to convert to cashpoints to this npc he also sells the items for cashpoints to convert them back.
    - shop exg_exp -1,501:50. prontera,100,100,5 script Exchanger Express 100,{ callshop "exg_exp",0; npcshopattach "exg_exp"; end; OnBuyItem: setarray [email protected]$, "@bought_", "bought", "-1", "@item"; if( !checkweight2(getd([email protected]$+"nameid"),getd([email protected]$+"quantity")) ) { mes "I'm sorry but purchasing this many items would put you over weight!"; close; } OnSellItem: if( !getarraysize([email protected]$) ) setarray [email protected]$, "@sold_", "sold", "1", "@delitem"; [email protected] = getarraysize(getd([email protected]$+"nameid")); for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) { if( [email protected]$[1] == "sold" ) { if ( countitem(@sold_nameid[[email protected]]) < @sold_quantity[[email protected]] || @sold_quantity[[email protected]] <= 0 ) { mes "Something went wrong!"; close; } } else { if ( @bought_quantity[[email protected]] <= 0 ) { mes "Something went wrong..."; close; } } for ( [email protected] = 0; [email protected] < .len; [email protected] = [email protected] + 2 ) { if( getd([email protected]$+"nameid["[email protected]+"]") == .item_base[[email protected]] ) { if ( #CASHPOINTS < .item_base[[email protected]+1] * @bought_quantity[[email protected]] && [email protected]$[1] != "sold" ) { mes "You have insufficient cashpoints."; close; } atcommand [email protected]$[3]+" "+.item_base[[email protected]]+" "+getd([email protected]$+"quantity["[email protected]+"]"); [email protected] = ( getd([email protected]$+"quantity["[email protected]+"]") * .item_base[[email protected]+1] ) * atoi([email protected]$[2]); #CASHPOINTS = #CASHPOINTS + [email protected]; dispbottom getitemname(.item_base[[email protected]]) +" x"+ getd([email protected]$+"quantity["[email protected]+"]") +" "+ [email protected]$[1] +" for "+ [email protected] +" CASHPOINTS!"; } } } deletearray getd([email protected]$+"quantity"); deletearray getd([email protected]$+"nameid"); mes "Deal completed."; close; OnInit: setarray .item_base, 7539, 3, 7227, 5, 671, 10; .len = getarraysize(.item_base); npcshopdelitem "exg_exp",501; for ( [email protected] = 0; [email protected] < .len; [email protected] = [email protected] + 2 ) npcshopadditem "exg_exp",.item_base[[email protected]],.item_base[[email protected]+1]; }
  10. Skorm's post in Resting System was marked as the answer   
    Perhaps something like this?

    http://rathena.org/board/topic/93779-hourly-rewards-version-2
  11. Skorm's post in Refine Ticket Custom was marked as the answer   
    prontera,100,100,5 script ticket_refine 100,{ mes .npc$; mes "Which item would you like to refine?"; next; while( [email protected]++ <= .e_len ) { [email protected] = [email protected] -1; if( .eqpl[ [email protected] ] ) { if( getequipid( [email protected] ) > -1 ) [email protected]$ = [email protected]$ + .eqp$[ [email protected] ]+" - [^0000FF"+getitemname( getequipid( [email protected] ) )+"^000000]:"; else [email protected]$ = [email protected]$ + "^adb4be"+.eqp$[ [email protected] ]+" - [Empty]^000000:"; } else [email protected]$ = [email protected]$ + ":"; } [email protected] = select( [email protected]$ ); [email protected]_loc = .eqpl[ [email protected] -1 ]; [email protected]_itm = getequipid( [email protected]_loc ); [email protected]_ref = getequiprefinerycnt( [email protected]_loc ); if( [email protected]_itm <= 0 ) { mes .npc$; mes "Hmm, I don't think you have anything equipped there."; close; } if( !getequipisenableref( [email protected]_loc ) && .chk_rf_able ) { mes .npc$; mes "Hmm, this item doesn't seem to be refine-able."; close; } if( [email protected]_ref < .ref_cap ) { mes .npc$; mes "Sorry but I don't refine items that so weak. Come back when it's at least +"+.ref_cap+"."; close; } mes .npc$; mes "Input desired refine."; next; switch( input( [email protected]_ref, (( [email protected]_ref < .min_ref )? .min_ref : [email protected]_ref+1 ), .max_ref ) ) { case -1: mes .npc$; if( [email protected]_ref < .min_ref ) mes "I do not refine items lower than "+.min_ref+"."; else mes "This item can not be refined lower than "+([email protected]_ref+1)+"."; close; case 1: mes .npc$; mes "Items can not be refined above "+.max_ref+"!"; close; default: } [email protected]_ref = [email protected]_ref - [email protected]_ref; for( [email protected] = [email protected]_ref; [email protected] < .c_len && [email protected] < [email protected]_ref; [email protected]++ ) [email protected]_cost = [email protected]_cost + .cost[[email protected]]; mes .npc$; mes "This new refine will cost you "[email protected]_cost+" "+getitemname(.tk_id)+"(s). Do you accept?"; next; if( select("Yes:No") == 2 ) { mes .npc$; mes "Alright, thanks anyways, goodbye!"; close; } if( .chk_rf_prct ) { mes .npc$; mes "There is a chance that this item will break! Do you still accept?"; next; if( select("Yes:No") == 2 ) { mes .npc$; mes "Alright, that's probably for the best!"; close; } } if( countitem(.tk_id) < [email protected]_cost ) { mes .npc$; mes "I'm sorry but you don't have enough tickets for that."; close; } if( [email protected]_itm != getequipid( [email protected]_loc ) || [email protected]_ref != getequiprefinerycnt( [email protected]_loc ) ) { mes .npc$; mes "Something went wrong! Aborting!"; close; } if( .chk_rf_gtim ) { [email protected] = getequipcardid( [email protected]_loc, 0 ); [email protected] = getequipcardid( [email protected]_loc, 1 ); [email protected] = getequipcardid( [email protected]_loc, 2 ); [email protected] = getequipcardid( [email protected]_loc, 3 ); } while( ([email protected]_ref = getequiprefinerycnt( [email protected]_loc )) < [email protected]_ref && [email protected]_ref < .c_len ) { if( .chk_rf_prct && getequippercentrefinery([email protected]_loc) <= rand(101) ) { failedrefitem( [email protected]_loc ); mes "Ahh! I'm soooo sorry but your item broke!"; close; } if( [email protected] ) { successrefitem( [email protected]_loc ); if( .chk_rf_gtim ) { delequip([email protected]_loc); getitem2 [email protected]_itm, 1, 1, [email protected]_ref, 0, [email protected], [email protected], [email protected], [email protected]; equip([email protected]_itm); [email protected] = 1; } } [email protected]_ref2 = getequiprefinerycnt( [email protected]_loc ); if( [email protected]_ref == [email protected]_ref2 ) break; delitem .tk_id, .cost[ [email protected]_ref ]; } mes .npc$; mes "All done thanks for stopping bye!."; close; OnInit: .npc$ = "[ Ticket Refiner ]"; .tk_id = 674; setarray .cost, // Ticket cost per level. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1~10 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 11~20 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5; // 21~31 .ref_cap = 10; // An item must be at least this refine before it can be refined by this npc. 0 disabled. .max_ref = 31; // This is the max refine. 0 disabled. .min_ref = 10; // This is the min refine. 0 disabled. .chk_rf_able = 1; // Check if the item is refine-able? 0 disabled. .chk_rf_prct = 0; // Check refine-able percentages? 0 disabled. .chk_rf_gtim = 0; // The npc will switch to getitem if the refine cap is too high. 0 disabled. setarray .eqp$, "Upper Headgear", "Armor", "Left Hand", "Right Hand", "Garment", "Shoes", "Accessory1", "Accessory2", "Mid Headgear", "Low Headgear"; setarray .eqpl, //Set EQI 0 to disable slot. 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; .e_len = getarraysize( .eqp$ ); .c_len = getarraysize( .cost ); } About the other thing in the item script just do...
    doevent "ticket_refine::OnGoNPCEvent"; getitem 674, 1;
  12. Skorm's post in @autoattack was marked as the answer   
    It might be easier to just disable vending on those maps?
    anthell mapflag novending This might work though...
    - script AT_Command -,{ OnAT_Command: if( !checkvending() ) atcommand "@autoattack"; else message strcharinfo(0), "This command can't be used while vending."; end; OnInit: bindatcmd "autoattack","AT_Command::OnAT_Command"; }
  13. Skorm's post in Setting Multiple Items was marked as the answer   
    Perhaps a little more information is needed?
     
    But maybe something along these lines or?
    getinventorylist; [email protected] = @inventorylist_count; copyarray [email protected]_list[0], @inventorylist_id[0], [email protected]; setarray [email protected], 501, 502, 503; setarray [email protected], 504, 506, 507; [email protected]_2 = getarraysize([email protected]); [email protected]_3 = getarraysize([email protected]); for( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) { for( [email protected] = 0; [email protected] < [email protected]_2; [email protected]++ ) if( [email protected]_list[[email protected]] == [email protected][[email protected]] ) [email protected]$ = [email protected]$ + getitemname([email protected]_list[[email protected]]) + ":"; [email protected]$ = [email protected]$ + ":"; } mes "Pick from the items you'd like to exchange."; [email protected] = select([email protected]$)-1; mes "You've selected "+getitemname([email protected]_list[[email protected]])+". What would you like to exchange it with?"; for( [email protected] = 0; [email protected] < [email protected]_3; [email protected]++ ) [email protected]_2$[getarraysize([email protected]_2$)] = getitemname([email protected][[email protected]]); [email protected]_3$ = implode( [email protected]_2$, ":" ); [email protected] = select([email protected]_3$)-1; delitem [email protected]_list[[email protected]], 1; getitem [email protected][[email protected]], 1;
  14. Skorm's post in Requesting for PVP PK points and PVP NPC SHOP script .TY was marked as the answer   
    Hmm...
    - shop custom_seller2 -1,501:500 prontera.gat,95,99,5 script PK Points Dealer 100,{ mes "[PK Points Dealer]"; mes "I will sell you items for PK points."; mes "Each time you kill a player on "+.map$+" you'll get 1 PK point to spend here!"; next; mes "[PK Points Dealer]"; mes "You currently have [^0000ff"+pk_points+"^000000] PK points to spend."; callshop "custom_seller2",1; npcshopattach "custom_seller2"; end; OnBuyItem: for(set [email protected],0; [email protected]<getarraysize(.customs); set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<getarraysize(@bought_nameid); set [email protected],[email protected]+1) { if(@bought_nameid[[email protected]]==.customs[[email protected]]) { if(checkweight(@bought_nameid[[email protected]],@bought_quantity[[email protected]])) { if(pk_points >= .Price[[email protected]]*@bought_quantity[[email protected]]) { set pk_points, pk_points - .Price[[email protected]]*@bought_quantity[[email protected]]; getitem @bought_nameid[[email protected]],@bought_quantity[[email protected]]; } else dispbottom "You don't have enough PK points to purchase that item."; } else dispbottom "Purchasing these items will put you over the weight limit!"; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); close; OnPCKillEvent: if( strcharinfo(3) != .map$ ) end; copyarray( @killed$[1], @killed$[0], .saved_l-1 ); @killed$ = ""+killedrid; if( countstr( implode( @killed$, "|" ), ""+killedrid, 0 ) <= .rstrk_l ) { pk_points++; dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s)."; } end; OnInit: set .map$, "guild_vs3"; set .saved_l, 3; //Length of saved ids can be up to 127. set .rstrk_l, 2; //Level of restriction. setarray .customs[0], 12103, 607, 678; // Enter the ID of customs here... setarray .Price[0], 20 , 40 , 300; // Price for each custom here... npcshopitem "custom_seller2", 0 , 0; // Don't touch any coding beyond here.. for( set .i,0; .customs[.i]; set .i,.i+1 ) npcshopadditem "custom_seller2",.customs[.i],.Price[.i]; end; }
  15. Skorm's post in Help! edit was marked as the answer   
    Here's an updated version...
     
    @follow.patch
  16. Skorm's post in Random Headgear Bonuses was marked as the answer   
    This is probably a pretty convoluted way of doing it... But I've found with SQL things are either extremely easy or nearly impossible. LOL
    DELIMITER $$ DROP PROCEDURE IF EXISTS dowhile $$ CREATE PROCEDURE dowhile() BEGIN DECLARE v1 INT DEFAULT (SELECT COUNT(*) FROM `item_db2_re` WHERE `equip_locations` & 769 AND `script` IS NULL); DECLARE v2 INT DEFAULT FLOOR( 1 + RAND( ) * 10 ); DECLARE v3 INT DEFAULT FLOOR( 1 + RAND( ) * 100 ); WHILE v1 > 0 DO CASE FLOOR( 1 + RAND( ) * 2 ) WHEN 1 THEN UPDATE `item_db2_re` SET `script` = CONCAT( 'bonus bStr,', v2, ';' ) WHERE `equip_locations` & 769 AND `script` IS NULL ORDER BY RAND() LIMIT 1; WHEN 2 THEN UPDATE `item_db2_re` SET `script` = CONCAT( 'bonus2 bAddEle,', v2, ',', v3, ';' ) WHERE `equip_locations` & 769 AND `script` IS NULL ORDER BY RAND() LIMIT 1; END CASE; SET v1 = v1 - 1; SET v2 = FLOOR( 1 + RAND( ) * 10 ); SET v3 = FLOOR( 1 + RAND( ) * 100 ); END WHILE; END $$ CALL dowhile();
  17. Skorm's post in R> getareauserid command was marked as the answer   
    Personally I hate it when commands use global variables to store these types of things...
    /*========================================== *------------------------------------------*/ static int buildin_getareausers_sub(struct block_list *bl,va_list ap) { int *users=va_arg(ap,int *); struct map_session_data *sd = (TBL_PC *)bl; struct script_state* st; st=va_arg(ap,struct script_state*); if( *users < 128 ) setd_sub(st, NULL, "[email protected]_ids", *users, (void *)__64BPRTSIZE(sd->status.account_id), NULL); (*users)++; return 0; } BUILDIN_FUNC(getareausers) { const char *str; int16 m,x0,y0,x1,y1,users=0; //doubt we can have more then 32k users on str=script_getstr(st,2); x0=script_getnum(st,3); y0=script_getnum(st,4); x1=script_getnum(st,5); y1=script_getnum(st,6); if( (m=map_mapname2mapid(str))< 0){ script_pushint(st,-1); return 0; } map_foreachinarea(buildin_getareausers_sub, m,x0,y0,x1,y1,BL_PC,&users,st); script_pushint(st,users); return 0; } NPC Example...
    prontera,148,177,5 script getareausers 100,{ [email protected] = getareausers("prontera",148,175,163,164); for( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) npctalk ""[email protected]_ids[[email protected]]; end; }
  18. Skorm's post in Anti Dual Script - Mac was marked as the answer   
    - script dualclientkicker2 -1,{
    OnPCLoginEvent:
    set [email protected], query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN "+
    "(SELECT `account_id` FROM `login` WHERE `last_mac` = "+
    "(SELECT `last_mac` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;",[email protected]);
    sleep2 1000;
    if( [email protected] > .max )
    atcommand "@kick "+strcharinfo(0);
    end;
    OnInit:
    set .max, 2; //Max Connections.
    }

  19. Skorm's post in Custom Buffer was marked as the answer   
    Like this?
    prontera,150,150,5 script Buffer 100,{ if( @h_last > gettimetick(2) || !slc_bufs ) goto Set_Buffs; set @h_last, gettimetick(2)+5; [email protected] = callsub(Sub_PriceCheck); if( [email protected] > Zeny ) { message strcharinfo(0), "You don't have enough zeny to buff double click the buffer to modify your selection."; end; } for( [email protected] = 0; [email protected] < .len; [email protected]++ ) if( ( slc_bufs & pow( 2, [email protected] ) ) ) { skilleffect .skil_num[[email protected]], .levels[[email protected]]; sc_start .sc_effect[[email protected]], .ticks[[email protected]], .levels[[email protected]]; message strcharinfo(0),"Buff "+.skil_txt$[[email protected]]+" Added!"; } Zeny = Zeny - [email protected]; end; Sub_PriceCheck: for( [email protected] = 0; [email protected] < .len; [email protected]++ ) if( ( slc_bufs & pow( 2, [email protected] ) ) ) [email protected] = [email protected] + .price[[email protected]]; return [email protected]; Set_Buffs: [email protected]_bufs = slc_bufs; [email protected] = callsub(Sub_PriceCheck); function sf { function s; [email protected] = getarg(2); [email protected] = getarg(3); return ( sprintf( getarg(0), s([email protected], [email protected], getarg(1), getarg(4), getarg(5)), s([email protected]++, [email protected], getarg(1), getarg(4), getarg(5)), s([email protected]++, [email protected], getarg(1), getarg(4), getarg(5)), s([email protected]++, [email protected], getarg(1), getarg(4), getarg(5)), s([email protected]++, [email protected], getarg(1), getarg(4), getarg(5)), s([email protected]++, [email protected], getarg(1), getarg(4), getarg(5)), s([email protected]++, [email protected], getarg(1), getarg(4), getarg(5)), s([email protected]++, [email protected], getarg(1), getarg(4), getarg(5)), s([email protected]++, [email protected], getarg(1), getarg(4), getarg(5)), s([email protected]++, [email protected], getarg(1), getarg(4), getarg(5)) ) +(( [email protected]+1 < [email protected] )?":Next":":") +(( [email protected] > 0 )?":Back":":") +":Done:Cancel" ); function s { if( getarg(0) >= getarg(1) ) return ""; else { [email protected]$ = getelementofarray( getarg(2), getarg(0) ); return [email protected]$==""?"":"Buff [ ^0054ff"[email protected]$+"^000000 ] Lv"+getelementofarray( getarg(4), getarg(0) )+" [ "+(getarg(3)&pow(2,getarg(0))?"^35a100On":"^FF0000Off")+"^000000 ]"; } }; }; function nex { return((getarg(0)+10)<getarg(1)?getarg(0)+10:getarg(1)-(getarg(1)%10)); }; function bac { return((getarg(0)-10)>=0?getarg(0)-10:0); }; mes .npc_nm$; mes "Select your buffs!"; next; [email protected] = 0; while( 1 ) { select( sf( .format$, .skil_txt$, [email protected], .len, [email protected]_bufs, .levels ) ); switch( @menu ) { case 11: [email protected] = nex( [email protected], .len ); break; case 12: [email protected] = bac( [email protected] ); break; case 13: mes .npc_nm$; mes "Alright, your current total will be "[email protected]+"z each time you use my buffing service. Is that ok?"; next; if( select("Yes:No") == 1 ) slc_bufs = [email protected]_bufs; case 14: end; default: [email protected] = [email protected][email protected]; if( ( [email protected]_bufs & pow( 2, [email protected] ) ) ) { [email protected]_bufs = [email protected]_bufs - pow( 2, [email protected]ect ); [email protected] = [email protected] - .price[[email protected]]; } else { [email protected]_bufs = [email protected]_bufs + pow( 2, [email protected] ); [email protected] = [email protected] + .price[[email protected]]; } } } end; OnInit: .npc_nm$ = "[ "+strnpcinfo(1)+" ]"; setarray .sc_effect, SC_INCREASEAGI, SC_BLESSING, SC_ASSUMPTIO, SC_IMPOSITIO, SC_ANGELUS, SC_MAGNIFICAT, SC_GLORIA; setarray .skil_txt$, "Increase Agi", "Blessing", "Assumptio", "Impositio", "Angelus", "Magnificat", "Gloria"; setarray .ticks, 300000, 300000, 300000, 300000, 300000, 300000, 300000; setarray .price, 1000, 1000, 5000, 5000, 5000, 10000, 10000; setarray .skil_num, 29, 34, 361, 66, 33, 74, 75; setarray .levels, 10, 10, 5, 5, 10, 5, 5; .format$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s"; .len = getarraysize(.sc_effect); end; }
  20. Skorm's post in Command password binding. was marked as the answer   
    Honestly I think this is a bug...
    // @commands (script-based) struct atcmd_binding_data* get_atcommandbind_byname(const char* name) { int i = 0; if( *name == atcommand_symbol || *name == charcommand_symbol ) name++; // for backwards compatibility ARR_FIND( 0, atcmd_binding_count, i, strcmpi(atcmd_binding[i]->command, name) == 0 ); return ( i < atcmd_binding_count ) ? atcmd_binding[i] : NULL; } Is a function used to get the bound command.... It uses strcmpi which is case insensitive. I'll ask someone who knows more about source than I do. x_x;;
     
    Edit:
     
    Alright so I was right it was a bug xD... I compared an older version of rAthena that I had and I can confirm your error, but it was solved in newer versions. If you don't feel like updating...
     
    In atcommand.c search for
    strcmp(atcmd_binding[i]->command, name) replace it with
    strcmpi(atcmd_binding[i]->command, name) and recompile.
  21. Skorm's post in pvp warper getmapuser was marked as the answer   
    Try this...
    prontera,151,190,5 script PvP Warper 843,{ mes "[ ^ff0000PVP Warper^000000 ]"; announce ""+strcharinfo(0)+" has entered PvP Arena [ Ancient - Nightmare ]", bc_all; warp "guild_vs2.gat",0,0; close2; delwaitingroom; OnInit: waitingroom "PvP Warper [ "+getmapusers("guild_vs2")+" ]",1; end; } The npc probably just needs to enter the room etc.
  22. Skorm's post in bindatcmd @bst Help was marked as the answer   
    /*
    CREATE TABLE `ragnarok_logs`.`bst_market_log` (
    `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
    `name` VARCHAR(30) NOT NULL DEFAULT '',
    `message` VARCHAR(150) NOT NULL DEFAULT '',
    `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    PRIMARY KEY (`id`))
    ENGINE = MyISAM
    DEFAULT CHARACTER SET = utf8;
    */
    - script bst_atcommand -1,{
    OnInit:
    bindatcmd "bst",strnpcinfo(0)+"::OnCommand";
    end;
    OnCommand:
    if ( !getstrlen([email protected]_parameters$) ) {
    message strcharinfo(0), "Please, enter a message (usage: @bst <message>).";
    end;
    }
    if ( @bst_delay + 1800 > gettimetick(2) ) {
    message strcharinfo(0), "There is a 30 min delay of using this command again";
    end;
    }
    @bst_delay = gettimetick(2);
    [email protected]$ = implode( [email protected]_parameters$," " );
    announce "[Market] "+ strcharinfo(0) +" : "+ [email protected]$, bc_all, 0x9999FF;
    query_logsql( "INSERT INTO `bst_market_log` ( `name`, `message` ) VALUES ( '"+escape_sql(strcharinfo(0))+"', '"+escape_sql( getstrlen([email protected]$)>150?substr([email protected]$,0,149):[email protected]$ )+"' );" );
    end;
    }

  23. Skorm's post in Request script Inside Dimensional Crack was marked as the answer   
    Courtesy of Ziu:
    https://www.dropbox.com/s/qz25fmuqbyptat6/HeroesTrailsGeneralNPC.rar
  24. Skorm's post in Permanent no_nightmare_drop everywhere. was marked as the answer   
    OnInit: setmapflag "<map name>",mf_nightmaredrop,off; Or
    <map_name> mapflag pvp_nightmaredrop off Also did you check mapflag/nightmare.txt
  25. Skorm's post in Special Monster Summoner was marked as the answer   
    event_map,100,100,5 script Stone 1#501 406,{ [email protected] = atoi(strnpcinfo(2)); switch ( [email protected] ) { case 501: [email protected]$ = "^CC0000"; [email protected]$ = "Red Spirit"; break; case 502: [email protected]$ = "^3333FF"; [email protected]$ = "Blue Spirit"; break; case 503: [email protected]$ = "^FFFF00"; [email protected]$ = "Yellow Spirit"; break; case 504: [email protected]$ = "^009900"; [email protected]$ = "Green Spirit"; break; case 506: [email protected]$ = "^9900FF"; [email protected]$ = "Violet Spirit"; } mes "[ "[email protected]$+"Ancient Stone of "[email protected]$+"^000000 ]"; mes "Will you insert the "[email protected]$+getitemname([email protected])+"^000000 and release the "[email protected][email protected]$+"^000000."; next; if( select("Insert!:Back down...") ) { if( !countitem([email protected]) ) { mes "You insert a random rock found lying on the ground..."; sleep2(100); mes "..."; sleep2(100); mes "..."; sleep2(100); mes [email protected]$+"Foolish mortal!!!"; atcommand "@nuke "+strcharinfo(0)+""; close; } hideonnpc strnpcinfo(0); delitem [email protected],1; .active++; if( .active >= .npc ) { mapannounce strnpcinfo(4),"Dark Infrit has been summoned",bc_map|bc_blue; monster "event_map",50,50,"Dark Infrit",2001,1,strnpcinfo(0)+"::OnMobDeath",2; } mes "( "+strnpcinfo(1)+" activated! )"; close; } mes [email protected]$+"You're not worthy!!!"; close; OnMobDeath: donpcevent("::OnStonesReactivate"); end; OnInit: .npc++; end; OnStonesReactivate: hideoffnpc strnpcinfo(0); .active = 0; } event_map,101,101,5 duplicate(Stone 1#501) Stone 2#502 406 event_map,102,102,5 duplicate(Stone 1#501) Stone 3#503 406 event_map,103,103,5 duplicate(Stone 1#501) Stone 4#504 406 event_map,104,104,5 duplicate(Stone 1#501) Stone 5#505 406 event_map,105,105,5 duplicate(Stone 1#501) Stone 6#506 406
×
×
  • Create New...

Important Information

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