Jump to content
  • 0

Fast Type Event


Erba

Question


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

my problem with the fast type event is that it happens to always detect the answer as a foul language even if the answer is gibberish like " )#598PFDS)(I40Y)H" i just encounter this problem after updating my server files to the latest one in the github..

 

how can i fix this?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Perhaps show us your script? :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

//FAST TYPE EVENT
//Credits to Emistry for making the script
//Paulinds for requesting the script, details & idea.

prontera,218,170,4	script	Fast-Type Event	421,{

if(getgmlevel() >= 99) callsub L_GM;
if( !.Event ) { 
	mes "There is no Event right now.";
} else if ( .String$ == "" ) {
	npctalk "Wait for the next round..";

} else {
	mes "Type the Correct Sentences.";
	mes "^FF0000" + .String$ + "^000000";
	input .@Type$;
	if( .String$ == "" ) {
		announce "Sorry, " + strcharinfo(0) + " is a bit slow..",0;
		close;
	}
	if ( .String$ == .@Type$ && .Event ) {
		getitem 25138, 10; //EDIT THE PRIZE HERE 
		announce "Fast-Type Event: " + strcharinfo(0) + " typed the correct string!",0;
		set .String$, "";
		set .Round, .Round + 1;
		donpcevent "Fast-Type Event::OnStart2";
	} else {
		announce "" + strcharinfo(0) + " mispelled some strings XD",0;
	}
}
close;

//OnMinute30:
OnClock0000:
OnClock0200:
OnClock0400:
OnClock0600:
OnClock0800:
OnClock1000:
OnClock1200:
OnClock1400:
OnClock1600:
OnClock1800:
OnClock2200:
OnClock2300:

if(.Event) end;
donpcevent "Fast-Type Event::OnStart";
end;

OnStart:
announce "Fast-Type Event has started at prontera 218 173 !",0;
L_Begin:
set .Event, 1;
set .String$, "";
while( getstrlen( .String$ ) < .Length ){
	set .String$,.String$ + .List$[ rand( getarraysize( .List$ ) ) ];
}
announce "Round "+(.Round+1)+" Started !",0;
end;

OnStart2:
sleep2 5000;
if(.Round == .Rounds) {
	if(!.Event) end;
	announce "Fast-Type Event: Event is over!",0;
	set .Event, 0;
	set .Round, 0;
	end;
}
if(!.Event) end;
announce "Fast-Type Event: Next round starts in 5 seconds...",0;
sleep2 5000;
if(!.Event) end;
goto L_Begin;

L_GM:
mes "Fast-Type event is" + (.Event?"^00FF00 ON^000000":"^FF0000 OFF^000000");
if(select((!.Event?"^00FF00Start":"^FF0000End") + " Event^000000","Normal Player") == 2) return;
switch(.Event) {
	case 1:
		set .Event, 0;
		set .Round, 0;
		set .String$, "";
		announce "Fast-Type Event: A GM has ended the event.",0; break;
	default: 
		donpcevent "Fast-Type Event::OnStart";
}
close;

OnInit:
set .Length,28; //EDIT THE LENGTH OF CHARACTERS TO BE TYPED
set .Rounds,5; //EDIT THE ROUNDS 
setarray .List$,";","B","_","D","E","%","=","H","I","J","/","L","M","N","6","P","Q","]","S","T",","; //YOU CAN ADD LETTERS, DIGITS & SYMBOLS HERE..
end;
}

THis one sir

Edited by Erba
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...