| Archer30   
   
   Posts: 1192
 
 | 
			| 
 
				igrik, thanks! I lost one parameter in my script and got confused    now it sorts out
 
I used i^colmagi_%(hero)_%v998_%v999_%v1000^ to store the visiting status of my script. It's better to be replaced with OB:C value I think. Fewer variable, more reliable
			 
 Latest ERA mods and scripts in development -  My GitHub
 
				
(This post was last modified: 08.09.2021 16:48 by Archer30.)
 |  | 
	| 08.09.2021 16:42 |  | 
	
		| igrik   
   Posts: 2821
 
 | 
			| 
 
				 (08.09.2021 15:17)Berserker Wrote:  igrik, did you try to set sound volume to 0 during replacement process instead? 
Берс, я и по русски неплохо понимаю   
Нет, не пытался даже (чёто не подумал об этом). Хотя у меня игра почти всегда в режиме без звука, так что я думаю установка громкости в 0 не сработает.
			 
 game bug fixes extended.dll  ||  My Plugins  ||  My GitHub
 |  | 
	| 08.09.2021 17:04 |  | 
	
		| Berserker   
   
   Posts: 16786
 
 |  | 
	| 08.09.2021 19:40 |  | 
	
		| Archer30   
   
   Posts: 1192
 
 |  | 
	| 08.09.2021 20:06 |  | 
	
		| Archer30   
   
   Posts: 1192
 
 | 
			| 
 
				Yes, at first it was confusing, but now I get the idea.  
Just by randomly checked a few pyramids, before and after visiting 
Table of pyramid data (incompleted) 
OB:C value before, After, Spell given, Spell ID for Green  player
 Quote:-2047969, -2040354, Fly, 6-1802209, -1794594, Magic Mirror, 36
 -1548257, -1540642, Earth Elem., 67
 -1540065, -1532450, Water Elem., 68
 -1531873, -1524258, Air Elem., 69
 
From these data it's easy to conclude the OB:C value for Pyramid, 
1. Difference between before and after visiting: 7615 
2. Difference between two spell IDs: 8192
 
Think I'm able to make a function for changing Pyramid spell and visitng status now    
If I want to push a pyramid or other wog object to be visited by AI, I only need to change the OB:C value to one of the unvisited value on AI's turn, and change it back to the orignal value on human's. That sounds a bit inefficient though...
			
 Latest ERA mods and scripts in development -  My GitHub
 
				
(This post was last modified: 08.09.2021 21:56 by Archer30.)
 |  | 
	| 08.09.2021 21:22 |  | 
	
		| Berserker   
   
   Posts: 16786
 
 |  | 
	| 08.09.2021 21:47 |  | 
	
		| XEPOMAHT   
   
   Posts: 2481
 
 | 
			| 
 
				 (08.09.2021 19:40)Berserker Wrote:  в чём баг-то? 
Озвучку объектов карты нельзя менять при удалении объектов с карты, когда сама озвучка ещё не инициализирована. Т.е. перед инструкцией карты должна включаться заглушка Игрика, а перед показом карты - выключаться.
  (08.09.2021 21:22)Archer30 Wrote:  From these data it's easy to conclude the OB:C value for Pyramid,1. Difference between before and after visiting: 7615
 2. Difference between two spell IDs: 8192
 
 Think I'm able to make a function for changing Pyramid spell and visitng status now
  
 If I want to push a pyramid or other wog object to be visited by AI, I only need to change the OB:C value to one of the unvisited value on AI's turn, and change it back to the orignal value on human's. That sounds a bit inefficient though...
 
Лет 10 назад как всё было разобрано, докуметировано и даже используется в MoP и ERA+:
 Quote:ТИП 63. ПИРАМИДАБИТ 0: ЕСТЬ ЛИ СТРАЖИ — PM:V.
 БИТЫ 1-4 ИГНОРИРУЮТСЯ И ОБЫЧНО ЗАПОЛНЕНЫ.
 БИТЫ 5-12: КАКИМИ ИГРОКАМИ ПОСЕЩЕНО (ПОБИТНО, ФОРМАТ E) — PM:P.
 БИТЫ 13-20: НОМЕР ЗАКЛИНАНИЯ (0..255) — PM:S.
 БИТЫ 21-31 ИГНОРИРУЮТСЯ И ОБЫЧНО ЗАПОЛНЕНЫ.
 
Не стоит изобретать велосипед.
			 |  | 
	| 08.09.2021 21:59 |  | 
	
		| Archer30   
   
   Posts: 1192
 
 | 
			| 
 
				interesting. Totally forgot about players. 
So my table was for green player. 
When I try with orange, the value before visiting is the same, while after is different
 
Orange 
 Quote:-2047969, -2047426, Fly, 6Edit: Quote:Лет 10 назад как всё было разобрано... 
Nice!    I completely forgot about PM receiver. I will read more about those
			
 Latest ERA mods and scripts in development -  My GitHub
 
				
(This post was last modified: 08.09.2021 22:06 by Archer30.)
 |  | 
	| 08.09.2021 21:59 |  | 
	
		| fatsawhorse   
 Posts: 1021
 
 | 
			| 
 
				Здравствуйте Berserker
 Вы правы, это моя неточность! Я потом только понял, когда выключил компьютер и отправил уже письмо на форум..
 
 Прошу прощения, это моя ошибка. Я не точно провёл проверку и из-за этого всё не работало! Я по разбирался дома и сумел правильно всё реализовать..
 
 Спасибо Вам Berserker за поправку..
 
				
(This post was last modified: 09.09.2021 19:24 by fatsawhorse.)
 |  | 
	| 09.09.2021 19:00 |  | 
	
		| Berserker   
   
   Posts: 16786
 
 |  | 
	| 09.09.2021 23:26 |  | 
	
		| Archer30   
   
   Posts: 1192
 
 |  | 
	| 13.09.2021 22:55 |  | 
	
		| Berserker   
   
   Posts: 16786
 
 |  | 
	| 13.09.2021 23:09 |  | 
	
		| Archer30   
   
   Posts: 1192
 
 |  | 
	| 13.09.2021 23:52 |  |