prontera,160,155,4 script Disguise Event 4_M_NFDEADMAN,{ if (getgmlevel() < .gm_level && .event_onoff) { end; } mes .@n$ = "[^0000FFDisguise NPC^000000]", "Welcome. How may I help you?"; next; mes .@n$; switch(select("Information", ((getgmlevel() >= .gm_level)?"Turn Event ["+(.event_onoff?"^FF0000OFF":"^0000FFON")+"^000000]:Event Settings":":"), "Nothing, just passing by.")) { case 1: mes "This event is quite simple. At the ", "start of the event, I will disguise", "myself as a random monster.", "You have to shout that monster's", "name out loud."; next; mes "If you are correct, you will", "receive a prize. If not, keep ", "trying! That's all that there is to ", "this event."; break; case 2: mes "Are you sure you want to turn the ", "event ["+(.event_onoff?"^FF0000OFF":"^0000FFON")+"^000000]"; if (select("Yes", "No") == 2) { close; } if (.event_onoff) { .event_onoff = 0; announce "A GM has decided to turn the Disguise Event off. As a result no further prizes will be rewarded.",bc_all | bc_blue; deletepset 1; setnpcdisplay "Disguise Event", 4_M_NFDEADMAN; stopnpctimer; close; } close2; callsub iStartEvent; end; case 3: mes "Pick a setting to modify."; next; mes .@n$; switch(select("Monster Display", "Number of Rounds", "Prize Settings")) { case 1: mes "Choose a disguise rule."; next; .disguise_option = select(implode(.disguise_desc$), ":")) - 1; mes .@n$; "The Disguise Rule has been set:", "----> [^0000FF"+ .disguise_desc$[.disguise_option] +"^000000]"; break; case 2: mes "Input the number of rounds you want", "the event to last.", "Current number of rounds: [^0000FF"+ .rounds +"^000000]"; next; if (input(.@rounds,.min,.max)) { .@rounds = .min; } .rounds = .@rounds; mes .@n$, "The number of rounds has been", "changed to "+ .rounds +"."; break; case 3: mes "Tell me the Item ID of the prize ", "to be given each round.", "Current item: [^0000FF"+ getitemname(.prize_item) +"^000000]"; next; input .@prize; if (getitemname(.@prize) == "null") { mes "That item does not exist.", "Please try again."; close; } .prize_item = .@prize; mes "Input the amount to be given."; next; mes .@n$; if (input(.@amount,1,10000)) { mes "That amount is invalid.", "Using a default amount of 1."; .@amount = 1; next; mes .@n$; } .prize_amount = .@amount; mes "Successfully changed prize.", "Prize: "+ .prize_amount +"x [^0000FF"+ getitemname(.prize_item) +"^000000]"; break; } break; } close; OnInit: .gm_level = 60; .rounds = 10; .prize_item = Red_Potion; .prize_amount = 10; .min = 3; .max = 10; // What disguise rule, the NPC should follow by default. // 0 = Disguise as all monsters | 1 = Disguise as MVPs only // Default: 1 .disguise_option = 1; setarray .disguise_desc$[0],"Disguise as all monsters.", "Disguise as MVPs only."; // Whether or not to block surrounding cells from players during event. // 0 = Disabled, 1 = 1x1 | 2 = 2x2 | 9 = 9x9 // Default: 0 (Disabled). .block_cells = 3; // Minutes before event starts .start_delay = 3; // Seconds of intermission before transforming again .change_delay = 10; // MVP List setarray .MVP[0], OSIRIS, BAPHOMET, DOPPELGANGER, MISTRESS, GOLDEN_BUG, ORK_HERO, DRAKE, EDDGA, MAYA, MOONLIGHT, PHARAOH, PHREEONI, ORC_LORD, KNIGHT_OF_WINDSTORM, GARM, DARK_LORD, TURTLE_GENERAL, LORD_OF_DEATH, DRACULA, EVENT_BAPHO, DARK_SNAKE_LORD, INCANTATION_SAMURAI, PORING_V, AMON_RA, TAO_GUNKA, RSX_0806, BACSOJIN_, B_SEYREN, B_EREMES, B_HARWORD, B_MAGALETA, B_SHECIL, B_KATRINN, B_YGNIZEM, APOCALIPS_H, LADY_TANEE, THANATOS, DETALE, KIEL_, RANDGRIS, GLOOMUNDERNIGHT, KTULLANUX, ATROCE, G_MAGALETA_, IFRIT, FALLINGBISHOP, BEELZEBUB_, GOPINICH, MOROCC_, KUBLIN, S_NYDHOG, BOITATA; if(checkre(0)){ setarray .MVP[getarraysize(.MVP)], QUEEN_SCARABA, LOST_DRAGON, LEAK, I_QUEEN_SCARABA; } // DO NOT CHANGE THE BELOW !! // Since this is a custom event, it should be made to support custom monsters !! // To increase mosnter range, simply increase the value of .last_mobid // Default: 5000 .last_mobid = 5000; freeloop(1); for( .@i = SCORPION; .@i < .last_mobid; .@i++ ) { if( !getmobdrops( ( .@i ) ) ) { .blacklist[.@i] = .@i; } } freeloop(0); end; OnClock0000: OnClock0200: OnClock0400: OnClock0600: OnClock0800: OnClock1000: OnClock1200: OnClock1400: OnClock1600: OnClock1800: OnClock2000: OnClock2200: iStartEvent: if (.event_onoff) { end; } .change = .round_count = 0; .event_onoff = 1; announce "The Disguise Event will begin in "+ .start_delay +" minute"+ ( (.start_delay > 1)?"s":"") +".",bc_all | bc_blue; announce "The Event is being held in "+ strnpcinfo(4) +".",bc_all | bc_blue; iSleepTimer: sleep 60000; ++.@minute; if (!.event_onoff) { end; } if( .@minute != .start_delay ) { announce "The Disguise Event will begin in "+ ( .start_delay - .@minute ) +" minute"+ ( (.start_delay - .@minute > 1)?"s":"") +".",bc_all | bc_blue; announce "The Event is being held in "+ strnpcinfo(4) +".",bc_all | bc_blue; callsub iSleepTimer; } if (!.event_onoff) { end; } announce "The Disguise Event has begun!",bc_all | bc_blue; announce "The Event is being held in "+ strnpcinfo(4) +".",bc_all | bc_blue; iDisguise: if (!.event_onoff) { end; } if (.change) { sleep (.change_delay * 1000); } .change = .winner = 0; switch(.disguise_option) { case 1: .@monster = rand(SCORPION, .last_mobid); if (compare(.blacklist$, ","+ .@monster +",")) { callsub iDisguise; } if (getmonsterinfo(.@monster, 0) == .last_monster$) { callsub iDisguise; } .last_monster$ = .monster_name$ = getmonsterinfo(.@monster, 0); break; case 2: .@i = rand(getarraysize(.MVP)); if (getmonsterinfo(.MVP[.@i], 0) == .last_monster$) { callsub iDisguise; } .last_monster$ = .monster_name$ = getmonsterinfo(.MVP[.@i], 0); .@monster = .MVP[.@i]; break; } setnpcdisplay strnpcinfo(3), .@monster; setnpctimer 0; initnpctimer; callsub iSetPset,1; end; iSetPset: deletepset 1; if (getarg(0)) { defpattern 1, "([^:]+):.\\s*"+ .monster_name$ +".*", "iCorrect"; } activatepset 1; return; end; OnTimer30000: stopnpctimer; setnpcdisplay strnpcinfo(3), 4_M_NFDEADMAN; specialeffect EF_DETECT2; npctalk "You took too long to guess what I was. Please wait "+ .change_delay +" second"+((.change_delay > 1)"s":"")+" while I disguise again."; .monster_name$ = ""; callsub iSetPset; .change = 1; callsub iDisguise; end; iCorrect: if (.winner) { dispbottom "Someone has already won this round."; end; } .winner = 1; ++.round_count; callsub iSetPset; getitem .prize_item, .prize_amount; announce strcharinfo(0) +" is correct!! I was disguised as: "+ .monster_name$ +"",bc_map | bc_blue; setnpcdisplay strnpcinfo(3), 4_M_NFDEADMAN; if (.round_count >= .rounds) { npctalk "Thank you all for playing. That was the last round of the Disguise Event. Come play again later."; .event_onoff = 0; stopnpctimer; end; } npctalk "Please wait "+ .change_delay +" second"+((.change_delay > 1)?"s":"")+", while I disguise again."; setnpctimer 0; stopnpctimer; .change = 1; callsub iDisguise; end; }