Форум HeroesWorld-а - Показать сообщение отдельно - Скрипты
Тема: Скрипты
Показать сообщение отдельно
#1276
Старый 06.05.2013, 17:08
  #1276
^
Warrior777
 
Аватар для Warrior777
📖
Регистрация: 15.09.2012
Адрес: Под кроватью
Сообщения: 602
Регистрация: 15.09.2012
Адрес: Под кроватью
Сообщения: 602
По умолчанию
Re: Скрипты

	
hp = random(1);
dp = random(1);
tep = random(1);

function politica()
	while 1 do
		if dp == 1 then
			SetPlayerTeam(2,1);
			print("Demon is on you!");
			sleep(5);
		else
			SetPlayerTeam(2,2);
			print("Demon is not on you");
			sleep(5);
		end;
		if hp == 1 then
			SetPlayerTeam(3,1);
			print("Human is on you!");
			sleep(5);
		else
			SetPlayerTeam(3,3);
			print("Human is not on you");
			sleep(5);
		end;
		if tep == 1 then
			SetPlayerTeam(4,1);
			print("Dark elf is on you!");
			sleep(5);
		else
			SetPlayerTeam(2,2);
			print("Dark elf is not on you");
			sleep(5);
		end;
	end;
end;

startThread(politica);

1)Как сделать так, чтобы print постоянно не писал одни и те же сообщения?
2)Значения hp, dp и tep постоянно равны 0. Не является ли это ошибкой скрипта или пакости рандома?
__________________
502 Bad Gateway

__________________________________

nginx/0.8.54
502 Bad Gateway

__________________________________

nginx/0.8.54
Warrior777 вне форума
Ответить с цитированием