Hey there I found an easier way to make token drop I think we can just make it drop by SuperBoss loot pack, and I've added the item in there, and had errors it doesn't work so I wonder how can we add random item that is base on loot pack?

Here is what I did I replace instruments, and then name the item it doesn't work.

new LootPackEntry(false, RewardTicket, 100.00, 1)


Here this is entire thing so you can get an idea.

public static readonly LootPack AosSuperBoss =
new LootPack(
new[]
{
new LootPackEntry(true, Gold, 100.00, "5d100+500"),
new LootPackEntry(false, AosMagicItemsUltraRich, 100.00, 1, 5, 25, 100),
new LootPackEntry(false, AosMagicItemsUltraRich, 100.00, 1, 5, 25, 100),
new LootPackEntry(false, AosMagicItemsUltraRich, 100.00, 1, 5, 25, 100),
new LootPackEntry(false, AosMagicItemsUltraRich, 100.00, 1, 5, 25, 100),
new LootPackEntry(false, AosMagicItemsUltraRich, 100.00, 1, 5, 33, 100),
new LootPackEntry(false, AosMagicItemsUltraRich, 100.00, 1, 5, 33, 100),
new LootPackEntry(false, AosMagicItemsUltraRich, 100.00, 1, 5, 33, 100),
new LootPackEntry(false, AosMagicItemsUltraRich, 100.00, 1, 5, 33, 100),
new LootPackEntry(false, AosMagicItemsUltraRich, 100.00, 1, 5, 50, 100),
new LootPackEntry(false, AosMagicItemsUltraRich, 100.00, 1, 5, 50, 100),
new LootPackEntry(false, Instruments, 2.00, 1)
new LootPackEntry(false, RewardTicket, 100.00, 1)
});


Here is Error that I've gotten

Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
+ Misc/LootPack.cs:
CS1514: Line 138: { expected
CS1525: Line 140: Invalid expression term 'public'
CS1513: Line 140: } expected
CS1513: Line 424: } expected
CS1026: Line 424: ) expected
CS1002: Line 424: ; expected
CS1520: Line 425: Method must have a return type
CS1031: Line 425: Type expected
CS1519: Line 425: Invalid token ',' in class, struct, or interface member declaration
CS0116: Line 426: A namespace cannot directly contain members such as fields or methods
CS1518: Line 430: Expected class, delegate, enum, interface, or struct
CS1518: Line 431: Expected class, delegate, enum, interface, or struct
CS1518: Line 431: Expected class, delegate, enum, interface, or struct
CS1001: Line 431: Identifier expected
CS1518: Line 431: Expected class, delegate, enum, interface, or struct
CS1518: Line 431: Expected class, delegate, enum, interface, or struct
CS1518: Line 431: Expected class, delegate, enum, interface, or struct
CS0116: Line 431: A namespace cannot directly contain members such as fields or methods
CS1518: Line 433: Expected class, delegate, enum, interface, or struct
CS1518: Line 434: Expected class, delegate, enum, interface, or struct
CS1518: Line 435: Expected class, delegate, enum, interface, or struct
CS1001: Line 435: Identifier expected
CS1518: Line 436: Expected class, delegate, enum, interface, or struct
CS1518: Line 437: Expected class, delegate, enum, interface, or struct
CS1518: Line 437: Expected class, delegate, enum, interface, or struct
CS1518: Line 438: Expected class, delegate, enum, interface, or struct
CS1518: Line 439: Expected class, delegate, enum, interface, or struct
CS1022: Line 440: Type or namespace definition, or end-of-file expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
Errors:
+ Misc/LootPack.cs:
CS1514: Line 138: { expected

You're missing or have mismatched curly braces. What do you use to edit your code? You should be using some sort of syntax highlighting editor, and it should show your mismatched quotes. Keep your code indented (indent 1 tab every time you open a code block with {, and go back a tab when you close with }) and you should have an easier time.
 
LOL i forgot to add common, and it work.

Thank you what happen was i copy, and paste, and it needed a common to help make it return for the next one, and I forgot to put a common for return.

Plus I had to add this for it to accept random item.

public static readonly LootPackItem[] RewardTicket = new[] {new LootPackItem(typeof(RewardTicket), 1)};
 
Back