[SOLOUTION] printing automated object link of dropped items from list.

InRoomFloor = ScopeReachable()
InRoomFloor = FilterByAttribute(InRoomFloor,"hasbeenmoved", true)
InRoomFloor = FilterByNotAttribute(InRoomFloor, "parent", Player)
list remove (InRoomFloor, Player)
foreach (obj, InRoomFloor) {
  msg (Replace(("{"+ obj + "}"), "Object: ", "object:"))
}

This seems a rather convoluted way to do it. Why not something like:

InRoomFloor = ScopeReachableNotHeld()
InRoomFloor = FilterByAttribute(InRoomFloor,"hasbeenmoved", true)
foreach (obj, InRoomFloor) {
  msg (GetDisplayNameLink (obj, "object"))
}

or:

InRoomFloor = ScopeReachableNotHeld()
InRoomFloor = FilterByAttribute(InRoomFloor,"hasbeenmoved", true)
msg (FormatList (InRoomFloor, "<br/>", "<br/>", ""))

@mrangel
it would still show player, and inventory, the code i have dose not and also will display object links automatically, and is far more superior then your code.


it would still show player, and inventory,

No it wouldn't. ScopeReachableNotHeld returns only objects that are in the room.

You use ScopeReachable, which internally runs ScopeReachableNotHeldForRoom and ScopeReachableInventory, and combines those lists together. So you're taking the list you want, adding the inventory, and then removing the inventory items again.

The only difference between the results is that your script will display any objects inside a bag that the player is holding.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums