|
||
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
|
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));
}
__________________
Last edited by Identity; 06-15-2008 at 03:26 AM. |
|
|
|
|
|
#2 (permalink) |
|
Master of the Internet
|
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|