Connection ErrorBad RequestSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
A question arose: there is a created mob with its own characteristics and abilities. Is it possible to edit it, taking into account the selected difficulty level? When loading a map.
Or is it only possible by creating 4 identical mobs with different settings for each of the 4 difficulty levels?
function HEAL.UseHeal(pl, ans) if not ans then HEAL.heal_arts_on = {} for key, art in Healing_arts do if HasArtefact(MAIN_HERO, art.id) then table.insert(HEAL.heal_arts_on, art.id) end end HEAL.len = length(HEAL.heal_arts_on)-1 print(HEAL.len, ' - длина 'массива) --Выводит минус единицу - длина массива sleep() if 0 < HEAL.len <= 4 then ---ВОТ ЗДЕСЬ ПАДАЕТ СКРИПТ. print('Проверка') --НЕ ВЫВОДИТСЯ В КОНСОЛЬ HEAL.variant = 1 local pthheal = "Interface/CustomAbilities/UseFirstAidKit/" local options = {} local values = {} while not values and not options do sleep() end for i=1, HEAL.len do print (HEAL.len) print('Проверка 2 ', HEAL.heal_arts_on) options=pthheal..'Use_'..i..'...' values= artifacts[HEAL.heal_arts_on].name -- end while not options[HEAL.len] do sleep() end options[HEAL.len+1]=Talk.BACK Talk.mode = 1
elseif HEAL.len <= 0 then print('Ai?oe') ---ТОЖЕ НЕ ВЫВОДИТСЯ В КОНСОЛЬ Talk.mode = 1 Talk.NewDialog("/UI/MessageBox/Warning.xdb#xpointer(/Texture)", pthheal.."WarningNoKit", pthheal.."NoKit", nil) end elseif ans then if HEAL.variant == 1 then if 0<ans<5 then STALKER.ChangeHealth(artifacts[HEAL.heal_arts_on[ans]].heal) RemoveArtefact(MAIN_HERO, HEAL.heal_arts_on[ans]) end end end end
This function is called from the spell book, the first call goes fine, but the second one errors out at the specified location. I don't even know what the problem is, though it's probably related to scope. But how to fix it (and more importantly, what exactly) — I have no idea...
if HEAL.len = -1, then the check 0 < heal.len will return nil, which will then be compared to 4, causing an error. It's simpler to write the condition as if heal.len > 0 and HEAL.len <= 4.
function pabota()
SetObjectEnabled("slava", false);
sleep(10);
SetMonsterSelectionType("slava", 0);
PlayObjectAnimation("slava", "attack00", IDLE);
end;
Trigger(NEW_DAY_TRIGGER, "pabota");
The peasants should constantly attack, but they don't. Can you tell me what's wrong?
What a name for your function! It would be better to call it "Peas_working". Regarding the fact that it's not working: did you pass the turn? The "new day" function starts working from the second day. Also, are there any errors in the console?
Hello. I'm having a problem with this script:
```
function Win()
while 1 do
sleep(10)
if IsHeroAlive("Quroq") == nil then
StartDialogScene("/Maps/SingleMissions/ne5/St3/DialogScene.xdb#xpointer(/DialogScene)");
sleep(10)
StartDialogScene("/Maps/SingleMissions/ne5/St4/DialogScene.xdb#xpointer(/DialogScene)");
sleep(10)
Win();
break;
end;
sleep(3)
end;
end;
startThread(Win);
```
The dialogs are looping (for some reason I don't understand). The Win command isn't working. Can you tell me where I made a mistake?
pl1gold = GetPlayerResource(PLAYER_number, GOLD) SetPlayerResource(PLAYER_number, GOLD, pl1gold - d), where d is the delta. If the player doesn't have that much money, it will return an error.