You can read and reply to posts and download all mods without registering.
We're an independent and non-profit fan-site. Find out more about us here.
class zbKeycodeHUD extends SqRootScript { function OnBeginScript() { if (!IsDataSet("Done")) { if (getQB()) { Quest.SubscribeMsg(self, getQB(), eQuestDataType.kQuestDataCampaign); checkQB(); } else { SetData("Done", true); } } } function OnEndScript() { if (!IsDataSet("Done")) { Quest.UnsubscribeMsg(self, getQB()); }; } function OnQuestChange() { checkQB(); } function checkQB() { if (Quest.Get(getQB()) == 1) { SetProperty("HUDUse", ": \"" + Data.GetObjString(self, "huduse") + "\n" + format("%05d", GetProperty("KeypadCode")) + "\""); OnEndScript(); SetData("Done", true); } } function getQB() { if (IsDataSet("CodeQB")) { return GetData("CodeQB"); } local deck, n, qb; local code = format("%05d", GetProperty("KeypadCode")); for (deck = 1; deck <= 9; deck++) { for (n = 1; n <= 32; n++) { qb = "Note_" + deck + "_" + n; if (Data.GetString("notes", qb).find(code)) { SetData("CodeQB", qb); return qb; } } } }}