Mabuhay Posted June 15, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Share Posted June 15, 2013 Please help me mod my script. 1.) if the @map$ = is not available as a map, it will notify the GM that the map he wrote is invalid. sample: "if he input 'protea' instead or 'prontera', the npc will say 'Invalid map' " 2.) After map has been selected. All skills will be disabled on the specified map from @map$. Here is my script: - script spawnevent -1,{ OnInit: .correct = 10; // spawn the special zombies .wrong = 90; // spawn the normal zombies end; OnWhisperGlobal: if(getgroupid() < 4) end; else if ( compare( @whispervar0$, "on" ) || compare( @whispervar0$, "start" ) ) { mes "What map to spwn?"; input @map$; set @2map$,@map$; if ( .count ) dispbottom "event already started"; else goto L_Start; } else if ( compare( @whispervar0$, "off" ) || compare( @whispervar0$, "end" ) ) { if ( !.count ) dispbottom "event not yet start"; else goto L_End; } else if ( !.count ) dispbottom "event is currently not running"; else dispbottom "event is currently running. "+ .count +" poring left"; end; L_Start: .count = .correct; announce "Apocalypse has begun at "+ @2map$ +".", 0; monster @2map$, 0,0, "Zombie", 1898, .correct, strnpcinfo(0)+"::OnCorrectKill"; monster @2map$, 0,0, "Zombie", 1898, .wrong, strnpcinfo(0)+"::OnWrongKill"; if ( !.count ) end; OnWrongKill: end; OnCorrectKill: .count--; getitem 909,1; // item reward if ( .count ) announce strcharinfo(0) +" killed a special zombie. "+ .count +" special zombie(s) left", 1; else goto L_End; end; L_End: .count = 0; announce "All special zombies are dead. Apocalypse has ended.", 0; killmonster @2map$, strnpcinfo(0)+"::OnCorrectKill"; killmonster @2map$, strnpcinfo(0)+"::OnWrongKill"; end; } Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 15, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 15, 2013 1.) if the @map$ = is not available as a map, it will notify the GM that the map he wrote is invalid. sample: "if he input 'protea' instead or 'prontera', the npc will say 'Invalid map' " input @map$; if ( getmapusers( @map$ ) == -1 ) { mes "Invalid map."; close; } After map has been selected. All skills will be disabled on the specified map from @map$. setmapflag @map$,mf_noskill; There is a mistake in L_End: .count = 0; announce "All special zombies are dead. Apocalypse has ended.", 0; killmonster @2map$, strnpcinfo(0)+"::OnCorrectKill"; killmonster @2map$, strnpcinfo(0)+"::OnWrongKill"; end; @2map$ is defined for the gm, null for player Quote Link to comment Share on other sites More sharing options...
Mabuhay Posted June 16, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Author Share Posted June 16, 2013 Thanks There is a mistake in L_End: .count = 0; announce "All special zombies are dead. Apocalypse has ended.", 0; killmonster @2map$, strnpcinfo(0)+"::OnCorrectKill"; killmonster @2map$, strnpcinfo(0)+"::OnWrongKill"; end; @2map$ is defined for the gm, null for player About this part. Im not good at scripting, so if you mind? how can i fix this Quote Link to comment Share on other sites More sharing options...
Question
Mabuhay
Please help me mod my script.
1.) if the @map$ = is not available as a map, it will notify the GM that the map he wrote is invalid.
sample: "if he input 'protea' instead or 'prontera', the npc will say 'Invalid map' "
2.) After map has been selected. All skills will be disabled on the specified map from @map$.
Here is my script:
Link to comment
Share on other sites
2 answers to this question
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.