Skip to content

Posts from Scripts Auto-translated

4.8 (8 ratings)
In reply to }{0TT@6bI4
User Avatar
#3595
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
#3596
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
#3597
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
#3598
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"
_________________
User Avatar
#3599
Auto-translated
There is no universal rule for inserting replays.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
#3600
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
#3601
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
#3602
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
#3603
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"
_________________
User Avatar
#3605
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
#3606
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
#3607
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


You can also manually create a table of 95 elements (not necessarily all of them), specifying a weight for each — the higher the weight, the greater the chance of it dropping.

С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
#3608
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
#3609
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"
_________________