Jump to content

Help with modifying an auto looter


kylez2006

Recommended Posts

 

I have modified the fallout 3 auto looter to be able to pickup everything but i am getting some weird edge cases i could use some help with. For example It does not want to pick up unique weapons or weapons on the field despite picking up misc items on the field no problem. I also cannot get it to pickup Pitt Steel Ingots in the field again despite the misc items all being picked up. I will include the code. this part for the most part has not been modified. I added all items to the individual form lists.

 

scn ALEnhS
ref ActiR
ref ActorR
ref AlchR
ref AmmoR
ref BookR
ref CMNYR
ref ConsR
ref ContR
ref CreaR
ref AMMOBASE
ref KeyR
ref LootR
ref MscR
ref NoteR
ref NPCR
ref OCe
ref ORe
ref WeapR
float WeapW
float WeapV
int ItemsCount
int AmmoCount
float timer
short Seen
short DoOnce
short InvCount
short InvPos
short InvT0
short InvT1
short XChem
short XAlchC
short XDrink
short XAlch
short XFood
short XHunger
short XMag
short XAlchM
short XThirst
short XVeno
short XEW
short XExpl
short XGun
short XAmmoM
short XBook
short XEPlace
short XEThrow
short XCMNY
short XMsc
short XMscEW
short XMscExpl
short XMscGun
short XMscC
short XMscQ
short OCEvl
short OREvl
short TLoot
short TSteal
Begin GameMode
if TLoot != IsKeyPressed 38
set TLoot to IsKeyPressed 38
if TLoot && ALEnhGLoot == 0
set ALEnhGLoot to 1
set ALEnhGSteal to 1
ShowMessage ALEnhMLootOn
elseif TLoot && ALEnhGLoot
set ALEnhGLoot to 0
set ALEnhGSteal to 0
ShowMessage ALEnhMLootOff
endif
endif
if (Player.GetInCell MegatonPlayerHouse || Player.GetInCell Tenpenny03Player) && ALEnhGLoot
set ALEnhGLoot to 0
set ALEnhGSteal to 0
ShowMessage ALEnhMLootOff
endif
if DoOnce == 0
set DoOnce to 1
set XAlch to 1
set XMag to 1
set XBook to 1
set XCMNY to 1
set XMsc to 1
set XGun to 1
set XFood to 1
endif
if ALEnhGLoot
set ActorR to GetFirstRef 200 1 0
set Seen to 0
Label 200
if IsFormValid ActorR
if ActorR.GetDead == 0 && ActorR.GetPlayerTeammate == 0
if ActorR.GetDetected Player == 1
set Seen to 1
endif
endif
set ActorR to Pencil01
set ActorR to GetNextRef
Goto 200
endif
set BookR to GetFirstRef 25 1 0
Label 25
if IsFormValid BookR
if (Player.GetDistance BookR < 1000) && (BookR.GetDisabled == 0)
set OREvl to 0
set OCEvl to 0
set ORe to BookR.GetOwner
set OCe to BookR.GetParentCellOwner
if ORe && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction)
if GetType ORe == 8
set OREvl to (ListGetFormIndex ALEnhLEvilFact ORe >= 0)
endif
endif
if OCe && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction)
if GetType OCe == 8
set OCEvl to (ListGetFormIndex ALEnhLEvilFact OCe >= 0)
endif
endif
if ((ORe == 0) && (OCe == 0)) || (ORe == Player.GetBaseObject) || (ORe == PlayerFaction) || (OCe == Player.GetBaseObject) || (OCe == PlayerFaction) || Seen == 0
if BookR.IsInList ALEnhLBook
BookR.Activate Player 1
endif
endif
endif
set BookR to Pencil01
set BookR to GetNextRef
Goto 25
endif
set ContR to GetFirstRef 27 1 0
Label 27
if IsFormValid ContR
set InvT0 to ContR.GetNumItems
if (Player.GetDistance ContR < 1000) && (ContR.GetDisabled == 0) && (InvT0 >0)
set OREvl to 0
set OCEvl to 0
set ORe to ContR.GetOwner
set OCe to ContR.GetParentCellOwner
if ORe && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction)
if GetType ORe == 8
set OREvl to (ListGetFormIndex ALEnhLEvilFact ORe >= 0)
endif
endif
if OCe && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction)
if GetType OCe == 8
set OCEvl to (ListGetFormIndex ALEnhLEvilFact OCe >= 0)
endif
endif
if (ContR.GetLocked == 1) && ALEnhGLock && ContR.GetLockLevel <= (GetActorValue Lockpick) && ContR.GetLockLevel < 255
if ((ORe == 0) && (OCe == 0)) || (ORe == Player.GetBaseObject) || (ORe == PlayerFaction) || (OCe == Player.GetBaseObject) || (OCe == PlayerFaction) || ((Seen == 0) && (OREvl || OCEvl || ALEnhGSteal))
ContR.Activate Player 1
endif
endif
if ContR.GetLocked == 0
if ((ORe == 0) && (OCe == 0)) || (ORe == Player.GetBaseObject) || (ORe == PlayerFaction) || (OCe == Player.GetBaseObject) || (OCe == PlayerFaction) || ((Seen == 0) && (OREvl || OCEvl || ALEnhGSteal))
set InvPos to 0
Label 136
set InvCount to ContR.GetNumItems
if InvPos < InvCount
set LootR to ContR.GetInventoryObject InvPos
if ListGetFormIndex ALEnhLBook LootR >= 0
set XBook to ListGetFormIndex ALEnhLBook LootR
endif
if ALEnhGChem
set XChem to ListGetFormIndex ALEnhLChem LootR
else
set XChem to -1
endif
if ALEnhGAlchC
set XAlchC to ListGetFormIndex ALEnhLAlchC LootR
else
set XAlchC to -1
endif
if ALEnhGDrink
set XDrink to ListGetFormIndex ALEnhLDrink LootR
else
set XDrink to -1
endif
set XAlch to ListGetFormIndex ALEnhLAlch LootR
if ALEnhGFood
set XFood to ListGetFormIndex ALEnhLFood LootR
else
set XFood to -1
endif
set XMag to ListGetFormIndex ALEnhLMag LootR
if ALEnhGAlchM
set XAlchM to ListGetFormIndex ALEnhLAlchM LootR
else
set XAlchM to -1
endif
if ALEnhGVenom
set XVeno to ListGetFormIndex ALEnhLVenom LootR
else
set XVeno to -1
endif
if ALEnhGEW
set XEW to ListGetFormIndex ALEnhLEW LootR
set XMscEW to ListGetFormIndex ALEnhLMiscEW LootR
else
set XEW to -1
set XMscEW to -1
endif
if ALEnhGExpl
set XExpl to ListGetFormIndex ALEnhLExpl LootR
set XMscExpl to ListGetFormIndex ALEnhLMiscExpl LootR
set XEPlace to ListGetFormIndex ALEnhLExplPlace LootR
set XEThrow to ListGetFormIndex ALEnhLExplThrow LootR
else
set XExpl to -1
set XMscExpl to -1
set XEPlace to -1
set XEThrow to -1
endif
if ALEnhGGun
set XGun to ListGetFormIndex ALEnhLGun LootR
set XMscGun to ListGetFormIndex ALEnhLMiscGun LootR
else
set XGun to -1
set XMscGun to -1
endif
if ALEnhGAmmoM
set XAmmoM to ListGetFormIndex ALEnhLAmmoM LootR
else
set XAmmoM to -1
endif
set XBook to ListGetFormIndex ALEnhLBook LootR
set XCMNY to ListGetFormIndex ALEnhLCMNY LootR
set XMsc to ListGetFormIndex ALEnhLMisc LootR
if ALEnhGMiscC
set XMscC to ListGetFormIndex ALEnhLMiscC LootR
else
set XMscC to -1
endif
if ALEnhGMiscQ
set XMscQ to ListGetFormIndex ALEnhLMiscQ LootR
else
set XMscQ to -1
endif
if (XChem >= 0) || (GetType LootR == 46) || (GetType LootR == 49) || (XAlchC >= 0) || (XDrink >= 0) || (XAlch >= 0) || (XFood >= 0) || (XMag >= 0) || (XAlchM >= 0) || (XVeno >= 0) || (XEW >= 0) || (XExpl >= 0) || (XGun >= 0) || (XAmmoM >= 0) || (XBook >= 0) || (XCMNY >= 0) || (XMsc >= 0) || (XMscEW >= 0) || (XMscExpl >= 0) || (XMscGun >= 0) || (XMscC >= 0) || (XMscQ >= 0) || (XEPlace >= 0) || (XEThrow >= 0)
set ItemsCount to ContR.GetItemCount LootR
Player.AddItem LootR ItemsCount
ContR.RemoveItem LootR ItemsCount
else
set InvPos to InvPos + 1
endif
Goto 136
endif
set InvT1 to ContR.GetNumItems
if ((ORe != 0) || (OCe != 0)) && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction) && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction) && (OREvl == 0) && (OCEvl == 0) && (InvT1 < InvT0) && (ContR.GetDefaultOpen == 0)
RewardKarma -5
endif
endif
set InvT1 to ContR.GetNumItems
if ((ORe != 0) || (OCe != 0)) && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction) && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction) && (OREvl == 0) && (OCEvl == 0) && (InvT1 < InvT0) && (ContR.GetDefaultOpen == 0)
RewardKarma -5
endif
endif
endif
set ContR to Pencil01
set ContR to GetNextRef
Goto 27
endif
set MscR to GetFirstRef 31 1 0
Label 31
if IsFormValid MscR
if (Player.GetDistance MscR < 1000) && (MscR.GetDisabled == 0)
set OREvl to 0
set OCEvl to 0
set ORe to MscR.GetOwner
set OCe to MscR.GetParentCellOwner
if ORe && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction)
if GetType ORe == 8
set OREvl to (ListGetFormIndex ALEnhLEvilFact ORe >= 0)
endif
endif
if OCe && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction)
if GetType OCe == 8
set OCEvl to (ListGetFormIndex ALEnhLEvilFact OCe >= 0)
endif
endif
if ((ORe == 0) && (OCe == 0)) || (ORe == Player.GetBaseObject) || (ORe == PlayerFaction) || (OCe == Player.GetBaseObject) || (OCe == PlayerFaction) || ((Seen == 0) && (OREvl || OCEvl || ALEnhGSteal))
if MscR.IsInList ALEnhLMisc
MscR.Activate Player 1
endif
if ALEnhGEW
if MscR.IsInList ALEnhLMiscEW
MscR.Activate Player 1
endif
endif
if ALEnhGExpl
if MscR.IsInList ALEnhLMiscExpl
MscR.Activate Player 1
endif
endif
if ALEnhGGun
if MscR.IsInList ALEnhLMiscGun
MscR.Activate Player 1
endif
endif
if ALEnhGMiscC
if MscR.IsInList ALEnhLMiscC
MscR.Activate Player 1
endif
endif
if ALEnhGMiscQ
if MscR.IsInList ALEnhLMiscQ
MscR.Activate Player 1
endif
endif
endif
endif
set MscR to Pencil01
set MscR to GetNextRef
Goto 31
endif
set AmmoR to GetFirstRef 41 1 0
Label 41
if IsFormValid AmmoR
if (Player.GetDistance AmmoR < 1000) && (AmmoR.GetDisabled == 0)
set OREvl to 0
set OCEvl to 0
set ORe to AmmoR.GetOwner
set OCe to AmmoR.GetParentCellOwner
if ORe && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction)
if GetType ORe == 8
set OREvl to (ListGetFormIndex ALEnhLEvilFact ORe >= 0)
endif
endif
if OCe && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction)
if GetType OCe == 8
set OCEvl to (ListGetFormIndex ALEnhLEvilFact OCe >= 0)
endif
endif
if ((ORe == 0) && (OCe == 0)) || (ORe == Player.GetBaseObject) || (ORe == PlayerFaction) || (OCe == Player.GetBaseObject) || (OCe == PlayerFaction) || ((Seen == 0) && (OREvl || OCEvl || ALEnhGSteal))
if ALEnhGEW
if AmmoR.IsInList ALEnhLEW
AmmoR.Activate Player 1
endif
endif
if ALEnhGExpl
if AmmoR.IsInList ALEnhLExpl
AmmoR.Activate Player 1
endif
endif
if ALEnhGGun
if AmmoR.IsInList ALEnhLGun
AmmoR.Activate Player 1
endif
endif
if ALEnhGAmmoM
if AmmoR.IsInList ALEnhLAmmoM
set AmmoCount to AmmoR.GetRefCount
set AMMOBASE to AmmoR.GetBaseObject
player.additem AMMOBASE AmmoCount
AmmoR.Activate Player 1
endif
endif
endif
endif
set AmmoR to Pencil01
set AmmoR to GetNextRef
Goto 41
endif
set NPCR to GetFirstRef 42 1 0
Label 42
if IsFormValid NPCR
if (Player.GetDistance NPCR < 1000) && (NPCR.GetDisabled == 0) && (NPCR.GetDead == 1)
set InvPos to 0
Label 210
set InvCount to NPCR.GetNumItems
if InvPos < InvCount
set LootR to NPCR.GetInventoryObject InvPos
if ALEnhGChem
set XChem to ListGetFormIndex ALEnhLChem LootR
else
set XChem to -1
endif
if ALEnhGAlchC
set XAlchC to ListGetFormIndex ALEnhLAlchC LootR
else
set XAlchC to -1
endif
if ALEnhGDrink
set XDrink to ListGetFormIndex ALEnhLDrink LootR
else
set XDrink to -1
endif
set XAlch to ListGetFormIndex ALEnhLAlch LootR
if ALEnhGFood
set XFood to ListGetFormIndex ALEnhLFood LootR
else
set XFood to -1
endif
set XMag to ListGetFormIndex ALEnhLMag LootR
if ALEnhGAlchM
set XAlchM to ListGetFormIndex ALEnhLAlchM LootR
else
set XAlchM to -1
endif
if ALEnhGVenom
set XVeno to ListGetFormIndex ALEnhLVenom LootR
else
set XVeno to -1
endif
if ALEnhGEW
set XEW to ListGetFormIndex ALEnhLEW LootR
set XMscEW to ListGetFormIndex ALEnhLMiscEW LootR
else
set XEW to -1
set XMscEW to -1
endif
if ALEnhGExpl
set XExpl to ListGetFormIndex ALEnhLExpl LootR
set XMscExpl to ListGetFormIndex ALEnhLMiscExpl LootR
set XEPlace to ListGetFormIndex ALEnhLExplPlace LootR
set XEThrow to ListGetFormIndex ALEnhLExplThrow LootR
else
set XExpl to -1
set XMscExpl to -1
set XEPlace to -1
set XEThrow to -1
endif
if ALEnhGGun
set XGun to ListGetFormIndex ALEnhLGun LootR
set XMscGun to ListGetFormIndex ALEnhLMiscGun LootR
else
set XGun to -1
set XMscGun to -1
endif
if ALEnhGAmmoM
set XAmmoM to ListGetFormIndex ALEnhLAmmoM LootR
else
set XAmmoM to -1
endif
set XBook to ListGetFormIndex ALEnhLBook LootR
set XCMNY to ListGetFormIndex ALEnhLCMNY LootR
set XMsc to ListGetFormIndex ALEnhLMisc LootR
if ALEnhGMiscC
set XMscC to ListGetFormIndex ALEnhLMiscC LootR
else
set XMscC to -1
endif
if ALEnhGMiscQ
set XMscQ to ListGetFormIndex ALEnhLMiscQ LootR
else
set XMscQ to -1
endif
if (XChem >= 0) || (GetType LootR == 46) || (GetType LootR == 49)|| (XAlchC >= 0) || (XDrink >= 0) || (XAlch >= 0) || (XFood >= 0) || (XMag >= 0) || (XAlchM >= 0) || (XVeno >= 0) || (XEW >= 0) || (XExpl >= 0) || (XGun >= 0) || (XAmmoM >= 0) || (XBook >= 0) || (XCMNY >= 0) || (XMsc >= 0) || (XMscEW >= 0) || (XMscExpl >= 0) || (XMscGun >= 0) || (XMscC >= 0) || (XMscQ >= 0) || (XEPlace >= 0) || (XEThrow >= 0)
set ItemsCount to NPCR.GetItemCount LootR
Player.AddItem LootR ItemsCount
NPCR.RemoveItem LootR ItemsCount
else
set InvPos to InvPos + 1
endif
Goto 210
endif
endif
set NPCR to Pencil01
set NPCR to GetNextRef
Goto 42
endif
set CreaR to GetFirstRef 43 1 0
Label 43
if IsFormValid CreaR
if (Player.GetDistance CreaR < 1000) && (CreaR.GetDisabled == 0) && (CreaR.GetDead == 1)
set InvPos to 0
Label 215
set InvCount to CreaR.GetNumItems
if InvPos < InvCount
set LootR to CreaR.GetInventoryObject InvPos
if ALEnhGChem
set XChem to ListGetFormIndex ALEnhLChem LootR
else
set XChem to -1
endif
if ALEnhGAlchC
set XAlchC to ListGetFormIndex ALEnhLAlchC LootR
else
set XAlchC to -1
endif
if ALEnhGDrink
set XDrink to ListGetFormIndex ALEnhLDrink LootR
else
set XDrink to -1
endif
set XAlch to ListGetFormIndex ALEnhLAlch LootR
set XMag to ListGetFormIndex ALEnhLMag LootR
if ALEnhGAlchM
set XAlchM to ListGetFormIndex ALEnhLAlchM LootR
else
set XAlchM to -1
endif
if ALEnhGEW
set XEW to ListGetFormIndex ALEnhLEW LootR
set XMscEW to ListGetFormIndex ALEnhLMiscEW LootR
else
set XEW to -1
set XMscEW to -1
endif
if ALEnhGExpl
set XExpl to ListGetFormIndex ALEnhLExpl LootR
set XMscExpl to ListGetFormIndex ALEnhLMiscExpl LootR
set XEPlace to ListGetFormIndex ALEnhLExplPlace LootR
set XEThrow to ListGetFormIndex ALEnhLExplThrow LootR
else
set XExpl to -1
set XMscExpl to -1
set XEPlace to -1
set XEThrow to -1
endif
if ALEnhGGun
set XGun to ListGetFormIndex ALEnhLGun LootR
set XMscGun to ListGetFormIndex ALEnhLMiscGun LootR
else
set XGun to -1
set XMscGun to -1
endif
if ALEnhGAmmoM
set XAmmoM to ListGetFormIndex ALEnhLAmmoM LootR
else
set XAmmoM to -1
endif
set XBook to ListGetFormIndex ALEnhLBook LootR
set XCMNY to ListGetFormIndex ALEnhLCMNY LootR
set XMsc to ListGetFormIndex ALEnhLMisc LootR
if ALEnhGMiscC
set XMscC to ListGetFormIndex ALEnhLMiscC LootR
else
set XMscC to -1
endif
if ALEnhGMiscQ
set XMscQ to ListGetFormIndex ALEnhLMiscQ LootR
else
set XMscQ to -1
endif
if (XChem >= 0) || (GetType LootR == 46) || (GetType LootR == 49) || (XAlchC >= 0) || (XDrink >= 0) || (XAlch >= 0) || (XFood >= 0) || (XMag >= 0) || (XAlchM >= 0) || (XVeno >= 0) || (XEW >= 0) || (XExpl >= 0) || (XGun >= 0) || (XAmmoM >= 0) || (XBook >= 0) || (XCMNY >= 0) || (XMsc >= 0) || (XMscEW >= 0) || (XMscExpl >= 0) || (XMscGun >= 0) || (XMscC >= 0) || (XMscQ >= 0) || (XEPlace >= 0) || (XEThrow >= 0)
set ItemsCount to CreaR.GetItemCount LootR
Player.AddItem LootR ItemsCount
CreaR.RemoveItem LootR ItemsCount
else
set InvPos to InvPos + 1
endif
Goto 215
endif
endif
set CreaR to Pencil01
set CreaR to GetNextRef
Goto 43
endif
if ALEnhGKey
set KeyR to GetFirstRef 46 1 0
Label 46
if IsFormValid KeyR
if (Player.GetDistance KeyR < 1000) && (KeyR.GetDisabled == 0)
set OREvl to 0
set OCEvl to 0
set ORe to KeyR.GetOwner
set OCe to KeyR.GetParentCellOwner
if ORe && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction)
if GetType ORe == 8
set OREvl to (ListGetFormIndex ALEnhLEvilFact ORe >= 0)
endif
endif
if OCe && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction)
if GetType OCe == 8
set OCEvl to (ListGetFormIndex ALEnhLEvilFact OCe >= 0)
endif
endif
if ((ORe == 0) && (OCe == 0)) || (ORe == Player.GetBaseObject) || (ORe == PlayerFaction) || (OCe == Player.GetBaseObject) || (OCe == PlayerFaction) || ((Seen == 0) && (OREvl || OCEvl || ALEnhGSteal))
KeyR.Activate Player 1
endif
endif
set KeyR to Pencil01
set KeyR to GetNextRef
Goto 46
endif
endif
set AlchR to GetFirstRef 47 1 0
Label 47
if IsFormValid AlchR
if (Player.GetDistance AlchR < 1000) && (AlchR.GetDisabled == 0)
set OREvl to 0
set OCEvl to 0
set ORe to AlchR.GetOwner
set OCe to AlchR.GetParentCellOwner
if ORe && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction)
if GetType ORe == 8
set OREvl to (ListGetFormIndex ALEnhLEvilFact ORe >= 0)
endif
endif
if OCe && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction)
if GetType OCe == 8
set OCEvl to (ListGetFormIndex ALEnhLEvilFact OCe >= 0)
endif
endif
if ((ORe == 0) && (OCe == 0)) || (ORe == Player.GetBaseObject) || (ORe == PlayerFaction) || (OCe == Player.GetBaseObject) || (OCe == PlayerFaction) || ((Seen == 0) && (OREvl || OCEvl || ALEnhGSteal))
if ALEnhGChem
if AlchR.IsInList ALEnhLChem
AlchR.Activate Player 1
endif
endif
if ALEnhGAlchC
if AlchR.IsInList ALEnhLAlchC
AlchR.Activate Player 1
endif
endif
if ALEnhGDrink
if AlchR.IsInList ALEnhLDrink
AlchR.Activate Player 1
endif
endif
if AlchR.IsInList ALEnhLAlch
AlchR.Activate Player 1
endif
if ALEnhGFood
if AlchR.IsInList ALEnhLFood
AlchR.Activate Player 1
endif
endif
if ALEnhGAlchM
if AlchR.IsInList ALEnhLAlchM
AlchR.Activate Player 1
endif
endif
endif
endif
set AlchR to Pencil01
set AlchR to GetNextRef
Goto 47
endif
if ALEnhGNote
set NoteR to GetFirstRef 49 1 0
Label 49
if IsFormValid NoteR
if (Player.GetDistance NoteR < 1000) && (NoteR.GetDisabled == 0)
set OREvl to 0
set OCEvl to 0
set ORe to NoteR.GetOwner
set OCe to NoteR.GetParentCellOwner
if ORe && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction)
if GetType ORe == 8
set OREvl to (ListGetFormIndex ALEnhLEvilFact ORe >= 0)
endif
endif
if OCe && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction)
if GetType OCe == 8
set OCEvl to (ListGetFormIndex ALEnhLEvilFact OCe >= 0)
endif
endif
if ((ORe == 0) && (OCe == 0)) || (ORe == Player.GetBaseObject) || (ORe == PlayerFaction) || (OCe == Player.GetBaseObject) || (OCe == PlayerFaction) || ((Seen == 0) && (OREvl || OCEvl || ALEnhGSteal))
NoteR.Activate Player 1
endif
endif
set NoteR to Pencil01
set NoteR to GetNextRef
Goto 49
endif
endif
set CMNYR to GetFirstRef 116 1 0
Label 116
if IsFormValid CMNYR
if (Player.GetDistance CMNYR < 1000) && (CMNYR.GetDisabled == 0)
set OREvl to 0
set OCEvl to 0
set ORe to CMNYR.GetOwner
set OCe to CMNYR.GetParentCellOwner
if ORe && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction)
if GetType ORe == 8
set OREvl to (ListGetFormIndex ALEnhLEvilFact ORe >= 0)
endif
endif
if OCe && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction)
if GetType OCe == 8
set OCEvl to (ListGetFormIndex ALEnhLEvilFact OCe >= 0)
endif
endif
if ((ORe == 0) && (OCe == 0)) || (ORe == Player.GetBaseObject) || (ORe == PlayerFaction) || (OCe == Player.GetBaseObject) || (OCe == PlayerFaction) || ((Seen == 0) && (OREvl || OCEvl || ALEnhGSteal))
if CMNYR.IsInList ALEnhLCMNY
CMNYR.Activate Player 1
endif
endif
endif
set CMNYR to Pencil01
set CMNYR to GetNextRef
Goto 116
endif
endif
endif
end
Edited by kylez2006
Link to comment
Share on other sites

The Pitt ingots are activators, not objects.

Is there any way to activate them with a script. Im super new to fallout modding. I did however figure out the weapons problem. Form 40 is weapons and it didnt exist in this addon so i made this.

 

set WeapR to GetFirstRef 40 1 0
Label 40
if IsFormValid WeapR
if (Player.GetDistance WeapR < 1000) && (WeapR.GetDisabled == 0)
set OREvl to 0
set OCEvl to 0
set ORe to WeapR.GetOwner
set OCe to WeapR.GetParentCellOwner
if ORe && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction)
if GetType ORe == 8
set OREvl to (ListGetFormIndex ALEnhLEvilFact ORe >= 0)
endif
endif
if OCe && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction)
if GetType OCe == 8
set OCEvl to (ListGetFormIndex ALEnhLEvilFact OCe >= 0)
endif
endif
if ((ORe == 0) && (OCe == 0)) || (ORe == Player.GetBaseObject) || (ORe == PlayerFaction) || (OCe == Player.GetBaseObject) || (OCe == PlayerFaction) || ((Seen == 0) && (OREvl || OCEvl || ALEnhGSteal))
if ALEnhGGun
if WeapR.IsInList ALEnhLGun
WeapR.Activate Player 1
endif
endif
endif
endif
set WeapR to Pencil01
set WeapR to GetNextRef
Goto 40
endif
Link to comment
Share on other sites

Got another question for you i got everything sorted out but now i ran into a new issue and i cant quite nail it down. When in game if i headshot someone triggering bloody mess it will cause a crash related to looting. I already linked how im sorting through the npc containers and guns and i cant seem to nail whats causing the crash, any help would be appreciated

Link to comment
Share on other sites

This is the code that is causing crashes. It will pickup stuff from the overworld and stuff laying around no problem but crashes if i kill the person. Craziest thing is sometimes it works for awhile no problems than it starts crashing everytime i kill someone. Im very lost and need help from a more experienced modder. I also tried changing the way i activate the item by adding it to my inventory and than disabling it in game but that didnt seem to work out.


set WeapR to GetFirstRef 40 1 0

Label 40

if IsFormValid WeapR

if (Player.GetDistance WeapR < 1000) && (WeapR.GetDisabled == 0)

set OREvl to 0

set OCEvl to 0

set ORe to WeapR.GetOwner

set OCe to WeapR.GetParentCellOwner

if ORe && (ORe != Player.GetBaseObject) && (ORe != PlayerFaction)

if GetType ORe == 8

set OREvl to (ListGetFormIndex ALEnhLEvilFact ORe >= 0)

endif

endif

if OCe && (OCe != Player.GetBaseObject) && (OCe != PlayerFaction)

if GetType OCe == 8

set OCEvl to (ListGetFormIndex ALEnhLEvilFact OCe >= 0)

endif

endif

if ((ORe == 0) && (OCe == 0)) || (ORe == Player.GetBaseObject) || (ORe == PlayerFaction) || (OCe == Player.GetBaseObject) || (OCe == PlayerFaction) || ((Seen == 0) && (OREvl || OCEvl || ALEnhGSteal))

if ALEnhGGun

if WeapR.IsInList ALEnhLGun

WeapR.Activate Player 1

endif

endif

endif

endif

set WeapR to Pencil01

set WeapR to GetNextRef

Goto 40

endif

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...