Author Topic: CRE_ADD_ITEM - what happens if inventory is full or slot is zero  (Read 1862 times)


Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: CRE_ADD_ITEM - what happens if inventory is full or slot is zero
« Reply #1 on: January 24, 2016, 04:57:47 AM »
If the inventory is full, ADD_CRE_ITEM grabs the first appropriate slot and tries to move the item already in that slot into the last inventory slot. A warning is printed about defaulting to inv16. If inv16 is also full, the moved item disappears. The new item is added to the vacated slot.

If slot is 0, ADD_CRE_ITEM prints a warning about slot 0 being unknown and defaults to inv15.

Offline agb1

  • Planewalker
  • *****
  • Posts: 30
Re: CRE_ADD_ITEM - what happens if inventory is full or slot is zero
« Reply #2 on: January 24, 2016, 10:15:12 AM »
Is there a way to instruct this function to avoid replacement of original inventory items?

We noticed that SCS adding potions to Davaeorn is sometimes replacing the river plug key.  It would be better in this case to skip adding potions.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: CRE_ADD_ITEM - what happens if inventory is full or slot is zero
« Reply #3 on: January 24, 2016, 02:47:30 PM »
ADD_CRE_ITEM can't not add items, no. I might be able to swing something like a NOMOVE keyword, but TP2 syntax is not great at being extensible.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: CRE_ADD_ITEM - what happens if inventory is full or slot is zero
« Reply #4 on: January 24, 2016, 04:40:24 PM »
I might be able to swing something like a NOMOVE keyword, but TP2 syntax is not great at being extensible.
In 240.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: