Jump to content

Capuche

Developer
  • Posts

    2,407
  • Joined

  • Last visited

  • Days Won

    49

Community Answers

  1. Capuche's post in Cool Down Problem! was marked as the answer   
    db/re/skill_cast_db.txt#L4
    Chenge the cooldown of your skill to 0.
  2. Capuche's post in disable pet when entering map was marked as the answer   
    There are none command to force the pet to return into its eggs, but you can restrict the access to the map.
    prontera,163,185,5 script warp event 56,{ if ( petstat(PET_CLASS) ) { mes "You can enter with your pet."; close; } warp "<event map>",0,0; end; } + mapflag itemnoequip and restricted like Kido said.
  3. Capuche's post in Random gift box with progress bar was marked as the answer   
    Item script part :
    { addtimer 1,"Dummy::Onmachin"; progressbar "FFFF00",2; /* give item */ },{},{} NPC part :
    - script Dummy -1,{ Onmachin: }
  4. Capuche's post in Query and String help was marked as the answer   
    query_sql "SELECT `userid` FROM `login` WHERE `email` = '[email protected]$'",[email protected]$; should be
    query_sql "SELECT `userid` FROM `login` WHERE `email` = '" + [email protected]$ + "'",[email protected]$; same thing in insert
     
     
    if ([email protected]$) ... [email protected]$ is a string variable, "!" is unappropriate
    it should be
    if ([email protected]$ == "")  
     
     
    setarray [email protected][0], 5518, 5518, 25000; setarray [email protected][0], 1, 1, 100; OnInit: these arrays should be definited under OnDoDonate: label like that
    OnDoDonate: setarray [email protected][0], 5518, 5518, 25000; setarray [email protected][0], 1, 1, 100;
  5. Capuche's post in @randomdisguise was marked as the answer   
    This emu throw an error with disguise command, but the command is in the source. It may be an issue with Hercules.
  6. Capuche's post in Quest NPC didn't shown up (worng script) HELP was marked as the answer   
    *copy/past your script in notepad. 3 seconds later -> found a problem in * Basic_Scripting#Structure
  7. Capuche's post in Novice/Baby/3rd job rings was marked as the answer   
    Do you want to only change the appearance or the class ?
     
    Appearance :
    changebase Job_Novice; // Changes player to Novice sprite. Class :
    jobchange Job_Novice; // Changes player to Novice
  8. Capuche's post in @command password lock was marked as the answer   
    - script item_cmd -1,{
    OnInit:
    .password$ = "MouHahahaha!";
    bindatcmd "item",strnpcinfo(3)+"::OnAtcommand",60,60;// your min gmlevel
    end;
    OnAtcommand:
    [email protected]$ = strcharinfo(0);
    message [email protected]$, "@item password ?";
    input [email protected]$;
    if ( [email protected]$ != .password$ )
    message [email protected]$, "Wrong password.";
    else
    atcommand "@item "+ implode( [email protected]_parameters$," " );
    end;
    }

  9. Capuche's post in @question was marked as the answer   
    - script atcmd_example -1,{ OnInit: bindatcmd "question",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: warp "prontera",150,150; createchatroom( getcharid(3), "Question", "",5 ); sit; end; }  
     
    Add in src/custom/script.inc
    // createchatroom( <char|account|name>, <title>, <password>, {<limit>, <type>} ); // password : only enabled for type 0 // limit[ 1,20 ], 1 by default // type : 1 -> public, 0 -> private BUILDIN_FUNC(createchatroom) { int len = strlen( script_getstr(st,3) ); int limit = 1; char title[ CHATROOM_TITLE_SIZE ]; char password[ CHATROOM_PASS_SIZE ]; bool type = 1;// chat public by default TBL_PC *sd = NULL; if ( script_isstring(st,2) ) sd = map_nick2sd( script_getstr(st,2) ); else { int id = script_getnum(st,2); sd = map_charid2sd(id) ? map_charid2sd(id) : map_id2sd(id); } if ( sd == NULL ) { ShowWarning( "createchatroom : none player attached.\n" ); return 0; } if ( (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM) || (battle_config.basic_skill_check && pc_checkskill(sd,NV_BASIC) < 4 ) || npc_isnear(&sd->bl) ) return 0; if ( len > CHATROOM_TITLE_SIZE || strlen( script_getstr(st,4) ) > CHATROOM_PASS_SIZE ) return 0; if ( sd->chatID != 0 ) return 0; safestrncpy( title, script_getstr(st,3), min( len+1,CHATROOM_TITLE_SIZE ) ); safestrncpy( password, script_getstr(st,4), CHATROOM_PASS_SIZE ); if ( script_hasdata(st,5) ) { int tmp = script_getnum(st,5); if ( tmp > limit && tmp <= 20 ) limit = tmp; else if ( tmp > 20 ) limit = 20; } if ( script_hasdata(st,6) && script_getnum(st,6) == 0 ) type = 0; chat_createpcchat( sd, title, password, limit, type ); chat_changechatstatus( sd, title, password, limit, type ); return 0; }  
    and in src/custom/script_def.inc
    BUILDIN_DEF(createchatroom,"vss??"), then recompile
  10. Capuche's post in Permanent monster spawn in area was marked as the answer   
    prontera,200,250,10,10 monster Poring 1002,10,10000,11000,0 spawn the monster in a rectangle of 10x10 (I mean radius) centered at 200,250
     
    190,260 -------------------------210,260
          |                                            |
          |                                            |
          |                200,250               |
          |                                            |
          |                                            |
    190,240 -------------------------210,240
     
    @Patskie
    Yes it would be an alternative. But you can get rid of donpcevent
    - script Sample -1,{ OnKill: sleep 1 * 60 * 1000; OnInit: monster "prontera",0,0,"Poring",1002,1,strnpcinfo(1)+"::OnKill"; end; }
  11. Capuche's post in Character's name on item + refine was marked as the answer   
    https://github.com/rathena/rathena/blob/master/npc/custom/item_signer.txt
  12. Capuche's post in IP Check character was marked as the answer   
    - script atcmd_example -1,{ OnInit: bindatcmd "ip",strnpcinfo(3)+"::OnAtcommand",60,60; end; OnAtcommand: if ( [email protected]_numparameters == 0 ) dispbottom "Please enter an ip"; else { [email protected] = query_sql( "select name from `char` left join login on `char`.account_id = login.account_id where online = 1 and last_ip = '"+ escape_sql( [email protected]_parameters$[0] ) +"'", [email protected]$ ); if ( [email protected] ) { dispbottom "Character online with this ip:"; while( [email protected] < [email protected] ) { dispbottom [email protected]$[[email protected]]; [email protected]++; } } else dispbottom "None character with this ip found."; } end; } @ip <your ip>
  13. Capuche's post in Request waiting room was marked as the answer   
    oO I didn't see the <number of people> option
    prontera,155,182,2 script onoi 75,{ end; OnInit: waitingroom "Party - Waiting Room",20,strnpcinfo(3)+"::OnStart",1; end; OnTimer2000: OnStart: if ( getmapusers( "new_1-2" ) == 0 ) { warpwaitingpc "new_1-2",0,0,1; if ( [email protected] ) announce "The player "+ rid2name( [email protected][0] ) +" was teleported to the event room!",bc_blue|bc_all; if ( getwaitingroomstate(0) == 0 ) { stopnpctimer; end; } } initnpctimer; end; }  
    thanks for remind me
  14. Capuche's post in Pets Food & Armor was marked as the answer   
    http://www.eathena.ws/board/index.php?showtopic=243923
  15. Capuche's post in Check Char with same IP was marked as the answer   
    prontera,156,178,3 script Check ID 952,{
    //input character name
    input [email protected]$;
    set [email protected], query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+getcharip(getcharid(3, [email protected]$))+"'",[email protected]);
    // no need freeloop
    set [email protected]$,"";
    for(set [email protected],0; [email protected]<[email protected]; set [email protected],[email protected]+1) // index start to 0
    set [email protected]$, [email protected]$+":"[email protected][[email protected]];
    set [email protected],select( [email protected]$ ) - 1;
    set [email protected], query_sql("SELECT `name` FROM `char` WHERE `account_id` = '"[email protected][[email protected]]+"'",[email protected]$);
    //can view the char name list by account selected
    set [email protected]$,"";
    for(set [email protected],0; [email protected]<[email protected]; set [email protected],[email protected]+1)
    set [email protected]$, [email protected]$+":"[email protected]$[[email protected]];
    // you must display the name
    close;
    }

  16. Capuche's post in npc point script needed help pls was marked as the answer   
    prontera,150,150,0 script Marvin 100,{ mes "[Marvin]"; mes "Excuse me, I was wondering if you would mind helping me. You see, I collect cards and curently I'm missing a " +getitemname(.random_card)+ ". If you could provide me with some pristine examples of this card, I can offer " +getitemname(.random_reward)+ " Cedi in return."; next; menu "What is Cedi?",L_what,"I have your cards!",L_check,"Nevermind",L_close; L_what: mes "[Marvin]"; mes "Cedi is an ancient currency that is still quite valuable in the right circles. I hear Tim-Tom down the road only takes Cedi at his shop."; next; mes "[Marvin]"; mes "How much I can give you per card varies, but I'll be sure to tell you how much I'm offering if you bring me some."; close; L_check: if (countitem(.random_card) < 1)goto L_nothing; getinventorylist; for ( set [email protected], 0; [email protected] < @inventorylist_count; set [email protected], [email protected] + 1 ) if ( @inventorylist_id[[email protected]] == .random_card ) set .count, @inventorylist_amount[[email protected]]; mes "[Marvin]"; mes "Would you like to trade those in now?"; next; menu "Sure thing!",L_sure,"No, thanks",L_close; L_nothing: mes "[Marvin]"; mes "I'm sorry, I dont believe you actually have any " +getitemname(.random_card)+ " for me."; close; L_sure: mes "[Marvin]"; delitem .random_card, .count; set #CEDIPOINTS, #CEDIPOINTS + ( .random_reward * .count ); mes "Thanks! These will look great in my collection. Oh, and you seem to have a balance of " +#CEDIPOINTS+ " Cedi now."; dispbottom "You now have " +#CEDIPOINTS+ " Cedi Points."; close; L_close: mes "[Marvin]"; mes "Alright, if you change your mind, come back and see me."; close; OnMinute00: if ( ( gettime(3) % 2 ) != 0 ) end; set .index, rand( getarraysize( .set_card ) ); set .random_card, .set_card[ .index ]; set .random_reward, .set_reward[ .index ]; end; OnInit: setarray .set_card[0],4001,4002,4003,4004,4005; setarray .set_reward[0],20,20,50,50,50,50; set .npc$, strnpcinfo(1); set .index, rand( getarraysize( .set_card ) ); set .random_card, .set_card[ .index ]; set .random_reward, .set_reward[ .index ]; end; } This one is working on my test server.
  17. Capuche's post in Legendary Script was marked as the answer   
    prontera,150,182,5 script ojnojio 78,{
    if ( #statusQuest < 10 ) {
    mes "I can add "+ .status_points +" status points in exchange for:";
    for ( [email protected] = 0; [email protected] < .size_item; [email protected]++ )
    mes "x"+ .amount_req[[email protected]] +" ^ff0000"+ getitemname( .item_req[[email protected]] ) +"^000000 (ID: "+ .item_req[[email protected]] +")";
    next;
    mes "You have done the quest "+ #statusQuest +" times for now.";
    next;
    if ( select( "I have all the items", "Leave" ) == 2 ) {
    mes "good bye.";
    close;
    }
    for ( [email protected] = 0; [email protected] < .size_item; [email protected]++ )
    if ( countitem( .item_req[[email protected]] ) < .amount_req[[email protected]] ) {
    if ( [email protected] == 0 ) {
    [email protected] = 1;
    mes "You miss :";
    }
    mes "- ^ff0000"+ ( .amount_req[[email protected]] - countitem( .item_req[[email protected]] ) ) +"/"+ .amount_req[[email protected]] +"^000000 "+ getitemname( .item_req[[email protected]] ) +" (ID: "+ .item_req[[email protected]] +")";
    }
    if ( [email protected] ) close;
    mes "Ok seems good, here your "+ .status_points +" status points.";
    StatusPoint = StatusPoint + .status_points;
    #statusQuest++;
    for ( [email protected] = 0; [email protected] < .size_item; [email protected]++ )
    delitem .item_req[[email protected]], .amount_req[[email protected]];
    close;
    }
    mes "You already have done the quest 10 times.";
    close;
    Oninit:
    .status_points = 1000;// amount of status points
    setarray .item_req, 502,503,504;// item id required
    setarray .amount_req, 1,2,5;// amount
    .size_item = getarraysize( .item_req );
    end;
    }

  18. Capuche's post in Rent Item was marked as the answer   
    right after the header add
    if ( getgmlevel() < 99 ) end;
  19. Capuche's post in script_rid2sd Help on Dice Event ! was marked as the answer   
    announce "Dice: Last 30 seconds.",bc_map,0x00CED1; bc_map: Message is sent to everyone in the same map as the source of the broadcast (player by default). Your script have none player attached.
     
    Use mapannounce
  20. Capuche's post in R> Emperium Game was marked as the answer   
    http://www.eathena.ws/board/index.php?showtopic=254539
    http://rathena.org/board/topic/53320-%E3%80%90-emistry-%C2%A9-2013-%E3%80%91e-scripts-collection/page-2?hl=%2Bemperium+%2Bbreaker#entry64540
  21. Capuche's post in atcommand reload groups.conf was marked as the answer   
    No need to restart the server to refresh the group
    you made a duplicate of a command in the 'Law Enforcement" group
  22. Capuche's post in @command On NPC was marked as the answer   
    - script ijnoo -1,{
    OnInit:
    while(1) {
    sleep 60000;// 60 secs
    cleanmap "<map name>";
    }
    }

  23. Capuche's post in Annie Rururu's BG was marked as the answer   
    replace
    invek,125,211,5 script Red Team 733,{ end; OnInit: sleep 50; set getvariableofnpc( .rednpcname$, "custom_bg#control" ), strnpcinfo(0); OnStart: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "custom_bg#control" ) +1, "custom_bg#control::OnStart", getvariableofnpc( .minplayer2start, "custom_bg#control" ); end; } invek,132,208,3 script Blue Team 734,{ end; OnInit: sleep 50; set getvariableofnpc( .bluenpcname$, "custom_bg#control" ), strnpcinfo(0); OnStart: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control" ) +1, "custom_bg#control::OnStart", getvariableofnpc( .minplayer2start, "custom_bg#control" ); end; }  
    by
    invek,125,211,5 script Red Team 733,{ end; OnInit: sleep 50; set getvariableofnpc( .rednpcname$, "custom_bg#control" ), strnpcinfo(0); OnStart: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "custom_bg#control" ) +1, "custom_bg#control::OnStart", 1; end; } invek,132,208,3 script Blue Team 734,{ end; OnInit: sleep 50; set getvariableofnpc( .bluenpcname$, "custom_bg#control" ), strnpcinfo(0); OnStart: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control" ) +1, "custom_bg#control::OnStart", 1; end; }
  24. Capuche's post in Requesting Save NPC was marked as the answer   
  25. Capuche's post in LMS Script " Support -Plz suggest was marked as the answer   
    The script try to disable a npc named Mr. Banker, your npc's name is Mr.Banker (no space)...
×
×
  • Create New...

Important Information

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