Skip to content
User Avatar
#3860
Auto-translated
Jack_of_shadows
BlueHeavenHero, you can check the relevant question from the FAQ in my signature.
Thank you, I finally managed to figure it out.

Added 1 hour 58 minutes ago
I'll never get along with TalkBoxes. I wrote this script, but when I click the OK answer (see the line elseif (ansver == 2) then in the FirstTalkBoxCallback function), nothing happens, the RobberJoin function doesn't work, and the console complains that "Value was NIL when getting global with name "RobberJoin"". I've checked all the paths to the text files and icon textures five times, and they are correct. How can I fix this?
function FirstTalkBox()
TalkBoxForPlayers(PLAYER_1, "/Textures/Interface/CombatArena/Faces/Heaven/ico_Marksman_128.xdb#xpointer(/Texture)", nil, "/Text/TalkBox.txt", nil, "FirstTalkBoxCallback", 0, "/Text/Robber.txt", nil, 0, "/Text/Ans1.txt", "/Text/Ans2.txt", "/Text/Ans3.txt")
Trigger(OBJECT_TOUCH_TRIGGER,"rodder", nil)
end;

Trigger(OBJECT_TOUCH_TRIGGER,"rodder", "FirstTalkBox")

function FirstTalkBoxCallback(player, answer)
if (answer == 1) then
MessageBox("/Text/Rimours.txt")
SetObjectiveState("prim3",OBJECTIVE_ACTIVE,1)
elseif (answer == 2) then
QuestionBox("/Text/RobberJoin.txt", "RobberJoin", "SecondTalkBox")
elseif (answer == 3) then
MessageBox("/Text/RobberAttack.txt")
StartCombat("Hafad", nil, 3, 3, 9+1*diff, 5, 5+1*diff, 2, 13+1*diff, nil, nil, nil, nil)
end;
end;

function SecondTalkBox()
TalkBoxForPlayers(PLAYER_1, "/Textures/Interface/CombatArena/Faces/Heaven/ico_Marksman_128.xdb#xpointer(/Texture)", nil, "/Text/TalkBox.txt", nil, "SecondTalkBoxCallback", 0, "/Text/Robber.txt", nil, 0, "/Text/Ans4.txt", "/Text/Ans5.txt")
end;

function SecondTalkBoxCallback(player, answer)
if (answer == 1) then
MessageBox("/Text/Rimours.txt")
sleep(1)
SetObjectiveState("prim3",OBJECTIVE_ACTIVE,1)
elseif (answer == 2) then
MessageBox("/Text/Objectives/CaptureCastle.txt")
sleep(1)
OpenCircleFog(126, 139, 0, 4, 1)
MoveCamera(126, 139, 0, 3, 0, 0, 1, 1)
sleep(1)
MessageBox("/Text/Rimours.txt")
SetObjectiveState("prim3",OBJECTIVE_ACTIVE,1)
end;

function RobberJoin()
AddHeroCreatures("Hafad", 1, 13)
AddHeroCreatures("Hafad", 3, 9)
AddHeroCreatures("Hafad", 5, 5)
sleep(1)
TalkBoxForPlayers(PLAYER_1, "/Textures/Interface/CombatArena/Faces/Heaven/ico_Marksman_128.xdb#xpointer(/Texture)", nil, "/Text/TalkBox.txt", nil, "SecondTalkBoxCallback", 0, "/Text/Robber.txt", nil, 0, "/Text/Ans4.txt", "/Text/Ans5.txt")
end;
end;

Мои карты:
Падший рыцарь
Сердце Хаоса

Мои моды:
Визуальные:
Изменение внешнего вида героев-некромантов
Существа-жители и кое-что по мелочи в городах Ордена Порядка, Некрополиса и Инферно

NCF-существа:
Странствующие рыцари
Наемники

Statistics

Welcome our newest member: artem

Users Online 1 users 1596 guests