generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
21
_module/nss/alt_givewidget.nss
Normal file
21
_module/nss/alt_givewidget.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
//Created by Esreyr Fears
|
||||
//on March 27th, 2006
|
||||
|
||||
void main() {
|
||||
//Get the PC (whether they are entering the module and acquiring the widget, or getting it by some other means.s
|
||||
object oPC = OBJECT_SELF;
|
||||
if ( !GetIsPC(oPC) ) oPC = GetEnteringObject();
|
||||
|
||||
//Give a Widget to any PC with a minimum druid level of 8.
|
||||
int nDruidLevel = GetLevelByClass(CLASS_TYPE_DRUID, oPC);
|
||||
int itemCount = 0;
|
||||
object oInventory = GetFirstItemInInventory(oPC);
|
||||
|
||||
while (GetIsObjectValid(oInventory)) {
|
||||
if ( GetTag(oInventory) == "alt_shape_conv") itemCount++;
|
||||
oInventory = GetNextItemInInventory(oPC);
|
||||
if (itemCount > 0) break; //no need to check further.
|
||||
}
|
||||
|
||||
if (itemCount == 0 && nDruidLevel > 12) CreateItemOnObject("alternateshapech", oPC);
|
||||
}
|
||||
Reference in New Issue
Block a user