I don't think (err...I hope) that it's not Amber causing lag Miraz's game. I also think that BGHead's (berelinde's) lag was also a symptom of some other problem than Miraz's because in BGHead's case emptying the chase solved the issue.
But since BGhead's lag seemed to be connected to Amber judging by the fact that IRC lagging stopped when she was kicked out of the party and I never figured out what could have caused the lag, I'm extremely interested to find clues to solve the issue.
Since replacing Miraz's baldur.bcs removed the lag I'll stat by posting the code which Amber adds to baldur.bcs. As far as I can see there's nothing that would cause the script to loop.
// Setting the Amber match variable
IF
Global("M#AmberMatch","GLOBAL",0)
Gender(Player1,MALE)
CheckStatGT(Player1,11,CHR)
CheckStatGT(Player1,11,INT)
THEN
RESPONSE #100
SetGlobal("M#AmberMatch","GLOBAL",1)
END
IF
Global("M#AmberMatch","GLOBAL",0)
OR(3)
!Gender(Player1,MALE)
!CheckStatGT(Player1,11,CHR)
!CheckStatGT(Player1,11,INT)
THEN
RESPONSE #100
SetGlobal("M#AmberMatch","GLOBAL",2)
END
IF
Global("M#AmberMatch","GLOBAL",2)
Gender(Player2,MALE)
CheckStatGT(Player2,11,CHR)
CheckStatGT(Player2,11,INT)
CheckStat(Player2,0,MORALEBREAK) // Bio-NPC, Hubelpot, Kelsey, Solaufein, Kivan of Shilmista, Kova, Willie Bruce, Goo
!HasItemEquiped("belt05",Player2) // Girdle of sex change
!Name("SUBRU",Player2) // Bons' Bruce PPG
!Name("JCBruce",Player2) // Compton's Bruce PPG
!Name("G#CASS",Player2) // Cassius CoM
!Name("FWGHARETH",Player2) // Ghareth PPG
!Name("CLFHSFNX",Player2) // Fonick Modlist
!Name("lrirenic",Player2) // Irenicus (Longer Road) FW
!Name("DKido",Player2) // Kido Modlist
!Name("Kindrek",Player2) // Kindrek CoM
!Name("NATH",Player2) // Nathaniel CoM
!Name("SK#NEHT",Player2) // Neh'Taniel Blacksheep
!Name("Therrin",Player2) // Therrin Modlist
!Name("TSUJATH",Player2) // Tsujatha CoM
!Name("VANIM",Player2) // Vanim Modlist
!Name("Wikaede",Player2) // Wikaede CoM
!Name("TLXAN",Player2) // Xan Modlist
!Name("O#Xan",Player2) // Xan (Kulyok's) PPG
!Name("SDNPC",Player2) // Yikari FW
!Name("Robilard",Player2) // Robillard (TDD) Modlist
!Name("Avaunis",Player2) // Auvanis (TDD) Modlist
!Name("Adario",Player2) // Adario Kalvaras (TDD) Modlist
!Name("KAGAINdd",Player2) // Kagain (TDD) Modlist
!Name("KIVANDD",Player2) // Kivan (TDD) Modlist
!Name("montaron",Player2) // Montaron (TDD) Modlist
!Name("xzardd",Player2) // Xzar (TDD) Modlist
!Name("yeslicdd",Player2) // Yeslick (TDD) Modlist
!Name("BOLIVAR",Player2) // Bolivar (SoS) FW
!Name("TOMASTM",Player2) // Tomas (SoS) FW
THEN
RESPONSE #100
SetGlobal("M#AmberMatch","GLOBAL",3)
END
IF
Global("M#AmberMatch","GLOBAL",2)
OR(32)
!Gender(Player2,MALE)
!CheckStatGT(Player2,11,CHR)
!CheckStatGT(Player2,11,INT)
!CheckStat(Player2,0,MORALEBREAK) // Bio-NPC, Hubelpot, Kelsey, Solaufein, Kivan of Shilmista, Kova, Willie Bruce, Goo
HasItemEquiped("belt05",Player2) // Girdle of sex change
Name("SUBRU",Player2) // Bons' Bruce PPG
Name("JCBruce",Player2) // Compton's Bruce PPG
Name("G#CASS",Player2) // Cassius CoM
Name("FWGHARETH",Player2) // Ghareth PPG
Name("CLFHSFNX",Player2) // Fonick Modlist
Name("lrirenic",Player2) // Irenicus (Longer Road) FW
Name("DKido",Player2) // Kido Modlist
Name("Kindrek",Player2) // Kindrek CoM
Name("NATH",Player2) // Nathaniel CoM
Name("SK#NEHT",Player2) // Neh'Taniel Blacksheep
Name("Therrin",Player2) // Therrin Modlist
Name("TSUJATH",Player2) // Tsujatha CoM
Name("VANIM",Player2) // Vanim Modlist
Name("Wikaede",Player2) // Wikaede CoM
Name("TLXAN",Player2) // Xan Modlist
Name("O#Xan",Player2) // Xan (Kulyok's) PPG
Name("SDNPC",Player2) // Yikari FW
Name("Robilard",Player2) // Robillard (TDD) Modlist
Name("Avaunis",Player2) // Auvanis (TDD) Modlist
Name("Adario",Player2) // Adario Kalvaras (TDD) Modlist
Name("KAGAINdd",Player2) // Kagain (TDD) Modlist
Name("KIVANDD",Player2) // Kivan (TDD) Modlist
Name("montaron",Player2) // Montaron (TDD) Modlist
Name("xzardd",Player2) // Xzar (TDD) Modlist
Name("yeslicdd",Player2) // Yeslick (TDD) Modlist
Name("BOLIVAR",Player2) // Bolivar (SoS) FW
Name("TOMASTM",Player2) // Tomas (SoS) FW
THEN
RESPONSE #100
SetGlobal("M#AmberMatch","GLOBAL",4)
END
// Setting Amber Romance timeout variables in case Amber is kicked out of party
IF
OR(2)
Global("M#AmberRomanceActive","GLOBAL",1)
Global("M#AmberRomanceActive","GLOBAL",2)
Global("M#AmberRomanceOut","GLOBAL",0)
!InPartyAllowDead("M#Amber")
!Dead("M#Amber")
THEN
RESPONSE #100
SetGlobal("M#AmberRomanceOut","GLOBAL",1)
SetGlobalTimer("M#AmberOutOfParty","GLOBAL",25920)
END
IF
OR(2)
Global("M#AmberRomanceActive","GLOBAL",1)
Global("M#AmberRomanceActive","GLOBAL",2)
Global("M#AmberRomanceOut","GLOBAL",1)
Global("M#AmberRomanceWaiting","GLOBAL",0)
GlobalTimerExpired("M#AmberOutOfParty","GLOBAL")
!InPartyAllowDead("M#Amber")
!Dead("M#Amber")
THEN
RESPONSE #100
SetGlobal("M#AmberRomanceActive","GLOBAL",3)
END
IF
OR(2)
Global("M#AmberRomanceActive","GLOBAL",1)
Global("M#AmberRomanceActive","GLOBAL",2)
Global("M#AmberRomanceOut","GLOBAL",1)
InPartyAllowDead("M#Amber")
THEN
RESPONSE #100
SetGlobal("M#AmberRomanceOut","GLOBAL",0)
SetGlobal("M#AmberRomanceWaiting","GLOBAL",0)
RealSetGlobalTimer("M#AmberRomance","GLOBAL",3600)
END
// A´mber returns after getting her bracelet back
IF
Global("M#JillBracelet","GLOBAL",2)
GlobalTimerExpired("M#AmberQuestTime","GLOBAL")
!InParty("M#Amber")
THEN
RESPONSE #100
SetGlobal("M#JillBracelet","GLOBAL",4)
MoveGlobalObjectOffScreen("M#Amber",Player1)
AddXPObject("M#Amber",1500)
ActionOverride("M#Amber",ApplySpellRES("M#JBRACE",Myself))
ActionOverride("M#Amber",MoveToObject(Player1))
ActionOverride("M#Amber",Dialog(Player1))
END
// Amber gets her bracelet back, helped by the protagonist
IF
Global("M#JillBracelet","GLOBAL",8)
THEN
RESPONSE #100
ActionOverride("M#Amber",ApplySpellRES("M#JBRACE",Myself))
SetGlobal("M#JillBracelet","GLOBAL",9)
RealSetGlobalTimer("M#AmberRomance","GLOBAL",1200)
END
// The slavers appear to kidnap Amber
IF
Global("M#AmberKidnap","GLOBAL",1)
RealGlobalTimerExpired("M#AmberQuestTime","GLOBAL")
InParty("M#Amber")
OR(10)
AreaCheck("ar0020") // City Gates
AreaCheck("ar0300") // Docks
AreaCheck("ar0400") // Slums
AreaCheck("ar0500") // Bridge
AreaCheck("ar0700") // Waukeen's Promenade
AreaCheck("ar0800") // Graveyard
AreaCheck("ar1100") // Umar Hills
AreaCheck("ar2000") // Trademeet
AreaCheck("ar1700") // Small Teeth Pass
AreaCheck("ar1800") // North Forest
THEN
RESPONSE #100
Wait(10)
CreateCreatureObjectOffScreen("remage02","M#Amber",0,0,0)
ChangeEnemyAlly("remage02",NEUTRAL)
ActionOverride("remage02",SetDialogue("m#kcut"))
ActionOverride("remage02",ChangeAIScript("m#remage",OVERRIDE))
ActionOverride("remage02",ChangeAIScript("MAGE8A",CLASS))
CreateCreatureObject("refigh01","remage02",0,0,0)
ChangeEnemyAlly("refigh01",NEUTRAL)
ActionOverride("refigh01",ChangeAIScript("m#reatta",OVERRIDE))
CreateCreatureObject("recler01","remage02",0,0,0)
ChangeEnemyAlly("recler01",NEUTRAL)
ActionOverride("recler01",ChangeAIScript("m#reatta",OVERRIDE))
ActionOverride("recler01",ChangeAIScript("PRIES8A",CLASS))
CreateCreatureObject("rethie01","remage02",0,0,0)
ChangeEnemyAlly("rethie01",NEUTRAL)
ActionOverride("rethie01",ChangeAIScript("m#reatta",OVERRIDE))
ActionOverride("rethie01",CreateItem("sw1h07",1,0,0))
ActionOverride("rethie01",FillSlot(SLOT_WEAPON1))
CreateCreatureObject("rethie03","remage02",0,0,0)
ChangeEnemyAlly("rethie03",NEUTRAL)
ActionOverride("rethie03",ChangeAIScript("m#reatta",OVERRIDE))
SetGlobal("M#AmberKidnap","GLOBAL",2)
StartCutSceneMode()
StartCutScene("m#kcut01")
END
// Amber is petrified
IF
StateCheck("M#Amber",STATE_STONE_DEATH)
Global("M#AmberStoned","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("M#AmberStoned","GLOBAL",1)
END
Edited by Meira, 01 August 2006 - 02:31 PM.