Jump to content

Skorm

Forum Moderator
  • Posts

    1,238
  • Joined

  • Last visited

  • Days Won

    28

Community Answers

  1. 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; }
  2. 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; [email protected] = getarg(2); [email protected] = getarg(3); return ( sprintf( getarg(0), s([email protected], [email protected], getarg(1)), s([email protected]++, [email protected], getarg(1)), s([email protected]++, [email protected], getarg(1)), s([email protected]++, [email protected], getarg(1)), s([email protected]++, [email protected], getarg(1)), s([email protected]++, [email protected], getarg(1)), s([email protected]++, [email protected], getarg(1)), s([email protected]++, [email protected], getarg(1)), s([email protected]++, [email protected], getarg(1)), s([email protected]++, [email protected], getarg(1)) ) +(( [email protected]+1 < [email protected] )?":Next":":") +(( [email protected] > 0 )?":Back":":") +":Cancel" ); function s { if( getarg(0) >= getarg(1) ) return ""; else { [email protected]$ = getguildname(getelementofarray(getarg(2),getarg(0))); return [email protected]$=="null"?"":[email protected]$; } }; }; 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?"; [email protected]_len = getarraysize($App_Guilds); [email protected]$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s"; next; if( select("Remove:Add") == 1 ) { while( [email protected] != 9999 ) { select( sf( [email protected]$, $App_Guilds, [email protected], [email protected]_len ) ); switch( @menu ) { case 11: [email protected] = nex( [email protected], [email protected]_len ); break; case 12: [email protected] = bac( [email protected] ); break; case 13: end; default: [email protected] = [email protected][email protected]; mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname($App_Guilds[[email protected]])+"]^000000 guild. Would you like to remove them from the accepted guilds?"; next; if( select("Yes:No") == 1 ) { deletearray($App_Guilds[[email protected]],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([email protected]$); [email protected] = query_sql( "Select `guild_id` from `guild` where `name` like '%"+escape_sql([email protected]$)+"%' or `master` like '%"+escape_sql([email protected]$)+"%';",[email protected]_id ); while( [email protected] != 9999 ) { select( sf( [email protected]$, [email protected]_id, [email protected], [email protected] ) ); switch( @menu ) { case 11: [email protected] = nex( [email protected], [email protected] ); break; case 12: [email protected] = bac( [email protected] ); break; case 13: end; default: [email protected] = [email protected][email protected]; [email protected]_len = getarraysize($App_Guilds); for([email protected]=0;[email protected]<[email protected]_len;[email protected]++) if( $App_Guilds[[email protected]][email protected]_id[[email protected]] ) { mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname([email protected]_id[[email protected]])+"]^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([email protected]_id[[email protected]])+"]^000000 guild. Would you like to add them to the accepted guilds?"; next; if( select("Yes:No") == 1 ) { [email protected]_len = getarraysize($App_Guilds); if( [email protected]_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[[email protected]_len] = [email protected]_id[[email protected]]; } } 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$; [email protected] = getarraysize($App_Guilds); for( [email protected]=0; [email protected] <= [email protected]; [email protected]++ ) { if( getcharid(2) == $App_Guilds[[email protected]] ) set [email protected]_Check, [email protected]_Check+1; } if( [email protected]_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; }
  3. 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( [email protected], 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, [email protected]([email protected]%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, [email protected]/5; close;
  4. 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([email protected],countitem(<item_id>))) delitem <item_id>, [email protected]; 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.
  5. 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 [email protected]$, @whispervar0$; set [email protected]$, @whispervar1$; // set [email protected],0; // while([email protected] < getarraysize(.morpho_disallowed)){ // if(@whispervar1$ == .morpho_disallowed$[[email protected]]){ // goto denied_unauthorized; // } else { // set [email protected],[email protected]+1; // } // } set [email protected],0; while([email protected] < 6){ if(@whispervar0$ == .keywords$[[email protected]]){ goto keyword; } set [email protected],[email protected]+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([email protected]){ 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 [email protected],getiteminfo([email protected]$,11); set [email protected],getiteminfo([email protected]$,5); // if([email protected] != 256 && [email protected] != 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,[email protected]; if([email protected] != 0 && [email protected] != -1){ dispbottom "Selected headgear ID: "[email protected]; setlook 4,[email protected]; } else { dispbottom "Invalid headgear ID."; } end; midhead: if(!isequipped(.mid_morpho)){ goto wrong_headgear; } set [email protected],getiteminfo([email protected]$,11); set [email protected],getiteminfo([email protected]$,5); // if([email protected] != 512 && [email protected] != 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,[email protected]; if([email protected] != 0 && [email protected] != -1){ dispbottom "Selected headgear ID: "[email protected]; setlook 5,[email protected]; } else { dispbottom "Invalid headgear ID."; } end; lowhead: if(!isequipped(.low_morpho)){ goto wrong_headgear; } set [email protected],getiteminfo([email protected]$,11); set [email protected],getiteminfo([email protected]$,5); // if([email protected] != 1){ // Lower Only. Comment out this line and the two below it to remove this functionality. // goto denied_wrongslot; // } set viewid_low,[email protected]; if([email protected] != 0 && [email protected] != -1){ dispbottom "Selected headgear ID: "[email protected]; setlook 3,[email protected]; } 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 [email protected],getarg(0); switch([email protected]) { 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...
  6. Skorm's post in NPC Warp Agent was marked as the answer   
    - script quest_block -1,{ OnPCLoadMapEvent: [email protected]$ = strcharinfo(3); while( [email protected]++<.len ) if( compare(.map_name$[[email protected]],[email protected]$) ) if( checkquest(.quest_id[[email protected]])!=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( [email protected]++<.len ) setmapflag .map_name$[[email protected]], 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.
  7. 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;
    [email protected] = getarraysize(.maps$);
    while([email protected]++<[email protected])
    [email protected]$ += "Room "[email protected]+" ["+getmapusers(.maps$[[email protected]])+"/"+.rooms[[email protected]]+"]:";
    select([email protected]$);
    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 "[email protected]+" 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 ;
    }

  8. 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;

  9. 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.
  10. 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([email protected]$,[email protected],[email protected],0); if( distance(.x,.y,[email protected],[email protected])<=11 && [email protected]$==.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. }
  11. 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.
  12. 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;
  13. Skorm's post in Save Spot Issue was marked as the answer   
    getmapxy([email protected]$,[email protected],[email protected],0); savepoint [email protected]$,[email protected],[email protected]; 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([email protected]$,strcharinfo(0)); close2; cutin "",255; detachrid; atcommand "@save "[email protected]$; end;
  14. 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:
  15. 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.
  16. 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.
  17. 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=
  18. 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([email protected],[email protected]+1)<=.e_len) { if(compare("|"+.e_itl$[[email protected]]+"|","|"+getequipid(.e_loc[[email protected]])+"|")) set [email protected]$, [email protected]$+.eqp$[[email protected]]+"- [^0000FF"+getitemname(getequipid(.e_loc[[email protected]]))+"^000000]:"; else set [email protected]$, [email protected]$+"^adb4be"+.eqp$[[email protected]]+"- [Empty]^000000:"; } select([email protected]$); set [email protected]_loc, .e_loc[(@menu-1)]; set [email protected]_id, getequipid([email protected]_loc); set [email protected]_rf, getequiprefinerycnt([email protected]_loc); if(compare("|"+.e_itm$+"|","|"[email protected]_id+"|")) { set [email protected], getequipcardid([email protected]_loc,0); while(getd(".menu"[email protected]+"$")!="") { mes .npc$; mes "Choose ^0000FF"+([email protected]+1)+.itm_c$[[email protected]]+"^000000 enchantment for your item."; next; select(getd(".menu"[email protected]+"$")); setd("[email protected]"+([email protected]+1),getequipcardid([email protected]_loc,([email protected]+1))); setd("[email protected]_crd"+([email protected]+1),(([email protected]>1)?.itm2[@menu-1]:.itm1[0]+((@menu-1)*10))); set([email protected],[email protected]+1); } } else { mes .npc$; mes "Sorry I don't recoginze that equipment."; close; } set Zeny, Zeny-.pric; delitem2 [email protected]_id, 1, 1, [email protected]_rf, 0, [email protected], [email protected], [email protected], [email protected]; getitem2 [email protected]_id, 1, 1, [email protected]_rf, 0, [email protected], [email protected]_crd1, [email protected]_crd2, [email protected]_crd3; misceffect .efet; mes .npc$; mes "All done!"; equip [email protected]_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([email protected],.itm1[0]);[email protected]<=.itm1[1];set([email protected],[email protected]+10)) set .menu0$, .menu0$+ getitemname([email protected])+":"; set .menu1$, .menu0$; for(set([email protected],0);[email protected]<.i_len;set([email protected],[email protected]+1)) set .menu2$, .menu2$+ getitemname(.itm2[[email protected]])+":"; }
  19. Skorm's post in VIP SYSTEM was marked as the answer   
    Switched the functions for the compare command because it's faster and some other things.
     
    //eAthena Version 2 prontera,150,150,5 script VIP system 56,{ function statusvip; function expirevip; function mainmenu; function showlist; function deletevip; function addvip; mes .npc_Name$; query_sql "SELECT `account_type` FROM login WHERE `account_id` = "+ getcharid(3), [email protected]_Type$; while( [email protected] < 3 && !compare([email protected]_Type$,.type_name$[[email protected]]) ) set [email protected], [email protected] +1; if( [email protected] == 3 ) mes "Hello "+ strcharinfo(0) +" you have an normal account. Get an "+ getitemname( .item_premium_b ) +", "+ getitemname( .item_premium_s ) +", "+ getitemname( .item_premium_g ) +" to get a premium account."; else { set [email protected]_Date$, statusvip( .type_name$[[email protected]], [email protected] +1, 1 ); mes "Hello "+ strcharinfo(0) +" you have an "+ .type_name$[[email protected]] +" and it will expire in "+ [email protected]_Date$; } goto L_player; OnWhisperGlobal: if ( getgmlevel() < 99 ) end; L_main: mes .npc_Name$; mes "Welcome, "+ strcharinfo(0) +"!"; mes "What can I do for you today?"; L_player: next; set [email protected], select( ( getgmlevel() < 99 ? "" : "VIP bronze Menu" ), ( getgmlevel() < 99 ? "" : "VIP silver Menu" ), ( getgmlevel() < 99 ? "" : "VIP gold Menu" ), ( ( countitem( .item_premium_b ) || countitem( .item_premium_s ) || countitem( .item_premium_g ) ) && .up_npc ? "Upgrade my account" : "" ), "Quit" ) -1; if ( [email protected] == 4 ) close; else if( [email protected] == 3 ) { setarray [email protected]$, "b", "s", "g"; set [email protected], (prompt("Bronze:Silver:Gold")-1); callfunc "VIP_upgrade", 7, getd(".item_premium_"[email protected]$[[email protected]]), [email protected]; } set [email protected]$, "[VIP "+ .type_name$[[email protected]] +"]"; next; mes .npc_Name$; mes [email protected]$; // if( getgmlevel() < 99 ) { // set [email protected]_s, select( "List Accounts", "Cancel" ); // if( [email protected]_s == 2 ) close; // mainmenu( [email protected]_s +2, [email protected] ); // } next; set [email protected]_s, select( "Add/Extend Account", "Delete Account", "List Accounts", "Back" ); if ( [email protected]_s == 4 || mainmenu( [email protected]_s, [email protected], [email protected]$ ) ) goto L_main; // Setting // ------- OnInit: set .npc_Name$,"[VIP System v4.0]"; set .bronze_AccLvl, 1; // VIP bronze Account Level set .silver_AccLvl, 2; // silver set .gold_AccLvl, 3; // gold set .bronze_ExpRate, 25; // VIP bronze Exp Boost in % ( 1 = 1% ) set .silver_ExpRate, 50; // silver set .gold_ExpRate, 100; // gold set .bronze_ItemRate, 0; // VIP bronze Item Drop Boost in % ( 1 = 1% ) set .silver_ItemRate, 5; // silver set .gold_ItemRate, 10; // gold set .item_premium_b, 501; // ID item to upgrade your account to bronze set .item_premium_s, 502; // ID item to upgrade your account to silver set .item_premium_g, 503; // ID item to upgrade your account to gold set .fcp, 0; // fcp for gold vip ? (0 : no) / (1 : yes) set .up_npc, 1; // player can upgrade to npc if items required 0 : no setarray .type_name$, "bronze", "silver", "gold" ; end; // On login // -------- OnPCLoginEvent: query_sql "SELECT `account_type` FROM login WHERE `account_id` = "+ getcharid(3), [email protected]_Type$; while( [email protected] < 3 && !compare([email protected]_Type$,.type_name$[[email protected]]) ) set [email protected], [email protected] +1; if( [email protected] == 3 ) end; sc_end sc_expboost; sc_end sc_itemboost; set [email protected]_Date$, statusvip( .type_name$[[email protected]], [email protected], 0 ); dispbottom "----------------------------------------------------------------------"; dispbottom "Account type: "+ [email protected]_Type$; dispbottom "Expiration date: "+ [email protected]_Date$; dispbottom "----------------------------------------------------------------------"; end; // Check the VIP status ; bonus VIP // -------------------------------- function statusvip { query_sql "SELECT `status` FROM `vip_"+ getarg(0) +"` WHERE `account_id` = "+ getcharid(3), [email protected]_Status$ ; query_sql "SELECT DATE_FORMAT(`end_date`, '%Y%m%d') FROM `vip_"+ getarg(0) +"` WHERE `account_id` = "+ getcharid(3), [email protected]_Date$ ; query_sql "SELECT CURDATE() + 0;", [email protected]_Date$ ; if( getarg(2) ) return [email protected]_Date$; if ( atoi([email protected]_Date$) >= atoi([email protected]_Date$) ) expirevip( "vip_"+ getarg(0), getcharid(3) ); else { set [email protected], 3600 * 60 * 1000; set [email protected]_Rate, getd( "."+ getarg(0) +"_ItemRate" ); set [email protected]_rate, getd( "."+ getarg(0) +"_ExpRate" ); if( [email protected]_rate ) sc_start sc_expboost, [email protected], [email protected]_rate; if( [email protected]_Rate ) sc_start sc_itemboost, [email protected], [email protected]_Rate; if( getarg(1) == 2 && .fcp ) { sc_start SC_CP_WEAPON, [email protected], 5; sc_start SC_CP_SHIELD, [email protected], 5; sc_start SC_CP_ARMOR, [email protected], 5; sc_start SC_CP_HELM, [email protected], 5; } } return [email protected]_Date$; } // VIP expire : updates tables // --------------------------- function expirevip { set [email protected]_Name$, getarg(0); set [email protected]_Id, getarg(1); query_sql "UPDATE `login` SET `level` = 0, `account_type` = 'NORMAL' WHERE account_id = "+ [email protected]_Id; query_sql "DELETE FROM "+ [email protected]_Name$ +" WHERE account_id = "+ [email protected]_Id; query_sql "ALTER TABLE "+ [email protected]_Name$ +" AUTO_INCREMENT = 1"; sc_end SC_CP_WEAPON; sc_end SC_CP_SHIELD; sc_end SC_CP_ARMOR; sc_end SC_CP_HELM; dispbottom "Your VIP expire."; end; } function mainmenu { switch( getarg(0) ) { case 1: addvip( getarg(1), getarg(2) ); break; case 2: deletevip( getarg(1), getarg(2) ); break; case 3: showlist( getarg(1) ); } return 1; } function addvip { set [email protected], getarg(0); set [email protected]$, getarg(1); mes .npc_Name$; mes [email protected]$; mes "Type the Account Name"; mes "you wish to add."; input [email protected]_Name$; next; mes .npc_Name$; mes [email protected]$; query_sql "SELECT `account_id` FROM login WHERE `userid` = '"+ escape_sql( [email protected]_Name$ )+"'", [email protected]_Id ; mes "Identifying account: "+ [email protected]_Name$ +"."; sleep2 500; if ( [email protected]_Id ) { mes "ERROR: Couldn't find account."; mes "Verify if you dind't make a typo."; close; } mes .npc_Name$; mes [email protected]$; mes "Type the number of days you"; mes "wish to add to the account's VIP"; mes "status."; next; while( input( [email protected], 1, 999 ) != 0 ) { mes .npc_Name$; mes [email protected]$; mes "Put a number between 1 and 999."; next; } mes .npc_Name$; mes [email protected]$; query_sql "SELECT `account_id` FROM vip_"+ .type_name$[[email protected]] +" WHERE `account_id` = "+ [email protected]_Id, [email protected]_accid; if ( [email protected]_accid == [email protected]_Id ) { mes "Account ID: "+ [email protected]_accid +"."; sleep2 500; query_sql "UPDATE vip_"+ .type_name$[[email protected]] +" SET end_date = DATE_ADD(end_date, INTERVAL "+ [email protected] +" DAY), `status` = 'ACTIVE' WHERE account_id = "[email protected]_accid; query_sql "UPDATE login SET `account_type` = '"+ .type_name$[[email protected]] +"' WHERE account_id = "+ [email protected]_accid; mes "Account "+ [email protected]_Id +" added successfully!"; } else { mes "Account ID: "+ [email protected]_Id +"."; sleep2 500; query_sql "INSERT INTO vip_"+ .type_name$[[email protected]] +" (`account_id`,`account_name`,`start_date`,`end_date`,`status`) VALUES ("[email protected]_Id+",'"+ escape_sql( [email protected]_Name$ ) +"',CURDATE(),CURDATE(),'ACTIVE')"; sleep2 100; query_sql "UPDATE vip_"+ .type_name$[[email protected]] +" SET end_date = DATE_ADD(start_date, INTERVAL "+ [email protected] +" DAY) WHERE account_id = "[email protected]_Id; query_sql "UPDATE `login` SET `level` = "+ getd( "."+ .type_name$[[email protected]] +"_AccLvl" ) +", `account_type` = '"+ .type_name$[[email protected]] +"' WHERE `account_id` = "[email protected]_Id; mes "Account "+ [email protected]_Id +" added successfully!"; } close; } function deletevip { set [email protected], getarg(0); set [email protected]$, getarg(1); set [email protected], query_sql( "SELECT account_name,`account_id` FROM vip_"+ .type_name$[[email protected]] +" LIMIT 127", [email protected]$, [email protected]_id ); mes .npc_Name$; mes [email protected]$; if ( [email protected] == 0 ) mes "There are currently no VIP "+ .type_name$[[email protected]] +" accounts."; else { mes "Select the account you wish "; mes "to remove from VIP system."; set [email protected]$, "1. "+ [email protected]$; for ( set [email protected], 1; [email protected] < [email protected]; set [email protected], [email protected] + 1 ) set [email protected]$, [email protected]$ +":"+ ( [email protected] +1 ) +". "+ [email protected]$[[email protected]]; set [email protected]$, [email protected]$ +":Cancel"; next; mes .npc_Name$; mes [email protected]$; set [email protected]_del, select( [email protected]$ ) -1; if ( [email protected]_del == [email protected] ) { next; return; } mes "Are you sure you want to remove the account "; mes [email protected]$[ [email protected]_del ] +" ?"; if ( select( "Yes", "No" ) -1 ) { next; return; } query_sql "UPDATE `login` SET `level` = 0, `account_type` = 'NORMAL' WHERE `account_id` = '"+ [email protected]_id +"'"; query_sql "DELETE FROM vip_"+ .type_name$[[email protected]] +" WHERE account_id = "+ [email protected]_id; query_sql "ALTER TABLE vip_"+ .type_name$[[email protected]] +" AUTO_INCREMENT = 1"; mes "VIP "+ .type_name$[[email protected]] +" account successfully deleted!."; } close; } function showlist { set [email protected], getarg(0); mes .npc_Name$; mes "VIP "+ .type_name$[[email protected]] +" accounts list:"; set [email protected], query_sql( "SELECT account_name FROM vip_"+ .type_name$[[email protected]] +" LIMIT 127", [email protected]$ ); if( [email protected] == 0 ) { mes "The list is empty."; close; } for ( set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1 ) mes ( [email protected] +1 )+". "+ [email protected]$[ [email protected] ]; close; } } // Upgrade via itemscript // ---------------------- /* callfunc( "VIP_upgrade", 7, 12703, 0 ); getarg(2) : 0 = up to bronze 1 = up to silver 2 = up to gold */ function script VIP_upgrade { if( select( "^777777~ Upgrade my account", "~ Not today^000000" ) -1 ) close; set [email protected]_id, getcharid(3) ; setarray [email protected]_name$, "bronze", "silver", "gold" ; set [email protected]_AccLvl, 1; // VIP bronze Account Level set [email protected]_AccLvl, 2; // silver set [email protected]_AccLvl, 3; // gold query_sql "SELECT `userid`, `account_type` FROM `login` WHERE `account_id` = '"+ [email protected]_id +"'", [email protected]_id$, [email protected]_type$; while( [email protected] < 3 && !compare([email protected]_Type$,[email protected]_name$[[email protected]]) ) set [email protected], [email protected] +1; dispbottom ""[email protected]+">="+getarg(2); if ( [email protected] == 2 || ( [email protected] >= getarg(2) && [email protected] != 3 ) ) { dispbottom "Your can't upgrade your account."; close; } if(!countitem(getarg(1))) { message strcharinfo(0), "You don't have any "+getarg(1)+"(s)."; close; } else if( [email protected] != 3 ) { query_sql "DELETE FROM vip_"+ [email protected]_name$[[email protected]] +" WHERE account_id = '"+ [email protected]_id +"'"; query_sql "ALTER TABLE vip_"+ [email protected]_name$[[email protected]] +" AUTO_INCREMENT = 1"; } query_sql "INSERT INTO vip_"+ [email protected]_name$[ getarg(2) ] +" (`account_id`,`account_name`,`start_date`,`end_date`,`status`) VALUES ("+ [email protected]_id +",'"+ escape_sql( [email protected]_id$ ) +"', CURDATE(), ( DATE_ADD(CURDATE(), INTERVAL "+ getarg(0) +" DAY) ), 'ACTIVE') "; query_sql "UPDATE `login` SET `level` = "+ getd( "[email protected]"+ [email protected]_name$[ getarg(2) ] +"_AccLvl" ) +", `account_type` = '"+ [email protected]_name$[getarg(2)] +"' WHERE `account_id` = '"+ [email protected]_id +"'"; query_sql "SELECT DATE_FORMAT(`end_date`, '%Y %M %d') FROM vip_"+ [email protected]_name$[ getarg(2) ] +" WHERE `account_id` = '"+ [email protected]_id +"'", [email protected]_Date$; message strcharinfo(0), "Account updated. Expiration : "+ [email protected]_Date$; delitem getarg(1), 1; message strcharinfo(0), "You must relog."; close2; sleep2 4000; if( playerattached() ) atcommand "@kick "+ strcharinfo(0); end; } // 12703,Holy_Egg_2,Holy Egg,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc( "VIP_upgrade", 7, 12703, 0 ); /* 7 days, item ID to delete */ },{},{} // 12703,Holy_Egg_2,Holy Egg,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc( "VIP_upgrade", 7, 12703, 1 ); /* 7 days, item ID to delete */ },{},{} // 12703,Holy_Egg_2,Holy Egg,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc( "VIP_upgrade", 7, 12703, 2 ); /* 7 days, item ID to delete */ },{},{}  
    Database bits:
    CREATE TABLE IF NOT EXISTS `vip_bronze` ( `account_id` int(11) unsigned NOT NULL default '0', `account_name` varchar(255) NOT NULL default 'NULL', `start_date` datetime NOT NULL default '0000-00-00 00:00:00', `end_date` datetime NOT NULL default '0000-00-00 00:00:00', `status` varchar(255) NOT NULL DEFAULT 'NULL', PRIMARY KEY (`account_id`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `vip_silver` ( `account_id` int(11) unsigned NOT NULL default '0', `account_name` varchar(255) NOT NULL default 'NULL', `start_date` datetime NOT NULL default '0000-00-00 00:00:00', `end_date` datetime NOT NULL default '0000-00-00 00:00:00', `status` varchar(255) NOT NULL DEFAULT 'NULL', PRIMARY KEY (`account_id`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `vip_gold` ( `account_id` int(11) unsigned NOT NULL default '0', `account_name` varchar(255) NOT NULL default 'NULL', `start_date` datetime NOT NULL default '0000-00-00 00:00:00', `end_date` datetime NOT NULL default '0000-00-00 00:00:00', `status` varchar(255) NOT NULL DEFAULT 'NULL', PRIMARY KEY (`account_id`) ) ENGINE=MyISAM; ALTER table `login` add column account_type varchar(255) NOT NULL default 'NULL' after `birthdate`, add index (account_type); UPDATE `login` SET `account_type` = 'NULL'; TRUNCATE `vip_bronze`; TRUNCATE `vip_gold`; TRUNCATE `vip_silver`;
  20. Skorm's post in Poring spawner was marked as the answer   
    http://code.google.com/p/ea-addicts/downloads/detail?name=mvpspawner.txt&can=2&q=
  21. Skorm's post in R>edit was marked as the answer   
    - script Royal Invasion -1,{
    OnClock0603:
    OnClock1757:
    setarray [email protected]$[0],"ars_fild12"; // Random town list
    set .map$, [email protected]$[rand(getarraysize([email protected]$))];
    set [email protected], 3613; // Mob ID
    set .count, 500; // Mob count
    set .boss, 1;
    monster .map$,0,0,strmobinfo(1,[email protected]),[email protected],.count,strnpcinfo(0)+"::OnMobDead";
    end;
    OnMobDead:
    set .count, .count-1;
    if (!.count) {
    set [email protected], 3622; // Boss ID
    monster .map$,0,0,strmobinfo(1,[email protected]),[email protected],1,strnpcinfo(0)+"::OnMobDead2";
    }
    end;
    OnMobDead2:
    set .boss, 0;
    announce strcharinfo(0)+" Emperor's Army has been annihilated! The Rune Midgard is Safe",0;
    sleep2 20000;
    announce "All Mighty Warrior who fought the emperor will be return to their lands. The Portal is closed.", bc_all;
    atcommand "@doommap";
    end;
    OnClock0803:
    if(!.boss) end;
    announce "The boss has won and the Portal is closed!!!", bc_all;
    killmonster .map$,strnpcinfo(0)+"::OnMobDead2";
    killmonster .map$,strnpcinfo(0)+"::OnMobDead";
    set .boss, 0;
    end;
    }

  22. Skorm's post in Help with my script was marked as the answer   
    Like this?
     
    function script patienceTest { setarray [email protected]_4096[0], 606,100, 914,50; // Job_Baby_Rune setarray [email protected]_4097[0], 606,100, 914,50; // Job_Baby_Warlock setarray [email protected]_4098[0], 606,100, 914,50; // Job_Baby_Ranger setarray [email protected]_4099[0], 606,100, 914,50; // Job_Baby_Bishop setarray [email protected]_4100[0], 606,100, 914,50; // Job_Baby_Mechanic setarray [email protected]_4101[0], 606,100, 914,50; // Job_Baby_Cross setarray [email protected]_4102[0], 606,100, 914,50; // Job_Baby_Guard setarray [email protected]_4103[0], 606,100, 914,50; // Job_Baby_Sorcerer setarray [email protected]_4104[0], 606,100, 914,50; // Job_Baby_Minstrel setarray [email protected]_4105[0], 606,100, 914,50; // Job_Baby_Wanderer setarray [email protected]_4106[0], 606,100, 914,50; // Job_Baby_Sura setarray [email protected]_4107[0], 606,100, 914,50; // Job_Baby_Genetic setarray [email protected]_4108[0], 606,100, 914,50; // Job_Baby_Chaser set [email protected], getarg(0); set [email protected]$, getarg(1); set [email protected], ([email protected]); if(Class != [email protected] || checkquest([email protected]) == 2) return; mes [email protected]$; set [email protected], roclass(eaclass()|EAJL_THIRD); if (checkquest([email protected]) == 1) { mes "Have you brought the items yet?"; next; if(select("Yes:No")-1) { mes "Alright comeback when you have!"; close; } set [email protected], 0; for(set [email protected],0; [email protected] < getarraysize(getd("[email protected]_"+ [email protected])); set [email protected],[email protected]+2) { if(countitem(getd("[email protected]_"+ [email protected] +"["+ [email protected] +"]")) < getd("[email protected]_"+ [email protected] +"["+ ([email protected]+1) +"]")) { mes "- "+ getd("[email protected]_"+ [email protected] +"["+ ([email protected]+1) +"]") +" "+ getitemname(getd("[email protected]_"+ [email protected] +"["+ [email protected] +"]")); set [email protected], 1; } } if([email protected]) { mes [email protected]$; mes "You are missing some items. Please come again when you have all the items I asked you to bring."; close; } mes [email protected]$; mes "Congratulations~! You have completed the ^0042FFPatience Test^000000!"; mes "Now we can get started."; for(set [email protected],0; [email protected] < getarraysize(getd("[email protected]_"+ [email protected])); set [email protected],[email protected]+2) delitem getd("[email protected]_"+ [email protected] +"["+ [email protected] +"]"), getd("[email protected]_"+ [email protected] +"["+ ([email protected]+1) +"]"); completequest [email protected]; next; } else if (checkquest([email protected]) < 1) { mes "Good. We will start with the ^0042FFPatience Test^000000."; mes "You are still very young, which is why you must complete this task in order to prove me that you got what it takes to become one of us."; next; mes [email protected]$; mes "Shall we begin then?"; next; if(select("Hold on:Yes!") == 1) { mes [email protected]$; mes "You must complete the ^0042FFPatience Test^000000 in order to change your job."; mes "Let me know when you are ready."; close; } mes "Your ^0042FFPatience Test^000000 is to bring me the following items:"; for(set [email protected],0; [email protected] < getarraysize(getd("[email protected]_"+ [email protected])); set [email protected],[email protected]+2) mes "- "+ getd("[email protected]_"+ [email protected] +"["+ ([email protected]+1) +"]") +" "+ getitemname(getd("[email protected]_"+ [email protected] +"["+ [email protected] +"]")); setquest [email protected]; close; } return; }
  23. Skorm's post in Help on dynamic menu was marked as the answer   
    There are a few different ways of doing a dynamic menu.
     
    set [email protected]$, "|1599|1201|"; //Items required. setarray [email protected]$, "Upper Headear", "Armor" , "Left hand" , "Right hand" , "Garment", "Footgear", "Accessory 1", "Accessory 2", "Middle Headgear", "Lower Headgear"; set [email protected], getarraysize([email protected]$); //Array size. set [email protected]$, implode([email protected]$,":"); //Menu npctalk "Where is the item equipped?"; select([email protected]$); //Setting the choice @menu. set [email protected]_itm, getequipid(@menu); //Equipped slot to ID. if(!compare([email protected]$,"|"[email protected]_itm+"|")) //Comparing Equipped item to required items! npctalk "No that's not the item!"; else npctalk "Awesome you got it!"; end; This is an example where the menu isn't so dynamic but your options are limited to one of multiple required items without loops etc.
     
     
    setarray [email protected], 501, 502 ,503, 504, 505; //Required List. set [email protected], getarraysize([email protected]); //Length of list. while([email protected]++-1<[email protected]) set [email protected]$, getitemname([email protected][[email protected]])+":"; //Creating the menu. set [email protected], select([email protected]$)-1; //Select from the menu and reduce the selection by one so it will match our array. if(!countitem([email protected][[email protected]])) //Get the ID from our array with the players selection, and use it to see if the item exists. npctalk "You don't have "+getitemname([email protected][[email protected]])+"."; else getitem([email protected][[email protected]],1); end; In this example you match the array with the selected menu... If the menu and the array are the same we can grab and use items from the array as our players selection.
     

     
    If you mean using case conditions they really aren't very flexible, but they do work well for database type situations where the information can be individually set for each item.
     
    function script Monster_DB { switch(getarg(0)){ case 1002: switch(getarg(1)){ // Keep in mind these are precents overall so 20% is actually lower while 140% is actually 40% higher. // Where 200% is double... It's like saying 2*400=800. case 0: // Heal Item Rate (Healing Items) return 20; // 20% for healing items. case 2: case 7: case 11: case 18: // Uasable Item Rate (Anything Usable that doesn't heal) return 100; // 100% for healing items. case 3: // Common Item Rate (ETC) return 200; //200% more for Common Items. case 4: case 5: case 8: case 10: // Equip Item Rate (Ammo, Pet Equip, Weapon, Armor) return 140; // 140% more for equip items. case 6: // Card Item Rate (Card) return 200; // 110% more for cards. } case 1003: case 1004: case 1005: //...to add new monsters simply do as I've done. } } Where 1002(getarg(0)) is the mob ID and number 0-6(getarg(1)) are dropped item types.
     
    You can view the full script here.
    http://code.google.com/p/ea-addicts/downloads/detail?name=dropemulator.txt&can=2&q=
     
    I hope this helps.
  24. Skorm's post in Simple Poring Coin Shop was marked as the answer   
    - shop custom_seller2 -1,501:20 prontera.gat,95,99,5 script Poring Coin Shop 100,{ mes "I will sell you items for " + getitemname(.CoinID) + "."; 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(countitem(.CoinID) >= .Price[[email protected]]*@bought_quantity[[email protected]]) { delitem .CoinID,.Price[[email protected]]*@bought_quantity[[email protected]]; getitem @bought_nameid[[email protected]],@bought_quantity[[email protected]]; } else dispbottom "You don't have enough "+getitemname(.CoinID)+" 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; OnInit: setarray .customs[0],12103,607,678;// Enter the ID of customs here set .CoinID,7539; // Enter the ID of the coin here. setarray .Price[0],20,40,300; // Price for each custom is set to 20 coins 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; }  
    Fill out the arrays .customs, and .price...
     
    Edit-- Didn't see Emistry's post... Haha this is an old script back from the eAthena days anyways . It's a very good one though I come back to this as a base for all of my shops.
  25. Skorm's post in auto prize box was marked as the answer   
    Alright I forgot one thing in the function so the rate should be fixed now. To add items exclusive to the party leader use the first callfunc.
    prontera,150,150,5 script Tier 1 Award 100,{ if(getcharid(0)!=getpartyleader(getcharid(1),2)) end; callfunc("package_func",3,7899,1,50); getpartymember(getcharid(1),2); set .mem, [email protected]; copyarray .mem_aid[0], [email protected][0], 128; while([email protected]<.mem) { set([email protected],[email protected]+1); if(isloggedin(.mem_aid[[email protected]])){ attachrid(.mem_aid[[email protected]]); callfunc("package_func",3,12246,1,10); } } set @id,getcharid(1); warpparty "prontera",165,24,@id; disablenpc "Tier 1 Award"; end; OnInit: disablenpc "Tier 1 Award"; } /// callfunc("package_func",<length>,<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,...}}}) function script package_func { set [email protected], getarg(0)+1; set([email protected],1); while([email protected]<[email protected]) { set([email protected],[email protected]+3); if(rand(101)<=getarg([email protected])) { set([email protected],[email protected]+1); set(@package_item[[email protected]],getarg([email protected])); set(@package_amount[[email protected]],getarg([email protected])); getitem(@package_item[[email protected]],@package_amount[[email protected]]); } } return [email protected]; } prontera,151,151,5 script Tier 1 106,{ if (getcharid(1) < 1) { mes "You're not in a party."; } else if (getpartyleader(getcharid(1),2) != getcharid(0)) { mes "You are not the party leader."; } else { getpartymember(getcharid(1)); set .mem, [email protected]; if (.mem < 2) { mes "You need at least 2 party members."; } else { mes "[Summon Man]"; mes "Hi There,"; mes "Welcome to Riot's Tier 1"; next; mes "[Summon Man]"; mes "This is a custom party quest of XXXX RO that you need party members to get through on this quest..."; next; mes "[Summon Man]"; mes "This is not a simple MVP Room remember all MVP here is"; mes "a Edited Stats by your Admin which 1 or 2 people"; mes "cannot defeat the MVP's Hope you enjoy and good-luck..."; next; mes "[Summon Man]"; mes "Would you like to summon the first Boss?"; menu "Yes",-,"No",L_ayaw; next; mes "[Tier 1]"; mes "before you summon the boss please bring me the following"; next; mes "[Summon Man]"; mes "10x Platinum Bullion"; menu "Yes",-,"No",L_ayaw; next; mes "[Tier 1]"; mes "I'll be waiting for you chosen one!"; if(countitem(7230) < 10) goto koolang; if(countitem(7230) >= 10) goto k1; close; L_ayaw: mes "[Tier 1]"; mes "Just speak to me if you have the Requirements"; close; koolang: next; mes "[Tier 1]"; mes "As I said one missing material and all the others go to waste"; close; k1: next; mes "[Tier 1]"; mes "Very well done my friend you have finished the Tier 1 Quest"; mes "Get ready"; delitem 7230,10; next; monster "prontera",0,0,"Tier 1",1399,1,"Tier 1::OnDarkDead"; mes "[Tier 1]"; mes "Now go and kill the Great Baphomet"; close; OnDarkDead: announce "Party "+getpartyname(getcharid(1))+" has Finish the Tier 1",bc_all,0xFFFF00; enablenpc "Tier 1 Award"; end; L_Dead: announce "Summon Man: ",3; set $OnDarkDead,0; end; } } close; }
×
×
  • Create New...

Important Information

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