RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Dupre's Token System

Tru

Knight
if you want tokens to spawn as loot on all npcs you have to edit lootpack.cs as was explained previously in this thread (i believe)
 

Rof

Wanderer
Rof said:
Token spells? How exactly to they work, or isn't that implemented as of yet. I love the idea, but I've been unable to get the spellbook to funtion as intended.


Doh, guess I'll have to work on this one myself. Oh darn, more scripting neat additions :cool:
 

Cable454

Wanderer
adding items

Hi there, i love this script, and ive just started using runuo, could someone help me by telling me how to add powerscrolls to the script? this would be really helpful, its late now, ill have a go in the morning, but if anyone can be really nice and tell me what do do i would be very grateful. Thanks alot!
 

dc_halo

Wanderer
uoguy said:
yeah been wondering y he was banned n what makes him a newb?......how do i add creatures with tokens ?! as in spawners? O and Btw to add tokens do [add tokens # (#) for the amount u want or do [add tok to see what other token related items there are
Ok, despite what the late Dupre says, his instructions were not complete to have tokens dropped from each and every monster. Tru is false in telling you that the mods to lootpack.cs are found in this thread, he explains it quite well in another thread entirely (thx Tru). I got it to work quite well by piecing together info from 2 different threads, so here it is (remember to back up your files before you make permanent changes to them).
First, edit scripts/misc/lootpack.cs: find the lines...

private static readonly LootPackItem[] Gold = new LootPackItem[]
{
new LootPackItem( typeof( Gold ), 1 )
};

copy those four lines and paste them underneath. Change "Gold" on both lines to "Tokens" (must be plural, with the "s"). Should look like so:

private static readonly LootPackItem[] Gold = new LootPackItem[]
{
new LootPackItem( typeof( Gold ), 1 )
};

private static readonly LootPackItem[] Tokens = new LootPackItem[]
{
new LootPackItem( typeof( Tokens ), 1 )
};

Next, find the lines:

public static readonly LootPack AosPoor = new LootPack( new LootPackEntry[]
{
new LootPackEntry( true, Gold, 100.00, "1d10+10" ),
new LootPackEntry( false, MagicItems, 0.02, 1, 5, 0, 90 ),
new LootPackEntry( false, Instruments, 0.02, 1 )
} );
These are definitions of different loot templates. The above clip is the definition for AOSPoor loot type. Copy and paste the following line underneath itself:

new LootPackEntry( true, Gold, 100.00, "1d10+10" ),

Change "Gold" to "Tokens" in the copied line. Do this to every definition in lootpack.cs (or at least the loot types you want dropping tokens). You can also modify the chance and ammount of tokens dropped by changing the numbers in the line. By using the above line as an example, the 100.00 is the % chance that a monster will have tokens when spawned and the 1d10+10 is the ammount (1d10=1-10, +10. So the actual range is 11-21).
Next, Dupre coded the tokens themselves to be blesed, so when you kill the monster carrying the tokens you won't see them drop. Lets fix that. Edit token.cs, look for the line:

LootType = LootType.Blessed;

Find it, highlight it and delete it.
These steps should allow you to see tokens on all monsters that should have them. Test it by simply adding a monster and killing it ([add "monstername"). Existing spawn won't have tokens until respawned.

Thanks to Tru and a couple others for the info in other threads (cant remember nicknames offhand)
 
Cable454 said:
Hi there, i love this script, and ive just started using runuo, could someone help me by telling me how to add powerscrolls to the script? this would be really helpful, its late now, ill have a go in the morning, but if anyone can be really nice and tell me what do do i would be very grateful. Thanks alot!


To add PowerScrolls you use:

Code:
AddItem(new PowerScroll( SkillName.Anatomy, 120 ) );

Change the skill name (in this example it is Anatomy) to whatever skill you want the scroll to be. Change the number (in this example it is 120) to whatever number power scroll you want, 105, 110, 115 or 120.

One note:

Make sure you spell the skill name right. To get a full list of each skill spelling when it comes to the PowerScrolls check out the file PowerScroll.cs. This will list all the skill names and the correct spelling for the PowerScroll.

Hope that helps!

Abaddon Knight
 

titan0051

Wanderer
Help please

I have had this problem as well, and i have seen 2 other people post the same problem, and no replys, so i will post it again.

Error:
the name 'm' doesnt exist in class or namespace 'server.mobiles.basecreatures'

Assistance Please.
 
Did you change your basecreature file with Dupre's? Or did you try to just add code to yours?

If you added code to yours, post the code you added. I need more info before I can even begin to try to answer that error.

Abaddon Knight
 

titan0051

Wanderer
I added his in. Does his include the code for tokens spawning on all monsters? or do i have to put that in his playermobile.cs?

I have a few scripts and havent altered the playermobile.cs as far as i know, so i replaced it with his, and the code for tokens to spawn on all monsters was not there, so i added it, and thats the error that came up.
 
Nce Script

Hay i liek teh script but ive looked every whear to find out whear to make them all spawn tokens but can not fint it can you send me a file or some thing whear i can find it or a file that all ready has it in it and ready to be put in my script folders and such plz let me know think you and have a nice day
 

Tru

Knight
It really REALLY helps to read the whole thread before you start asking questions that have been answered over and over and OVER
 
sorry

sorry i cant read and under stand much most people when thay do a script i can under stand that but ? and then answer is a bit harder becuse thers so many but next time i will try to look further adn read more befor i make a reposince to a ? think you for your hwlp
 

airwalk

Wanderer
dc_halo said:
Ok, despite what the late Dupre says, his instructions were not complete to have tokens dropped from each and every monster. Tru is false in telling you that the mods to lootpack.cs are found in this thread, he explains it quite well in another thread entirely (thx Tru). I got it to work quite well by piecing together info from 2 different threads, so here it is (remember to back up your files before you make permanent changes to them).
First, edit scripts/misc/lootpack.cs: find the lines...

private static readonly LootPackItem[] Gold = new LootPackItem[]
{
new LootPackItem( typeof( Gold ), 1 )
};

copy those four lines and paste them underneath. Change "Gold" on both lines to "Tokens" (must be plural, with the "s"). Should look like so:

private static readonly LootPackItem[] Gold = new LootPackItem[]
{
new LootPackItem( typeof( Gold ), 1 )
};

private static readonly LootPackItem[] Tokens = new LootPackItem[]
{
new LootPackItem( typeof( Tokens ), 1 )
};

Next, find the lines:

public static readonly LootPack AosPoor = new LootPack( new LootPackEntry[]
{
new LootPackEntry( true, Gold, 100.00, "1d10+10" ),
new LootPackEntry( false, MagicItems, 0.02, 1, 5, 0, 90 ),
new LootPackEntry( false, Instruments, 0.02, 1 )
} );
These are definitions of different loot templates. The above clip is the definition for AOSPoor loot type. Copy and paste the following line underneath itself:

new LootPackEntry( true, Gold, 100.00, "1d10+10" ),

Change "Gold" to "Tokens" in the copied line. Do this to every definition in lootpack.cs (or at least the loot types you want dropping tokens). You can also modify the chance and ammount of tokens dropped by changing the numbers in the line. By using the above line as an example, the 100.00 is the % chance that a monster will have tokens when spawned and the 1d10+10 is the ammount (1d10=1-10, +10. So the actual range is 11-21).
Next, Dupre coded the tokens themselves to be blesed, so when you kill the monster carrying the tokens you won't see them drop. Lets fix that. Edit token.cs, look for the line:

LootType = LootType.Blessed;

Find it, highlight it and delete it.
These steps should allow you to see tokens on all monsters that should have them. Test it by simply adding a monster and killing it ([add "monstername"). Existing spawn won't have tokens until respawned.

Thanks to Tru and a couple others for the info in other threads (cant remember nicknames offhand)

I Have Token in all LOOT , but, when i kill this monster, the token has deleted? WHY? :S
 

Rob24

Sorceror
Good Job But You Have A Bug On Your Lil System Here

your token system have a bug on it when someone get lote of token's and like to get a

"SKILLBALL"

For a reward and they have skills now but not max skills the "SKILLBALL" dont show no skills on the "SKILLBALL" can you plz fix your lil system so no one else bug the shit out of you of this and plz can you fix my so Players stop buging me of the "SKILLBALL" ty for your hard work on this system plz test your work ty
 

Protius73

Sorceror
Hye man nice setup i like the script... works well... i customized the rewards for them and everything... was wondering if you got any word on when the spellbook will be done?? Im liking the spellbook but anxious to try out the spells and test them ... any ideas on an eta?? thx for the hard work man you made my shard a bit nicer for the players... gives them something to strive for hehe
 
Top