MukkiesftKies Posted July 15, 2018 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 123 Reputation: 7 Joined: 03/13/12 Last Seen: January 2, 2019 Share Posted July 15, 2018 i use OnClock1601:if (.count < 1) goto L_SUM;end;it work. but when i use like this if (.count > 1) goto L_SUM; or if (.count >= 1) goto L_SUM;. nothing happen. i just want to make if player click npc more than 100 times. monster will spawn. - script 100times -1,{ OnClock1601: if (.count > 1) goto L_SUM; end; L_SUM: for( .@i = 0; .@i < .size; .@i++ ){ killmonster .Map$[.@i],"All"; monster .Map$[.@i],0,0,"--ja--",.MobID,1,strnpcinfo(0)+"::OnKilled"; } end; OnKilled: set .count,.count - 50; end; OnInit: .MobID = 1785; setarray .Map$[0],"prontera"; .size = getarraysize( .Map$ ); end; } Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted July 15, 2018 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: 29 minutes ago Share Posted July 15, 2018 i probably wont answer the question cuz i didn't understand what is the script about but what is .count ? it's a variable for nothing your kill event does not do anything Quote Link to comment Share on other sites More sharing options...
0 MukkiesftKies Posted July 15, 2018 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 123 Reputation: 7 Joined: 03/13/12 Last Seen: January 2, 2019 Author Share Posted July 15, 2018 (edited) 1 hour ago, sader1992 said: i probably wont answer the question cuz i didn't understand what is the script about but what is .count ? it's a variable for nothing your kill event does not do anything this is my full script prontera,155,157,5 script Haruhi Suzumiya 500,{ if (.knsON) goto L_START; set .@n$,"*** ^800000Event Employee^000000 ***"; //--- Dialog When Event Start ----\\ L_Start: if (.count > 5 ) goto L_ANGRY; mes .@n$; mes"I lost my school bag. I think someone steal and I know"; mes"him but I'm no sure."; emotion ET_CRY; next; mes .@n$; mes"Very big and tall."; mes"Maybe people, maybe monster!"; next; mes .@n$; mes"Arghh! I don't know."; next; switch(select("Cooldown. Your school bag safe now.:Hahaha, I dont care about you.")){ case 1: if ( countitem(501) ) { mes .@n$; //-- bring item and get reward --\\ mes"Thank you so much!"; mes"Take this as my thanks"; getitem 502,100; close; } else { mes .@n$; //-- not enough item. --\\ mes"Are you try to kidding me?"; emotion ET_HNG; sleep2 1000; mes"How dare you?!"; close; } case 2: mes .@n$; mes"How dare you?!"; sleep2 1000; mes"I will make sure"; mes"you will regret."+ .count +""; if (!#onetimes) { set #onetimes,1; .count++; sleep2 1000; emotion ET_HNG; close; } sleep2 1000; emotion ET_HNG; close; } L_ANGRY: MES"I HATE YOU!"; CLOSE; OnInit: set .knsON,0; end; OnClock1633: // - start event - \\ set .knsON,1; end; OnClock1711: // - end event - \\ set .knsON,0; end; } - script 100times -1,{ OnClock1634: if (.count < 1) goto L_SUM; end; L_SUM: for( .@i = 0; .@i < .size; .@i++ ){ killmonster .Map$[.@i],"All"; monster .Map$[.@i],0,0,"--ja--",.MobID,1,strnpcinfo(0)+"::OnKilled"; } end; OnKilled: set .count,.count-50; end; OnInit: .MobID = 1785; setarray .Map$[0],"prontera"; .size = getarraysize( .Map$ ); end; } this script like quest and npc revenge to player who play her. Edited July 15, 2018 by MukkiesftKies Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted July 15, 2018 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: 29 minutes ago Share Posted July 15, 2018 (edited) 13 minutes ago, MukkiesftKies said: this is my full script prontera,155,157,5 script Haruhi Suzumiya 500,{ if (.knsON) goto L_START; set .@n$,"*** ^800000Event Employee^000000 ***"; //--- Dialog When Event Start ----\\ L_Start: if (.count > 5 ) goto L_ANGRY; mes .@n$; mes"I lost my school bag. I think someone steal and I know"; mes"him but I'm no sure."; emotion ET_CRY; next; mes .@n$; mes"Very big and tall."; mes"Maybe people, maybe monster!"; next; mes .@n$; mes"Arghh! I don't know."; next; switch(select("Cooldown. Your school bag safe now.:Hahaha, I dont care about you.")){ case 1: if ( countitem(501) ) { mes .@n$; //-- bring item and get reward --\\ mes"Thank you so much!"; mes"Take this as my thanks"; getitem 502,100; close; } else { mes .@n$; //-- not enough item. --\\ mes"Are you try to kidding me?"; emotion ET_HNG; sleep2 1000; mes"How dare you?!"; close; } case 2: mes .@n$; mes"How dare you?!"; sleep2 1000; mes"I will make sure"; mes"you will regret."+ .count +""; if (!#onetimes) { set #onetimes,1; .count++; sleep2 1000; emotion ET_HNG; close; } sleep2 1000; emotion ET_HNG; close; } L_ANGRY: MES"I HATE YOU!"; CLOSE; OnInit: set .knsON,0; end; OnClock1633: // - start event - \\ set .knsON,1; end; OnClock1711: // - end event - \\ set .knsON,0; end; } - script 100times -1,{ OnClock1634: if (.count < 1) goto L_SUM; end; L_SUM: for( .@i = 0; .@i < .size; .@i++ ){ killmonster .Map$[.@i],"All"; monster .Map$[.@i],0,0,"--ja--",.MobID,1,strnpcinfo(0)+"::OnKilled"; } end; OnKilled: set .count,.count-50; end; OnInit: .MobID = 1785; setarray .Map$[0],"prontera"; .size = getarraysize( .Map$ ); end; } this script like quest and npc revenge to player who play her. still the same .variable is an npc variable not global variable .count in npc1 != .count in npc2 for more info rAthena Variables Edited July 15, 2018 by sader1992 Quote Link to comment Share on other sites More sharing options...
0 MukkiesftKies Posted July 15, 2018 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 123 Reputation: 7 Joined: 03/13/12 Last Seen: January 2, 2019 Author Share Posted July 15, 2018 14 minutes ago, sader1992 said: still the same .variable is an npc variable not global variable .count in npc1 != .count in npc2 so var must be ($count > 3) right ? i already try and it work. lol lol lol lol lol i spend time with this var for 3 hour and i don't know what i do. Quote Link to comment Share on other sites More sharing options...
Question
MukkiesftKies
i use
OnClock1601:
if (.count < 1) goto L_SUM;
end;
it work. but when i use like this if (.count > 1) goto L_SUM; or if (.count >= 1) goto L_SUM;. nothing happen.
i just want to make if player click npc more than 100 times. monster will spawn.
Link to comment
Share on other sites
4 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.