Adding to pets stats via deed.

Candy Apple

Well-Known Member
Nov 14, 2016
292
26
45
Im trying to make a deed that will add say 5 points to all these attributes to a pet. Hits, Stamina, Mana, Strength, Dexterity and Intellignce. So far I got one working and is attached, however since all are not maxseed in the props I'm unsure where to find the right wording for the rest :( any help with the correct words or a deed that will apply all of the attributes would be awesome. Thanks again for all the support :)
 

Attachments

Anon the Felon

Well-Known Member
Jun 24, 2016
166
39
34
C#:
m.SetHits ((m.HitsMax + (Utility.RandomMinMax (25, 50))));
m.SetStam ((m.StamMax + (Utility.RandomMinMax (25, 50))));
m.SetMana ((m.ManaMax + (Utility.RandomMinMax (25, 50))));
The above code will take m, which must be a mobile, and add 25-50 to the max values of each core stat.
 

Candy Apple

Well-Known Member
Nov 14, 2016
292
26
45
C#:
m.SetHits ((m.HitsMax + (Utility.RandomMinMax (25, 50))));
m.SetStam ((m.StamMax + (Utility.RandomMinMax (25, 50))));
m.SetMana ((m.ManaMax + (Utility.RandomMinMax (25, 50))));
The above code will take m, which must be a mobile, and add 25-50 to the max values of each core stat.
Im not a great scripter so im not to sure where to replace this in the deed?
 

Candy Apple

Well-Known Member
Nov 14, 2016
292
26
45
C#:
m.SetHits ((m.HitsMax + (Utility.RandomMinMax (25, 50))));
m.SetStam ((m.StamMax + (Utility.RandomMinMax (25, 50))));
m.SetMana ((m.ManaMax + (Utility.RandomMinMax (25, 50))));
The above code will take m, which must be a mobile, and add 25-50 to the max values of each core stat.
This is for only 3 of the attributes I didn't get the other 3. I am not sure how to even Script this deed. I only have the Above attachement working and I did not make that..
Post automatically merged:

This is for only 3 of the attributes I didn't get the other 3. I am not sure how to even Script this deed. I only have the Above attachement working and I did not make that..
This is what I did and got this.


Errors:
+ Custom/Loose scripts/PetMaxHitsDeed1000.cs:
CS0103: Line 84: The name 'm' does not exist in the current context
CS0103: Line 84: The name 'm' does not exist in the current context
CS0103: Line 85: The name 'm' does not exist in the current context
CS0103: Line 85: The name 'm' does not exist in the current context
CS0103: Line 86: The name 'm' does not exist in the current context
CS0103: Line 86: The name 'm' does not exist in the current context
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 

Attachments

Last edited:

Candy Apple

Well-Known Member
Nov 14, 2016
292
26
45
This should do it.
I did not get any errors and want to thank you for your time in this :)
Post automatically merged:

I did not get any errors and want to thank you for your time in this :)
Hate to bother you with this but is there a way that it could be set so they can only say apply no more than 5 deeds to the pet???
 
Last edited:

Anon the Felon

Well-Known Member
Jun 24, 2016
166
39
34
Open the script Visam kindly wrote for you, and change:
C#:
bc.SetHits ((bc.HitsMax + (Utility.RandomMinMax (25, 25))));
bc.SetStam ((bc.StamMax + (Utility.RandomMinMax (25, 25))));
bc.SetMana ((bc.ManaMax + (Utility.RandomMinMax (25, 25))));
to

C#:
bc.SetHits (bc.HitsMax + 5);
bc.SetStam (bc.StamMax + 5);
bc.SetMana (bc.ManaMax + 5);
 

Candy Apple

Well-Known Member
Nov 14, 2016
292
26
45
Open the script Visam kindly wrote for you, and change:
C#:
bc.SetHits ((bc.HitsMax + (Utility.RandomMinMax (25, 25))));
bc.SetStam ((bc.StamMax + (Utility.RandomMinMax (25, 25))));
bc.SetMana ((bc.ManaMax + (Utility.RandomMinMax (25, 25))));
to

C#:
bc.SetHits (bc.HitsMax + 5);
bc.SetStam (bc.StamMax + 5);
bc.SetMana (bc.ManaMax + 5);
Yes I got that part but they can use as many deeds as they want. I was trying to see about say they can only apply that deed 10x and then no more.
 

Visam

Well-Known Member
Mar 19, 2015
277
55
47
This should do it for you. I gave it an xml attachment that will be added to any pet it's been used on holding the total number of times it's had a stat deed used on it.
It's currently set to stop at 5. If you want more/less I marked the spot in the script with a comment on line 92
 

Attachments

Candy Apple

Well-Known Member
Nov 14, 2016
292
26
45
This should do it for you. I gave it an xml attachment that will be added to any pet it's been used on holding the total number of times it's had a stat deed used on it.
It's currently set to stop at 5. If you want more/less I marked the spot in the script with a comment on line 92
You rock man thanks so much :) Have a awesome weekend
 

Candy Apple

Well-Known Member
Nov 14, 2016
292
26
45
This should do it for you. I gave it an xml attachment that will be added to any pet it's been used on holding the total number of times it's had a stat deed used on it.
It's currently set to stop at 5. If you want more/less I marked the spot in the script with a comment on line 92
Ok I had a idea lol and Im still learning here. I was thinking a deed that would add say 100 to magery and resisting spells But a one time apply the deed and still allow the pet to get to say 110 or 120 maybe even a deed one time apply for 120 in both? how would I go about that and could I use what you made for me and just change the Stats to the two I said above??
 

Visam

Well-Known Member
Mar 19, 2015
277
55
47
you would need to change:
3 spots that say "PetMaxStatDeedsUsed" to something like "PetMaxMageryDeedUsed"

line 92 to 1 instead of 5

replace the stat mods:
bc.SetHits ((bc.HitsMax + (Utility.RandomMinMax (25, 25)))); //The numbers here can have a minimum, maximum
bc.SetStam ((bc.StamMax + (Utility.RandomMinMax (25, 25)))); //In case you want to randomize it some
bc.SetMana ((bc.ManaMax + (Utility.RandomMinMax (25, 25))));

with:
bc.Skills.Magery.Cap = 120;
and same for any other skills you want

You'd also need to change the names and messages.
 

Candy Apple

Well-Known Member
Nov 14, 2016
292
26
45
you would need to change:
3 spots that say "PetMaxStatDeedsUsed" to something like "PetMaxMageryDeedUsed"

line 92 to 1 instead of 5

replace the stat mods:
bc.SetHits ((bc.HitsMax + (Utility.RandomMinMax (25, 25)))); //The numbers here can have a minimum, maximum
bc.SetStam ((bc.StamMax + (Utility.RandomMinMax (25, 25)))); //In case you want to randomize it some
bc.SetMana ((bc.ManaMax + (Utility.RandomMinMax (25, 25))));

with:
bc.Skills.Magery.Cap = 120;
and same for any other skills you want

You'd also need to change the names and messages.
Ok this is what I made but it didn't set the 2 skills to 100. What did I do wrong here?
 

Attachments

Visam

Well-Known Member
Mar 19, 2015
277
55
47
this sets the maximum the skill can go up to
bc.Skills.Magery.Cap = 120;

this sets the skill to a set value
bc.SetSkill(SkillName.Magery, 120);
 

Candy Apple

Well-Known Member
Nov 14, 2016
292
26
45
this sets the maximum the skill can go up to
bc.Skills.Magery.Cap = 120;

this sets the skill to a set value
bc.SetSkill(SkillName.Magery, 120);
Ok thanks I think I got this :) and thanks for your time again