Greetings,
Anyone have a script like this they would be willing to share? I am guessing it would need to check first if the item(s) is(are) identified, and if not ID it(them).
Laz
Greetings,
Anyone have a script like this they would be willing to share? I am guessing it would need to check first if the item(s) is(are) identified, and if not ID it(them).
Laz
// put this OnDisturbed of a container.
void main()
{
object oItem=GetInventoryDisturbItem();
object oPC=GetLastDisturbed();
int nType=GetInventoryDisturbType();
switch (nType)
{
case INVENTORY_DISTURB_TYPE_ADDED:
//Put your identify code here
SetIdentified(oItem,TRUE);
//End of Identify code
break;
case INVENTORY_DISTURB_TYPE_REMOVED:
break;
case INVENTORY_DISTURB_TYPE_STOLEN:
break;
}
}
So there is 3 main ways inventories can be disturbed.
Thank you very much Baaelos. I will give this a try.
This worked perfectly. TYVM Baaleos. I recommend to anyone using omega forges to add this to the ondisturbed event.
Umm... what?
I asked the community to help with an issue, which I didn't elaborate on. Baaleos presented a solution which I verified as working, and I gave a heads up to anyone else using the system we found could benefit from this.
If you want my version of the script I would love to post it if these damn forums would allow me to paste (It's nothing special, I just added the code Baaleos provided to dm_forge_ondist).
P.S. how the hell do you paste things on these boards anyways? I tried more reply options, paste, paste simple text, paste from word. Nothing works...
P.S. Sometimes you have to use CTRL C / X / V to copy / cut / paste these sites. Seems like a conspiracy to regress to the 1970s...
Scary for me, as CTRL C was also the code for crashing programs on many systems... ![]()
#include "dm_forge_config"
void main()
{
object oItemPlot = GetLastDisturbed();
object oPC = GetLastUsedBy();
if(!PLOT_UNFORGEABLE) return;
if(GetPlotFlag(oItemPlot))
{
CopyItem(oItemPlot,oPC,TRUE);
DestroyObject(oItemPlot,0.5);
SendMessageToPC(oPC,"You cannot forge that item");
}
//ID item
{
object oItem=GetInventoryDisturbItem();
object oPC=GetLastDisturbed();
int nType=GetInventoryDisturbType();
switch (nType)
{
case INVENTORY_DISTURB_TYPE_ADDED:
//Put your identify code here
SetIdentified(oItem,TRUE);
//End of Identify code
break;
case INVENTORY_DISTURB_TYPE_REMOVED:
break;
case INVENTORY_DISTURB_TYPE_STOLEN:
break;
}
}
}
I was using IE11. Firefox seems to handle it no problems. Thanks much. That's the code we used for the omega forge ondisturbed event.