Jump to content
ℹ️ Intermittent Download History issues ×

Script is not working for unknown reason


afftor

Recommended Posts


 

 

 

Scriptname Loot extends ReferenceAlias Conditional

 

Message Property Breakdown Auto

MiscObject Property OreIron Auto

Keyword Property VendorItemArmor Auto

Keyword Property VendorItemWeapon Auto

Keyword Property VendorItemClothing Auto

Quest Property start Auto

 

Event OnInit()

Debug.Notification("whatever")

endEvent

 

Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)

If (akSourceContainer As Actor).IsDead() == 1

If akBaseItem.HasKeyword(VendorItemArmor) || akBaseItem.HasKeyword(VendorItemWeapon) || akBaseItem.HasKeyword(VendorItemClothing)

Game.GetPlayer().RemoveItem(akItemReference, 1, true)

Game.GetPlayer().AddItem(OreIron, 2)

Breakdown.Show()

else

Debug.Notification ("Wrong item")

EndIf

else

Debug.Notification ("wrong container")

EndIf

EndEvent

 

 

 

I made this script to check whenever player picks up a piece of equipment from dead enemies to break it down for resources. However only If (akSourceContainer As Actor).IsDead() == 1 line actually works, all checks fails, even If I delete every check only debug messages show up, items are never tracked or added. I suspect this might be a case of ReferenceAlias, but I have no real knowledge on this extension.

Edited by afftor
Link to comment
Share on other sites

  • Recently Browsing   0 members

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