

when dialog ends it returns to CheckCoastGuard again.This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. as you can see PauseCoastGuardCheck does nothing but save the caught chance and checks if the character is in dialog every 5 seconds. msgid 'These files use different carriage return types.nnDo you want to treat all carriage return types as equivalent for this comparisonnnNote: If you always want to treat all carriage return types as equivalent, set the option Ignore carriage return differences (Windows/Unix/Mac) in the Compare tab of the options dialog (available under Edit/Options). }it's called from CheckCoastGuard if dialogRun or dialogSelf (which is useless rn, but it's for future proofing I guess) is true. If(!dialogRun & !dialogSelf) PostEvent("CheckCoastGuard",5000,"f",chance_get_caught) Įlse PostEvent("PauseCoastGuardCheck",5000,"f",chance_get_caught) If(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING paused during conversation") In the above 'r' metacharacter example for regex, there are no 'carriage return' in the string, so its unmatched. PostEvent("PauseCoastGuardCheck",5000,"f",chance_get_caught) Įlse PostEvent("CheckCoastGuard",5000,"f",chance_get_caught) SetEventHandler("PauseCoastGuardCheck","PauseCoastGuardCheck",1) If(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING Evaded the Coastguard (for now)") If(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING caught chance is "+chance_get_caught+" in "+(100*SMUGGLING_TIME_CHANCE_MULT)) Lai_QuestDelay("Rand_ContrabandInterruption",1.0) If(Rand((100*SMUGGLING_TIME_CHANCE_MULT))1) TraceAndLog("SMUGGLING Coastguard found you!") If(PChar.location = )įloat chance_get_caught = GetEventData() maybe I interrupted the event where the coast guard finds me and spawns by boarding the ship in the middle of it, thus messing things up? I guess the crash is rare enough that it hasnt been reported. it'll take some digging to figure it out I guess. So it seems these functions are called before things they are dependent on are initiated or after they are deleted. If(CheckCharacterPerk(Pchar,"AdvanceSmuggling")) Largegroup_chance = largegroup_chance*0.5 If(CheckCharacterPerk(Pchar,"ImproveSmuggling")) If(DEBUG_SMUGGLING>1) trace("SMUGGLING load Coastguard patrol and pursuit") it might be coincidence since I didn't manage to reproduce it very many times. maybe when it spawns a ship? because I did encounter a coast guard ship at day once, and I only got the crash at night. I didn't manage to reproduce the error a lot of times, but my guess is it has something to do with getting caught with opium at night considering one of the failing lines has to do with time of day. }I wasn't smuggling opium and definitely not using it, but I did the smuggling start where I think you start with opium on you, so might have been in the inventory. Pchar.quest.(questname).win_condition = "remove_opium_effect" Pchar.quest.(questname).win_condition.l1.date.year = GetAddingDataYear(0, 0, days) Pchar.quest.(questname).win_condition.l1.date.month = GetAddingDataMonth(0, 0, days) Pchar.quest.(questname).win_condition.l1.date.day = GetAddingDataDay(0, 0, days) Pchar.quest.(questname).win_condition.l1 = "Timer"

String questname = "remove_opium_effect_"+opiumuses If(CheckAttribute(pchar,"quest.opium_use.amount")) opiumuses = sti(_use.amount)

If(CheckAttribute(pchar,"quest.opium_use.opiumsickness")) sickness = sickness + stf(_use.opiumsickness) TakeItemFromCharacter(User, "opium") // PB: This is already handled elsewhere
