HI all, if i want to add a skill to an item, like in this reward sandals from tailoring, if i want the sandals to add +1, +3 or +5 to tailoring skill and want it to be over cap of the 120, how do i do that please ?
Code:
  private static readonly ConstructCallback Sandals = new ConstructCallback(CreateSandals);

  private static readonly int[] m_SandalHues = new int[]
  {
  0x489, 0x47F, 0x482,
  0x47E, 0x48F, 0x494,
  0x484, 0x497
  };
  private static Item CreateSandals(int type)
  {
  return new Sandals(m_SandalHues[Utility.Random(m_SandalHues.Length)]);
  }
 
I am trying actually to add tamers sandals to the reward BOD and i dont know why it say its a 'type' use like a 'variable'

Code:
            RewardCollection.Add(new BODCollectionItem(0x170d, 1157102, 0x170d, 50, TamerSandals, 1));
 

Attachments

  • TamerSandals.cs
    3.3 KB · Views: 7
Do the sandals compile fine with the server before adding as a reward? If it compiles fine now go in-game and say [add TamerSandals

Do they actually create?
 
Do the sandals compile fine with the server before adding as a reward? If it compiles fine now go in-game and say [add TamerSandals

Do they actually create?

Sadly it does not compile, i tried to make it the same than AncientHammer but i dont know why it doesn't want to compile correctly.
Modified it a bit again but this version still not loading.

Code:
------------------------------------------------------------------------------------------------------------------------
ServUO - [https://www.servuo.com] Version 0.5, Build 6552.22931
Core: Optimizing for 4 64-bit processors
RandomImpl: CSPRandom (Software)
Core: Loading config...
Scripts: Compiling C# scripts...Failed with: 1 errors, 1 warnings
Warnings:
+ Services/Revamped Dungeons/Covetous Void Spawn/Creatures/CovetousCreature.cs:
    CS0108: Line 13: 'Server.Mobiles.CovetousCreature.Level' masque le membre hérité 'Server.Mobiles.BaseCreature.Level'. Utilisez le mot clé new si le masquage est intentionnel.
Errors:
+ Items/Equipment/Clothing/TamerSandals.cs:
    CS0115: Line 55: 'Server.Items.TamerSandals.CraftSystem' : aucune méthode appropriée n'a été trouvée pour la substitution
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
Basically it's in french saying "no appropriate method found for the substitution"
 

Attachments

  • TamerSandals.cs
    3.5 KB · Views: 2
Ill fix it. What bonus do you want them to have?
I'd like +1, +3 or +5 to max skill that could go over cap. But the Skill + should be added in Rewards.cs i think like the ancient hammers who you add ...,10 ,15 ,20 at the end of line to add the skill + you want.
 
So this one works fine. The problem will be when you create it you need to define the bonus it will get, in the code.

Example - [add tamersandals 20
[doublepost=1512853710][/doublepost]Look at the BOD system for blacksmith and see how it applies the values.
 

Attachments

  • [ServUO.com]-TamerSandals.cs
    3.2 KB · Views: 6
Code:
                RewardCollection.Add(new BODCollectionItem(0x13C6, 1157086, 0, 100, MiningGloves, 1));
                RewardCollection.Add(new BODCollectionItem(0x13D5, 1157087, 0, 200, MiningGloves, 3));
  				RewardCollection.Add(new BODCollectionItem(0x13EB, 1157088, 0, 450, MiningGloves, 5));
 
Still not loading :(

Code:
------------------------------------------------------------------------------------------------------------------------
ServUO - [https://www.servuo.com] Version 0.5, Build 6552.22931
Core: Optimizing for 4 64-bit processors
RandomImpl: CSPRandom (Software)
Core: Loading config...
Scripts: Compiling C# scripts...Failed with: 1 errors, 1 warnings
Warnings:
+ Services/Revamped Dungeons/Covetous Void Spawn/Creatures/CovetousCreature.cs:
    CS0108: Line 13: 'Server.Mobiles.CovetousCreature.Level' hides inherited member 'Server.Mobiles.BaseCreature.Level'. Use the new keyword if hiding was intended.
Errors:
+ Items/Equipment/Clothing/TamerSandals.cs:
    CS0115: Line 55: 'Server.Items.TamerSandals.CraftSystem': no suitable method found to override
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

My Rewards.cs is here too, if you look at the bottom you will see the Taming region but its not completed at all, I made it from Alchemy and adding rewards when I get them done.
 

Attachments

  • TamerSandals.cs
    3.5 KB · Views: 3
  • Rewards.cs
    93.4 KB · Views: 5
Because you didn't add the TamerSandals.cs file I fixed for you.
 

Attachments

  • [ServUO.com]-TamerSandals.cs
    3.2 KB · Views: 16
Back