Jump to content
  • 0

NPC Event Reward With Password, Can Be Claimed Once And Resettable


Imbecile

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   1
  • Joined:  04/14/17
  • Last Seen:  

Hi everyone. I have a question too. how to make a event npc with password that if you put the password correctly, it will give you items. but the password can be reset for every event and the items can only be claimed once for every event. i saw once on some private server, i've try every script but it doesn't work /swt

 

sorry for the complicated request. just wondering if you guys got the same script and wouldn't mind sharing it with me

 

thank you

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

here you go 

//===== Athena Script =====================================
//= Mr. Password
//===== By ================================
//= 
//===== Description =======================================
//= Use the GM menu to enter a Password, clue and prize. 
//= Players will then have to input the password using the
//= clue given.
//===== Credits ===========================================
//=
//===== Version ===========================================
//= v1.1
//=========================================================
//= v1.0 - First release.
//= v1.1 - Fixed an exploit.
//=========================================================

prontera,159,226,1	script	Mr Password	869,{

// Set this to the minimum GM level allowed to access the GM CP.
if (getgmlevel() > 10) goto L_gm;

L_insert:
	if($prizewon == 0) {
	mes "[Mr Password]";
	mes "Somebody already guessed the password.";
	mes "Please wait for my boss to give me a new one.";
	close;
	}
	mes "[Mr Password]";
	mes "Hello " + strcharinfo(0) + ", would you like to guess the password?";
	mes "The clue is: ^008000"+$clue$+"^000000";
	next;
	mes "[Mr Password]";
	mes "Go on, take a guess.";
	input @text$;
	if ( $prizewon == 0 ) {
	mes "Too late, you were'nt fast enough!";
	close;
	} 
	if (@text$ == $password$) goto L_win;
	if (@text$ != $password$) goto L_error;

L_error:
	mes "[Mr Password]";
	mes "Sorry, that's incorrect. Try again.";
	close;

L_win:
	mes "[Mr Password]";
	mes "Congratulations!! You guessed correctly!";
	mes "Check your Inventory for your amazing ^008000"+ getitemname($get_item_id) +"^000000";
	mes "Cool Prize huh?";
	announce "Mr Password: " + strcharinfo(0) + " has guessed correctly, what a smart person!",0;
	getitem $get_item_id,$get_item_amount;
	set $prizewon, 0;
	close;

L_gm:
	mes "[Mr Password]";
	mes "Hello GM " + strcharinfo(0) + ", What would you like to do?";
	switch(select("Set Password:Set Clue:Set Prize:Normal Player Mode:Announce")) {
	case 1:
		mes "[Mr Password]";
		mes "So, what password should I use this time boss?";
		input $password$;
		next;
		mes "[Mr Password]";
		mes "Ok, so you want the password to be ^008000"+$password$+"^000000? cool.";
		next;
		goto L_gm;
	case 2: mes "[Mr Password]";
		mes "So, what clue should I give them boss?";
		input $clue$;
		next;
		mes "[Mr Password]";
		mes "Ok, so the clue is: ^008000"+$clue$+"^000000, gotcha!";
		next;
		goto L_gm;
	case 3:
		mes "[Mr Password]";
		mes "Alright, what should the prize be boss?";
		input $get_item_id;
		next;
		mes "[Mr Password]";
		mes "How many of this item should I give them?";
		input $get_item_amount;
		next;
		mes "[Mr Password]";
		mes "So, the prize is ^008000"+ $get_item_amount +" "+ getitemname($get_item_id) +"^000000? Awesome.";
		next;
		goto L_gm;
	case 4:
		next;
		goto L_insert;
	case 5:
		mes "[Mr Password]";
		mes "Ok, I'll let everyone know we're ready.";
		next;
		announce "Mr Password: The Boss has given me a new Password, come try guess it and get a prize!",0;
		set $prizewon, 1;
		next;
		goto L_gm;
	}
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   1
  • Joined:  04/14/17
  • Last Seen:  

what a great script @Cyro! thanks! but it's not what i mean sir. i guess my explanation are really bad so people can't understand what i'm trying to tell. here lemme give you an example :

 

i run some event. the event ends

after the event, i gave the player a password

you click the npc, it ask you to input the password. if the password are correct, the npc will give you items

but it can only be claimed once for every event

and if i want to run another event, the password can be resettable. and if the password are already reset, other player can claim the items again but only once for every event

i already tried every script that i found on the forum. but still doesn't solve my problem

so sorry for the bad explanation before sir  /sry 

Edited by padangyoesa
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

oh, i thought guess the password event, since you mention event ,

 

check this out 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   1
  • Joined:  04/14/17
  • Last Seen:  

THIS IS IT! OMG YOU ARE A GENIUS @Cyro! Thank you so much for sharing this with me sir. Thank you so much!

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