Davaite
Initiate
I've been learning to modify scripts well enough, but some things I just can't get to work.
In this case, I can make a function that can read the Luck from PlayerMobile, but I can't get that to pass to any other functions in a script, and when I try to add the (PlayerMobile whatever) to existing scripts they throw an error.
Take for example the craft satchels from heartwood quests.
It is simple enough to modify it so that Luck/100 % be added to the chance for a recipe, but I can't get it to read from the player inside the function, which for some reason I cannot add parameters to without it breaking, and can't get it to read the value from another function in the script - even set to public.
In this case, I can make a function that can read the Luck from PlayerMobile, but I can't get that to pass to any other functions in a script, and when I try to add the (PlayerMobile whatever) to existing scripts they throw an error.
Take for example the craft satchels from heartwood quests.
Code:
public class FletcherCraftsmanSatchel : BaseCraftsmanSatchel
{
[Constructable]
public FletcherCraftsmanSatchel()
: base()
{
if (this.Items.Count < 2 && 0.5 > Utility.RandomDouble())
this.DropItem(Reward.FletcherRecipe());
if (0.01 > Utility.RandomDouble())
this.DropItem(Reward.FletcherRunic());
}
It is simple enough to modify it so that Luck/100 % be added to the chance for a recipe, but I can't get it to read from the player inside the function, which for some reason I cannot add parameters to without it breaking, and can't get it to read the value from another function in the script - even set to public.
Last edited by a moderator: