Emistry Posted October 9, 2014 Posted October 9, 2014 View File Monster Counting Game A mini event where a numbers of monsters will be spawned within a specified area. Players have to count for the monsters that exist within that area and tell the NPC to win the event. Btw, this is just a new version of event based on my previous Flower Counting Event. Thank you @AnnieRuru for delivering me the idea of using "live" monsters. Configuration: OnInit: // how many rounds .max_round = 3; // minute each round .max_duration = 3; // dummy mob id represent wall .wall_mob_id = 1085; // ( x1,y1,x2,y2 ) area for event setarray .xy_area, 151,169, // ( x1,y1 ) 161,179; // ( x2,y2 ) // monster list used in event setarray .monster, 1002, 1031, 1836, 1595; Preview : Feel free to share your idea/opinions to improve this. Submitter Emistry Submitted 10/09/2014 Category Games, Events, Quests Video Content Author Emistry 4 Quote
Moofie91 Posted October 9, 2014 Posted October 9, 2014 is it possible to warp player that are inside the cell to some where else? Quote
Emistry Posted October 9, 2014 Author Posted October 9, 2014 is it possible to warp player that are inside the cell to some where else? Oh, forgotten that xD Updated script to v1.1. 1 Quote
Emistry Posted October 10, 2014 Author Posted October 10, 2014 can we include also the spam check? you can refer my flower counting script to add that. 1 Quote
Kido Posted October 13, 2014 Posted October 13, 2014 Woa awesome script! *5/5* thank you so much for such amazing script o:! Edit: may i ask, ho to make it to start when clicked? or by pm? o:! Quote
Emistry Posted October 13, 2014 Author Posted October 13, 2014 @Kido OnWhisperGlobal: if( getgmlevel() < 99 ) end; detachrid; OnMinute00: // start every hour find and add.. 1 Quote
Kido Posted October 13, 2014 Posted October 13, 2014 @Kido OnWhisperGlobal: if( getgmlevel() < 99 ) end; detachrid; OnMinute00: // start every hour find and add.. Thank you so much it's working awsm o:! dunno why, players can kill the mushrooms D: Quote
Moofie91 Posted October 14, 2014 Posted October 14, 2014 When player tried to put answer within a rows, its crash the map server?E.g Player : 11 12 13 14 15 16 17 18Player 2 : 23 24 25 26 27 28 29 30Any idea? Quote
Emistry Posted October 14, 2014 Author Posted October 14, 2014 @Moofie91 it seem fine for me, my map-server didnt crash even though i try to answer using your way. anyway, updated script to avoid this kind of "answer" which exploit the event behaviours. 1 Quote
jawbreaker Posted October 24, 2014 Posted October 24, 2014 im trying to add the spam protection from Emistry flower counting, can you verify if this is ok? Thanks prontera,155,181,5 script Monster Counting Game 757,{ mes "This is a Monsters Counting Game"; mes "I will summon some Monsters here, and you have to count the Correct Amount of Monsters i summoned."; mes "^FF0000Only Count for the Monsters i mentioned^000000"; next; switch( select( "Information", ( getgmlevel() < .GMLevel || .status )?"":"^FF0000[GM]^000000 Start Game", ( getgmlevel() < .GMLevel || !.status )?"":"^FF0000[GM]^000000 End Game" )){ case 1: mes "When the Event Start, i will summon some Monsters at a small area, and players have to count the amount of the flowers."; mes "Whoever tell me the correct amount of Monsters i mentioned, he/she win the game."; break; case 2: mes "Event will begin right now."; close2; donpcevent strnpcinfo(0)+"::OnStartEvent"; end; case 3: deletepset 1; npctalk "Counting Game Cancelled."; mes "Game Cancelled."; killmonster .map$,"All"; setcell .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],cell_basilica,0; setcell .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],cell_walkable,1; .status = 0; delwaitingroom; break; } close; OnSpammed: .@Spam = 0; end; iSpam: if( getgmlevel() > 90 ) end; set @Spam,@Spam + 1; if( @Spam >= .Spam ){ // 3 Continuos Answer will trigger... set @SpamDelay,gettimetick(2) + .Spam; dispbottom "SPAM Detected, your answer within next "+.Spam+" Seconds will be Ignored."; } deltimer strnpcinfo(0)+"::OnSpammed"; addtimer ( .Spam * 1000 ),strnpcinfo(0)+"::OnSpammed"; end; OnRight: .@Spam = 0; deltimer strnpcinfo(0)+"::OnSpammed"; getmapxy( .@map$,.@x,.@y,0 ); if ( .status == 0 ) { dispbottom "[Counting Game] Event isnt running."; } else if ( .status == 1 ) { dispbottom "[Counting Game] Please wait for the round to start."; } else if ( distance( .npc_x,.npc_y,.@x,.@y ) > 14 ) { dispbottom "[Counting Game] You're too far away."; } else if( @SpamDelay > gettimetick(2) ){ message strcharinfo(0),"SPAM Protection : Remain "+( @SpamDelay - gettimetick(2) )+" seconds."; } else { npctalk "Bravo!! "+strcharinfo(0)+" is correct!!"; // rewards getitem 512,1; getitem 512,2; getitem 512,3; specialeffect2 EF_POTION_CON; awake .npc_name$; } end; function xy_wall; end; OnInit: // Min. GM Level to access GM Panel .GMLevel = 80; .Spam = 3; .Delay = 10; .max_round = 3; .max_duration = 3; .wall_mob_id = 1085; setarray .xy_area, 151,169, 161,179; setarray .monster, PORING, DROPS, MARIN, POPORING; .monster_size = getarraysize( .monster ); .npc_name$ = strnpcinfo(0); getmapxy( .map$,.npc_x,.npc_y,1 ); setmapflag .map$,mf_monster_noteleport; end; OnMinute00: OnStartEvent: if ( !.status ) { areawarp .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],.map$,.npc_x,.npc_y; killmonster .map$,.npc_name$+"::OnDied"; killmonster .map$,.npc_name$+"::OnWallDied"; setcell .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],cell_basilica,1; setcell .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],cell_walkable,1; .status = 1; for( .@i = .xy_area[0]; .@i <= .xy_area[2]; .@i++ ){ xy_wall( .@i,.xy_area[1] ); xy_wall( .@i,.xy_area[3] ); } for( .@i = .xy_area[1]; .@i <= .xy_area[3]; .@i++ ){ xy_wall( .xy_area[0],.@i,0 ); xy_wall( .xy_area[2],.@i ); } do{ .@round++; npctalk "Round # "+.@round; sleep 5000; .status = 2; .@mob = .monster[ rand( .monster_size ) ]; .@amount = rand( 20,50 ); // add-on size influence ? areamonster .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],"",.@mob,.@amount,.npc_name$+"::OnDied"; deletepset 1; defpattern 1,"([^:]+):.*"+.@amount+".$", "OnRight"; defpattern 1,"([^:]+):.*.*", "iSpam"; activatepset 1; waitingroom "How many's there?",0; npctalk "Tell me the correct amount of monster in there."; // debugmes " > "+.@amount+" "+getmonsterinfo( .@mob,MOB_NAME ); sleep ( .max_duration * 60000 ); killmonster .map$,.npc_name$+"::OnDied"; delwaitingroom; deletepset 1; .status = 1; sleep 5000; }while( .@round < .max_round ); npctalk "That's the Last, thank you for participating."; emotion e_thx; killmonster .map$,.npc_name$+"::OnDied"; killmonster .map$,.npc_name$+"::OnWallDied"; setcell .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],cell_basilica,0; setcell .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],cell_walkable,1; .status = 0; } end; OnDied: OnWallDied: end; function xy_wall { .@x = getarg(0); .@y = getarg(1); monster .map$,.@x,.@y,"",.wall_mob_id,1,.npc_name$+"::OnWallDied"; setcell .map$,.@x,.@y,.@x,.@y,cell_walkable,0; // setcell .map$,.@x,.@y,.@x,.@y,cell_basilica,1; return; } } Quote
ccp033102 Posted November 30, 2014 Posted November 30, 2014 (edited) ....... I correct it to 1002 then it is ok Edited December 1, 2014 by ccp033102 Quote
Yonko Posted February 23, 2015 Posted February 23, 2015 My players can kill the mushrooms D: yah same issue to me waiting for emistry to fix this Quote
xlaws27 Posted March 3, 2015 Posted March 3, 2015 <--- first time to make a ragnarok private server how can i add this script? can u teach my step by step ? thank you!!! Quote
Nova Posted March 3, 2015 Posted March 3, 2015 I'd rename the text file you download from "Monster Counting Game 1.2.txt" to "monstercounting.txt" After that, put the script inside your npc/ folder. Probably inside npc/custom/ Then inside your same npc/ folder, look for the file called scripts_custom.conf and add a line to it saying npc: npc/custom/monstercounting.txt Or whatever you ended up naming the text file. Once that's done all you need to do is log in as a GM with sufficient powers, and type in @reloadscript and the script will be loaded onto the server. Or you can restart the server as well, either works. Quote
qabakrall Posted August 22, 2015 Posted August 22, 2015 Please Tell me how to make so that one player takes no more than 3 answers for 1 round? Quote
BreezyRO Posted January 3, 2017 Posted January 3, 2017 How do you change the map where the event is held? I assume its where the npc is located? or am i wrong? Quote
Emistry Posted January 3, 2017 Author Posted January 3, 2017 On 8/22/2015 at 10:08 PM, qabakrall said: Please Tell me how to make so that one player takes no more than 3 answers for 1 round? .Spam = 3; 1 hour ago, BreezyRO said: I assume its where the npc is located yes Quote
dezmay Posted January 26, 2017 Posted January 26, 2017 On 11/30/2014 at 7:09 PM, ccp033102 said: I correct it to 1002 then it is ok i had the same problem now. where to replace that 1002? Quote
Emistry Posted January 27, 2017 Author Posted January 27, 2017 setarray .monster, PORING, DROPS, MARIN, POPORING; replace with monster id. 1 Quote
dezmay Posted January 29, 2017 Posted January 29, 2017 On 1/27/2017 at 4:03 PM, Emistry said: setarray .monster, PORING, DROPS, MARIN, POPORING; replace with monster id. Thank you! Quote
mirabell Posted April 9, 2017 Posted April 9, 2017 (edited) hello, I was testing this script and i found a few glitches. The wall of mushrooms are killable The mobs in the area are killable with aoes npc wont hear your answer unless the answer follows a space not sure maybe setcell basilica changed ? maybe using a setmapflag skilldamage 2 to disable mob killing ? its a fun minigame. not sure if anyone else noticed these. Edited April 9, 2017 by mirabell fix post Quote
RedMonkey Posted April 20, 2017 Posted April 20, 2017 (edited) On 4/10/2017 at 2:56 AM, mirabell said: hello, I was testing this script and i found a few glitches. The wall of mushrooms are killable The mobs in the area are killable with aoes npc wont hear your answer unless the answer follows a space not sure maybe setcell basilica changed ? maybe using a setmapflag skilldamage 2 to disable mob killing ? its a fun minigame. not sure if anyone else noticed these. Experienced the same problem. How to make mushrooms and monsters invulnerable? Edit: Got mine working properly. map.c Quote switch( cell ) { case CELL_WALKABLE: map[m].cell[j].walkable = flag; break; case CELL_SHOOTABLE: map[m].cell[j].shootable = flag; break; case CELL_WATER: map[m].cell[j].water = flag; break; case CELL_NPC: map[m].cell[j].npc = flag; break; case CELL_BASILICA: map[m].cell[j].basilica = flag; break; case CELL_LANDPROTECTOR: map[m].cell[j].landprotector = flag; break; case CELL_NOVENDING: map[m].cell[j].novending = flag; break; case CELL_NOCHAT: map[m].cell[j].nochat = flag; break; default: ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell); break; } Looks like set_cell function type is case sensitive. Also, I put the set_cell line at OnMinute59: Edited April 21, 2017 by akosivinmark Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.