RoT2_PRC8/_module/nss/pws_onacquire.nss
Jaysyn904 499aba4eb3 Initial upload
Initial upload
2023-09-25 18:13:22 -04:00

46 lines
1.7 KiB
Plaintext

#include "pws_nodropunique"
#include "cs_misc_function"
void main()
{
object oIA = GetModuleItemAcquired();
object oIABy = GetModuleItemAcquiredBy();
object oIAFrom = GetModuleItemAcquiredFrom();
int iStolen = FALSE;
//cs_AcquireDebug();
if (!GetIsDM(oIABy)) {
if ((oIABy != OBJECT_INVALID) && (oIA != OBJECT_INVALID)) {
if (GetIsPC(oIABy) && GetStolenFlag(oIA)) { // This is a attempt at stealing an item made by a PC.
if (oIAFrom != OBJECT_INVALID) {
if (GetIsPC(oIAFrom)) { // Player is trying to steal from another Player
SendMessageToPC(oIABy, "You are not allowed to Pickpocket players in this module.");
AssignCommand(oIAFrom, cs_CopyObjectOntoPlayer(oIA, oIAFrom));
DestroyObject(oIA);
iStolen = TRUE;
} else { // Player is trying to steal from a non-player. Need to re-create stolen item so that stolen flag isn't set!
AssignCommand(oIABy, cs_CopyObjectOntoPlayer(oIA, oIABy));
DestroyObject(oIA);
}
}
}
}
}
if (iStolen == FALSE) {
CheckForUnique();
ExecuteScript ("loot_notify",GetModule());
//This is for the Store Clean up Script--Zach
cs_MakeItemNoClean(GetModuleItemAcquired());
}
// For arena Flags
ExecuteScript("ac_"+GetTag
(GetModuleItemAcquired()), OBJECT_SELF);
}