Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
#787
Auto-translated
What does the console display?
 

К А
Стикеры GBF в Telegram
User Avatar
#788
Auto-translated
fast foken read `=' in line 18 to string "DoString script"
That's how he criticizes the gem market...
(Script) ERROR: expected
Something like that... Doesn't write anything about messages.
Script failed, unknown error
502 Bad Gateway
__________________________________
nginx/0.8.54
User Avatar
#789
Auto-translated
GetPlayerRecource (1, 6, >=10000)
– Why can you write it like that?
GetPlayerResource (1, 6) >=10000
SetPlayerResource (6, -10000, 5, 10);
Sixth player, minus ten thousand ID? o_O
Check the Manuals and see the correct way to write the functions.
You can also browse through the scripts of other maps. To write scripts, you need to at least look at their basics ;)
Here is the basics:

number GetPlayerResource( nPlayerID, nResID )

Returns the current amount of resource nResID for player nPlayerID. Resource IDs are listed in /scripts/advmap-startup.lua and are as follows:
WOOD = 0
ORE = 1
MERCURY = 2
CRYSTAL = 3
SULFUR = 4
GEM = 5
GOLD = 6

void SetPlayerResource( nPlayerID, nResID, nCount )

Sets the current amount of resource nResID to nCount for player nPlayerID. Based on this function, a higher-level primitive is implemented in the /scripts/advmap-startup.lua file – void SetPlayerStartResource( nPlayerID, nResID, nCount ), which distributes starting resources to the player depending on the difficulty level.



Added 5 minutes ago
Warrior777
I AM COMPLETELY CONFUSED ABOUT WHAT TO DO???:confused: :confused: :confused: :smile33: :smile33: :smile33:
If you are completely stuck, send the map to my private messages. I will fix the script.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Dyrman
User Avatar
#790
Auto-translated

Added 5 minutes later
If it's completely broken, send me the map in a private message. I'll fix the script.
The map is for the original 1.6 version. Will you be able to do it?
502 Bad Gateway
__________________________________
nginx/0.8.54
In reply to Warrior777
User Avatar
#791
Auto-translated
Warrior777

A map for the original 1.6. Can you handle it?
Go ahead and send it.
If I'm going to create it in 3.1 without opening the map in the editor, it will work.
Although there should be direct compatibility, there isn't reverse compatibility...
At least, let's try to make the scripts work, and that doesn't depend on the version, as long as you don't use any extra ones.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
User Avatar
#793
Auto-translated
Warrior777
I can't send it in a private message...
The map isn't quite ready yet.
Upload it to a file-sharing service and send me the link in a private message. Delete the message; I've already downloaded it.

Added 19 minutes later

Here's how the script should look:
SetObjectEnabled("rinok_samocvetov", nil);
MessageBox (GetMapDataPath().."zasada.txt");
---
function Zasada1 ()
MessageBox (GetMapDataPath().."napadenie_zasady.txt", "zasada_napadenie");
end;
---
function zasada_napadenie ()
StartCombat("Diraya", nil, 3, 30, 50, 32, 30, 34, 20, nil, nil, nil);
Trigger (REGION_ENTER_AND_STOP_TRIGGER, "zasada1", nil);
end;
---
Trigger (REGION_ENTER_AND_STOP_TRIGGER, "zasada1", "Zasada1");
---
function Samocveti ()
if GetPlayerResource(1, 6) >= 10000 then
QuestionBox (GetMapDataPath().."pokupka.txt", "pokupka");
else
MessageBox (GetMapDataPath().."malo_many.txt");
end;
end;
---
Trigger (OBJECT_TOUCH_TRIGGER, "rinok_samocvetov", "Samocveti");
--
function pokupka ()
SetPlayerResource(1,6,GetPlayerResource(1, 6) - 10000);
MessageBox (GetMapDataPath().."poterya.txt");
end;
Instead of GetMapDataPath().."malo_many.txt", you can also write "/Maps/SingleMissions/ELO/malo_many.txt"
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
User Avatar
#794
Auto-translated
It seems like nothing will happen anyway, even if you don't use the editor.
Attachments 1
1 file attached • Total size: 16.7 KB
502 Bad Gateway
__________________________________
nginx/0.8.54
In reply to Warrior777
User Avatar
#795
Auto-translated
Warrior777
It seems like nothing will work anyway, even if you don't use the editor.
So, for version 1.6, copy the necessary .txt files into the file of your original map, as well as the script. As I said, there is no backward compatibility.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
User Avatar
#796
Auto-translated
Ah, I'll try to restore the previous file and change the scripts... Maybe it will work...

Added 5 minutes later
The battle still won't start.

Added 7 minutes later
+I need the gem market to not have resources stolen (-10000 gold and nothing is given to you), but instead, 10 gems should be given for them.
502 Bad Gateway
__________________________________
nginx/0.8.54
In reply to Warrior777
User Avatar
#797
Auto-translated
Warrior777
Ah, I'll try to restore the previous file and modify the scripts... Maybe it will work...

Added 5 minutes later
The battle still won't start.
Why is it so difficult... Here's the file that works on version 1.6 (a friend checked). I copied the files myself (it's not hard to copy 6 files ;) scripts + txt), as I wrote above.
Attachments 1
1 file attached • Total size: 74.4 KB
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Warrior777
User Avatar
#798
Auto-translated
Warrior777
I need the gem market to not have resources stolen (-10000 gold and nothing is given to you), but instead, 10 gems should be given in exchange.
You can write this yourself, it's very simple to do by analogy. I just corrected what you had written.

Added 4 minutes later
Warrior777
The battle still doesn't start.
The encoding of some files hasn't been changed. I recreated each one from scratch, and it works for me. So, pay close attention to the encoding. It wasn't starting because you didn't copy the necessary .txt file, as I asked.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Dyrman
User Avatar
#799
Auto-translated
Dyrman
Why is it so difficult... here's a file that works on 1.6 (a friend checked it). I copied the files myself (it's not hard to copy 6 files ;) scripts + txt), as I wrote above.
It still doesn't launch. Does your friend definitely have version 1.6?
502 Bad Gateway
__________________________________
nginx/0.8.54
In reply to Warrior777
User Avatar
#800
Auto-translated
Warrior777
It still won't launch. Does your acquaintance definitely have version 1.6?
Yes. I even installed it myself. Everything works.
Attachments 6
6 files attached • Total size: 1.4 MB
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Dyrman
User Avatar
#801
Auto-translated
I have a rather simple question. How can I make it so that after a creature plays a certain animation after losing, it continues to move as it should? I have the following situation: a hero enters zone 1, and a trigger is activated, playing a "joy" animation for the griffin. Everything works correctly, but for some reason, after the animation plays, the griffin freezes in place. What needs to be done so that it continues to move after the animation? And why don't any of the animations work for my fire demon, even though I'm using the same settings for other creatures, and it works for them? Thank you in advance.
In reply to Рыцарь Бездны
User Avatar
#802
Auto-translated
Knight of the Abyss
I have a rather simple question. How can I make it so that after a creature plays a certain animation when it loses, it continues to move as it should? I have the following situation: a hero enters zone 1, and a trigger is activated, playing a "joy" animation for the griffin. Everything works correctly, but for some reason, after the animation plays, the griffin freezes in place. What needs to be done so that it continues to move after the animation? And why don't any of the animations work for my fire demon, even though I write the same thing for other creatures, and it works for them? Thank you in advance.
PlayObjectAnimation('griphon','happy',ONESHOT)--to prevent it from freezing.
For other monsters, you need to click on "..." and in the AnimSet field, select the animation for it using the same "...", instead of LOD.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4

Statistics

Welcome our newest member: Emil