Jump to content
  • 0

Stop the Clock not working


myieee

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  83
  • Reputation:   0
  • Joined:  12/07/11
  • Last Seen:  

ok i like this mini event and the title says STOP THE CLOCK AT 1000 !! is there someone can edit this script

prontera.gat,156,175,5	script	Stop the Clock at 1000	902,{

if (getgmlevel() >= 60) {
	announce "STOP THE CLOCK AT 1000 IS STARTING IN 5 SECONDS!",bc_map;
	sleep2 5000;
	announce "0",bc_map;
	set $@kc,0;
	set $@kci,0;
	set $@kcid,rand(100000,999999);
	while ($@kc < 1100) {
		set $@kc,$@kc+1;
		set $@kci,$@kci+1;
		if ($@kci == 100 || ($@kci == 10 && $@kc > 600) || ($@kci == 1 && $@kc >= 950 && $@kc < 1050)) {
			announce $@kc,bc_map;
			set $@kci,0;
			specialeffect 18;
		}
		sleep2 10;
	}
	set $@kc,0;
} else {
	if ($@kc > 0 && @kcid != $@kcid) {
		set @kcid,$@kcid;
		announce "Blue"+strcharinfo(0) + " GOT " + ($@kc),bc_map;
	}
}

}

this is the script but i need someone to edit this like if someone get closer in 1000 lets say 998 to 1002 you win ! and gm can set a prize for the winner so he/she will get an automatic reward and also if you stop the clock at exactly 1000 you can get a double prize pls help

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  78
  • Reputation:   3
  • Joined:  12/06/11
  • Last Seen:  

bump on this topic

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  130
  • Reputation:   43
  • Joined:  12/11/11
  • Last Seen:  

You could save all clicks before the second is over in an array or two (one for the names and one for the times), and then when someone presses after the second is over, you check who's the closest to the time 1000.

For the times before 1000, you just take (1000 - their time) and for the ones after: (their time - 1000)

So basically:

if(still under 1 sec){
save name and (1000-time), you only need to save the one closest
} else {
stop event
save name and (time-1000)
check the one with lowest time difference
announce winner
}

Commands which could help:

- If/Else

- *gettimetick(0)

EDIT: Easily done w/o arrays.

Edited by plankt
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  130
  • Reputation:   43
  • Joined:  12/11/11
  • Last Seen:  

@FrozIgnition

You could have infinite amount of winners tho /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  392
  • Reputation:   47
  • Joined:  11/18/11
  • Last Seen:  

@FrozIgnition

You could have infinite amount of winners tho :D

Can also be easily abused by bots.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  83
  • Reputation:   0
  • Joined:  12/07/11
  • Last Seen:  

still the same.. it doesnt work

Link to comment
Share on other sites

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.

×
×
  • Create New...