Jump to content
  • 0

Watch Youtube for Cash Point?


ooGubAoo

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.03
  • Content Count:  55
  • Reputation:   1
  • Joined:  06/08/23
  • Last Seen:  

Is it possible to create an NPC for giving out 1 Cash Point when opening a specific Youtube every 1 minute?
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.02
  • Content Count:  1016
  • Reputation:   191
  • Joined:  11/27/14
  • Last Seen:  

On 6/9/2024 at 1:30 PM, ooGubAoo said:
Is it possible to create an NPC for giving out 1 Cash Point when opening a specific Youtube every 1 minute?
Quote

 

Try this simple npc that i made

 

prontera,150,150,5	script	YouTubeReward	123,{

	// Configuration
	OnInit:
		// YouTube video link
		set .video_link$, "https://www.youtube.com/your_video_link";
		// Code to be entered by the player
		set .correct_code$, "your_code_here";
		// Cash points reward
		set .cash_points_reward, 100;
		end;

	// Main script
	mes "[YouTube Reward NPC]";

	if (youtube_reward == 1) {
		mes "You have already received your reward for watching the video.";
		close;
	}

	mes "Hello, adventurer!";
	mes "Watch the following YouTube video and find the hidden code to receive a reward.";
	mes "Video link: " + .video_link$;
	next;
	mes "[YouTube Reward NPC]";
	mes "Enter the code you found in the video:";
	input @code$;

	if (@code$ == .correct_code$) {
		mes "[YouTube Reward NPC]";
		mes "Congratulations! You have entered the correct code.";
		mes "Here is your reward.";
		// Give the player cash points
		set #CASHPOINTS, #CASHPOINTS + .cash_points_reward;
		set youtube_reward, 1; // Mark the player as having received the reward
		close;
	} else {
		mes "[YouTube Reward NPC]";
		mes "Sorry, that code is incorrect. Please watch the video and try again.";
		close;
	}
}

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.03
  • Content Count:  55
  • Reputation:   1
  • Joined:  06/08/23
  • Last Seen:  

On 7/1/2024 at 8:40 AM, Poring King said:

Try this simple npc that i made

 

prontera,150,150,5	script	YouTubeReward	123,{

	// Configuration
	OnInit:
		// YouTube video link
		set .video_link$, "https://www.youtube.com/your_video_link";
		// Code to be entered by the player
		set .correct_code$, "your_code_here";
		// Cash points reward
		set .cash_points_reward, 100;
		end;

	// Main script
	mes "[YouTube Reward NPC]";

	if (youtube_reward == 1) {
		mes "You have already received your reward for watching the video.";
		close;
	}

	mes "Hello, adventurer!";
	mes "Watch the following YouTube video and find the hidden code to receive a reward.";
	mes "Video link: " + .video_link$;
	next;
	mes "[YouTube Reward NPC]";
	mes "Enter the code you found in the video:";
	input @code$;

	if (@code$ == .correct_code$) {
		mes "[YouTube Reward NPC]";
		mes "Congratulations! You have entered the correct code.";
		mes "Here is your reward.";
		// Give the player cash points
		set #CASHPOINTS, #CASHPOINTS + .cash_points_reward;
		set youtube_reward, 1; // Mark the player as having received the reward
		close;
	} else {
		mes "[YouTube Reward NPC]";
		mes "Sorry, that code is incorrect. Please watch the video and try again.";
		close;
	}
}

 

Sorry i cant talk with this NPC

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  215
  • Reputation:   95
  • Joined:  06/02/12
  • Last Seen:  

7 hours ago, ooGubAoo said:

Sorry i cant talk with this NPC

prontera,150,150,5	script	YouTubeReward	123,{
	goto Main;

	// Configuration
	OnInit:
		// YouTube video link
		set .video_link$, "https://www.youtube.com/your_video_link";
		// Code to be entered by the player
		set .correct_code$, "your_code_here";
		// Cash points reward
		set .cash_points_reward, 100;
		end;

	// Main script
Main:
	mes "[YouTube Reward NPC]";

	if (youtube_reward == 1) {
		mes "You have already received your reward for watching the video.";
		close;
	}

	mes "Hello, adventurer!";
	mes "Watch the following YouTube video and find the hidden code to receive a reward.";
	mes "<URL>Video link<INFO>" + .video_link$ + "</INFO></URL>";
	next;
	if (select("I watched the video.", "Cancel") == 2)
		close;
	mes "[YouTube Reward NPC]";
	mes "Enter the code you found in the video:";
	input @code$;
	clear;
	
	if (@code$ == .correct_code$) {
		mes "[YouTube Reward NPC]";
		mes "Congratulations! You have entered the correct code.";
		mes "Here is your reward.";
		// Give the player cash points
		set #CASHPOINTS, #CASHPOINTS + .cash_points_reward;
		set youtube_reward, 1; // Mark the player as having received the reward
		close;
	} else {
		mes "[YouTube Reward NPC]";
		mes "Sorry, that code is incorrect. Please watch the video and try again.";
		close;
	}
}

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.03
  • Content Count:  55
  • Reputation:   1
  • Joined:  06/08/23
  • Last Seen:  

On 7/8/2024 at 3:37 PM, Racaae said:
prontera,150,150,5	script	YouTubeReward	123,{
	goto Main;

	// Configuration
	OnInit:
		// YouTube video link
		set .video_link$, "https://www.youtube.com/your_video_link";
		// Code to be entered by the player
		set .correct_code$, "your_code_here";
		// Cash points reward
		set .cash_points_reward, 100;
		end;

	// Main script
Main:
	mes "[YouTube Reward NPC]";

	if (youtube_reward == 1) {
		mes "You have already received your reward for watching the video.";
		close;
	}

	mes "Hello, adventurer!";
	mes "Watch the following YouTube video and find the hidden code to receive a reward.";
	mes "<URL>Video link<INFO>" + .video_link$ + "</INFO></URL>";
	next;
	if (select("I watched the video.", "Cancel") == 2)
		close;
	mes "[YouTube Reward NPC]";
	mes "Enter the code you found in the video:";
	input @code$;
	clear;
	
	if (@code$ == .correct_code$) {
		mes "[YouTube Reward NPC]";
		mes "Congratulations! You have entered the correct code.";
		mes "Here is your reward.";
		// Give the player cash points
		set #CASHPOINTS, #CASHPOINTS + .cash_points_reward;
		set youtube_reward, 1; // Mark the player as having received the reward
		close;
	} else {
		mes "[YouTube Reward NPC]";
		mes "Sorry, that code is incorrect. Please watch the video and try again.";
		close;
	}
}

 

Thank you very much.
And i need GM command to reset reward get new reward for player.

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