Jump to content

Skorm

Forum Moderator
  • Posts

    1268
  • Joined

  • Last visited

  • Days Won

    33

Community Answers

  1. 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; .@total = callsub(Sub_PriceCheck); if( .@total > Zeny ) { message strcharinfo(0), "You don't have enough zeny to buff double click the buffer to modify your selection."; end; } for( .@a = 0; .@a < .len; .@a++ ) if( ( slc_bufs & pow( 2, .@a ) ) ) { skilleffect .skil_num[.@a], .levels[.@a]; sc_start .sc_effect[.@a], .ticks[.@a], .levels[.@a]; message strcharinfo(0),"Buff "+.skil_txt$[.@a]+" Added!"; } Zeny = Zeny - .@total; end; Sub_PriceCheck: for( .@a = 0; .@a < .len; .@a++ ) if( ( slc_bufs & pow( 2, .@a ) ) ) .@total = .@total + .price[.@a]; return .@total; Set_Buffs: .@slc_bufs = slc_bufs; .@total = callsub(Sub_PriceCheck); function sf { function s; .@a = getarg(2); .@len = getarg(3); return ( sprintf( getarg(0), s(.@a, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)) ) +(( .@a+1 < .@len )?":Next":":") +(( .@a-11 > 0 )?":Back":":") +":Done:Cancel" ); function s { if( getarg(0) >= getarg(1) ) return ""; else { .@name$ = getelementofarray( getarg(2), getarg(0) ); return .@name$==""?"":"Buff [ ^0054ff"+.@name$+"^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; .@a = 0; while( 1 ) { select( sf( .format$, .skil_txt$, .@a, .len, .@slc_bufs, .levels ) ); switch( @menu ) { case 11: .@a = nex( .@a, .len ); break; case 12: .@a = bac( .@a ); break; case 13: mes .npc_nm$; mes "Alright, your current total will be "+.@total+"z each time you use my buffing service. Is that ok?"; next; if( select("Yes:No") == 1 ) slc_bufs = .@slc_bufs; case 14: end; default: .@select = .@a+@menu-1; if( ( .@slc_bufs & pow( 2, .@select ) ) ) { .@slc_bufs = .@slc_bufs - pow( 2, .@select ); .@total = .@total - .price[.@select]; } else { .@slc_bufs = .@slc_bufs + pow( 2, .@select ); .@total = .@total + .price[.@select]; } } } 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; }
  2. 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.
  3. 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.
  4. 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(.@atcmd_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);
    .@message$ = implode( .@atcmd_parameters$," " );
    announce "[Market] "+ strcharinfo(0) +" : "+ .@message$, bc_all, 0x9999FF;
    query_logsql( "INSERT INTO `bst_market_log` ( `name`, `message` ) VALUES ( '"+escape_sql(strcharinfo(0))+"', '"+escape_sql( getstrlen(.@message$)>150?substr(.@message$,0,149):.@message$ )+"' );" );
    end;
    }

  5. 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
  6. 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
  7. Skorm's post in Special Monster Summoner was marked as the answer   
    event_map,100,100,5 script Stone 1#501 406,{ .@item = atoi(strnpcinfo(2)); switch ( .@item ) { case 501: .@color$ = "^CC0000"; .@name$ = "Red Spirit"; break; case 502: .@color$ = "^3333FF"; .@name$ = "Blue Spirit"; break; case 503: .@color$ = "^FFFF00"; .@name$ = "Yellow Spirit"; break; case 504: .@color$ = "^009900"; .@name$ = "Green Spirit"; break; case 506: .@color$ = "^9900FF"; .@name$ = "Violet Spirit"; } mes "[ "+.@color$+"Ancient Stone of "+.@name$+"^000000 ]"; mes "Will you insert the "+.@color$+getitemname(.@item)+"^000000 and release the "+.@color$+.@name$+"^000000."; next; if( select("Insert!:Back down...") ) { if( !countitem(.@item) ) { mes "You insert a random rock found lying on the ground..."; sleep2(100); mes "..."; sleep2(100); mes "..."; sleep2(100); mes .@color$+"Foolish mortal!!!"; atcommand "@nuke "+strcharinfo(0)+""; close; } hideonnpc strnpcinfo(0); delitem .@item,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 .@color$+"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
  8. Skorm's post in Buffer HELP was marked as the answer   
    prontera,155,185,5 script Healer#h1-1::Healer 936,{ if( isPremium() ) { percentheal 100,100; skilleffect 45,0; sc_start SC_CONCENTRATE,900000,10; skilleffect 74,0; sc_start SC_MAGNIFICAT,900000,5; skilleffect 75,0; sc_start SC_GLORIA,900000,5; skilleffect 66,0; sc_start SC_IMPOSITIO,900000,5; skilleffect 67,0; sc_start SC_SUFFRAGIUM,900000,3; skilleffect 34,0; sc_start SC_BLESSING,900000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,900000,10; sc_start SC_STRFood,900000,10; sc_start SC_AGIFood,900000,10; sc_start SC_VITFood,900000,10; sc_start SC_INTFood,900000,10; sc_start SC_DEXFood,900000,10; sc_start SC_LUKFood,900000,10; sc_start SC_ASPDPOTION2,900000,0; atcommand "@repairall"; dispbottom "[ VIP Manager ] Your are now FULLY Buffs"; } else { specialeffect2 EF_HEAL2; percentheal 100,100; specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,900000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,900000,10; skilleffect 66,0; sc_start SC_IMPOSITIO,900000,5; skilleffect 74,0; sc_start SC_MAGNIFICAT,900000,5; skilleffect 8,0; sc_start SC_ENDURE,900000,10; sc_start SC_CONCENTRATE,900000,10; sc_start SC_ASPDPOTION2,900000,0; sc_start SC_KYRIE,900000,5; specialeffect2 EF_HEAL2; percentheal 100,100; atcommand "@repairall"; dispbottom "[ Healer ] You are now Healed!"; } end; }
  9. Skorm's post in NPC Script was marked as the answer   
    - script SupplyTrigger -1,{ OnWed1700: OnSun1600: enablenpc "WoE Supply"; end; OnAgitEnd: OnAgitEnd2: disablenpc "WoE Supply"; end; } prontera,100,200,3 script WoE Supply 78,{ function sf { function s; .@a = getarg(2); .@len = getarg(3); return ( sprintf( getarg(0), s(.@a, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)) ) +(( .@a+1 < .@len )?":Next":":") +(( .@a-11 > 0 )?":Back":":") +":Cancel" ); function s { if( getarg(0) >= getarg(1) ) return ""; else { .@name$ = getguildname(getelementofarray(getarg(2),getarg(0))); return .@name$=="null"?"":.@name$; } }; }; 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); }; if( getgmlevel()>=80 ) { mes .Npc_Name$; mes "Hello Mr. GM what would you like to do?"; next; switch( select("Add/Remove Guilds:Clear Guild Data:Player Menu:Cancel") ) { case 1: mes .Npc_Name$; mes "Would you like to add or remove a guild?"; .@a_len = getarraysize($App_Guilds); .@format$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s"; next; if( select("Remove:Add") == 1 ) { while( .@a != 9999 ) { select( sf( .@format$, $App_Guilds, .@a, .@a_len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@a_len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname($App_Guilds[.@select])+"]^000000 guild. Would you like to remove them from the accepted guilds?"; next; if( select("Yes:No") == 1 ) { deletearray($App_Guilds[.@select],1); mes .Npc_Name$; mes "The guild has been removed!"; } close; } } } else { mes .Npc_Name$; mes "Please input guild name or masters name."; next; input(.@input$); .@len = query_sql( "Select `guild_id` from `guild` where `name` like '%"+escape_sql(.@input$)+"%' or `master` like '%"+escape_sql(.@input$)+"%';",.@guild_id ); while( .@a != 9999 ) { select( sf( .@format$, .@guild_id, .@a, .@len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; .@a_len = getarraysize($App_Guilds); for(.@b=0;.@b<.@a_len;.@b++) if( $App_Guilds[.@b]==.@guild_id[.@select] ) { mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. I'm sorry but that guild has already been added to the accepted list."; close; } mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. Would you like to add them to the accepted guilds?"; next; if( select("Yes:No") == 1 ) { .@a_len = getarraysize($App_Guilds); if( .@a_len>=128 ) { mes .Npc_Name$; mes "I'm sorry but the accepted list is full please make some room and try again..."; } else { mes .Npc_Name$; mes "The guild was successfully added!"; $App_Guilds[.@a_len] = .@guild_id[.@select]; } } close; } } } case 2: mes .Npc_Name$; mes "Are you sure you want to clear the guild data?!"; next; if( select("Yes!:No!")==1 ) { mes .Npc_Name$; mes "This is you last chance. Are you surly sure as sure can be?"; next; if( select("Surly!:No, wait... Where am I?!!")==1 ) deletearray($App_Guilds); } if( @menu==1 ) { mes .Npc_Name$; mes "The deed is done..."; } else { mes .Npc_Name$; mes "Wow that was a close one... Have a nice day!"; } close; case 3: break; case 4: mes .Npc_Name$; mes "Alright, have a nice day!"; close; } } mes .Npc_Name$; mes "I'm here to give you supplies for WoE!"; next; mes .Npc_Name$; .@len = getarraysize($App_Guilds); for( .@i=0; .@i <= .@len; .@i++ ) { if( getcharid(2) == $App_Guilds[.@i] ) set .@Guild_Check, .@Guild_Check+1; } if( .@Guild_Check < 1 ) { mes "Your guild has not yet been approved, please contact the GMs"; close; } if( !getcharid(2) ) { mes "Sorry only members of a guild may use this npc."; close; } if( BaseLevel < 99 || Class > 4022 ) { mes "Sorry this is for Lvl 99 Trans Class only"; close; } if( gettimetick(2) < #delay ) { mes "Sorry, you can only claim this once every WoE"; close; } switch( Class ) { case 4009: //High Priest getitem 19052,1; //HP Pack break; case 4010: //High Wizard mes "Please choose your role"; mes "Support : Ganbantien"; mes "Offensive : SG/MS/LOV (Includes Crystal Fragments)"; next; if( select("Support High Wizard:Offensive High Wizard")==1 ) getitem 19047,1; //Support HWIZ Pack else getitem 19046,1; //Offensive HWIZ Pack break; case 4011: //Whitesmith getitem 19051,1; //Whitesmith Pack break; case 4012: //Sniper getitem 19054,1; //Sniper Pack break; case 4013: //Sinx getitem 19055,1; //Sinx Pack break; case 4016: //Champion getitem 19053,1; //Champion Pack break; case 4017: //Professor getitem 19048,1; //Prof Pack break; case 4018: //Stalker mes "Please choose your type."; mes "Flame : Flame Stone"; mes "Ice : Ice Stone"; mes "Wind : Wind Stone"; mes "Shadow : Shadow Orb"; next; switch( select("Flame:Ice:Wind:Shadow") ) { case 1: getitem 19056,1; break; case 2: getitem 19057,1; break; case 3: getitem 19058,1; break; case 4: getitem 19059,1; } break; case 4019: //Creator mes "Please choose your role."; mes "Support : Slim Potion Pitcher"; mes "Offensive : Acid Demonstration"; next; if( select("Support Creator:Offensive Creator")==1 ) getitem 19050,1; else getitem 19049,1; break; case 25: //Ninja mes "Please choose your type."; mes "Flame : Flame Stone"; mes "Ice : Ice Stone"; mes "Wind : Wind Stone"; mes "Shadow : Shadow Orb"; next; switch( select("Flame:Ice:Wind:Shadow") ) { case 1: getitem 19056,1; break; case 2: getitem 19057,1; break; case 3: getitem 19058,1; break; case 4: getitem 19059,1; } break; //Add more cases for all classes default: if( !callsub( L_GLSub, .Npc_Name$ ) ) mes "Sorry this is only for the classes which require items for using skills."; close; } set #delay, gettimetick(2)+10800; callsub( L_GLSub, .Npc_Name$ ); mes "There you are, goodluck!"; close; L_GLSub: if( getguildmasterid(getcharid(2)) == getcharid(0) ) { mes getarg(0); mes "Would you like to claim your guild leader package too?"; next; if( select("Yes:No")==1 ) switch( gettime(4) ) { case 0: getitem 19056,1; break; //Sunday case 1: getitem 19056,1; break; //Monday case 2: getitem 19056,1; break; //Tuesday case 3: getitem 19056,1; break; //Wednesday case 4: getitem 19056,1; break; //Thursday case 5: getitem 19056,1; break; //Friday case 6: getitem 19056,1; //Saturday } return 1; } return 0; OnInit: set .Npc_Name$, "[^0000FF WoE Supply ^000000]"; disablenpc "WoE Supply"; end; }
  10. Skorm's post in Script exchange of items for the amount indicated was marked as the answer   
    mes "[Event Manager]"; mes "How many silver coins would you like to exchange?"; mes "[5 Silver Coins = 1 Gold Coin]"; next; switch( input( .@pas1, 5, countitem(8032) ) ) { case -1: mes "[Event Manager]"; mes "You can't go that low; the minimum value is 5."; close; case 1: mes "[Event Manager]"; mes "You don't have that many silver coins!"; close; } delitem 8032, .@pas1-(.@pas1%5); mes " [ Event Manager ]"; mes "Thank you for choosing ...RO that luck be with you in future events, and you can win many Coins, and exchange with beautiful items."; getitem 8033, .@pas1/5; close;
  11. Skorm's post in Delete specific item on all players in a certain map was marked as the answer   
    Firstly, you don't want to do disablenpc "<script_npc>"; that would unload the npc altogether instead make the npc header like...
    event_map,0,0,0 script script_npc 139,{ L_EventStart: initnpctimer; end; OnTimer600000: announce "The event has ended!",bc_all,0xFF4500; addrid(1); delitem <item_id>, countitem(<item_id>); warp "prontera",156,191; end; } Secondly, you wouldn't want to use sleep2 because no players are attached so it doesn't matter if we keep them.
    OnClock0000: announce "The event has started!",bc_all,0xFF4500; enablenpc "<event_warper>"; sleep 30000; announce "Time's up! The warper will no longer accept participants!",bc_all,0xFF4500; disablenpc "<event_warper>"; donpcevent "script_npc::L_EventStart"; end; Lastly, yes and no.. For the players that are currently logged into your server you want to remove the item from inside the server because SQL doesn't update to the player until they relog.
    OnClock0000: donpcevent "script_npc::L_Coroutine"; addrid(0); if(set(.@i,countitem(<item_id>))) delitem <item_id>, .@i; end; L_Coroutine: sleep 100; query_sql("DELETE FROM `inventory` WHERE `nameid` = <itemid>;"); Just remember to include the other databases that could contain items like storage and cart.
     
    But overall you understood what I meant quite well.
  12. Skorm's post in Requesting Dyna hat was marked as the answer   
    //Morphogenic Hat Script //Allows a player to change their look to absolutely any hat available or to a defined upper limit. Check the "OnInit" label for information on this. // //By Slam - script Morpho -1,{ OnWhisperGlobal: goto Validation_whisp; end; Validation_whisp: set .@var0$, @whispervar0$; set .@var1$, @whispervar1$; // set .@i,0; // while(.@i < getarraysize(.morpho_disallowed)){ // if(@whispervar1$ == .morpho_disallowed$[.@i]){ // goto denied_unauthorized; // } else { // set .@i,.@i+1; // } // } set .@ii,0; while(.@ii < 6){ if(@whispervar0$ == .keywords$[.@ii]){ goto keyword; } set .@ii,.@ii+1; } dispbottom "---------------[Morphohat Helper]---------------"; dispbottom " "; dispbottom "Sorry, I didn't understand the option you have"; dispbottom "have given me. Please type 'help' for more info"; dispbottom " "; end; keyword: switch(.@ii){ case 0: goto help; case 1: goto tophead; case 2: goto midhead; case 3: goto lowhead; case 4: goto clear; case 5: goto info; } help: dispbottom "---------------[Morphohat Helper]---------------"; dispbottom " "; dispbottom "Welcome to the Morphohat Settings NPC!"; dispbottom "I can help you set what your Morphohat looks like"; dispbottom " "; dispbottom "To use this NPC, whisper NPC:Morpho (you should"; dispbottom "know this already) with upper/middle/lower or "; dispbottom "wing. The wing section is not yet implemented"; dispbottom "however. Now, to set your Morphohat use the "; dispbottom "following layout:"; dispbottom " "; dispbottom "upper#5232 - This will make it a Pink Kitty"; dispbottom " "; dispbottom "Protip: Use RateMyServer.net for item IDs."; end; tophead: if(!isequipped(.top_morpho)){ goto wrong_headgear; } set .@viewid,getiteminfo(.@var1$,11); set .@equipslot,getiteminfo(.@var1$,5); // if(.@equipslot != 256 && .@equipslot != 768){ //Upper and Upper+Mid Only. Comment out this line and the two below it to remove this functionality. // goto denied_wrongslot; // } set viewid_top,.@viewid; if(.@viewid != 0 && .@viewid != -1){ dispbottom "Selected headgear ID: "+.@viewid; setlook 4,.@viewid; } else { dispbottom "Invalid headgear ID."; } end; midhead: if(!isequipped(.mid_morpho)){ goto wrong_headgear; } set .@viewid,getiteminfo(.@var1$,11); set .@equipslot,getiteminfo(.@var1$,5); // if(.@equipslot != 512 && .@equipslot != 513){ //Mid and Mid+Lower only. Comment out this line and the two below it to remove this functionality. // goto denied_wrongslot; // } set viewid_mid,.@viewid; if(.@viewid != 0 && .@viewid != -1){ dispbottom "Selected headgear ID: "+.@viewid; setlook 5,.@viewid; } else { dispbottom "Invalid headgear ID."; } end; lowhead: if(!isequipped(.low_morpho)){ goto wrong_headgear; } set .@viewid,getiteminfo(.@var1$,11); set .@equipslot,getiteminfo(.@var1$,5); // if(.@equipslot != 1){ // Lower Only. Comment out this line and the two below it to remove this functionality. // goto denied_wrongslot; // } set viewid_low,.@viewid; if(.@viewid != 0 && .@viewid != -1){ dispbottom "Selected headgear ID: "+.@viewid; setlook 3,.@viewid; } else { dispbottom "Invalid headgear ID."; } end; clear: set viewid_low, 0; set viewid_mid, 0; set viewid_top, 0; if (getequipid(1) == .top_morpho) setlook 5,0; if (getequipid(9) == .mid_morpho) setlook 4,0; if (getequipid(10) == .low_morpho) setlook 3,0; dispbottom "Your Morphing Hats list has been cleared."; end; info: dispbottom "---------------[Morphohat Helper]---------------"; dispbottom " "; dispbottom "You currently have the following items set for your Morpho hat:"; dispbottom "Upper - "+viewid_top; dispbottom "Middle - "+viewid_mid; dispbottom "Lower - "+viewid_low; end; denied_wrongslot: dispbottom "Sorry, this headgear was not designed for this headgear slot."; end; denied_unauthorized: dispbottom "Sorry, you cannot change your Morphohat into this headgear. Please try another."; end; wrong_headgear: dispbottom "Sorry, you do not currently have your Morphohat equipped. Please equip it and try again!"; end; OnInit: //Array of keywords for the script setarray .keywords$[0],"help","upper","middle","lower","clear","info","wing"; //Change this to the upper limit of the headgears that you wish to make available setarray .morpho_disallowed$[0],"9001","5386","5387","5391","5394","5407","5408","5419","5428","5436","5437","5438","5439","5440","5441","5442","5443","5444","5445","5446","5447","5448","5449","5459","5481","5486","5487","5488","5492","5493","5494","5495","5508","5516","5517","5520","5532","5533","5534","5535","5540","5541","5542","5543","5544","5551","5552","5553","5560","5561","5562","5571","5575","5576","5577","5578","5583","5584","5587","5595","5600","5601","5602","5603","5604","5605","5606","5607","5608","5609","5610","5611","5612","5613","5614","5615","5616","5617","5618","5619","5620","5621","5622","5623","5624","5625","5626","5627","5628","5629","5630","5631","5632","5633","5634","5635","5636","5637","5638","5639","5640","5641","5642","5643","5644","5645","5646","5647","5648","5649","5650","5651","5652","5653","5654","5655","5656","5657","5658","5659","5660","5661","5662","5663","5664","5665","5666","5667","5668","5669","5670","5671","5672","5673","5674","5675","5676","5677","5678","5679","5680","5681","5682","5683","5684","5685","5686","5687","5688","5689","5690","5691","5692","5693","5694","5695","5696","5697","5698","5699","5700","5701","5702","5703","5704","5705","5706","5707","5708","5709","5710","5711","5712","5713","5714","5715","5716","5717","5718","5719","5720","5721","5722","5723","5724","5725","5726","5727","5728","5729","5730","5731","5732","5733","5734","5735","5736","5737","5738","5739","5740","5741","5742","5743","5744","5745","5746","5747","5748","5749","5750","5751","5752","5753","5754","5755","5756","5757","5758","5759","5760","5761","5762","5763","5764","5765","5766","5767","5768","5769","5770","5771","5772","5773","5774","5775","5776","5777","5778","5779","5780","5781","5782","5783","5784","5785","5786","5787","5788","5789","5790","5791","5792","5793","5794","5795","5796","5797","5798","5799","5809","5812","5814","5824","23134","5070"; //inb4OVERNINETHOUSAND //Equip IDs - Change these to the ID numbers of the hat you wish to designate as the Morphing hat set .top_morpho,25092; set .mid_morpho,25093; set .low_morpho,25094; end; } //Use 'callfunc "MorphoEquip",<1,2,3>;' for the "OnEquip" script to let people know that they need to set the view ID or to set the viewid if the person has already set one. //If you wish to make the "Morph" an Account bound variable, simply change all instances of "viewid_" with "#viewid_" function script MorphoEquip { set .@equipslot,getarg(0); switch(.@equipslot) { case 1: //Upper if (!uppernotify) { dispbottom "No headgear set for upper. PM \"NPC:Morpho\" with the word \"help\" for more information."; set uppernotify,1; end; } setlook 4,viewid_top; end; case 2: //Mid if (!middlenotify) { dispbottom "No headgear set for middle. PM \"NPC:Morpho\" with the word \"help\" for more information."; set middlenotify,1; end; } setlook 5,viewid_mid; end; case 3: //Lower if (!lowernotify) { dispbottom "No headgear set for lower. PM \"NPC:Morpho\" with the word \"help\" for more information."; set lowernotify,1; end; } setlook 3,viewid_low; end; } } Script as is...
  13. Skorm's post in NPC Warp Agent was marked as the answer   
    - script quest_block -1,{ OnPCLoadMapEvent: .@map$ = strcharinfo(3); while( .@i++<.len ) if( compare(.map_name$[.@i],.@map$) ) if( checkquest(.quest_id[.@i])!=2 ) { message strcharinfo(0), "You are not authorized to enter this map."; warp "prontera",100,100; } end; OnInit: setarray .quest_id[1], 16146; setarray .map_name$[1], "lhz_dun03"; .len = getarraysize(.map_name$); while( .@i++<.len ) setmapflag .map_name$[.@i], mf_loadevent; } You can also look in quest_db.txt in your server files under db folder it's a little easier because you don't have to extract your data.
  14. Skorm's post in hello RA DEVS im here again was marked as the answer   
    payon,153,235,4 script DB/MVP Warper 859,{
    mes "[Dead Branch Room Warper]";
    mes "Which dead branch room would you like to be warped to?";
    next;
    .@len = getarraysize(.maps$);
    while(.@i++<.@len)
    .@select$ += "Room "+.@i+" ["+getmapusers(.maps$[.@i])+"/"+.rooms[.@i]+"]:";
    select(.@select$);
    jump_zero((getmapusers(.maps$[@menu])<.rooms[@menu]),L_NoRoom);
    warp(.maps$[@menu],0,0);
    end;
    L_NoRoom:
    mes "[Dead Branch Room Warper]";
    mes "I'm sorry but the maximum users for Room "+@menu+" have been reached.";
    close;
    OnInit:
    setarray .maps$[1], "06guild_01", "06guild_02", "06guild_03", "06guild_04", "06guild_05";
    setarray .rooms[1], 5 , 4 , 4 , 4 , 4 ;
    }

  15. Skorm's post in Guild storage help was marked as the answer   
    mes "^00C5EF[Kafra Employee]^000000";
    mes "Here, let me open";
    mes "your Guild Storage for you.";
    mes "Thank you for using";
    mes "the Kafra Service.";
    close2;
    cutin "", 255;
    switch(guildopenstorage()){
    case 1:
    mes "^00C5EF[Kafra Employee]^000000";
    mes "Oops, I'm sorry but another guild member is using the guild storage";
    mes "right now. Please wait until that person is finished.";
    close;
    case 2:
    mes "^00C5EF[Kafra Employee]^000000";
    mes "Oops, I'm sorry, but you do not have a guild.";
    mes "You must belong to a guild in order to access the guild storage.";
    close;
    default:
    }
    end;

  16. Skorm's post in Get the current Player coords was marked as the answer   
    Why? Your server already does this...
     
    map_athena.conf
    // Database autosave time // All characters are saved on this time in seconds (example: // autosave of 60 secs with 60 characters online -> one char is saved every // second) autosave_time: 300 Inside char database look for last_map, last_x, and last_y.
  17. Skorm's post in Hourly Rewards Version 2 was marked as the answer   
    I really don't know much about the @afk command I also don't know if the players can even be called while in that state but... Yeah...
    prontera,100,100,5 script hourlypoints 139,8,11,{ end; OnTouch: dispbottom "Stay here to get afk hourly points."; attachnpctimer(); startnpctimer(); end; OnTimer3600000: getmapxy(.@map$,.@x,.@y,0); if( distance(.x,.y,.@x,.@y)<=11 && .@map$==.map$ ) { if( checkidle() ) { set #KAFRAPOINTS, #KAFRAPOINTS + .point_amt; dispbottom "You received "+.point_amt+" Kafrapoints by staying afk ingame for 1 hour"; dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints"; set @consecutive_hour, @consecutive_hour + 1; //Check for 3 hours consecutive if(@consecutive_hour == 3) { set @consecutive_hour,0; set #KAFRAPOINTS, #KAFRAPOINTS + .cpoint_amt; dispbottom "You receive "+.cpoint_amt+" Kafrapoints in afking for 3 consecutive hours"; dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints"; } } attachnpctimer(); initnpctimer(); } else { dispbottom "You left the afk area and will no longer receive Kafrapoints."; stopnpctimer(); } end; OnInit: getmapxy(.map$,.x,.y,1); set .cpoint_amt, 50; //Points gained for consecutive time online. set .point_amt, 10; //Normal points gained. }
  18. Skorm's post in Delete character Script. was marked as the answer   
    Right there are actually quite a few different tables to clear relating to characters.
     
    http://rathena.org/board/topic/84590-how-to-delete-account-using-sql-if-they-are-not-active/?hl=%2Bdelete+%2Baccount
     
    If you just delete the character from `char` you'd be leaving a whole mess of stuff behind.
  19. Skorm's post in Item script problem was marked as the answer   
    Here is an example for the skill cloaking...
     
    Script_Event:
    autobonus3 "{ undisguise; while(checkoption(Option_Hide|Option_Cloak|Option_Invisible|Option_Chasewalk)) sleep2(1000); if(playerattached()) disguise(1147); }",10000,1,135; Equip_Event:
    disguise 1147; UnEquip_Event:
    undisguise;
  20. Skorm's post in Save Spot Issue was marked as the answer   
    getmapxy(.@map$,.@x,.@y,0); savepoint .@map$,.@x,.@y; Or you can try detaching the player from the script so the npc uses the command.
    mes "^00C5EF[Kafra Employee]^000000"; mes "Your Respawn Point"; mes "has been saved here."; set(.@char$,strcharinfo(0)); close2; cutin "",255; detachrid; atcommand "@save "+.@char$; end;
  21. Skorm's post in Poring Summoner (non-automated event) was marked as the answer   
    Just remove the OnHourXX:
    OnHour02: //CHANGE THIS TO THE HOUR YOU WOULD LIKE THIS EVENT TO LOAD! OnHour05: OnHour09: OnHour14: OnHour17: OnHour20: OnHour23:
  22. Skorm's post in Two Parties in 1 Instance ID was marked as the answer   
    I would assume so...
     
    Just save the instance id into a variable from the first party and then use it in the command.
    warp(instance_mapname("prontera",.instanceid),0,0); I know Hercules has some really nice instance commands.
    That allow for player, server, party, or even guild specific instances.
    :0 I don't know if rAthena has adopted them yet, because I'm using a slightly older revision.
  23. Skorm's post in Sprakki NPC (Novice Ground) was marked as the answer   
    - script Sprakki#newbe05::NvSprakkiB -1,{ if (job_novice_q == 0) { cutin "v_sprakki02",2; mes "^00D1FE[Sprakki]^000000"; mes "Hello there! Welcome to the World of ^00CFAARagnarok^000000."; mes "My name is Sprakki and I'm in charge of giving you basic gameplay tips."; mes "Click on the ^F268D3[Next]^000000 button or press ^60D8FF[Enter]^000000 key to continue."; next; mes "^00D1FE[Sprakki]^000000"; mes "First you need to learn the very basics of controlling your character."; mes "All the basic ^4d4dffmoves, selection of items, and attacks^000000 use the ^4d4dff left click of the mouse^000000."; next; cutin "",255; cutin "tutorial01",3; mes "-! Info !-"; mes "Click on the ground to move the character."; mes "Attacking monsters and conversations with the people of this world can be done by simply clicking on them."; next; cutin "",255; cutin "v_sprakki02",2; mes "^00D1FE[Sprakki]^000000"; mes "Well then, I will give you a quest to talk to me."; mes "After the conversation is over, talk to me again by left-clicking on me."; set job_novice_q,1; setquest 7117; next; cutin "",255; cutin "tutorial02",3; mes "-! Info !-"; mes "You've received a quest from Sprakki."; mes "You can check the contents of the quest in the Quest Info Window by pressing the ^4d4dffAlt + U^000000 keys at the same time."; next; cutin "",255; cutin "v_sprakki01",2; mes "^00D1FE[Sprakki]^000000"; mes "Have you checked the Quest Info Window?"; mes "Well, talk to me again."; close2; cutin "",255; end; } else if (job_novice_q < 3&&job_novice_q != 2) { if (job_novice_q == 1) { cutin "v_sprakki02",2; mes "^00D1FE[Sprakki]^000000"; mes "Great!"; mes "Now you know how to move and talk to others, right?"; getexp 600,5; set job_novice_q,2; setquest 7118; completequest 7117; next; } cutin "",255; cutin "v_sprakki02",2; mes "^00D1FE[Sprakki]^000000"; mes "The Training Center is prepared for novices just like you."; mes "You are going to be trained to get used to the basics of the Game."; next; mes "^00D1FE[Sprakki]^000000"; mes "I will guide you to the Novice Training Center."; mes "Instructor 'Brade' will be waiting to speak to you."; next; mes "^00D1FE[Sprakki]^000000"; mes "Please go see Instructor 'Brade' across the bridge to continue your training."; mes "But, you will miss all the advantages you can get in the Training Center."; next; cutin "",255; mes "^4d4dffYou received a quest from Sprakki."; mes "Please check the Quest Info Window.^000000"; close; } else if (job_novice_q == 2) { cutin "v_sprakki02",2; mes "^00D1FE[Sprakki]^000000"; mes "Please go see Instructor 'Brade' across the bridge to continue your training."; close2; cutin "",255; end; } }  
    I imagine it'd be better to use checkquest but variables work too.
  24. Skorm's post in MVP Spawner was marked as the answer   
    https://code.google.com/p/ea-addicts/downloads/detail?name=mvpspawner.txt&can=2&q=
  25. Skorm's post in Hammer Time for Middle Headgear 2: The Enchantment was marked as the answer   
    If getequipid was returning 0 then yeah it would.
     
    prontera,201,188,4 script Neo Enchanter 851,{ mes .npc$; mes "Hello there!"; mes "I can make Neo items even better!"; mes "If you have a ^0000FF"+getitemname(atoi(.e_itl$[1]))+"^000000,"; mes "a ^0000FF"+getitemname(atoi(.e_itl$[0]))+"^000000,"; mes "or a ^0000FF"+getitemname(atoi(.e_itl$[2]))+"^000000."; mes "I'll enchant it for 1,000,000z"; next; if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; } if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; } if(.note){ mes "^a92435----------NOTICE----------"; mes "The enchanted Neo armor will only"; mes "be available during the event"; mes "period. (October 17 - November 21)"; next; } mes .npc$; mes "Which Neo item would you like to enchant?"; next; while(set(.@a,.@a+1)<=.e_len) { if(compare("|"+.e_itl$[.@a-1]+"|","|"+getequipid(.e_loc[.@a-1])+"|")) set .@menu$, .@menu$+.eqp$[.@a-1]+"- [^0000FF"+getitemname(getequipid(.e_loc[.@a-1]))+"^000000]:"; else set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a-1]+"- [Empty]^000000:"; } select(.@menu$); set .@eq_loc, .e_loc[(@menu-1)]; set .@eq_id, getequipid(.@eq_loc); set .@eq_rf, getequiprefinerycnt(.@eq_loc); if(compare("|"+.e_itm$+"|","|"+.@eq_id+"|")) { set .@crd0, getequipcardid(.@eq_loc,0); while(getd(".menu"+.@b+"$")!="") { mes .npc$; mes "Choose ^0000FF"+(.@b+1)+.itm_c$[.@b]+"^000000 enchantment for your item."; next; select(getd(".menu"+.@b+"$")); setd(".@crd"+(.@b+1),getequipcardid(.@eq_loc,(.@b+1))); setd(".@n_crd"+(.@b+1),((.@b>1)?.itm2[@menu-1]:.itm1[0]+((@menu-1)*10))); set(.@b,.@b+1); } } else { mes .npc$; mes "Sorry I don't recoginze that equipment."; close; } set Zeny, Zeny-.pric; delitem2 .@eq_id, 1, 1, .@eq_rf, 0, .@crd0, .@crd1, .@crd2, .@crd3; getitem2 .@eq_id, 1, 1, .@eq_rf, 0, .@crd0, .@n_crd1, .@n_crd2, .@n_crd3; misceffect .efet; mes .npc$; mes "All done!"; equip .@eq_id; close; //NPC Constants OnInit: //=-=-=-=-=-=-=Configuration=-=-=-=-=-=-= set .npc$ , "[Neo Enchanter]"; // NPC Name set .note , 1; // Shows notice 1=on/0=off set .pric , 1000000; // Price set .efet , 154; // Effect Number setarray .itm1 , 4704, 4764; // Item Menu1 Range setarray .itm2 , 4802, 4788, 4765, 4763, 4799; // Item Menu2 setarray .itm_c$, "st", "nd", "rd"; // Numbers setarray .eqp$ , "Shield", "Garment", "Accessory1", "Accessory2";// Menu3 setarray .e_itl$, "2137", "2548", "2763", "2763"; // Equip Items setarray .e_loc , 3, 5, 7, 8; // Equip Locations set .e_itm$, implode(.e_itl$,"|"); set .e_len , getarraysize(.eqp$); set .i_len , getarraysize(.itm2); //=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-= for(set(.@a,.itm1[0]);.@a<=.itm1[1];set(.@a,.@a+10)) set .menu0$, .menu0$+ getitemname(.@a)+":"; set .menu1$, .menu0$; for(set(.@a,0);.@a<.i_len;set(.@a,.@a+1)) set .menu2$, .menu2$+ getitemname(.itm2[.@a])+":"; }
×
×
  • Create New...