Jump to content

Recommended Posts

Posted

Click The Ninja


How it works

Every seconds some ninja will spawn (depending of the number of player on the map), the first to click on them will get a reward and will have to wait before being able to get another reward.

To launch it, you can go it by hand or Auto start it with OnClockXXXX. The players will join using @ninja.

Configuration

You can edit the number of ninja, the timing between spawn, the delay between rewards ect. Follow the !!Modify

With a small number of ninja spawning, only the fastest will get rewarded, if you spawn a lot of ninja, everybody will get a chance to have one!

 

There's more information to help the configuration inside the npc.


  • Submitter
  • Submitted
    07/04/2020
  • Category
  • Video
    https://www.youtube.com/watch?v=uT0cH-QgXLw
  • Content Author
    Kreustoo

 

  • 1 month later...
Posted (edited)

Awesome script, Need an announcement when the event is finished. like a map broadcast or something.

 

Other issue is that, any gm  can select launch the event  and repet it dozen of times in a row and the events runs together..

Edited by iraciz
Posted (edited)

Hello,

The npc says when the training is over (Line 69). You can change that to an announce if you want :).

And for the gm, there's a .MinGMLevel value that you can edit to what you want, and yeah, there's no protection into breaking the npc launching it multiples time, but I don't put thoses kind of protection for the gm, I assume they know what they are doing.

Edited by Kreustoo
  • 2 weeks later...
Posted

Nice I still use it, by the way, there is a client side negative effect,  somehow repeated clicking on the spawned npcs sometimes crashes the exe but not the server. 

Posted (edited)

Oh, I think to prevent that you need to move the npc then disable it, I'll do a patch for this then. Thanks for the report!

Edited by Kreustoo
  • 2 weeks later...
Posted

@iraciz

@@ -125,7 +126,7 @@ prontera,149,150,4	script	Ninja Click	637,{ //!!Modify!! Position
 		end;
 	}
 	npctalk "Training Ninja: Damn! "+strcharinfo(0)+" got me!";
-	disablenpc strnpcinfo(3);
+	hideonnpc strnpcinfo(3);
 	for(.@i = 0;.@i< getarraysize(.Rewards);.@i =.@i +2){
 		getitem .Rewards[.@i],.Rewards[.@i+1];
 	}

I relaunched the game to test and this little fix should fix the crash, tell me if it does the job or not

Posted
1 hour ago, Kreustoo said:

@iraciz


@@ -125,7 +126,7 @@ prontera,149,150,4	script	Ninja Click	637,{ //!!Modify!! Position
 		end;
 	}
 	npctalk "Training Ninja: Damn! "+strcharinfo(0)+" got me!";
-	disablenpc strnpcinfo(3);
+	hideonnpc strnpcinfo(3);
 	for(.@i = 0;.@i< getarraysize(.Rewards);.@i =.@i +2){
 		getitem .Rewards[.@i],.Rewards[.@i+1];
 	}

I relaunched the game to test and this little fix should fix the crash, tell me if it does the job or not

Ninja spawn now in hinding status, and players can't see them.hwnn.thumb.png.a13d03d4704752aaea7cbcdcf789f567.png

Posted

Okay my bad, tested it with reloadnpc, @iraciz
 

From d3f15f841b1a0f563925e8710c3b798360a5d8c7 Mon Sep 17 00:00:00 2001
From: Kreustoo <kreustoo@gmail.com>
Date: Sat, 29 Aug 2020 21:03:23 +0200
Subject: [PATCH] ClickTheNinja, Fix the hideon hideoff

---
 scripts/Click The Ninja/ClickTheNinja.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/Click The Ninja/ClickTheNinja.txt b/scripts/Click The Ninja/ClickTheNinja.txt
index 04dc3f6..4a1c1bc 100644
--- a/scripts/Click The Ninja/ClickTheNinja.txt	
+++ b/scripts/Click The Ninja/ClickTheNinja.txt	
@@ -61,7 +61,7 @@ prontera,149,150,4	script	Ninja Click	637,{ //!!Modify!! Position
 			for(.@i = 0;.@i < .NbNpcSession;.@i++){
 				.@npcName$ = "EvNinjaTrainDup"+.Current;
 				movenpc .@npcName$,rand(.XMin,.XMax),rand(.YMin,.YMax);
-				enablenpc .@npcName$;
+				hideoffnpc .@npcName$;
 				.Current++;
 				if(.Current > .MaxNpc)
 					.Current = 1;
@@ -109,7 +109,7 @@ prontera,149,150,4	script	Ninja Click	637,{ //!!Modify!! Position
 		if(.NbNpcSession < 1)
 			.NbNpcSession = 1;
 		for(.@i = 1;.@i <= .MaxNpc;.@i++)
-			disablenpc "EvNinjaTrainDup"+.@i;
+			hideonnpc "EvNinjaTrainDup"+.@i;
 		mapannounce .@mapnameNPC$,"The event started, be the first to click on the npc!",bc_all;
 		initnpctimer;
 	end;

 

  • 1 month later...
Posted (edited)

Hey man, nice script loving it. A question from me.

Will it possible to make player walk close to it instead of clicking it and the rewards triggers once the player is next to the ninja?

 

UPDATE: Nevermind, i got it working in my server! Thanks for the script!!

Edited by fzxree1010
Got Solution

Join the conversation

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

Guest
Reply to this topic...

×   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...