Posts from Do such scripts even exist, and if so, where can I find them?
What you need is possibly only available on the ERA platform.
Example of a completed script for the first question:
!?OB3/133/0; (object on the map at X/Y/Z coordinates - you can change these to your own)
!!OBv998/v999/v1000:S; (disable standard object properties)
!!VRz47:S^NPC Guard Name^; (put any header between the ^ ^ symbols)
!!VRz48:S^" - state the password, traveler!"^; (the question asked to the player)
!!IF
30/z47/z48; (!!IF: D30 , without a space, between F: and D /the forum converts this combination into a smiley/)
!!IF:E1/30;
!!VRz49:Sz1;
!!VRz50:S^Sesame^; (the answer to the question)
!!IF&z49=z50:V8/1;
!!VRz50:S^SESAME^; (the answer to the question, in case Caps Lock is on)
!!IF&z49=z50:V8/1;
!!IF&8:M^"- correct, pass through!"^;
!!UN&8:Ov998/v999/v1000; (remove the object that was just visited, in case of a correct answer)
!!IF&-8:M^"- incorrect, get lost"^;
!!IF:V8/0;
-------------------
Example of a completed script for the second question:
!?OB140/7/0; (object at coordinates 140/7/0 /let's say an NPC speaking with the player/)
!!MP:P^guitar^/1/0; (start playing mp3 file guitar.mp3)
!!IF:M^dialogue with the NPC the player is interacting with^; (dialogue text told to the player while the audio file is playing)
-------------------------------------
If you wish to create on the ERA platform, I am attaching a link to the ERA official forum page: http://wforum.heroes35.net/index.php
You can also ask questions in the ERA Discord channel: https://discord.com/invite/bvfJGZe
And another question – is it possible to disable the ability to enter cheats through file editing or using scripts? Or to disable the chat altogether?
But the second one just won't work. I found a script !!MP:S#, which allows you to replace the standard in-game melody, but I can't figure out how to make it play immediately when visiting an object. When I use !!MP:P, the game gives an error. What could be the reason for this?
And another question - is it possible to disable the ability to enter cheats by editing files or using scripts? Or to disable the chat altogether?
If you get an error on the !!MP:P receiver, then most likely you either have an old version of ERA or a regular WoG. Because the ability to expand the functionality of working with sound files was added somewhere in version 2.8.8 or later.
Clarification: the MP3 file itself must physically be present in your mod, and the mod must be enabled in the mod manager.
Example of file location: HoMM3 ERA\Mods\Stalker\MP3\guitar.mp3 Here, the Stalker directory is the name of the mod (you will have your own), enabled in the mod manager.
Regarding disabling cheat input: it is possible to change/add your own reaction to input using scripts. As an example, when any cheat is entered, activate a loss, or prescribe some other "punitive" measure. You can completely disable the use of chat (add your own script reaction to the TAB key).
Example:
!?FU(OnChat)&x1=1;
!!SN:X?t/?z2;
!VRz100:S^WOGSARUMAN^; cheat for all spells on the adventure map
!!UN&z2=z100:Q0/1; loss for the active player
-------------------------------------------
This script will only work on ERA; on WoG, it will most likely give an error.
-------------------------------------------
If you need any other scripts, you can look at the examples in my Stalker map-mod.
A little lower in this section, there is a subsection with this mod, with links for download.