Subject: [Ironfist 1.3.0] Bug with the OnTownOpen callback 2018-07-19, 21:56
The syntax OnTownOpen(name) doesn't provide anything in variable 'name'. In fact, the function works fine even without the argument. The problem appears when you want to execute only in a specific town (and that's why bringing the Mage's Ring of Power to Sorrow's End doesn't do anything).
function OnTownOpen(name) if name == "Sorrow's End" then MessageBox("Hello"); end; end; --This will not show anything
function OnTownOpen() t = GetCurrentTown(); if GetTownName(t) == "Sorrow's End" then MessageBox("Hello"); end; end; --This will show "Hello" (without the quotes) when you enter the town screen of Sorrow's End