Auto-translated
The script still doesn't work. And along with it, another script doesn't work either!
--Disabling the standard operation of the closed market
SetObjectEnabled("proposalswap", nil);
--Exchange with the closed market merchant: the merchant gives the hero a border guard key, and the hero gives the merchant an artifact
function share()
MessageBox(GetMapDataPath().."marketclosed.txt");
if HasArtefact("Linaas", 57) then
QuestionBox(GetMapDataPath().."proposalswap.txt", "swap", "noswap");
else MessageBox(GetMapDataPath().."goodbye.txt");
end
end
function noswap()
MessageBox(GetMapDataPath().."theworseswap.txt");
Trigger(OBJECT_TOUCH_TRIGGER, "proposalswap", nil);
end;
function swap()
MessageBox(GetMapDataPath().."commitswap.txt");
RemoveArtefact("Linaas", 57);
GiveBorderguardKey(1, 7);
end;
Trigger(OBJECT_TOUCH_TRIGGER, "proposalswap", "share")