ReApEr

Member
I was just curious if it was possible to add a value to a custom item in definscription? The server crashes as its being forced to create the item with no value. (At least that's what i think)

Code:
index = this.AddCraft(typeof(LevelUpScroll), 1044294, ("a wonderous scroll of Leveling +5 max levels"), 115.0, 120.0, typeof(BlankScroll), 1044377, 50, 1044378);
this.AddRes(index, typeof(Gold), ("Gold"), 50000, 1044253);
this.AddRes(index, typeof(ParasiticPlant), ("Parasitic plant"), 50, 1044253);
Now I by no means no what i'm doing, I know i could just create scrolls with values of 5, 10, 15, 20 and 25. But would just make my life easier if i could control the value from within the definscription script.

On a side note, Do you think it would make more sense a blacksmith being able to create the levelupscrolls over the scribe? as I have it only a level 120 blacksmith can use the scrolls.
(The scrolls are the ones for the XML level items)
 
AFAIR these long numbers are defined as TextDefinition, they can be either an int or a string, try putting your custom description over the number position
 
So where the numbers 1044294 that should be replaced with my text input? and where the custom text is currently it should be replaced with the value "5"? I'm not at home right now so can't test but I'll say thanks anyway hah.
 
Take this as an example;


Code:
//Mana Pots
            index = AddCraft(typeof(ShrinkPotion), "Shrink Potion", "Shrink Potion", 100.0, 101.0, typeof(Rootvi), "Vi Roots", 10, "You do not have enough Vi Roots to make that potion..");
            AddRes(index, typeof(Bottle), 1044529, 1, 500315);

In your code 1044294 refers to the Cliloc value if im not mistaken you can replace it with

"Your custom name"
 
He asks to give the scroll the value of 5, as far as I know it is not possible unless the craftingsystem would be modified.

For those who are still not sure. He is asking to feed a value into the constructor on creation.
 
He asks to give the scroll the value of 5, as far as I know it is not possible unless the craftingsystem would be modified.

For those who are still not sure. He is asking to feed a value into the constructor on creation.
Ahh thanks, I guess my description wasn't good enough. My bad. Makes sense now, I'll just create individual scripts for each one i'm adding.

Code:
				//custom add
				 index = this.AddCraft(typeof(levelupscroll5), ("Custom"), ("a wonderous scroll of Leveling +5 max levels"), 119.5, 120.0, typeof(BlankScroll), 1044377, 50, 1044378);
                this.AddRes(index, typeof(Gold), ("Gold"), 50000, 1044253);
                this.AddRes(index, typeof(ParasiticPlant), ("Parasitic plant"), 50, 1044253);
                this.ForceNonExceptional(index);
                this.SetNeededExpansion(index, Expansion.ML);
				
				index = this.AddCraft(typeof(levelupscroll10), ("Custom"), ("a wonderous scroll of Leveling +10 max levels"), 119.5, 120.0, typeof(BlankScroll), 1044377, 100, 1044378);
                this.AddRes(index, typeof(Gold), ("Gold"), 100000, 1044253);
                this.AddRes(index, typeof(ParasiticPlant), ("Parasitic plant"), 100, 1044253);
                this.ForceNonExceptional(index);
                this.SetNeededExpansion(index, Expansion.ML);
				
				index = this.AddCraft(typeof(levelupscroll25), ("Custom"), ("a wonderous scroll of Leveling +25 max levels"), 119.5, 120.0, typeof(BlankScroll), 1044377, 250, 1044378);
                this.AddRes(index, typeof(Gold), ("Gold"), 250000, 1044253);
                this.AddRes(index, typeof(ParasiticPlant), ("Parasitic plant"), 250, 1044253);
                this.ForceNonExceptional(index);
                this.SetNeededExpansion(index, Expansion.ML);
				//custom add end

this works perfectly fine for that. I was just hoping i could have got around it without having to create them.
I'm just too lazy.

Thanks again PyrO for clearing that up.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back