random drop script updated

This commit is contained in:
EpicValor 2023-08-31 00:53:09 -05:00
parent f7ed314414
commit e4b8a47120
6 changed files with 31 additions and 28 deletions

View File

@ -1193,7 +1193,7 @@
}, },
"Version": { "Version": {
"type": "dword", "type": "dword",
"value": 48 "value": 50
}, },
"Width": { "Width": {
"type": "int", "type": "int",

View File

@ -2569,7 +2569,7 @@
}, },
"Version": { "Version": {
"type": "dword", "type": "dword",
"value": 69 "value": 70
}, },
"Width": { "Width": {
"type": "int", "type": "int",

View File

@ -5679,15 +5679,15 @@
}, },
"X": { "X": {
"type": "float", "type": "float",
"value": 47.74093627929688 "value": 47.79956817626953
}, },
"Y": { "Y": {
"type": "float", "type": "float",
"value": 41.72182846069336 "value": 41.75308609008789
}, },
"Z": { "Z": {
"type": "float", "type": "float",
"value": 9.5367431640625e-007 "value": -5.7220458984375e-006
} }
}, },
{ {
@ -11063,7 +11063,7 @@
}, },
"XOrientation": { "XOrientation": {
"type": "float", "type": "float",
"value": -0.9420575499534607 "value": 0.9924795031547546
}, },
"XPosition": { "XPosition": {
"type": "float", "type": "float",
@ -11071,7 +11071,7 @@
}, },
"YOrientation": { "YOrientation": {
"type": "float", "type": "float",
"value": -0.3354513943195343 "value": 0.1224108561873436
}, },
"YPosition": { "YPosition": {
"type": "float", "type": "float",
@ -11124,7 +11124,7 @@
}, },
"XOrientation": { "XOrientation": {
"type": "float", "type": "float",
"value": 0.3826837241649628 "value": -0.3826834261417389
}, },
"XPosition": { "XPosition": {
"type": "float", "type": "float",
@ -11132,7 +11132,7 @@
}, },
"YOrientation": { "YOrientation": {
"type": "float", "type": "float",
"value": -0.9238793849945068 "value": 0.9238795638084412
}, },
"YPosition": { "YPosition": {
"type": "float", "type": "float",
@ -11185,7 +11185,7 @@
}, },
"XOrientation": { "XOrientation": {
"type": "float", "type": "float",
"value": 0.8314697742462158 "value": -0.3368898332118988
}, },
"XPosition": { "XPosition": {
"type": "float", "type": "float",
@ -11193,7 +11193,7 @@
}, },
"YOrientation": { "YOrientation": {
"type": "float", "type": "float",
"value": -0.5555699467658997 "value": 0.9415440559387207
}, },
"YPosition": { "YPosition": {
"type": "float", "type": "float",
@ -11246,7 +11246,7 @@
}, },
"XOrientation": { "XOrientation": {
"type": "float", "type": "float",
"value": -0.3368898332118988 "value": 0.4713970422744751
}, },
"XPosition": { "XPosition": {
"type": "float", "type": "float",
@ -11254,7 +11254,7 @@
}, },
"YOrientation": { "YOrientation": {
"type": "float", "type": "float",
"value": 0.9415440559387207 "value": -0.881921112537384
}, },
"YPosition": { "YPosition": {
"type": "float", "type": "float",
@ -11307,7 +11307,7 @@
}, },
"XOrientation": { "XOrientation": {
"type": "float", "type": "float",
"value": 0.9583225250244141 "value": -0.9700313210487366
}, },
"XPosition": { "XPosition": {
"type": "float", "type": "float",
@ -11315,7 +11315,7 @@
}, },
"YOrientation": { "YOrientation": {
"type": "float", "type": "float",
"value": 0.2856886088848114 "value": -0.2429799735546112
}, },
"YPosition": { "YPosition": {
"type": "float", "type": "float",
@ -11368,7 +11368,7 @@
}, },
"XOrientation": { "XOrientation": {
"type": "float", "type": "float",
"value": -0.975702166557312 "value": 0.8819212317466736
}, },
"XPosition": { "XPosition": {
"type": "float", "type": "float",
@ -11376,7 +11376,7 @@
}, },
"YOrientation": { "YOrientation": {
"type": "float", "type": "float",
"value": -0.2191010862588882 "value": 0.4713967740535736
}, },
"YPosition": { "YPosition": {
"type": "float", "type": "float",
@ -11429,7 +11429,7 @@
}, },
"XOrientation": { "XOrientation": {
"type": "float", "type": "float",
"value": 0.5792809724807739 "value": -0.5555703639984131
}, },
"XPosition": { "XPosition": {
"type": "float", "type": "float",
@ -11437,7 +11437,7 @@
}, },
"YOrientation": { "YOrientation": {
"type": "float", "type": "float",
"value": 0.8151279091835022 "value": -0.8314695358276367
}, },
"YPosition": { "YPosition": {
"type": "float", "type": "float",

Binary file not shown.

View File

@ -4,16 +4,19 @@ void main()
object oItem = GetFirstItemInInventory(oNPC); object oItem = GetFirstItemInInventory(oNPC);
while (GetIsObjectValid(oItem)) while (GetIsObjectValid(oItem))
{
// if item set to droppable it will 100% drop
if (GetDroppableFlag(oItem)== TRUE)
{ {
SetDroppableFlag(oItem, TRUE); if (GetDroppableFlag(oItem) == TRUE)
{
//items already set as droppable should stay that way
SetLocalInt (oItem, "droppable", 1);
GetNextItemInInventory(oNPC);
}
if (GetLocalInt(oItem, "droppable") == FALSE)
{
//20% chance to drop item inventory not already set as droppable
int bDroppable=d100()>80;
SetDroppableFlag(oItem, bDroppable);
oItem = GetNextItemInInventory(oNPC);
} }
//10% chance of item in inventory being droppable if not marked droppable
int bDroppable=d100()>90;
SetDroppableFlag(oItem, bDroppable);
oItem = GetNextItemInInventory(oNPC);
} }
} }

Binary file not shown.