UOGamers 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!

  • To obtain new Razor updates, please reinstall Razor from our new website.

[SVN] Scroll of Transcendence

Status
Not open for further replies.

Kiluad

Sorceror
Re: [Testing Needed] Scroll of Transcendence

Kiluad;579021 said:
And yeah, but that's how champ spawns work, anything that wanders in gets counted for the spawn.

should correct that, that's not how they work, they work based on anything that's spawned in the area getting killed.

should further express that's not how they work in RunUO.
 
Re: [Testing Needed] Scroll of Transcendence

Kiluad;579660 said:
should correct that, that's not how they work, they work based on anything that's spawned in the area getting killed.

should further express that's not how they work in RunUO.


Ok BaseCreature edit was removed. Moved it to ChampionSpawn.cs file.

I have attached it for those who are developing it or not to have a look to see what was done.

I have tested it and you do receive them (Transcendence and 105 Power Scrolls) whether you kill or your pet kills the creatures.

it is in .doc format but just remove the .doc at the end for regular cs file.
 

Attachments

  • ChampionSpawn.cs.doc
    44.5 KB · Views: 2
Re: [Testing Needed] Scroll of Transcendence

Well I guess if I read the first post again I would of seen you already done that.

Only problem with the code is that you only get the SoT's from Felucca, Ilshenar or the Tokuno Islands. Which I forgot to add in the Tokuno map as well.

The way you have it you get them from Malas also. Which would be the Pestilence spawn in Bedlam. According to UOGuide which may not be accurate either. You don't just the ones listed above.
 

Kiluad

Sorceror
Re: [Testing Needed] Scroll of Transcendence

Callandor2k;579673 said:
Well I guess if I read the first post again I would of seen you already done that.

Only problem with the code is that you only get the SoT's from Felucca, Ilshenar or the Tokuno Islands. Which I forgot to add in the Tokuno map as well.

The way you have it you get them from Malas also. Which would be the Pestilence spawn in Bedlam. According to UOGuide which may not be accurate either. You don't just the ones listed above.

Now that's foresight.

&& Map != Map.Malas should work, should it not, to the tram drop if statement. I'll add it now.

maybe those thick If statements should be slimmed down a bit though..
 
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

Callandor2k;579360 said:
You are correct that they are no longer obtainable on OSI. But you know how OSI is. You never know when they will bring them back.

Those quests you see in the file are a part of MalGanis ML package. They are there for compatability reasons for that system. As you are not supposed to be able to use a Soul Stone or Transcendence Scroll while under the effects of the Scroll of Alacrity. Also some of the New Haven quests are advanced skill gain type quests, and the quest files have an edit in them so you cannot use the alacrity scrolls while having the quests. And vice versa as well.

After all the Virtue armor was originally obtained through Special tokens. But since have been either added to the Virtue Artifact Drop system or through a quest.

I see. Well, so for RunUO all that's needed is the item itself and functionality. Plus those warnings about soulstone, SoT...

Since there are still no ML quests in RunUO base, I think we can jump the part about quests now. Just I'll write somewhere to remember to add it as quests will be implemented.

It's a bit a mayhem to find the code in those files you have published... after all, you know that part of code, you written it :)

Would you mind, if it's possible for you, to prepare and post a diff for scrolls of alacrity based on the last RunUO SVN? (you can do it tomorrow, when the repository will be updated)
Thank you! ;)
 

Gisela

Bug Hunter
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

You also need to include some kind of license like the GPL in this code; otherwise it's illegal for others to use it.
 
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

Gisela;579813 said:
You also need to include some kind of license like the GPL in this code; otherwise it's illegal for others to use it.

looks funny but it's a real bug: we should speak to Mark about. Scripts outside core are not covered by GPL :/
 
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

I am unsure of how to make a diff file the way you guys are doing it. So I used Winmerge to create a patch file. here are all the patch files that are needed.

I removed the references to the Transcendence Scroll and to MalGanis Quest systems as well.

These files are compared to the current SVN 337.

I hope this helps.

{edit} Figured the diff file out. I'll post them in a moment when I get them done.
 
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

Ok here are the diff files.....

I think that's all of em.


The Transcendence Scroll should have these edits in it for the Scroll of Alacrity....

Code:
                if (firstStage)
                {
                    from.CloseGump(typeof(StatCapScroll.InternalGump));
                    from.CloseGump(typeof(PowerScroll.InternalGump));
                    from.CloseGump(typeof(ScrollofTranscendence.InternalGump));
                    from.CloseGump(typeof(ScrollofAlacrity.InternalGump));
                    from.SendGump(new InternalGump(from, this));
                }
and also....

Code:
                    double tskill = from.Skills[m_Skill].Base;
                    double tcap = from.Skills[m_Skill].Cap;
                    bool canGain = true;
                    PlayerMobile pm = from as PlayerMobile;

                    if (tskill >= tcap || from.Skills[m_Skill].Lock == SkillLock.Locked || from.Skills[m_Skill].Lock == SkillLock.Down)
                    {
                        from.SendLocalizedMessage(1094935); /*You cannot increase this skill at this time. The skill may be locked or set to lower in your skill menu.
                                                             *If you are at your total skill cap, you must use a Powerscroll to increase your current skill cap.*/
                        return;
                    }
                    #region Acroll of Alacrity
                    else if (pm.AcceleratedStart > DateTime.Now)
                    {
                        from.SendLocalizedMessage(1077951); // You are already under the effect of an accelerated skillgain scroll.
                        return;
                    }
                    #endregion
                    if ((tskill + m_Value) > tcap)
                        m_Value = tcap - tskill;
And then for the Alacrity Scroll edits for the Transcendence scrolls should only be this....

Code:
                if (firstStage)
                {
                    from.CloseGump(typeof(StatCapScroll.InternalGump));
                    from.CloseGump(typeof(PowerScroll.InternalGump));
                    #region Scroll of Transcendence
                    from.CloseGump(typeof(ScrollofTranscendence.InternalGump));
                    #endregion
                    from.CloseGump(typeof(ScrollofAlacrity.InternalGump));
                    from.SendGump(new InternalGump(from, this));
                }

If you really need something relating to GPL in order to use it.....

Code:
/***************************************************************************
 *                            ScrollofTranscendence.cs
 *                            -------------------
 *   begin                : June 1, 2009
 *   copyright            : (C) Shai'Tan Malkier aka Callandor2k
 *   email                : [email protected]
 *
 *   $Id: ScrollofTranscendence.cs 1 2009-06-1 04:28:39Z Callandor2k $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This Script/File is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/
 

Attachments

  • StatScroll.diff
    830 bytes · Views: 1
  • SoulStone.diff
    2.2 KB · Views: 0
  • SkillCheck.diff
    679 bytes · Views: 0
  • PowerScroll.diff
    805 bytes · Views: 1
  • PlayerMobile.diff
    1.2 KB · Views: 1
  • All in one patch.diff
    5.9 KB · Views: 5
Re: [Testing Needed] Scroll of Transcendence

Kiluad;579749 said:
Now that's foresight.

&& Map != Map.Malas should work, should it not, to the tram drop if statement. I'll add it now.

maybe those thick If statements should be slimmed down a bit though..


Why not do something like this.....

Code:
                        if (Core.Expansion >= Expansion.ML) // Or something similar.  Just incase of future expansion
                        {
                            if (Map == Map.Felucca)
                            {
                                if (Utility.RandomDouble() < 0.001)
                                {
                                    double random = Utility.Random(49);

                                    if (random <= 24)
                                    {
                                        killer.SendLocalizedMessage(1094936); // You have received a Scroll of Transcendence!
                                        ScrollofTranscendence SoTF = CreateRandomFelSoT();
                                        killer.AddToBackpack(SoTF);
                                    }
                                    else
                                    {
                                        killer.SendLocalizedMessage(1049524); // You have received a scroll of power!
                                        PowerScroll PS = CreateRandomFelPS();
                                        killer.AddToBackpack(PS);
                                    }
                                }
                            }

                            if (Map == Map.Ilshenar || Map == Map.Tokuno)
                            {
                                if (Utility.RandomDouble() < 0.001)
                                {
                                    killer.SendLocalizedMessage(1094936); // You have received a Scroll of Transcendence!
                                    ScrollofTranscendence SoTT = CreateRandomTramSoT();
                                    killer.AddToBackpack(SoTT);
                                }
                            }
                        }
btw. I changed the random to .001 because I went through a champ last night and got 12 scrolls with the other way I was doing it. with .001 I got at most 6. May still need tweaked a little bit though.
 

uome

Bug Hunter
Re: [Testing Needed] Scroll of Transcendence

0.001 sound a lot more realistic based on any documents/reports i have seen and the previous testing i had done on the first version.

Has the version in the op been eddited yet to slim down the if statements and to add the Malas map?
Let me know when it has and you cosider it ready for testing, then i will do my best to try and break it for you and get back a report detailing any issues. :D

Thanks.
 
Re: [Testing Needed] Scroll of Transcendence

uome;580740 said:
0.001 sound a lot more realistic based on any documents/reports i have seen and the previous testing i had done on the first version.

Has the version in the op been eddited yet to slim down the if statements and to add the Malas map?
Let me know when it has and you cosider it ready for testing, then i will do my best to try and break it for you and get back a report detailing any issues. :D

Thanks.


I don't know what is going on with it. All I know is that I submitted the files and info and the rest is all in the hands of who ever is working on it to verify. Y'all know more than I do on what's going on with it.
 
Re: [Testing Needed] Scroll of Transcendence

If anyone is willing to test it and consider uploading to SVN. Here is what I have got.

Code:
            m_HasBeenAdvanced = false;

            Start();
        }

        private ScrollofTranscendence CreateRandomTramSoT()
        {
            int level;
            double random = Utility.RandomDouble();

            if (0.2 >= random)
                level = 5;
            else if (0.4 >= random)
                level = 4;
            else if (0.6 >= random)
                level = 3;
            else if (0.8 >= random)
                level = 2;
            else
                level = 1;

            return ScrollofTranscendence.CreateRandom(level, level);

        }

        private ScrollofTranscendence CreateRandomFelSoT()
        {
            int level;
            double random = Utility.RandomDouble();

            if (0.2 >= random)
                level = 10;
            else if (0.4 >= random)
                level = 9;
            else if (0.6 >= random)
                level = 8;
            else if (0.8 >= random)
                level = 7;
            else
                level = 6;

            return ScrollofTranscendence.CreateRandom(level, level);

        }

        private PowerScroll CreateRandomFelPS()
        {
            return PowerScroll.CreateRandomNoCraft(5, 5);
        }

        public void OnSlice()
        {

Code:
                        if( killer is BaseCreature )
                            killer = ((BaseCreature)killer).GetMaster();

                        if (Core.Expansion >= Expansion.ML) // Or something similar.  Just incase of future expansion
                        {
                            if (Map == Map.Felucca)
                            {
                                if (Utility.RandomDouble() < 0.001)
                                {
                                    double random = Utility.Random(49);

                                    if (random <= 24)
                                    {
                                        killer.SendLocalizedMessage(1094936); // You have received a Scroll of Transcendence!
                                        ScrollofTranscendence SoTF = CreateRandomFelSoT();
                                        killer.AddToBackpack(SoTF);
                                    }
                                    else
                                    {
                                        killer.SendLocalizedMessage(1049524); // You have received a scroll of power!
                                        PowerScroll PS = CreateRandomFelPS();
                                        killer.AddToBackpack(PS);
                                    }
                                }
                            }

                            if (Map == Map.Ilshenar || Map == Map.Tokuno)
                            {
                                if (Utility.RandomDouble() < 0.001)
                                {
                                    killer.SendLocalizedMessage(1094936); // You have received a Scroll of Transcendence!
                                    ScrollofTranscendence SoTT = CreateRandomTramSoT();
                                    killer.AddToBackpack(SoTT);
                                }
                            }
                        }

                        if( killer is PlayerMobile )
                        {
                            int mobSubLevel = GetSubLevelFor( m ) + 1;

Edits are still located in the Scroll of Transcendence file for the Scroll of Alacrity so if you don't have it you can just remove those regions. There are 4 of them and each one is marked with region code.

The diff file has the ChampionSpawn.cs, PowerScroll.cs and StatScroll.cs file edits in it.

Enjoy and I hope something comes of it.
 

Attachments

  • Scroll of Transcendence.diff
    5 KB · Views: 2
  • ScrollofTranscendence.cs.txt
    11.4 KB · Views: 2
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

Well any word on whether or not it can be used or not? I noticed no one has downloaded the files that was asked for. So I figured it was a dead subject since an official RunUO scripter didn't write it.
 
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

Callandor2k;581028 said:
Well any word on whether or not it can be used or not? I noticed no one has downloaded the files that was asked for. So I figured it was a dead subject since an official RunUO scripter didn't write it.

Yes, sorry about that, I got RL duties + other patches to test :eek:

I'll have a look on yours as I have some time ;)
 
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

I have tested it for a while. I had to take your scrollsofalacrity.cs from the rar archive because it wasn't contained in diffs :p

Looks like it's ok. The only doubt I could have is if in OSI every gain is multiplied by a random number between 2 and 5 (as you did) or if the multiplier is pre-determined.
Although, I believe discovering it will be hard, since they last only 15 minutes and, with the OSI GGS, you'll see only 1 gain in that period.

I attach the patch for it against RunUO SVN 339, and I consider this as ready to be considered in the next RC patch.
Little modifications I have done:
- commented out parts of ScrollofAlacrity.cs about skillgain quests and scrolls of trascendence, with a note "to uncomment when they will be implemtented"
- put a GPL license with your name on the new scriptfile. I have hypotized this project started the same day of scroll of trascendence. You know, prudence is mother of all of virtues... :) Tell me if it's OK or some changes should be done
- ah... removed all of those nasty space lines and converted them in tabs. It helps really much in order and in merging ;)

P.S. I use WinMerge too, but to create patches I suggest you TortoiseSVN, it's a great tool to prepare patches to include multiple and added files.

P.P.S. In this part of ScrollofAlacrity.cs:
Code:
        private static SkillName[] m_Skills = new SkillName[]
            {
                SkillName.Alchemy,
                SkillName.Anatomy,
                SkillName.AnimalLore,
                SkillName.ItemID,
                SkillName.ArmsLore,
                SkillName.Parry,
                SkillName.Begging,
                SkillName.Blacksmith,
                SkillName.Fletching,
                SkillName.Peacemaking,
                SkillName.Camping,
                SkillName.Carpentry,
                SkillName.Cartography,
                SkillName.Cooking,
                SkillName.DetectHidden,
                SkillName.Discordance,
                SkillName.EvalInt,
                SkillName.Healing,
                SkillName.Fishing,
                SkillName.Forensics,
                SkillName.Herding,
                SkillName.Hiding,
                SkillName.Provocation,
                SkillName.Inscribe,
                SkillName.Lockpicking,
                SkillName.Magery,
                SkillName.MagicResist,
                SkillName.Tactics,
                SkillName.Snooping,
                SkillName.Musicianship,
                SkillName.Poisoning,
                SkillName.Archery,
                SkillName.SpiritSpeak,
                SkillName.Stealing,
                SkillName.Tailoring,
                SkillName.AnimalTaming,
                SkillName.TasteID,
                SkillName.Tinkering,
                SkillName.Tracking,
                SkillName.Veterinary,
                SkillName.Swords,
                SkillName.Macing,
                SkillName.Fencing,
                SkillName.Wrestling,
                SkillName.Lumberjacking,
                SkillName.Mining,
                SkillName.Meditation,
                SkillName.Stealth,
                SkillName.RemoveTrap,
                SkillName.Necromancy,
                SkillName.Focus,
                SkillName.Chivalry,
                SkillName.Bushido,
                SkillName.Ninjitsu,
                SkillName.Spellweaving
            };
Is there a particular criteria about the order? Or they could be sort alphabetically?
 

Attachments

  • alacrity.diff
    14.2 KB · Views: 9

uome

Bug Hunter
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

Callandor2k;581028 said:
Well any word on whether or not it can be used or not? I noticed no one has downloaded the files that was asked for. So I figured it was a dead subject since an official RunUO scripter didn't write it.
If there is any word from staf saying there is a chance they will be used then i will get on and test it, but untill then i'm affraid i'll have to leave it due to the sheer volume of stuff i have to test, sorry :(

I wouldn't worry about the fact that an officail runuo scripter didn't write it, if it is accurate to osi and usefull to runuo, tested hard and the code is sound then i don't see why it wouldn't go in.
Keep at it, we realy apprectaite your contributions.
 
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

uome;581172 said:
I wouldn't worry about the fact that an officail runuo scripter didn't write it, if it is accurate to osi and usefull to runuo, tested hard and the code is sound then i don't see why it wouldn't go in.
Keep at it, we realy apprectaite your contributions.

Not to mention no one here, apart Mark that atm merges and correct what we do, is an official RunUO coder... and neither an official Demise coder :p
So we are really glad if you will continue helping us :)
Have you already had a look in the Bugfix Thread index? There are lots of things we can't figure at the moment how to resolve. Do you think you can give us a hand about?
Thank you :)
 
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

osd_daedalus;581096 said:
Yes, sorry about that, I got RL duties + other patches to test :eek:

I'll have a look on yours as I have some time ;)

Ya I know. Was just giving everyone a hard time. I have a family myself so I know how it goes.

osd_daedalus;581143 said:
I have tested it for a while. I had to take your scrollsofalacrity.cs from the rar archive because it wasn't contained in diffs :p

Looks like it's ok. The only doubt I could have is if in OSI every gain is multiplied by a random number between 2 and 5 (as you did) or if the multiplier is pre-determined.
Although, I believe discovering it will be hard, since they last only 15 minutes and, with the OSI GGS, you'll see only 1 gain in that period.

I attach the patch for it against RunUO SVN 339, and I consider this as ready to be considered in the next RC patch.
Little modifications I have done:
- commented out parts of ScrollofAlacrity.cs about skillgain quests and scrolls of trascendence, with a note "to uncomment when they will be implemtented"
- put a GPL license with your name on the new scriptfile. I have hypotized this project started the same day of scroll of trascendence. You know, prudence is mother of all of virtues... :) Tell me if it's OK or some changes should be done
- ah... removed all of those nasty space lines and converted them in tabs. It helps really much in order and in merging ;)

P.S. I use WinMerge too, but to create patches I suggest you TortoiseSVN, it's a great tool to prepare patches to include multiple and added files.

P.P.S. In this part of ScrollofAlacrity.cs:
Code:
        private static SkillName[] m_Skills = new SkillName[]
            {
                SkillName.Alchemy,
                SkillName.Anatomy,
                SkillName.AnimalLore,
                SkillName.ItemID,
                SkillName.ArmsLore,
                SkillName.Parry,
                SkillName.Begging,
                SkillName.Blacksmith,
                SkillName.Fletching,
                SkillName.Peacemaking,
                SkillName.Camping,
                SkillName.Carpentry,
                SkillName.Cartography,
                SkillName.Cooking,
                SkillName.DetectHidden,
                SkillName.Discordance,
                SkillName.EvalInt,
                SkillName.Healing,
                SkillName.Fishing,
                SkillName.Forensics,
                SkillName.Herding,
                SkillName.Hiding,
                SkillName.Provocation,
                SkillName.Inscribe,
                SkillName.Lockpicking,
                SkillName.Magery,
                SkillName.MagicResist,
                SkillName.Tactics,
                SkillName.Snooping,
                SkillName.Musicianship,
                SkillName.Poisoning,
                SkillName.Archery,
                SkillName.SpiritSpeak,
                SkillName.Stealing,
                SkillName.Tailoring,
                SkillName.AnimalTaming,
                SkillName.TasteID,
                SkillName.Tinkering,
                SkillName.Tracking,
                SkillName.Veterinary,
                SkillName.Swords,
                SkillName.Macing,
                SkillName.Fencing,
                SkillName.Wrestling,
                SkillName.Lumberjacking,
                SkillName.Mining,
                SkillName.Meditation,
                SkillName.Stealth,
                SkillName.RemoveTrap,
                SkillName.Necromancy,
                SkillName.Focus,
                SkillName.Chivalry,
                SkillName.Bushido,
                SkillName.Ninjitsu,
                SkillName.Spellweaving
            };
Is there a particular criteria about the order? Or they could be sort alphabetically?

Ya the 2, 5 is as it should be. it's a random 0.2 - 0.5 gain. as per UOGuide
"A Scroll of Alacrity is used by double-clicking whereupon a dialog box will appear prompting the character for confirmation. When confirmed, the character immediately begins a 15 minute period of enhanced skillgain during which if they would normally gain .1, they will gain .2 to .5 points in that skill. The effect only lasts 15 minutes and expires even if the character logs out, dies or loses connection. "

Ya I figured out how to use TortoiseSVN to make a diff file. And as far as alphabetized skills. I don't see where that is really that important since it is gonna be a random skill anyway. But I guess for professionalism it should be.

uome;581172 said:
If there is any word from staf saying there is a chance they will be used then i will get on and test it, but untill then i'm affraid i'll have to leave it due to the sheer volume of stuff i have to test, sorry :(

I wouldn't worry about the fact that an officail runuo scripter didn't write it, if it is accurate to osi and usefull to runuo, tested hard and the code is sound then i don't see why it wouldn't go in.
Keep at it, we realy apprectaite your contributions.

no problem. glad to be of some assistance.

osd_daedalus;581189 said:
Not to mention no one here, apart Mark that atm merges and correct what we do, is an official RunUO coder... and neither an official Demise coder :p
So we are really glad if you will continue helping us :)
Have you already had a look in the Bugfix Thread index? There are lots of things we can't figure at the moment how to resolve. Do you think you can give us a hand about?
Thank you :)

Yes I sure can. I'll check them out.
 
Re: [Missing Feature] [Needs Testing] Scroll of Alacrity

Oh and all looks good in that diff file except for one thing.

The Powerscroll.cs and StatScroll.cs patches are missing the Scroll of Transcendence edit. It's in the Scroll of Alacrity just not in the other two. All three should have the code in red......

if (firstStage)
{
from.CloseGump(typeof(StatCapScroll.InternalGump));
from.CloseGump(typeof(PowerScroll.InternalGump));
//from.CloseGump(typeof(ScrollofTranscendence.InternalGump)); //to uncomment when Scrolls of Trascendence will be implemented
from.CloseGump(typeof(ScrollofAlacrity.InternalGump));
from.SendGump(new InternalGump(from, this));
}

Thanks for adding the GPL btw.
 
Status
Not open for further replies.
Top