Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to }{0TT@6bI4
User Avatar
Auto-translated
Returning to the topic of design, I'd like to mention individual preferences. Personally, I think that a beginner should first focus on the developers' designs and then on mapmakers' creations. And by the way, how do you determine where to insert "sleep"?
In reply to Григорий Ковалев
User Avatar
Auto-translated
Grigory Kovalev
By the way, how do I know where to insert the "sleep" command?
You already received an answer about this two pages ago If you still don't understand, the best thing to do is to open the map files of the original campaign and take a look at any MapScript.lua or script.lua or mapname_script.lua (there might be something like that in the original Heroes of Might and Magic V).
In reply to }{0TT@6bI4
Auto-translated
So, does he have maps there?
"The page is only available to authorized users."
I logged in with a password. It shows his detailed information, and that there are no entries on his wall.
He only posts maps for friends, or am I just slow? – Keep in mind that I've only been on this "VKontakte" for a week, and I don't know what to click on.
User Avatar
Auto-translated
Write to him in a private message, ask for screenshots, he will understand.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
Auto-translated
Hottabych, okay, maybe I'll write something. But I think I found a website for his mod; there are a lot of screenshots there. Cool!
User Avatar
Auto-translated
I don't recall Alexei ever making any questionable mods. Perhaps you're confusing him with fkrtifzobr.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
Hello. Could you please provide a script for collecting 50 units of sulfur, so that after it is collected, it is taken from the player, and the player is teleported, for example, to a portal? Thank you in advance.
User Avatar
Auto-translated
function SulfurCheck() while 1 do sleep(1) if GetPlayerResource(1, SULFUR) >= 50 then SetPlayerResource(1, SULFUR, GetPlayerResource(1, SULFUR)-50) SetObjectPosition("hero name", x,y,fl, effect type) break end end end ```

At the right moment, startThread(SulfurCheck). X, y, fl are coordinates, effect_type is the teleport effect type, from 1 to 4 (see Novik for details) or -1.

С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
Thank you.
User Avatar
Auto-translated
Hello everyone. I had an idea: when talking to an NPC, there should be an option to choose "create a random artifact." And here's the question: I'll probably need to create an array with the IDs of these artifacts. But I haven't worked with arrays before and don't know how to implement this.
Сценарий: "Наследие прошлого"
Кампании:
"
Новый порядок", "Серый Альянс""Поиски Истины"

Трейлер №2 кампании "Дыхание Пустоты": https://www.youtube.com/watch?v=XkHKXk5BctA&ab_channel=%D0%90ndrei_21

User Avatar
Auto-translated
`random(95)+1` will generate a random artifact ID. Will that work?
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
Auto-translated
arts = { [1] = {mass = 1}, [2] = {mass = 14}, [3] = {mass = 7}, [4] = {mass = 8}, [5] = {mass = 11}, } function GetRandomArt() local sum local n for id, props in arts do sum = sum + props.mass end n = random(sum) + 1 local start, finish, shift = 0, 0, 0 for id, props in arts do finish = start + props.mass if start <= n and n < finish then return id else shift = finish - start start = finish finish = start + shift end end return 0 end ```

Alternatively, you can manually create a table of 95 elements (not necessarily all of them), specifying the mass for each one – the higher the mass, the greater the chance of it appearing.

С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
Auto-translated
I figured out the random part myself; it seems to work. But with this method, isn't there a chance of getting Ashera's Tear or Freya's Artifact?
Сценарий: "Наследие прошлого"
Кампании:
"
Новый порядок", "Серый Альянс""Поиски Истины"

Трейлер №2 кампании "Дыхание Пустоты": https://www.youtube.com/watch?v=XkHKXk5BctA&ab_channel=%D0%90ndrei_21

User Avatar
Auto-translated
The Tear of Aschi might drop, but Frida won't (she's number 96), and we only go up to 95. But in any case, we can set up a check: if the Tear of Aschi drops, reroll.
Or, use the table method mentioned above.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________

Statistics

Welcome our newest member: Emil