Scofield Posted June 3, 2020 Group: Members Topic Count: 109 Topics Per Day: 0.02 Content Count: 272 Reputation: 16 Joined: 01/11/13 Last Seen: 12 hours ago Share Posted June 3, 2020 (edited) i want to put this npc to activate on 3 maps instead of just 1, and even if the person reloged it would be checked again. - script bot2 -1,{ OnInit: OnPCLoadMapEvent: if( !Checking ) end; OnNPCKillEvent: if ( strcharinfo(3) == "bat_c01" ) { set Kill,Kill+1; if( Kill >= rand( 15,35 ) ){ set Checking,1; announce "RO Guard : Bot Check time! Thank you for your patience!",bc_yellow|bc_self; atcommand "@option 2"; mes "[^ff557fRO Guard^000000]"; mes "Please enter the ^FF0000RED COLOUR NUMBER^000000"; next; set .@Number,rand( 999999 ); mes "[^ff557fRO Guard^000000]"; mes "Number : "; mes rand( 999999 )+"^ff0000"+.@Number+"^000000"+rand( 999999 ); input @Number; if( @Number != .@Number ){ mes "Sorry, WRONG."; atcommand "@kick "+strcharinfo(0); }else{ mes "Thank you. You now can move!."; dispbottom "100% of effectiveness."; announce "RO Guard : To rewared your kindness, please take a bonus of some Buffs.",bc_blue|bc_self; sc_start SC_INCREASEAGI,500000,10; sc_start SC_BLESSING,500000,10; percentheal 100,100; atcommand "@option 0 0 0"; if(@cart == 1) { setcart; set @cart,0; } if(@falcon == 1) { setfalcon; set @falcon,0; } if(@riding == 1) { setriding; set @riding,0; } set Checking,0; set Kill,0; } close; } } } bat_c01 mapflag loadevent Edited June 4, 2020 by Mael Use a codebox Quote Link to comment Share on other sites More sharing options...
0 Start_ Posted June 4, 2020 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 950 Reputation: 180 Joined: 04/05/13 Last Seen: Wednesday at 02:57 AM Share Posted June 4, 2020 Simple way is add more maps on if ( strcharinfo(3) == "bat_c01" ) { change to if ( strcharinfo(3) == "bat_c01" || strcharinfo(3) == "bat_c02" ) { and add this on bottom of scripts. bat_c02 mapflag loadevent 1 Quote Link to comment Share on other sites More sharing options...
0 Scofield Posted June 4, 2020 Group: Members Topic Count: 109 Topics Per Day: 0.02 Content Count: 272 Reputation: 16 Joined: 01/11/13 Last Seen: 12 hours ago Author Share Posted June 4, 2020 after the char is kicked will the npc work with it again? Quote Link to comment Share on other sites More sharing options...
0 Start_ Posted June 4, 2020 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 950 Reputation: 180 Joined: 04/05/13 Last Seen: Wednesday at 02:57 AM Share Posted June 4, 2020 Not sure about it just try. If it not run just use OnPCLoginEvent and check map name. Quote Link to comment Share on other sites More sharing options...
0 Scofield Posted June 4, 2020 Group: Members Topic Count: 109 Topics Per Day: 0.02 Content Count: 272 Reputation: 16 Joined: 01/11/13 Last Seen: 12 hours ago Author Share Posted June 4, 2020 I tested it and the people who take the test and pass the npc question again I wish that people who were not bot the npc would not ask more until she relog Quote Link to comment Share on other sites More sharing options...
0 Start_ Posted June 4, 2020 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 950 Reputation: 180 Joined: 04/05/13 Last Seen: Wednesday at 02:57 AM Share Posted June 4, 2020 (edited) set ask = 1; when success answer to anti bot. use this variables to check he/she already answer. like if(ask) end; and put this on bottom on scripts. OnPCLogout: ask = 0; end; Edited June 4, 2020 by Start_ 1 Quote Link to comment Share on other sites More sharing options...
Question
Scofield
i want to put this npc to activate on 3 maps instead of just 1, and even if the person reloged it would be checked again.
Use a codebox
Link to comment
Share on other sites
5 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.