ServUO Version
Publish 57
Ultima Expansion
Stygian Abyss
Hi there! Is there a custom script for ServUo to increase skills in pvm with monsters? For example after that the monster deads will drop an item that double-clicked increases skill for a player.
Thank you!
 
It's not custom but that's what a Scroll Of Transcendence does.
ScrollOfTranscendence.cs

They can be set for picking a random skill or a specific one and you can specify how much it will raise the skill
 
Non è una consuetudine, ma è quello che fa una pergamena della trascendenza.
ScrollOfTranscendence.cs

Possono essere impostati per scegliere un'abilità casuale o una specifica e puoi specificare quanto aumenterà l'abilità
Thank you for this advice and for your answer!
Have monsters a grade of difficult in their props?
I would like to link different scrolloftrascendence with the ease/difficulty of monster; otherwise: How I may put scrolloftrascendence as object with xmlspawner? I have tried with orc/add/scrolloftrascendence anatomy 1,0 but does not work unfortunately
 
Last edited:
I think this should work.

This will add the item to the Orc at creation making the item stealable besides being able to be looted on it's death.
C#:
Orc/ADD/<ScrollOfTranscendence,Alchemy,1>

Also, depending on if the version your using has had it removed yet or not you might also be able to use the following instead.
This will give the item to the player that killed the Orc on it's death directly into the players backpack "cannot be stolen from the creature before it's death"
C#:
Orc/ATTACH/<xmldeathaction/action/@GIVE/ScrollOfTranscendence,Alchemy,1>
 
I have a question: if the monster is defeated by party, will the scroll be given to each players?
How I may make this?
 
With xml spawner I'm not sure how to drop the item into everyone's pack at least not without creating your own custom attachment. What I put above will only drop it into the pack of the player that landed the killing blow, if that's working you should be able to use the following to drop it into the creatures corpse instead of the players when it dies:

C#:
Orc/ATTACH/<xmldeathaction/action/@SETONTHIS/ADD/ScrollOfTranscendence,Alchemy,1>

I wasn't sure if xmldeathaction would work on the version your using or not.
 
Ok thanks, I will try with a party. But, may I replace "anatomy" with random skill?An May I replace the increment with random increment with MinMax?
 
Something like:

C#:
Orc/ATTACH/<xmldeathaction/action/@SETONTHIS/ADD/ScrollOfTranscendence/{RNDLIST,Alchemy,Anatomy,Healing,Stealing}/{RND,1,5}>

You can add as many skills to the RNDLIST as you want, its a randomlist it will pick one from the list, the RND its the minmax value, its random too, value goes from 1 to 5.

I dont have my computer here to test, tell me if it works
 
Thanks, unfortunately it does not work but now I am trying to look for a guide for xmlspawner and I will try to fix.
I did not know rndlist and rnd syntax, thanks for this insight
 
C#:
Orc/ATTACH/<xmldeathaction/action/@SETONTHIS/ADD/ScrollOfTranscendence,{RNDLIST,Alchemy,Anatomy,Healing,Stealing{RND,1,5}>
 
This should work:
C#:
Orc/ATTACH/<xmldeathaction/action/@SETONTHIS/ADD/ScrollOfTranscendence,{RNDSTRLIST,Alchemy,Anatomy,Healing,Stealing},{RND,1,5}>
 
Now it work! Thank you!
I have tried also to change in
Orc/ATTACH/<xmldeathaction/action/@GIVE/ScrollOfTranscendence,{RNDSTRLIST,Alchemy,Anatomy,Healing,Stealing},{RND,1,5}
in order to add in backpack. It is ok but how to set for decimal increment? For example from 0.1 to 5.0? Because 0.1 and 0,1 does not work :/
 
RND only works with whole numbers to do from .1 to 5.0 you would have to replace
{RND,1,5}
with
{RNDLIST,0.1,0.2,0.3,0.4,0.5, ect.....}
ect..... would be a continuation all the way up until you reach 5.0
 
I have tried with
Orc/ATTACH/<xmldeathaction/action/@SETONTHIS/ADD/ScrollOfTranscendence,{RNDSTRLIST,Alchemy,Anatomy,Healing,Stealing},{RNDLIST,0.1,0.2,0.3,0.4,0.5}>
for a simple and rapid test but the orc drops only scroll from 1.0 to 5.0
 
Could be from a difference between my installation and yours but it changing 0.1....to 0.5 to numbers 1 to 5 is very odd.

The images below are from me using the following:
C#:
Orc/ATTACH/<xmldeathaction/action/@SETONTHIS/ADD/ScrollOfTranscendence,{RNDSTRLIST,Alchemy,Anatomy,Healing,Stealing},{RNDLIST,0.1,0.2,0.3,0.4,0.5}>
I put 3 of them so you could see the randomness works for me.

1.jpg

2.jpg

3.jpg
 
I have tried both to copy and past this in your last post:

Orc/ATTACH/<xmldeathaction/action/@SETONTHIS/ADD/ScrollOfTranscendence,{RNDSTRLIST,Alchemy,Anatomy,Healing,Stealing},{RNDLIST,0.1,0.2,0.3,0.4,0.5}>

and also with 0.01 to 0.05 but does not work.

I have tried to open [props and change manually "value" in 0.1 (with point ".") but this, after that I have confirmed, is transformed in 1
After if I tray to change in 0,1 (with comma ",") in [props-->value it works. But only from [props

Moreover I have tried even with {RNDLIST,"0,1","0,2","0,3","0,4","0,5"}> but it does not work

Perhaps I have to fix someone in BaseXmlSpawner.cs ?
 
Last edited:
Here are the parts of my BaseXmlSpawner.cs that might be relevant:

C#:
                            else if (kw == valuemodKeyword.RNDLIST || kw == valuemodKeyword.RNDSTRLIST)
                            {
                                // generate a random number and use it as the property value.  Use the format /RNDLIST,val1,val2,.../
                                if (value_keywordargs.Length > 1)
                                {
                                    // compute a random index into the arglist

                                    int randindex = Utility.Random(1, value_keywordargs.Length - 1);

                                    // assign the list entry as the value

                                    string randvalue = value_keywordargs[randindex];

                                    // set the property value
                                    string result = SetPropertyValue(spawner, o, arglist[0], randvalue);

                                    // see if it was successful
                                    if (result != "Property has been set.")
                                    {
                                        status_str = arglist[0] + " : " + result;
                                        no_error = false;
                                    }
                                }
                                else
                                {
                                    status_str = "Invalid " + arglist[0] + " args : " + arglist[1];
                                    no_error = false;
                                }
                                if (arglist.Length < 3) break;
                                remainder = arglist[2];
                            }

and further down:
C#:
                        else if ((kw == valueKeyword.RNDLIST) && arglist.Length > 1)
                        {
                            // syntax is RNDLIST,val1,val2,...

                            ptype = typeof(Int32);

                            // compute a random index into the arglist

                            int randindex = Utility.Random(1, arglist.Length - 1);

                            // return the list entry as the value

                            return arglist[randindex];
                        }
 
Back