Adding to pets stats via deed.

Candy Apple

Squire
Nov 14, 2016
293
26
28
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

Jun 24, 2016
170
40
28
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

Squire
Nov 14, 2016
293
26
28
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

Squire
Nov 14, 2016
293
26
28
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

Squire
Nov 14, 2016
293
26
28
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:
Jun 24, 2016
170
40
28
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

Squire
Nov 14, 2016
293
26
28
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

Squire
Mar 19, 2015
294
69
28
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

Squire
Nov 14, 2016
293
26
28
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

Squire
Nov 14, 2016
293
26
28
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

Squire
Mar 19, 2015
294
69
28
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

Squire
Nov 14, 2016
293
26
28
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

Squire
Mar 19, 2015
294
69
28
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

Squire
Nov 14, 2016
293
26
28
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