Skocz do zawartości

[Tut]1 kamień duchowy i skil P


  • Zamknięty Temat jest zamknięty
3 odpowiedzi w tym temacie

#1
Morderca99

Morderca99

  • 327 postów
quest training_grandmaster_skill begin

	state start begin

		when 50513.use begin

			say_title("Kamien[łĚ°ŞµĄŻĹ] Duchowy")



			if pc.get_skill_group() == 0 then

				say("Nie wybrales jeszcze swojej drogi duchowej!"..pc.get_skill_group())

				return

			end



			if get_time&#40;&#41; < pc.getqf&#40;&#34;next_time&#34;&#41; then -- and not is_test_server&#40;&#41; then

				if pc.is_skill_book_no_delay&#40;&#41; then

					say&#40;&#34;Uczenie sie spowoduje usuniecie&#34;&#41;

					say&#40;&#34;efektu Zwoju Egzorcyzmu&#34;&#41;

					say&#40;&#34;&#34;&#41;

					wait&#40;&#41;

					say_title&#40;&#34;Kamien&#91;łĚ°Ş&#181;ĄŻĹ&#93; Duchowy&#34;&#41;

				else

					say&#40;&#34;Musisz poczekac 24h lub uzyc Zwoju egzorcyzmu zanim bedziesz szkolil swoje umiejetnosci ponownie!&#34;&#41;

					return

				end

			end



			local result = training_grandmaster_skill.BuildGrandMasterSkillList&#40;pc.get_job&#40;&#41;, pc.get_skill_group&#40;&#41;&#41;



			local vnum_list = result&#91;1&#93;

			local name_list = result&#91;2&#93;



			if table.getn&#40;vnum_list&#41; == 0 then

				say&#40;&#34;Nie masz zadnych umiejetnosci do szkolenia!&#91;łĚ°Ş&#181;ĄŻĹ&#93;&#34;&#41;

				return

			end



			say&#40;&#34;Wybierz umiejetnosc &#91;łĚ°Ş&#181;ĄŻĹ&#93;ktora chcesz szkolic&#34;&#41;

			say&#40;&#34;&#34;&#41;



			local menu_list = &#123;&#125;

			table.foreach&#40;name_list, function&#40;i, name&#41; table.insert&#40;menu_list, name&#41; end&#41;

			table.insert&#40;menu_list, &#34;Anuluj&#34;&#41; 



			local s=select_table&#40;menu_list&#41;

			if table.getn&#40;menu_list&#41; == s then

				return

			end



			local skill_name=name_list&#91;s&#93;

			local skill_vnum=vnum_list&#91;s&#93;

			local skill_level = pc.get_skill_level&#40;skill_vnum&#41;

			local cur_alignment = pc.get_real_alignment&#40;&#41;

			local need_alignment = 1000+500*&#40;skill_level-30&#41;



			test_chat&#40;&#34;Ranga&#58; &#34;..cur_alignment&#41;

			test_chat&#40;&#34;Potrzebujesz punktow rangi&#58; &#34;..need_alignment&#41;



			local title=string.format&#40;&#34;Szkolenie umiejetnosci %s&#34;, skill_name&#41;



			say_title&#40;title&#41;

			say&#40;&#34;Czy chcesz szkolic ta umiejetnosc?&#34;&#41;

			say&#40;&#34;Szkolenie odbierze twoje punkty dobra!&#34;&#41;

			say&#40;&#34;&#34;&#41;



			if cur_alignment<-19000+need_alignment then

				say_reward&#40;&#34;Nie masz wystarczajaco duzo rangi!&#34;&#41;

				return

			end



			if cur_alignment<0 then

				say_reward&#40;string.format&#40;&#34;Potrzebujesz&#58; %d -> %d punktow rangi!&#34;, need_alignment, need_alignment*2&#41;&#41;

				say_reward&#40;&#34;Jesli szkolenie powiedzie sie, zostanie odebrane 2x wiecej punktow!&#34;&#41;

				need_alignment=need_alignment*2

			elseif cur_alignment<need_alignment then

				say_reward&#40;string.format&#40;&#34;Potrzebujesz&#58; %d punktow rangi&#34;, need_alignment&#41;&#41;

				say_reward&#40;&#34;&#34;&#41;

			else

				say_reward&#40;string.format&#40;&#34;Potrzebujesz&#58; %d punktow rangi&#34;, need_alignment&#41;&#41;

			end

			say&#40;&#34;&#34;&#41;



			local s=select&#40;&#34;Kontynuuj&#34;&#41; 

			if s==2 then

				return

			end





			if cur_alignment>=0 and cur_alignment<need_alignment then

				say_title&#40;string.format&#40;&#34;%s&#34;, title&#41;&#41;

				say&#40;&#34;Niestety, twoje punkty rangi&#34;&#41;

				say&#40;&#34;sa na minusie.&#34;&#41;

				say&#40;&#34;Aby szkolic umiejetnosc musisz&#34;&#41;

				say&#40;&#34;wpisac w to pole&#58;&#34;&#41;

				say&#40;&#34;&#34;&#41;

				say_reward&#40;&#34;Trenuj&#34;&#41;

				say&#40;&#34;&#34;&#41;

				say&#40;&#34;UWAGA! Duze litery sie licza!&#34;&#41;

				local s=input&#40;&#41;

				if s!=&#34;Trenuj&#34; then

					return

				end

			end



			if get_time&#40;&#41; < pc.getqf&#40;&#34;next_time&#34;&#41; then -- and not is_test_server&#40;&#41; then

				if pc.is_skill_book_no_delay&#40;&#41; then

					pc.remove_skill_book_no_delay&#40;&#41;

				else

					say&#40;&#34;&#91;°ŞŻĹ&#181;ĄŻĹ&#93;§ŢŻŕ­×˝mżů&#187;~&#58; Ąđ&#174;§¤¤&#34;&#41;

					return

				end

			end



			pc.setqf&#40;&#34;next_time&#34;, get_time&#40;&#41;+time_hour_to_sec&#40;number&#40;8, 12&#41;&#41;&#41;



			if need_alignment>0 then

				if pc.learn_grand_master_skill&#40;skill_vnum&#41; then

					pc.change_alignment&#40;-need_alignment&#41;





					say_title&#40;string.format&#40;&#34;%s&#34;, title&#41;&#41;

					if 40 == pc.get_skill_level&#40;skill_vnum&#41; then

						say&#40;string.format&#40;&#34;%s &#91;°ŞŻĹ&#181;ĄŻĹ&#93;&#34;, skill_name&#41;&#41;

					else

						say&#40;string.format&#40;&#34;&#91;°ŞŻĹ&#181;ĄŻĹ&#93;&#34;, skill_name, skill_level-30+1+1&#41;&#41;

					end

					say&#40;&#34;&#34;&#41;

					say_reward&#40;&#34;Udalo sie, twoja umiejetnosci zostala wyszkolona!&#34;&#41;

					say_reward&#40;string.format&#40;&#34;Zostalo odjetych %d punktow rangi.&#34;, need_alignment&#41;&#41;

					say&#40;&#34;&#34;&#41;

				else

					say_title&#40;string.format&#40;&#34;%s&#34;, title&#41;&#41;

					say&#40;&#34;Nie udalo sie!&#34;&#41;

					say&#40;&#34;&#34;&#41;

					say_reward&#40;&#34;Zadne punkty rangi nie zostaly odebrane!&#34;&#41;

					say&#40;&#34;&#34;&#41;

					pc.change_alignment&#40;-number&#40;need_alignment/3, need_alignment/2&#41;&#41;

				end

			end



			item.remove&#40;&#41;

		end

		function BuildGrandMasterSkillList&#40;job, group&#41;

			GRAND_MASTER_SKILL_LEVEL = 30

			PERFECT_MASTER_SKILL_LEVEL = 31



			local skill_list = special.active_skill_list&#91;job+1&#93;&#91;group&#93;

			local ret_vnum_list = &#123;&#125;

			local ret_name_list = &#123;&#125;



			-- test_chat&#40;string.format&#40;&#34;job=%d, group=%d&#34;, job, group&#41;&#41;



			table.foreach&#40;skill_list, 

			function&#40;i, skill_vnum&#41; 

				local skill_level = pc.get_skill_level&#40;skill_vnum&#41;



				-- test_chat&#40;string.format&#40;&#34;&#91;%d&#93;=%d&#34;, skill_vnum, skill_level&#41;&#41;

				if skill_level >= GRAND_MASTER_SKILL_LEVEL and skill_level < PERFECT_MASTER_SKILL_LEVEL then



					table.insert&#40;ret_vnum_list, skill_vnum&#41;

					local name=locale.GM_SKILL_NAME_DICT&#91;skill_vnum&#93;

					if name == nil then name=skill_vnum end

					table.insert&#40;ret_name_list, name&#41;

				end

			end&#41;

			return &#123;ret_vnum_list, ret_name_list&#125;





			--return &#123;ret_vnum_list, ret_name_list&#125;

		end

	end

end


Podmien plik za traning_grandmaster_skill.quest w folderze /usr/rain/channel/share_data/locale/hongkong/quest
później ./qc traning_grandmaster_skill.quest i reboot
potem root mcncc.com, potem /etc/rc.d/netif restart i nastepnie ./start
  • 0
Dołączona grafika

#2
Morderca99

Morderca99

  • 327 postów
Tak...
  • 0
Dołączona grafika

#3
Try_X

Try_X

  • 4 postów
UP@
LoL ? Nie działa na innych serwerach ;-)
A tak to "gitez" .
Pomógł leci koffany :-P
  • 0

#4
Morderca99

Morderca99

  • 327 postów
ale chodzi mi hamachi.Serwer ja masz na hamachi mozesz tak zrobić a nie se na jakimś privku np SdLongju
  • 0
Dołączona grafika




Użytkownicy przeglądający ten temat: 0