A Bookcase that can only hold books.
A pedastal that will only hold a single holy symbol.
I think I have seen this before in modules on the vault, but cannot recall where I saw them, and am not able to get into the toolset to play with it right now...
So I guess what I am really curious about is which functions would one use to restrict stored item types and container capacity?
Restricted containers
Débuté par
Leurnid
, mai 18 2012 08:33
#1
Posté 18 mai 2012 - 08:33
#2
Posté 18 mai 2012 - 08:51
Leurnid wrote...
So I guess what I am really curious about is which functions would one use to restrict stored item types and container capacity?
It sounds to me more like you are asking what event do you use. It would be OnDisturbed
If you are asking how to the the same for an item container, sadly, it can not be done. Items have no events for when items are added or removed from them.
#3
Posté 18 mai 2012 - 09:04
Right now I am just musing, until I can open up the toolset and fiddle around with things. I was hoping that perhaps a module builder active on the forums here had already worked these things out and had some advice, so my fiddling started in the right neighborhood.
#4
Posté 18 mai 2012 - 10:03
if (GetBaseItemType(oItem) != BASE_ITEM_SPELLSCROLL)// use BASE_ITEM_XXXX for your own
{
DelayCommand(0.3, AssignCommand(OBJECT_SELF, ActionGiveItem(oItem, oPC)));
FloatingTextStringOnCreature("You can only store scrolls here.",oPC,FALSE);
return;
}
if (GetBaseItemType(oItem) == BASE_ITEM_SPELLSCROLL)
{
//do your own storing script stuff
}
{
DelayCommand(0.3, AssignCommand(OBJECT_SELF, ActionGiveItem(oItem, oPC)));
FloatingTextStringOnCreature("You can only store scrolls here.",oPC,FALSE);
return;
}
if (GetBaseItemType(oItem) == BASE_ITEM_SPELLSCROLL)
{
//do your own storing script stuff
}
#5
Posté 18 mai 2012 - 10:08
So putting 2 and 2 together:
You can't block the item outright, but you can bounce it back out at them =D
You can't block the item outright, but you can bounce it back out at them =D





Retour en haut






