Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
#3029
Auto-translated
There's something strange happening in the file within the "gamemechanics" folder. I want to set the price to 1 coin; how can I do that in this case? Here's the file.
User Avatar
#3030
Auto-translated
The function has stopped working for me, and now I don't get the weekly gold bonus, and I can't train 20,000 horses.
Please help me fix it; here's the file.
User Avatar
#3031
Auto-translated
well, this is a completely different map. the necessary files are missing; they need to be transferred to the map. all the scripts also need to be transferred to a single file, which is specified in the Script property of the map; in your case, this is MapScript.2.lua.
Нет войне.
In reply to Gerter
User Avatar
#3032
Auto-translated
which files need to be placed in Script2.lua? I'm confused, what do I need to do to be able to train 20,000 horses again? The GameMechanic file exists. But it contains different files, not the ones that were there initially. Why have they changed?
User Avatar
#3033
Auto-translated
To make the weekly and training features work, you need to add the GameMechanics folder from the map I sent to your map. To ensure all scripts function correctly, copy the contents of all files (MapScript.lua and MapScript.1.lua) into MapScript.2.lua.
Нет войне.
User Avatar
#3034
Auto-translated
I did everything as you said, but it didn't work.
Here is the file.
User Avatar
#3035
Auto-translated
This map works fine for me. Perhaps there are other maps in the Maps folder besides this one? You should delete them. You can also clear the Editor/H5MMods folder.
Нет войне.
User Avatar
#3036
Auto-translated
It turns out that for the map to work, I need both the new map I created and the old one that I sent you.
That's weird.

Added 2 minutes later
How do I make the training cost 1 coin per horse?
User Avatar
#3037
Auto-translated
I don't know if it's possible to set specific numbers for training, but I guess if you change the value in this line in DefaultStats:
3
to something like 0.01, the training cost will be very low.
Нет войне.
User Avatar
#3038
Auto-translated
Thank you for your help, you were a great help to me. Happy New Year to everyone!

Added 7 minutes later
And which line is responsible for the cost of upgrading creatures in the castle? I need to reduce the cost of upgrading horses.
User Avatar
#3039
Auto-translated
I couldn't find any specific lines related to this. It seems that only general training coefficients can be adjusted.
Нет войне.
User Avatar
#3040
Auto-translated
I understand. I solved this problem by setting 9 bags of gold, each containing 10 million gold.

Added 6 minutes later
Thank you for your help, Gerter.
User Avatar
#3041
Auto-translated
Is it possible to add travel spells to an Orc using a script? The standard command doesn't work.
User Avatar
#3042
Auto-translated
Hey everyone, I have a question. Can you tell me what's wrong?
The situation: there's an elven town belonging to an elf (Player 3). If Player 2 captures it, the quest fails, and the game is lost.
function CheckAnpossal()
while 1 do
sleep(5)
if GetObjectOwner ('houseElf') == PLAYER_2 then
sleep(10)
SetObjectiveState('q4', OBJECTIVE_FAILED, 1);
sleep(10)
Loose ();
Trigger(OBJECT_CAPTURE_TRIGGER, 'houseElf', nil)
break
end
end
end

startThread (CheckAnpossal)
This command isn't working. After the town is captured, nothing happens. There are no errors. Where could I have made a mistake? Thanks in advance.
Автор карт:
Долина расхитителей
Выбор мира
In reply to OrnsteinDragonslayer
User Avatar
#3043
Auto-translated
OrnsteinDragonslayer
Hey guys, I have a question. Can you tell me what's wrong?
The situation: there's an elven town belonging to an elf (Player 3). If Player 2 captures it, the quest fails, and the game is lost.
function CheckAnpossal()
while 1 do
sleep(5)
if GetObjectOwner ('houseElf') == PLAYER_2 then
sleep(10)
SetObjectiveState('q4', OBJECTIVE_FAILED, 1);
sleep(10)
Loose ();
Trigger(OBJECT_CAPTURE_TRIGGER, 'houseElf', nil)
break
end
end
end

startThread (CheckAnpossal)
This command doesn't work. Nothing happens after the town is captured. There are no errors. Where could I have made a mistake? Thanks in advance.

I don't quite understand why there's a "1" in "SetObjectiveState('q4', OBJECTIVE_FAILED, 1);" and why the trigger is removed afterward.

Statistics

Welcome our newest member: Emil

Users Online 1 users 1071 guests