Jump to content

Skorm

Forum Moderator
  • Posts

    1282
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Skorm

  1. 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
  2. What kind of message like a dialogue box, npc talk, or waiting room?
  3. In the name Stone 2#502 number is the itemid. If you switch the first npc's name make sure you also modify the "duplicate(Stone 1#501)" to reflect that change.
  4. I'm not really sure what you want here the topic you directed me to has links the eathena version... Why not just download it form there??? Lol
  5. Skorm

    N> Script

    Did you resolve this topic yourself? I can't tell anyways I'm marking this as solved just quote me if you still need help with this.
  6. http://rathena.org/board/topic/94812-woe-points-counter/ That might help... These topics look similar.
  7. It's called xray and it's only supported by older clients. You could probably diff it and get a few more ids that way but honestly for clients above 2008. I don't think you can get very many.
  8. Skorm

    Buffer HELP

    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

    NPC Script

    Guild Master gets the item now. (working) Can you slightly change it for Guild Master like onwednesday - item1, onsunday - item2? Done... http://rathena.org/board/topic/93077-npc-script/page-2#entry256484
  10. You can use this npc translator it just locates the text bits that the player will see and puts them at the bottom so you can modify them without messing up the script. http://paradox924x.com/eAthena/Tools/byMyzter/NPCTranslator.rar Just download the dependencies for the program from the internet.
  11. Doing this with a script would be really cumbersome on your server... Because each player would need a timer or the server would be on a timer to check the status of each player... Either way it isn't pretty. I recommend src.
  12. Skorm

    Buffer HELP

    What buffer npc post the script....
  13. Skorm

    NPC Script

    Ok Another small oversight on my part. It's fixed in the post above. No, it's untabulated and a mess to read, sorry.
  14. event_map,100,100,5 script Stone 1#501 406,{ .@item = atoi(strnpcinfo(2)); if( !countitem(.@item) ) end; npctalk "GRAAAAHHHH!!!"; hideonnpc strnpcinfo(0); delitem .@item,1; .active++; if( .active >= .npc ) monster "event_map",50,50,"Dark Infrit",2001,1,strnpcinfo(0)+"::OnMobDeath",2; end; 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
  15. Skorm

    NPC Script

    - 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; }
  16. Skorm

    NPC Script

    Somehow I managed to paste the script twice one after the other in the same code box. If you grabbed the top version it wasn't changed. I've since corrected the mistake. Also:
  17. Skorm

    NPC Script

    Small oversight on my part it's fixed in the above post. Lol you're welcome.
  18. Skorm

    NPC Script

    Yeah some things still haven't been tested like the next and back buttons when there are more than 10 guilds in the list but it should work. - 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 "Guild data cleared!"; deletearray($App_Guilds); 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$; for( set .@i,0; .@i <= getarraysize($App_Guilds); set .@i, .@i+1 ) { 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 4012: //Sniper class getitem 1065,10; //10 Traps getitem 504,20; //20 White potions break; case 4019: //Creator class getitem 7136,10; //10 Acid Bottles getitem 504,20; //20 White potions break; //Add more cases for all classes default: break; } set #delay, gettimetick(2)+10800; mes "Here you go, goodluck!"; close; OnInit: set .Npc_Name$, "[^0000FF WoE Supply ^000000]"; disablenpc "WoE Supply"; end; }
  19. event_map,100,100,5 script Start Event 100,{ monster "event_map",0,0,"--ja--",2001,100,"OnMobDeath"; end; OnMobDeath: #event_points++; dispbottom "You have "+#event_points+" event point(s)."; }
  20. 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;
  21. Skorm

    NPC Script

    - script SupplyTrigger -1,{ OnWed1700: OnSun1600: enablenpc "WoE Supply"; end; OnAgitEnd: OnAgitEnd2: disablenpc "WoE Supply"; end; } prontera,100,200,3 script WoE Supply 78,{ mes .Npc_Name$; mes "I'm here to give you supplies for WoE!"; next; mes .Npc_Name$; for( set .@i,0; .@i <= getarraysize(.App_Guild); set .@i, .@i+1 ) { if( getcharid(2) == .App_Guild[.@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( BaseLevel < 99 || Class > 4022 ) { mes "Sorry this is for Lvl 99 Trans Class only"; close; } if( gettimetick(2) < #delay && compare(#job$+"|","|"+Class+"|") ) { mes "Sorry, you can only claim this once every WoE"; close; } if( gettimetick(2) >= #delay ) set #job$, ""; switch( Class ) { case 4012: //Sniper class getitem 1065,10; //10 Traps getitem 504,20; //20 White potions break; case 4019: //Creator class getitem 7136,10; //10 Acid Bottles getitem 504,20; //20 White potions break; //Add more cases for all classes default: break; } set #delay, gettimetick(2)+10800; set #job$, #job$+"|"+Class; mes "Here you go, goodluck!"; close; OnInit: setarray .App_Guild[0], 1001, 1002, 1003; //Edit content to Guild IDs of approved guilds. set .Npc_Name$, "[^0000FF WoE Supply ^000000]"; disablenpc "WoE Supply"; end; } I switched it up a little bit so that players can't get items of the same class by logging onto a different character.
  22. Skorm

    hi!

    Uhm... Hi? Normally when someone makes an introduction topic they include some information about themselves but... Hi and welcome to this wonderful place that I like to call home.
  23. OnWhisperGlobal: if(isequipped(<item_id>)) goto Validation_whisp; end; If the head gear doesn't take all the head slots they can still morph other parts.
  24. 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.
  25. //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...
×
×
  • Create New...