Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    51

Community Answers

  1. Capuche's post in Ladder Problem was marked as the answer   
    for (set .@i,0; .@i<8; set .@i,.@i+1) { mes (.@i+1) +". ^0000FF"+ .@aid$[.@i] +"^000000 ["+ .@var[.@i] +"]"; - close; } + close; your script close the window and put an end on for loop after one iteration
  2. Capuche's post in [ Load ] Pls Help! was marked as the answer   
    The previous script doesn't work on 3ceam.
    - script jnojij -,{ OnPCLoadMapEvent: if ( strcharinfo(3) == "job3_rune01" && @warp_on_job3_rune01 == 0 ) { if ( getsavepoint(0) != "job3_rune01" ) { message strcharinfo(0), "You can't warp here."; warp "Save",0,0; } } } job3_rune01 mapflag loadevent prontera,150,150,5 script warpto job3_rune01 56,{ set @warp_on_job3_rune01, 1; warp "job3_rune01",0,0;// warp player on rune map sleep2 50; set @warp_on_job3_rune01, 0; }  
    I don't find an easy way with script npc
  3. Capuche's post in Guild Recall NPC Pls any Help Fast was marked as the answer   
    - .@guild_id = getcharid(2); -   :   means 'delete the line'
     
    + set .@guild_id, getcharid(2); +   :   means 'add the line'
     
    prontera,150,150,5 script ihjbnik 56,{ .@guild_id = getcharid(2);// <---- REPLACE HERE if ( !.@guild_id ) {  
    Like that
    prontera,150,150,5 script ihjbnik 56,{ set .@guild_id, getcharid(2); if ( !.@guild_id ) { mes "you are not in a guild"; close; } else if ( getguildmasterid(.@guild_id) != getcharid(0) ) { mes "I only talk to the guild master"; close; } mes "warp?"; next; if ( select( "yes", "no" ) -1 ) end; warpguild "prontera",161,181,.@guild_id; end; }  
    it's hard to help you
  4. Capuche's post in about pvp drop skull / bone was marked as the answer   
    - script zehj -1,{
    OnPCKillEvent:
    .@map$ = strcharinfo(3);
    if ( .@map$ == "guild_vs3" || .@map$ == "pvp_y_1-2" ) {
    .@char_id = getcharid( 0,rid2name( killedrid ) );
    getitem2 7420,1,1,0,0,254,0, ( .@char_id & 65535 ), ( .@char_id >> 16 );
    }
    end;
    }

  5. Capuche's post in please EDIT my script .. was marked as the answer   
    Use F_RandMes function
    getitem callfunc( "F_RandMes", 3, 1101, 1201, 1501 ),.@itemamount; http://rathena.org/board/topic/78263-scripting-faqtipstricks/
    for more infos
  6. Capuche's post in help with this dice event. was marked as the answer   
    Nope there is a wrong typo : it's hideonnpc, not hideoonnpc sorry
     
    Also add a mapwarp
    L_Champ: mapannounce "quiz_01","Dice: Come to me and tell me your name.",0; hideoffnpc "Dice#evnt1"; sleep 300000;// 5mins hideonnpc "Dice#evnt1"; mapwarp "quiz_01","prontera",150,150; end;
  7. Capuche's post in help me with this script! thank you! was marked as the answer   
    prontera,128,213,5 script Coin Manager#1::CM 733,{
    // Your Server Max Zeny Amount
    set .MaxZeny,1000000000;
    // Coins Item ID and each Coins Costs
    setarray .Coins[1],677;
    setarray .Zeny[1],10000000;
    set .@change_zeny_per_day, 2000000000;
    // Quest
    setarray .@item_need, 7227,5, 7444,100, 969,100, 999,100;
    .@size_need = getarraysize( .@item_need );
    set @Menu$,"";
    for( set .@a,1; .@a < getarraysize( .Coins ); set .@a,.@a+1 )
    set @Menu$,@Menu$ + getitemname( .Coins[.@a] )+":";
    while( 1 ){
    mes "Hello I am the Coin Manager, if you are interested in coins you have to talk with me,What can i help you with?";
    next;
    switch( select( "I want trade Coin to Zeny:I want trade Zeny to Coin" ) ){
    Case 1:
    mes "Very well. But im only interested on really expensive Coins made of Platinum:";
    for( set .@a,1; .@a < getarraysize( .Coins ); set .@a,.@a+1 ){
    mes "^0000FF"+getitemname( .Coins[.@a] )+" ^FF0000"+.Zeny[.@a]+"^000000 Zeny.";
    }
    next;
    set .@a,select( @Menu$ );
    mes "Select the Amount of Coins you want to trade into Zeny.";
    mes "You have "+countitem( .Coins[.@a] )+" "+getitemname( .Coins[.@a] )+".";
    input @Amount,0,countitem( .Coins[.@a] );
    if( @Amount < 1 ){
    mes "You don't have that quantity of Coins.";
    }else if( ( Zeny + ( @Amount * .Zeny[.@a] ) ) > .MaxZeny ){
    mes "You can't hold this amount of Zeny.";
    }else{
    set Zeny,Zeny + ( @Amount * .Zeny[.@a] );
    delitem .Coins[.@a],@Amount;
    mes "Done, you have traded "+@Amount+" of "+getitemname(.Coins[.@a])+" into "+( @Amount * .Zeny[.@a] )+" Zeny.";
    }
    next;
    break;
    Case 2:
    if ( zeny_coin_quest < gettimetick(2) ) {
    mes "im sory but you have to make platinum permit quest to trade zeny into platinum coins, do you want to make platinum permit quest?";
    next;
    if ( select( "yes", "no" ) -1 ) end;
    mes "you need :";
    for ( .@i = 0; .@i < .@size_need; .@i += 2 )
    mes "- "+ .@item_need[.@i+1] +" "+ getitemname( .@item_need[.@i] );
    mes "and 100,000,000z";
    next;
    if ( select( "give the items", "leave" ) -1 ) close;
    .@j = 0;
    for ( .@i = 0; .@i < .@size_need; .@i += 2 )
    if ( countitem( .@item_need[.@i] ) < .@item_need[.@i+1] ) {
    if ( !.@j ) mes "I'm sorry you need";
    mes "- "+ ( .@item_need[.@i+1] - countitem( .@item_need[.@i] ) ) +" "+ getitemname( .@item_need[.@i] );
    .@j++;
    }
    if ( Zeny < 100000000 )
    mes "You need "+ ( 100000000 - Zeny ) +" zeny.";
    if ( .@j || Zeny < 100000000 ) close;
    for ( .@i = 0; .@i < .@size_need; .@i += 2 )
    delitem .@item_need[.@i], .@item_need[.@i+1];
    Zeny = Zeny - 100000000;
    zeny_coin_quest = gettimetick(2) + 30 * 86400;
    close;
    }
    else if ( getstrlen( maxchange_zeny_per_day$ ) ) {
    explode( .@tmp$, maxchange_zeny_per_day$, "|" );
    if ( atoi( .@tmp$ ) == gettime(4) && atoi( .@tmp$[1] ) > .@change_zeny_per_day ) {
    mes "I'm sorry you can't exchange more than "+ .@change_zeny_per_day +" zeny per day.";
    close;
    }
    else if ( atoi( .@tmp$ ) != gettime(4) )
    .@tmp$[1] = 0;
    }
    mes "Very well. Here is the list on how much each coin is worth:";
    for( set .@a,1; .@a < getarraysize( .Coins ); set .@a,.@a+1 ){
    mes "^0000FF"+getitemname( .Coins[.@a] )+" ^FF0000"+.Zeny[.@a]+"^000000 Zeny.";
    }
    next;
    set .@a,select( @Menu$ );
    mes "Select the Amount of Zeny you want to trade into "+getitemname( .Coins[.@a] )+".";
    mes "You can get maximum of "+Zeny/.Zeny[.@a]+" "+getitemname( .Coins[.@a] )+".";
    input @Amount,0,Zeny/.Zeny[.@a];
    if( @Amount < 1 ){
    mes "You don't have that quantity of Zeny.";
    }else{
    set Zeny,Zeny - ( @Amount * .Zeny[.@a] );
    getitem .Coins[.@a],@Amount;
    mes "Done, you have traded "+( @Amount * .Zeny[.@a] )+" Zeny into "+@Amount+" of "+getitemname(.Coins[.@a])+" .";
    .@tmp$ = gettime(4);
    .@tmp$[1] = atoi( .@tmp$[1] ) + @Amount * .Zeny[.@a];
    maxchange_zeny_per_day$ = implode( .@tmp$, "|" );
    }
    next;
    break;
    }
    }
    close;
    }
    payon,164,222,2 duplicate(CM) Coin Manager#2 733
    turbo_room,93,117,5 duplicate(CM) Coin Manager#3 733

  8. Capuche's post in Somebody can edit this script for me please? job master was marked as the answer   
    Like this?
    //===== rAthena Script ======================================= //= Job Master //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.3 //===== Compatible With: ===================================== //= rAthena SVN r16114+ //===== Description: ========================================= //= A fully functional job changer. //===== Additional Comments: ================================= //= 1.1 Fixed reset on Baby job change. [Euphy] //= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support. [Euphy] //= 1.3 Kagerou/Oboro added. [Euphy] //============================================================ prontera,153,183,4 script Job Master#1::JM 743,{ function Job_Menu; function A_An; mes "[Job Master]"; if (Class > 4049) { mes "No more jobs are available."; close; } if (checkfalcon() || checkcart() || checkriding() || ismounting()) { mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkriding())?"Peco":"")+((ismounting())?"mount":"")+" before proceeding."; close; } if (.SkillPointCheck && SkillPoint) { mes "Please use all your skill points before proceeding."; close; } set .@eac, eaclass(); set .@i, ((.ThirdClass)?roclass(.@eac&EAJ_UPPERMASK):Class); if (.@i > 6 && .@i < 22) { if (BaseLevel < .Rebirth[0] || JobLevel < .Rebirth[1]) { set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, .Rebirth[1]-JobLevel; mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue."; close; } if (Class > 21) { mes "Switch to third class?"; next; Job_Menu(roclass(.@eac|EAJL_THIRD)); close; } while(1) { mes "Select an option."; next; set .@i, select(" ~ ^0055FFRebirth^000000:: ~ ^777777Cancel^000000"); if (.@i==3) close; mes "[Job Master]"; mes "Are you sure?"; next; Job_Menu(roclass(.@eac|EAJL_UPPER)); mes "[Job Master]"; } } set .@j1, roclass(.@eac|EAJL_2_1); set .@j2,roclass(.@eac|EAJL_2_2); if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE) setarray .@exp[0],roclass(.@eac|EAJL_THIRD),99; if (Class == Job_Ninja) setarray .@exp[0],.@j1,70; if (.@exp[0] && (.ThirdClass || Class == Job_Ninja)) { if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) { set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, .@exp[1]-JobLevel; mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue."; close; } mes "Switch to "+jobname(.@exp[0])+"?"; next; Job_Menu(.@exp[0]); close; } if (.@eac&EAJL_2) if (.@eac&(EAJL_UPPER|EAJL_BABY) || roclass(.@eac|EAJL_UPPER) == -1) { mes "No more jobs are available."; close; } if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) { if (JobLevel < .JobReq[0]) mes "A job level of "+.JobReq[0]+" is required to change into the 1st Class."; else if (Class == 4001 && .LastJob && lastJob) { mes "Switch classes now?"; next; Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER)); } else switch(Class) { case 0: Job_Menu(1,2,3,4,5,6,23,4046,24,25,4023); case 4001: Job_Menu(4002,4003,4004,4005,4006,4007); case 4023: Job_Menu(4024,4025,4026,4027,4028,4029,4045); default: mes "An error has occurred."; break; } close; } if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1) mes "No more jobs are available."; else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1]) mes "A job level of "+.JobReq[1]+" is required to change into the 2nd Class."; else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) { mes "Switch classes now?"; next; Job_Menu(lastJob+4001); } else Job_Menu(.@j1,.@j2); close; function Job_Menu { while(1) { if (getargcount() > 1) { mes "Select a job."; set .@menu$,""; for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) set .@menu$, .@menu$+" ~ "+jobname(getarg(.@i))+":"; set .@menu$, .@menu$+" ~ ^777777Cancel^000000"; next; set .@i, getarg(select(.@menu$)-1,0); if (!.@i) close; if ((.@i == 23 || .@i == 4045) && BaseLevel < .SNovice) { mes "[Job Master]"; mes "A base level of "+.SNovice+" is required to turn into a "+jobname(.@i)+"."; close; } mes "[Job Master]"; mes "Are you sure?"; next; } else set .@i, getarg(0); if (select(" ~ Change into ^0055FF"+jobname(.@i)+"^000000 class: ~ ^777777"+((getargcount() > 1)?"Go back":"Cancel")+"^000000") == 1) { mes "[Job Master]"; mes "You are now "+A_An(jobname(.@i))+"!"; if (.@i==4001 && .LastJob) set lastJob, Class; jobchange .@i; if (.@i==4001 || .@i==4023) resetlvl(1); specialeffect2 338; specialeffect2 432; if (.Platinum) callsub Get_Platinum; close; } if (getargcount() == 1) return; mes "[Job Master]"; } end; } function A_An { setarray .@A$[0],"a","e","i","o","u"; set .@B$, "_"+getarg(0); for(set .@i,0; .@i<5; set .@i,.@i+1) if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0); return "a "+getarg(0); } Get_Platinum: skill 142,1,0; switch(BaseClass) { case 0: if (Class !=23) skill 143,1,0; break; case 1: skill 144,1,0; skill 145,1,0; skill 146,1,0; break; case 2: skill 157,1,0; break; case 3: skill 147,1,0; skill 148,1,0; break; case 4: skill 156,1,0; break; case 5: skill 153,1,0; skill 154,1,0; skill 155,1,0; break; case 6: skill 149,1,0; skill 150,1,0; skill 151,1,0; skill 152,1,0; break; default: break; } switch(BaseJob) { case 7: skill 1001,1,0; break; case 8: skill 1014,1,0; break; case 9: skill 1006,1,0; break; case 10: skill 1012,1,0; skill 1013,1,0; break; case 11: skill 1009,1,0; break; case 12: skill 1003,1,0; skill 1004,1,0; break; case 14: skill 1002,1,0; break; case 15: skill 1015,1,0; skill 1016,1,0; break; case 16: skill 1007,1,0; skill 1008,1,0; skill 1017,1,0; skill 1018,1,0; skill 1019,1,0; break; case 17: skill 1005,1,0; break; case 18: skill 238,1,0; break; case 19: skill 1010,1,0; break; case 20: skill 1011,1,0; break; default: break; } return; OnInit: setarray .Rebirth[0],0,50; // Minimum base level, job level to rebirth OR change to third class setarray .JobReq[0],10,50; // Minimum job level to turn into 1st class, 2nd class set .ThirdClass,0; // Enable third classes? (1: yes / 0: no) set .SNovice,50; // Minimum base level to turn into Super Novice set .LastJob,1; // Enforce linear class changes? (1: yes / 0: no) set .SkillPointCheck,1; // Force player to use up all skill points? (1: yes / 0: no) set .Platinum,0; // Get platinum skills automatically? (1: yes / 0: no) end; } payon,148,231,6 duplicate(JM) Job Master#2 743
  9. Capuche's post in Little help once again :3 was marked as the answer   
    prontera,150,150,5 script special warper 456,{ function t; .@item_required = 607; .@timer_allow = 3600; // allow to warp 1h .@level_required = 99; .@special_map$ = "geffen"; if ( #allow_use_warper && #allow_use_warper > gettimetick(2) ) { mes "you can use the warp for "+ t( #allow_use_warper - gettimetick(2) ); next; } else { if ( #allow_use_warper && #allow_use_warper < gettimetick(2) ) { #allow_use_warper = 0; setd ".allow_"+ getcharid(3), 0; } if ( BaseLevel < .@level_required ) { mes "you must be level "+ .@level_required +" to go further."; close; } else if ( countitem( .@item_required ) < 0 ) { mes "you need a "+ getitemname( .@item_required ); close; } else if ( #delay_special_warp > gettimetick(2) ) { mes "I'm sorry you can't use this warper. you must wait "+ t( #delay_special_warp - gettimetick(2) ); close; } } select( "use warper" ); warp .@special_map$,0,0; // your warp map if ( !#allow_use_warper ) { #allow_use_warper = gettimetick(2) + .@timer_allow; #delay_special_warp = gettimetick(2) + 86400 * 7; // 1 week of delay } if ( !getd( ".allow_"+ getcharid(3) ) ) { setd ".allow_"+ getcharid(3), 1; attachnpctimer; initnpctimer; } end; OnTimer300000: // check timer every 5mins OnTimer600000: OnTimer900000: OnTimer1200000: OnTimer1500000: OnTimer1800000: OnTimer2100000: OnTimer2400000: OnTimer2700000: OnTimer3000000: OnTimer3300000: OnTimer3600000: if ( strcharinfo(3) == .@special_map$ && #allow_use_warper && #allow_use_warper < gettimetick(2) ) { stopnpctimer; warp "prontera",0,0; message strcharinfo(0), "end of time"; setd ".allow_"+ getcharid(3), 0; } else if ( strcharinfo(3) != .@special_map$ ) stopnpctimer; end; function t { function s; set .@left, getarg(0); if ( .@left <= 0 ) return getarg(0); set .@day, .@left / 86400; set .@hour, .@left % 86400 / 3600; set .@min, .@left % 3600 / 60; set .@sec, .@left % 60; return ( ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" min"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" sec"+ s( .@sec,1 ) : "" ) ); function s { return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); } } } Try this one
  10. Capuche's post in Make famous PvP Ladder works only in specific PvP rooms? was marked as the answer   
    add right after
    OnPCKillEvent: if ( getgmlevel() >= $@LadderGM ) end; theses lines
    .@map$ = strcharinfo(3); if ( .@map$ != "pvp_n_1-3" && .@map$ != "arena_4" && .@map$ != "final_dest" ) end;
  11. Capuche's post in Mapflag Restriction of Item was marked as the answer   
    Mapflag#restricted.txt ?
    trunk/npc/mapflag/restricted.txt
  12. Capuche's post in delitemid = getarg(1) was marked as the answer   
    mes "[Premium Disguise]"; mes "Alright, thank you! You can now access the "+getarg(2)+" headgear."; delitem 7227, getarg(1); setd "#"+getarg(0)+getarg(3),1; You were right
  13. Capuche's post in Euphys Quest Shop duplicate item? was marked as the answer   
    You can make several shop in the main npc
    prontera,142,172,5 script Recorn's Customs#1 998,{ callfunc "qshop",1,2,3,4; }// call shop 1,2,3,4 ra_temple,144,190,11 script Primelda's Headgear Machine#1 562,{ callfunc "qshop",5; }// call shop 5 setarray .Shops$[1],"Headgears","Wings","Weapons","Other","Cute Headgears"; Add(1,5022,1,1000000,0,7086,1,969,10,999,40,1003,50,984,2); Add(1,5032,1,100000,0,1059,250,2221,1,2227,1,7063,600); Add(1,5027,1,100000,0,2252,1,1036,400,7001,50,4052,1); Add(1,5045,1,100000,0,2252,1,1054,450,943,200); Add(1,5372,1,30000000,0,5058,1,7166,1000,982,10); Add(1,18600,1,45000000,0,5016,1,2747,5,4257,1,4195,1,983,10); Add(1,5457,1,20000000,0,10007,10,1234,1,2214,1,982,10); add(1,5442,1,5000000,0,7441,10,1034,100,5052,1,978,1); add(1,5495,1,15000000,0,12028,10,1468,1,996,50,7162,100,615,5); add(1,5293,1,20000000,0,7134,100,577,100,523,100,12085,10,544,10); add(1,5401,1,20000000,0,2276,1,7799,10,734,100,4412,1); add(1,5325,1,35000000,0,5104,1,5034,1,4021,1,7095,500,1971,5); add(1,5362,1,15000000,0,4230,1,7157,200,7156,400,7117,250); add(1,18505,1,5000000,0,1615,1,932,300,628,100); add(1,5305,1,30000000,0,2287,10,5019,1,4337,1,7110,500); add(1,5574,1,10000000,0,7315,100,7201,150,738,1); Add(2,26002,1,0,0,7063,1000,2254,1,2743,2,674,5); Add(2,26003,1,0,0,7063,1000,2255,1,2680,2,674,5); Add(3,1224,1,0,0,7297,30,969,10,999,50,714,10); Add(3,1225,1,0,0,7292,30,969,10,999,50,714,10); Add(4,531,1,3,0,512,1,713,1); Add(4,532,1,3,0,513,1,713,1); Add(4,533,1,3,0,514,1,713,1); Add(4,534,1,3,0,515,1,713,1); Add(5,5133,1,0,0,671,1,4150,1,7107,300,7106,500); Add(5,5151,1,0,0,671,1,5001,1,7319,200,4001,2); Add(5,5182,1,0,0,671,1,4023,1,920,400,9010,1); Add(5,5454,1,0,0,671,1,4029,1,7030,300,9010,1); Add(5,5186,1,0,0,671,1,4280,1,1032,300,12002,20); Add(5,5455,1,0,0,671,1,4280,1,1033,300,12002,20); Add(5,5129,1,0,0,671,1,4015,1,574,30,916,100,7203,100); Add(5,5183,1,0,0,671,1,1049,1,574,30,916,100,7203,100); Add(5,5020,1,0,0,671,1,2210,1,1059,300,7166,300); Add(5,5387,1,0,0,671,1,2213,1,1059,300,7165,300); Add(5,5099,1,0,0,671,1,2213,1,4195,1,6394,100,980,1); Add(5,5185,1,0,0,671,1,7298,300,706,10,7198,300,2270,1); Add(5,5187,1,0,0,671,1,5085,1,7213,300,975,5); Add(5,5776,1,0,0,671,1,994,10,7097,500,7098,500,7451,1); Add(5,5297,1,0,0,671,1,2254,1,2282,1,7063,200,6394,100); Add(5,5456,1,0,0,671,1,2227,1,582,250,568,250,976,1); Add(5,5317,1,0,0,671,1,2227,1,995,10,544,100,1249,1); Add(5,5382,1,0,0,671,1,2244,1,5083,1,530,100,538,100); Add(5,5339,1,0,0,671,1,2272,1,7151,50,7111,50); Add(5,5336,1,0,0,671,1,2272,1,7151,50,7111,50); Add(5,5337,1,0,0,671,1,2272,1,7151,50,7111,50); Add(5,5338,1,0,0,671,1,2272,1,7151,50,7111,50); Add(5,5346,1,0,0,671,1,2272,1,7151,50,7111,50); Add(5,5474,1,0,0,671,1,2272,1,7151,50,7111,50,983,1);
  14. Capuche's post in Hi! Help with the Donation NPC made by Emistry. was marked as the answer   
    prontera,157,181,5 script Sample 757,{ if( getgmlevel() < 80 ){ mes "I only serve GM Staffs"; }else{ mes "Input the Player Name "; mes "Type ^FF0000CANCEL^000000 to cancel."; input .@Name$; if( compare( .@Name$,"cancel" ) ) close; if ( !getcharid( 3,.@Name$ ) ) { query_sql "select `account_id` from `char` where `name` = '"+ escape_sql( .@Name$ ) +"'", .@account_id; if ( !.@account_id ) close; } next; mes "What item to be Given ?"; do{ input .@ItemID,501,32767; if( getitemname( .@ItemID ) == "" ) mes "Invalid Item ID"; }while( getitemname( .@ItemID ) == "" ); mes "Input the Amount of "+getitemname( .@ItemID )+" to be given."; mes "Min. 1 ~ Max. 10"; input .@Amount,1,10; mes "If it is Equip...how much it should be Refined ?"; input .@Refine,0,10; next; mes "Receiver : ^0000FF"+.@Name$+"^000000"; mes "Item : ^FF0000"+getitemname( .@ItemID )+"^000000"; mes "Amount : ^FF0000"+.@Amount+"^000000"; mes "Refine : ^FF0000"+.@Refine+"^000000"; if( select("Confirm:Cancel") == 1 ){ announce "[ "+.@Name$+" ] gained "+.@Amount+" x "+getitemname( .@ItemID )+" from GM.",0; if ( getcharid( 3,.@Name$ ) ) { message .@Name$,"You have gained "+.@Amount+" x "+getitemname( .@ItemID )+" from GM."; getitem2 .@ItemID,.@Amount,1,.@Refine,0,0,0,0,0,getcharid( 3,.@Name$ ); } else { query_sql "select `account_id` from `char` where `name` = '"+ escape_sql( .@Name$ ) +"'", .@account_id; query_sql "insert into `global_reg_value` values ( '0', '#gift_iditem', '"+ .@ItemID +"', 2, "+ .@account_id +" ) on duplicate key update `value` = '"+ .@ItemID +"'"; query_sql "insert into `global_reg_value` values ( '0', '#gift_amountitem', '"+ .@Amount +"', 2, "+ .@account_id +" ) on duplicate key update `value` = '"+ .@Amount +"'"; query_sql "insert into `global_reg_value` values ( '0', '#gift_refineitem', '"+ .@Refine +"', 2, "+ .@account_id +" ) on duplicate key update `value` = '"+ .@Refine +"'"; } } } close; OnPCLoginEvent: if ( #gift_iditem ) { getitem2 #gift_iditem, #gift_amountitem,1, #gift_refineitem,0,0,0,0,0; message strcharinfo(0),"You have gained "+ #gift_amountitem +" x "+getitemname( #gift_iditem )+" from GM."; #gift_iditem = #gift_amountitem = #gift_refineitem = 0; } end; }  
    Make a copy of your database, just in case...
  15. Capuche's post in Need a little mod <3 was marked as the answer   
    input @map$; if ( getmapusers( @map$ ) == -1 ) { mes "Invalid map."; close; }  
     
     
    setmapflag @map$,mf_noskill;  
     
    There is a mistake in
    L_End: .count = 0; announce "All special zombies are dead. Apocalypse has ended.", 0; killmonster @2map$, strnpcinfo(0)+"::OnCorrectKill"; killmonster @2map$, strnpcinfo(0)+"::OnWrongKill"; end; @2map$ is defined for the gm, null for player
  16. Capuche's post in @AutoTrade was marked as the answer   
    Maybe coz of this ? Mapflag#autotrade
  17. Capuche's post in Headgear Disguise was marked as the answer   
    Just delete the addtimer in preview npc and the view is 'permanent' (stay on the session if changelook with atcommand, permanent if changelook with npc command)
  18. Capuche's post in Send Mail Reward was marked as the answer   
    @top_id, @top_name$; @top_id is a temporary variable attached to the player. With OnMinute, there is none player attached to the script.
    Change to .@top_id, .@top_name$;
  19. Capuche's post in euphy quest shop was marked as the answer   
    Yeah
    prontera,164,203,6 script Quest Shop#1 998,{ callfunc "qshop", 1; } open shop "Headgears"
     
    prontera,164,203,6 script Quest Shop#2 998,{ callfunc "qshop", 2; } open shop "Weapons"
    etc..
  20. Capuche's post in maxlevelranker error was marked as the answer   
    Check my post in the main topic
  21. Capuche's post in bindatcmd only in town was marked as the answer   
    - script vendwarp -1,{ OnInit: bindatcmd("vend",strnpcinfo(0)+"::OnVend"); end; OnVend: if( !getmapflag( strcharinfo(3),mf_town ) ) { message strcharinfo(0), "not autorized"; end; } warp "vend_zone",99,99; end; }  
    getmapflag + mapflag town
  22. Capuche's post in timer was marked as the answer   
    Try this :
    - script LMS_npc -1,{ OnClock0045: OnClock0245: OnClock0445: OnClock0645: OnClock0845: OnClock1045: OnClock1245: OnClock1445: OnClock1645: OnClock1845: OnClock2045: OnClock2245: announce "Mr. Manager: The Last Man Standing event will be starting shortly.",0; sleep 10000; announce "Mr. Manager: Those who want to play, please proceed to Prontera and Register.",0; sleep 10000; announce "Mr. Manager: After 1 Minute the Registration will close.",0; sleep 10000; announce "Mr. Manager: Please go to Prontera and Register now if you want to join.",0; enablenpc "All Job Manager"; sleep 30000; announce "Mr. Manager: Last 30 seconds.",0; sleep 5000; announce "Mr. Manager: If you want to join please Register in Prontera.",0; sleep 15000; announce "Mr. Manager: Last 10 seconds.",0; sleep 5000; for( set .@i, 5; .@i > 0; set .@i, .@i -1 ) { announce "Mr. Manager: "+ .@i +".",0; sleep 1000; } announce "Mr. Manager: Time's up.",0; sleep 1000; disablenpc "All Job Manager"; donpcevent "All Job Manager::OnEnable"; end; OnInit: disablenpc "Mr.Banker"; disablenpc "All Job Manager"; disablenpc "Killa_warp"; end; } //---------All Job Registration--------------- prontera,155,181,5 script All Job Manager 106,{ if( Class == Job_Novice ){ mes "Novice cant join."; close; } else if ( getcharid(1) ) { mes "You have a party you cannot enter"; close; } mes "[Mr. Manager]"; mes "Hello What can I do for you?"; next; menu "Register",-,"What is LMS?",what,"Leave",leave; next; mes "[Mr. Manager]"; mes "Thank you for registering Mr. " + strcharinfo(0) + ", Have fun!"; close2; warp "1@pump",0,0; if( .size ) { while( .@i < .size && .name_reg$[.@i] != strcharinfo(0) ) set .@i, .@i +1; if( .@i == .size ) end; } .aid_reg[.size] = getcharid(3); .name_reg$[.size] = strcharinfo(0); .size++; #kill_point = 0; end; what: mes "[Mr. Manager]"; mes "LMS is also known as Last Man Standing Event"; next; mes "[Mr. Manager]"; mes "LMS is also like a PvP."; mes "The only difference is at LMS you will TCG Card if you are the Last Man Standing at the arena."; next; mes "[Mr. Manager]"; mes "That's all"; close; leave: mes "[Mr. Manager]"; mes "I hope you will register next time"; close; OnEnable: pvpoff "1@pump"; mapannounce "1@pump","Mr. Manager: The Last Man Standing Event will start shortly",0; sleep 10000; mapannounce "1@pump","Mr. Manager: But before we start this is just a few reminders..",0; sleep 10000; mapannounce "1@pump","Mr. Manager: Only the Last Man Standing will win this event!!",0; sleep 10000; mapannounce "1@pump","Mr. Manager: What are we waiting for?..Let's Get Ready to Rumble!!...",0; sleep 10000; if(getmapusers("1@pump") == 1) goto L_Champ; else if(getmapusers("1@pump") == 0) end; else if(getmapusers("1@pump") > 1) { mapannounce "1@pump","Mr. Manager: Get ready at the count of 5 we will start!....",0; sleep 1000; for( set .@i, 5; .@i > 0; set .@i, .@i -1 ) { mapannounce "1@pump","Mr. Manager: "+ .@i +" !",0; sleep 1000; } pvpon "1@pump"; enablenpc "Killa_warp"; initnpctimer; } L_loop: sleep 2000; if(getmapusers("1@pump") == 1) { // winner L_Champ: mapannounce "1@pump","Mr.Banker: Please talk to me to get your prize..",0; pvpoff "1@pump"; enablenpc "Mr.Banker"; stopnpctimer; sleep 60000; goto L_disable; } else if(getmapusers("1@pump") == 2) { announce "Mr. Manager: Last 2 Brave warriors are still alive!",0; sleep 10000; if(getmapusers("1@pump") == 1) goto L_Champ; else if(getmapusers("1@pump") > 1) goto L_loop; } else if(getmapusers("1@pump") > 2) goto L_loop; L_disable: mapwarp "1@pump", "prontera",155,182; disablenpc "Mr.Banker"; disablenpc "Killa_warp"; stopnpctimer; deletearray .aid_reg; deletearray .name_reg$; .size = 0; end; OnTimer600000: // out of time announce "Mr. Manager: Out of time ! End of the event !", 0; for ( .@i = 0; .@i < .size; .@i++ ) if( !getmapxy( .@map$, .@x, .@y, 0, .name_reg$[.@i] ) && .@map$ == "1@pump" ) { attachrid .aid_reg[.@i]; if ( .@points <= #kill_point ) { .@points = #kill_point; .@winner = .aid_reg[.@i]; .@winner_name$ = .name_reg$[.@i]; } } detachrid; announce "Mr. Manager: We have a winner! well done "+ .@winner_name$ +".",0; getitem 7227,50, .@winner; getitem 12103,1, .@winner; // Change This item id to what ever you want . item id,amount getitem 7829,10, .@winner; getitem 7828,10, .@winner; sleep 1000; goto L_disable; } 1@pump,52,99,6 script Mr.Banker 56,{ mes "[Banker]"; mes "Congrats. You've won."; close2; announce "Mr. Manager: We have a winner! well done "+strcharinfo(0)+".",0; getitem 7227,50; getitem 12103,1; // Change This item id to what ever you want . item id,amount getitem 7829,10; getitem 7828,10; warp "prontera",155,182; disablenpc "Mr.Banker"; disablenpc "Killa_warp"; end; } //----- Die = warp prt ----- - script Killa_warp -1,{ OnPCDieEvent: if( strcharinfo(3) == "1@pump" ) { set #kill_point, 0; announce ""+strcharinfo(0)+" died, and out of the game!.",bc_all; warp "prontera",150,150; } end; OnPCKillEvent: if( strcharinfo(3) =="1@pump") { set #kill_point,#kill_point+1; if ( #kill_point % 4 == 0) { announce ""+strcharinfo(0)+" have made 4 Consecutive Kills!!He will be granted an item",bc_all; getitem 7829,10; getitem 7828,10; } } end; } // == Mapflags 1@pump mapflag nowarp 1@pump mapflag nowarpto 1@pump mapflag noteleport 1@pump mapflag nosave 1@pump mapflag nomemo 1@pump mapflag nobranch 1@pump mapflag pvp_noparty 1@pump mapflag partylock
  23. Capuche's post in Script like this :> was marked as the answer   
    This stop the script if kill by a monster :
    OnPCDieEvent: if ( killerrid > 3000000 ) end;
  24. Capuche's post in How to change LHZ Boss Respawn time to every 5hours when killed was marked as the answer   
    5 hours <=> 300 mins <=> 18000 secs
    OnTimer18000000: // delay1 = 18000000 ms (300 min)  
    Delay 2:
    sleep rand(0,1)*60000; // 0 to 1 minute
  25. Capuche's post in Bossnia Mobs! was marked as the answer   
    Change the delay to 0
    ...<monster name>%TAB%<mob id>,<amount>,<delay1>,<delay2>,<event>  
     
    Change the coordinates to 0 to randomize the spawn
    <map name>,<x>,<y>,<xs>,<ys>%TAB%...
×
×
  • Create New...