Initial commit
Initial commit.
This commit is contained in:
51
_module/nss/flintandtinder.nss
Normal file
51
_module/nss/flintandtinder.nss
Normal file
@@ -0,0 +1,51 @@
|
||||
/* Script generated by
|
||||
Lilac Soul's NWN Script Generator, v. 2.1
|
||||
|
||||
For download info, please visit:
|
||||
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC;
|
||||
oPC = GetItemActivator();
|
||||
|
||||
if (GetIsObjectValid(GetItemActivatedTarget())
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You want to light what on fire?");
|
||||
return;}
|
||||
|
||||
object oWood = GetItemPossessedBy(oPC,"wood");
|
||||
|
||||
|
||||
if (oWood != OBJECT_INVALID)
|
||||
{
|
||||
|
||||
|
||||
location lTarget;
|
||||
|
||||
|
||||
|
||||
lTarget = GetItemActivatedTargetLocation();
|
||||
location lPC = GetLocation(oPC);
|
||||
float fDistance = GetDistanceBetweenLocations(lPC,lTarget);
|
||||
|
||||
if (fDistance <= 2.0)
|
||||
{
|
||||
CreateObject(OBJECT_TYPE_PLACEABLE, "campfire", lTarget);
|
||||
DestroyObject(oWood,0.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToPC(GetItemActivator(), "Too far away.");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToPC(GetItemActivator(), "You have no firewood.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user