whitevo
Feeling good, thats what I do.
Since its already written out here, I just move it to better place. Incase somebody is bored or wants to help me.
I need new function.
function deathPenalty(player) end --(player is player userdata)
All the function features should be able to change in a single config table.
function features:
1. Looks trough all item slots on player.
3. Looks trough the equipped bag on player (NB! don't start looping bag into bag. In my server players can't put bag into bag, unless its special type of bag. Which I deal with myself)
Example 1 formula:
DR= 10
first removes DR% of stack (math.floor).
then with 100-DR % chance it will decide will it remove DR% again.
Now the chance of removing DR% will be 100-DR*2
unless it doesn't fail.
next chance is 100-DR*3
etc.
prefer this formula with while loop.
Uhm, I guess that is it for now.
I need new function.
function deathPenalty(player) end --(player is player userdata)
All the function features should be able to change in a single config table.
function features:
1. Looks trough all item slots on player.
feature config:
2. Checks slot items:option1: slot item is removed.
option2: slot item is removed with % chance.
option3: random amount of stacked slot items is removed.
option4: random amount of stacked slot items is removed with % diminishing return. (example1* below)
option5: slot item will get item:getAttribute(TEXT, "soulbound") instead of remove.
option6: slot item has chance to be removed when item has TEXT "soulbound".
option7: slot item is removed when item has TEXT "soulbound".
option8: leave me nice ordered cap in function, where I can start scripting gem/stone upgrade removals.
option2: slot item is removed with % chance.
option3: random amount of stacked slot items is removed.
option4: random amount of stacked slot items is removed with % diminishing return. (example1* below)
option5: slot item will get item:getAttribute(TEXT, "soulbound") instead of remove.
option6: slot item has chance to be removed when item has TEXT "soulbound".
option7: slot item is removed when item has TEXT "soulbound".
option8: leave me nice ordered cap in function, where I can start scripting gem/stone upgrade removals.
feature config:
option1: Do nothing when itemID isInArray(item id array here)
option2: Do nothing when itemID with itemAID is in table = {k = {v}}
option3: attach [1.] config to itemID
option4: attach [1.] config to itemID with itemAID
option5: run custom function to itemID (I will make the custom functions) table = {itemID = functionName} (all custom functions use 2 parameters, itemID and player)
option2: Do nothing when itemID with itemAID is in table = {k = {v}}
option3: attach [1.] config to itemID
option4: attach [1.] config to itemID with itemAID
option5: run custom function to itemID (I will make the custom functions) table = {itemID = functionName} (all custom functions use 2 parameters, itemID and player)
3. Looks trough the equipped bag on player (NB! don't start looping bag into bag. In my server players can't put bag into bag, unless its special type of bag. Which I deal with myself)
feature config:
option1: item is removed.
option2: random amount of stacked item is removed.
option3: random amount of stacked item is removed with % diminishing return. (example1* below)
option4: item is placed on player body instead of removing from game.
option5: item has chance to be removed.
option6: item is removed when item has TEXT "soulbound".
option7: item has chance to be removed when item has TEXT "soulbound".
option8: leave me nice ordered cap in function, where I can start scripting gem/stone upgrade removals.
option2: random amount of stacked item is removed.
option3: random amount of stacked item is removed with % diminishing return. (example1* below)
option4: item is placed on player body instead of removing from game.
option5: item has chance to be removed.
option6: item is removed when item has TEXT "soulbound".
option7: item has chance to be removed when item has TEXT "soulbound".
option8: leave me nice ordered cap in function, where I can start scripting gem/stone upgrade removals.
Example 1 formula:
DR= 10
first removes DR% of stack (math.floor).
then with 100-DR % chance it will decide will it remove DR% again.
Now the chance of removing DR% will be 100-DR*2
unless it doesn't fail.
next chance is 100-DR*3
etc.
prefer this formula with while loop.
Uhm, I guess that is it for now.