Jump to content
  • 0

Question

Posted

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;
}

4 answers to this question

Recommended Posts

  • 0
Posted

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

  • 0
Posted (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 by MukkiesftKies
  • 0
Posted (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 by sader1992
  • 0
Posted
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 /thx/sry

i spend time with this var for 3 hour and i don't know what i do.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...