Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Releases

Custom Script Releases This forum is where you can release your custom scripts for other users to use.

Please note: By releasing your scripts here you are submitting them to the public and as such agree to make them public domain. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO.

Reply
 
Thread Tools Display Modes
Old 06-15-2008, 02:43 AM   #1 (permalink)
Forum Expert
 
Join Date: Jul 2006
Location: uo
Posts: 741
Send a message via AIM to Identity Send a message via Yahoo to Identity
Default explosion potion target cancel

I'm working on a shard right now and we can't seem to get explosion pots to be activated after a player cancels the target for one (hitting escape). I've found (which makes complete sense) that ThrowTarget.OnTargetCancel() occurs when the player presses escape, however when the player tries to activate the potion again (by pressing a hotkey to use an explosion pot, to do the pot explo combo) it says "You must wait a few seconds before you can use that item.".. that occurs also if the player throws the pot to the ground and tries to throw the same pot once more.

What changes need to be made (Runuo 2.0 [svn - I think]) to make pots work like they do on hybrid?

EDIT: Whoops.. wrong section, please move this.

EDIT2: Got it working, add this:
Code:
protected override void OnTargetCancel(Mobile from, TargetCancelType cancelType)
            {
                base.OnTargetCancel(from, cancelType);
                from.EndAction(typeof(BaseExplosionPotion));

            }
to BaseExplosionPotion.cs in the ThrowTarget class.
__________________

Last edited by Identity; 06-15-2008 at 03:26 AM.
Identity is offline   Reply With Quote
Old 06-15-2008, 10:11 AM   #2 (permalink)
Master of the Internet
 
Join Date: Mar 2006
Location: Germany
Age: 17
Posts: 14,809
Send a message via AIM to Suil Ban Send a message via MSN to Suil Ban
Default

I set it up the delay and target cancelling/getting like this in Drink():

Code:
if (from is PlayerMobile)
            {
                PlayerMobile pm = from as PlayerMobile;
                if (DateTime.Now - pm.LastExplo < TimeSpan.FromSeconds(5.0))
                {
                    if (m_Timer != null)
                    {
                        from.Target = new ThrowTarget(this);
                        return;
                    }

                    pm.LocalOverheadMessage(0, 0x22, false, "You must wait 5 before using another explosion potion.");
                    return;
                }

                pm.LastExplo = DateTime.Now;
            }
__________________
go fish
Suil Ban is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5