RC-PotatoNewbie.sk 3.01 KB
Newer Older
1
#
Tommy Ang's avatar
Tommy Ang committed
2 3 4 5 6
# RC-Potato Newbie
#
# Scripted by TomYaMee
#

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
variables:
	{checker::0} = "0"
	{checker::1} = "1"
	{checker::2} = "2"
	{checker::3} = "3"
	{checker::4} = "4"
	{checker::5} = "5"
	{checker::6} = "6"
	{checker::7} = "7"
	{checker::8} = "8"
	{checker::9} = "9"	
	{checker::A} = "a"
	{checker::B} = "b"
	{checker::C} = "c"
	{checker::D} = "d"
	{checker::E} = "e"
	{checker::F} = "f"
	{checker::G} = "g"
	{checker::H} = "h"
	{checker::I} = "i"
	{checker::J} = "j"
	{checker::K} = "k"
	{checker::L} = "l"
	{checker::M} = "m"
	{checker::N} = "n"
	{checker::O} = "o"
	{checker::P} = "p"
	{checker::Q} = "q"
	{checker::R} = "r"
	{checker::S} = "s"
	{checker::T} = "t"
	{checker::U} = "u"
	{checker::V} = "v"
	{checker::W} = "w"
	{checker::X} = "x"
	{checker::Y} = "y"
	{checker::Z} = "z"
Tommy Ang's avatar
Tommy Ang committed
44
	{checker::_} = "_"
45 46 47

	

Tommy Ang's avatar
Options  
Tommy Ang committed
48
options:
49
	Prefix: [&6PotatoLanguage&r]
Tommy Ang's avatar
Options  
Tommy Ang committed
50 51
	Plg Chinese: 您的首选语言设置为华语
	Plg English: Your preferred language has been set to English
Tommy Ang's avatar
Chat:  
Tommy Ang committed
52
#	Plg BM: Bahasa pilihan anda telah ditetapkan kepada Bahasa Malaysia
Tommy Ang's avatar
Options  
Tommy Ang committed
53

Tommy Ang's avatar
Tommy Ang committed
54 55 56 57 58 59 60
command /plg <text>:
	description: Potato Clan Main Command
	usage: /plg <text>
	executable by: players
	trigger:
		if arg 1 is "English":
			set {language.%player%} to "english"
61
			message "{@Prefix} &e{@Plg English}"
Tommy Ang's avatar
Chat:  
Tommy Ang committed
62 63
			if {languagefirstset.%player%} is 1:
				clear {languagefirstset.%player%}
64
				wait 1.5 second
65
				message "[&6PotatoLogin&r] Please register with &b/register <password> <confirmpassword>"
Tommy Ang's avatar
Chat:  
Tommy Ang committed
66 67 68
#		if arg 1 is "BMalaysia":
#			set {language.%player%} to "bmalaysia"
#			message "[PLanguage] {@Plg BM}"
Tommy Ang's avatar
Tommy Ang committed
69 70
		if arg 1 is "Chinese":
			set {language.%player%} to "chinese"
71
			message "{@Prefix} {@Plg Chinese}"
Tommy Ang's avatar
Chat:  
Tommy Ang committed
72 73
			if {languagefirstset.%player%} is 1:
				clear {languagefirstset.%player%}
74
				wait 1.5 second
75
				message "[&6PotatoLogin&r] 请注册与此 &b/register <密码> <确认密码>"
Tommy Ang's avatar
Tommy Ang committed
76

77
on join:
78
	if player's name contains " ":
79 80
		wait 0.5 second
		ban player due to "Name spacing is not allowed in the server!"
81
		stop
82
	wait 1.5 second
83 84 85 86 87 88 89 90 91 92 93 94 95
	if {languagefirstset.%player%} is 1:
		stop
	if {language.%player%} is not set:
		message "Welcome to RammyCraft!"
	#	message "Selamat Datang ke RammyCraft!"
		message "欢迎来到 RammyCraft!"
		set {languagefirstset.%player%} to 1
		message "&e------------------- Potato Language -------------------"
		message "English: &b/plg English"
		message "华语: &b/plg Chinese"
		
on join:
	if {languagefirstset.%player%} is 1:
96
		wait 1.5 second
97 98 99 100
		message "&e------------------- Potato Language -------------------"
		message "English: &b/plg English"
		message "华语: &b/plg Chinese"
		stop
101
	
102
on join:
103 104 105 106 107 108 109 110 111 112 113
	set {_name} to player's name
	loop {checker::*}:
		replace all loop-index with loop-value in {_name}
	set {_length} to length of player's name
	loop {_length} times:
		set {_checker::%loop-number%} to subtext of player's name from character loop-number to character loop-number
		if {checker::*} does not contain {_checker::%loop-number%}:
			execute console command "ban %player% Name contains inappropriate character(s)!"
			#ban player due to "Name contains inappropriate character(s)!"
			stop