|
||
|
|||||||
| Custom Script Release Archive This is a pre-script database archive of what our users had released. |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
Join Date: Feb 2003
Location: East Coast USA
Posts: 1,382
|
Updated: 8/9/2005: Kamuflaro's update applied to files. Archive file updated.
Updated: 8/9/2005: Plague Beast Lord corpses are deleted on death, and frozen Plague Beast Lords are deleted on deserialization. The latter is a quick fix for a reported crash and should resolve the problem. The puzzle doesn't work right after deserialization, and I'm not sure why. I'll take a more detailed look later but this is a quick resolution for now. Please report any further crashes. Only the ZIP has been updated for this fix. The instructions in this post have been updated for missing "using" statements. This is someone else's Plague Beast Lord, from the looks of it released somewhere around RunUO Beta 19. I've updated it to work with RunUO 1.0.0. Please help me test this script. Report any item leaks, bugs, etc. If you notice inconsistencies with OSI behavior and have the time to adjust the scripts, please feel free (Just remember to post them to either this thread or forum =) What the heck IS a Plague Beast Lord? Click here or here. What does this package contain? The Plague Beast Lord and all necessary files (organs, mostly) plus the modifications necessary for distro scripts. The Plague Beast Lord and necessary files are included in the archive. The distro modifications are included in this post. Without further adieu: Bandage.cs: (2 modifications) Code:
private class InternalTarget : Target
{
private Bandage m_Bandage;
public InternalTarget( Bandage bandage ) : base( 1, false, TargetFlags.Beneficial )
{
m_Bandage = bandage;
}
protected override void OnTarget( Mobile from, object targeted )
{
if ( m_Bandage.Deleted )
return;
//**************************** v----Added (for PlagueBeastLord)
if ( targeted is Plague_Blood )
{
Plague_Blood p = targeted as Plague_Blood;
p.Taponar( from );
m_Bandage.Consume();
}
else
//**************************** ^----Added (for PlagueBeastLord)
if ( targeted is Mobile )
{
if ( from.InRange( m_Bandage.GetWorldLocation(), Core.AOS ? 2 : 1 ) )
{
if ( BandageContext.BeginHeal( from, (Mobile)targeted ) != null )
m_Bandage.Consume();
}
else
{
from.SendLocalizedMessage( 500295 ); // You are too far away to do that.
}
}
else
{
from.SendLocalizedMessage( 500970 ); // Bandages can not be used on that.
}
}
//************************ v----Added (for PlagueBeastLord)
protected override void OnNonlocalTarget( Mobile from, object targeted )
{
if ( targeted is Plague_Blood )
{
from.RevealingAction();
Plague_Blood p= targeted as Plague_Blood;
p.Taponar(from);
m_Bandage.Consume();
}
}
//************************ ^----Added (for PlagueBeastLord)
}
Code:
private class InternalTarget : Target
{
private Scissors m_Item;
public InternalTarget( Scissors item ) : base( 1, false, TargetFlags.None )
{
m_Item = item;
}
//************** v-------------- Added (for PlagueBeastLords)
protected override void OnNonlocalTarget( Mobile from, object targeted )
{
if ( m_Item.Deleted ) return;
if ( targeted is BaseOrgano )
{
from.RevealingAction();
BaseOrgano org = (BaseOrgano)targeted;
org.Abrir( from );
}
else if ( targeted is Plague_Venas )
{
from.RevealingAction();
Plague_Venas org = (Plague_Venas)targeted;
org.CutVein( from );
}
else if ( targeted is Plague_Core )
{
from.RevealingAction();
Plague_Core PCore_ = (Plague_Core)targeted;
PCore_.Cortar( from );
}
}
//************** ^-------------- Added (for PlagueBeastLords)
protected override void OnTarget( Mobile from, object targeted )
{
if ( m_Item.Deleted ) return;
/*if ( targeted is Item && !((Item)targeted).IsStandardLoot() )
{
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
}
else */
Item targ = null;
if ( targeted is Item )
targ = (Item)targeted;
//************** v-------------- Added (for PlagueBeastLords)
if ( targeted != null && targeted is BaseOrgano )
{
from.RevealingAction();
BaseOrgano org = (BaseOrgano)targeted;
org.Abrir( from );
}
else if (targeted is Plague_Venas )
{
from.RevealingAction();
Plague_Venas org = (Plague_Venas)targeted;
org.CutVein( from );
}
else if (targeted is Plague_Core )
{
from.RevealingAction();
Plague_Core PCore_ = (Plague_Core)targeted;
PCore_.Cortar( from );
}
else
//************** ^-------------- Added (for PlagueBeastLords)
if ( targ != null && !targ.Movable )
{
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
}
else if ( targ != null && !targ.IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 502437 ); // Items you wish to cut must be in your backpack.
}
else if ( targeted is IScissorable )
{
IScissorable obj = (IScissorable)targeted;
if ( obj.Scissor( from, m_Item ) )
from.PlaySound( 0x248 );
}
else
{
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
}
}
}
At the top of the file, add: Code:
using Server.Mobiles; Code:
public void Target( Mobile m )
{
if ( !Caster.CanSee( m ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( Core.AOS && (m.Frozen || m.Paralyzed || (m.Spell != null && m.Spell.IsCasting)) )
{
Caster.SendLocalizedMessage( 1061923 ); // The target is already frozen.
}
else if ( CheckHSequence( m ) )
{
SpellHelper.Turn( Caster, m );
SpellHelper.CheckReflect( (int)this.Circle, Caster, ref m );
double duration;
if ( Core.AOS )
{
int secs = 2 + (GetDamageFixed( Caster ) / 100) - (GetResistFixed( m ) / 100);
if ( !m.Player )
secs *= 3;
if ( secs < 0 )
secs = 0;
duration = secs;
}
else
{
// Algorithm: ((20% of magery) + 7) seconds [- 50% if resisted]
duration = 7.0 + (Caster.Skills[SkillName.Magery].Value * 0.2);
if ( CheckResisted( m ) )
duration *= 0.75;
}
//********** v---- Added
if ( m is PlagueBeastLord )
{
PlagueBeastLord PBL = m as PlagueBeastLord;
PBL.Congelar( Caster );
Caster.Combatant = null;
Caster.Warmode = false;
}
else
//********** ^----- Added
m.Paralyze( TimeSpan.FromSeconds( duration ) );
m.PlaySound( 0x204 );
m.FixedEffect( 0x376A, 6, 1 );
}
FinishSequence();
}
BladedItemTarget.cs (2 modifications) At the top of the file, add: Code:
using Server.Network; Code:
protected override void OnTarget( Mobile from, object targeted )
{
if ( m_Item.Deleted )
return;
if ( targeted is ICarvable )
{
((ICarvable)targeted).Carve( from, m_Item );
}
else if ( targeted is SwampDragon && ((SwampDragon)targeted).HasBarding )
{
SwampDragon pet = (SwampDragon)targeted;
if ( !pet.Controled || pet.ControlMaster != from )
from.SendLocalizedMessage( 1053022 ); // You cannot remove barding from a swamp dragon you do not own.
else
pet.HasBarding = false;
}
//******** v----- Added (for PlagueBeastLords)
else if ( targeted is PlagueBeastLord)
{
from.RevealingAction();
PlagueBeastLord p = targeted as PlagueBeastLord;
if (p.Congelado)
{
if ( p.Abierto )
from.LocalOverheadMessage( MessageType.Emote, 0x6CB, false, "The creature already was opened." ); // La criatura ya fue abierta
else
p.Abrir( from );
}
else
from.SendMessage( "The beast must be solidified to open it!" ); // La bestia debe estar solidificada para abrirla!
}
//******** ^----- Added (for PlagueBeastLords)
else
{
PlagueBeast.cs: (1 modification) Code:
// added for plague beast lord
public override void OnDeath( Container c )
{
c.DropItem( new Plague_gland() );
base.OnDeath( c );
}
// added for plague beast lord
__________________
![]() the-retelling.org : scripts and tech demo |
|
|
|
|
#2 (permalink) | |
|
Forum Expert
|
Quote:
Code:
failed (1 errors, 0 warnings) - Error: Scripts\CustomScripts\PlagueBeastLord\PlagueBeastLord\PlagueBeastLord\ Internal\PlagueBackpack.cs: CS0115: (line 12, column 24) 'Server.Items.PlagueBac kpack.CanStore(Server.Mobile)': no suitable method found to override |
|
|
|
|
|
#3 (permalink) |
|
Forum Expert
Join Date: Feb 2003
Location: East Coast USA
Posts: 1,382
|
No idea, Containers should have a CanStore method to override, if you're using RunUO 1.0.0.
Edit: PlagueBackpack is based off Container, which is in the core. So either you're not using the latest RunUO release or you're using a modified core. Update to RunUO 1.0.0 or compare Container.cs from the RunUO 1.0.0 source release with your modified core's source if you're using a modified core. Edit2: CanStore, not OnStore.. Oops.
__________________
![]() the-retelling.org : scripts and tech demo |
|
|
|
|
#5 (permalink) | |
|
Forum Expert
Join Date: Feb 2003
Location: East Coast USA
Posts: 1,382
|
Quote:
__________________
![]() the-retelling.org : scripts and tech demo |
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
Join Date: Feb 2004
Age: 27
Posts: 1,834
|
Phew... finally got it to compile...
Had to delete the test file... no idea, how to iron out that error I got... You leck in your instructions, that you got to add 2 references. using Server.Network; ^In BladedItemTarget.cs using Server.Mobiles; ^in Paralyze.cs Ok, now onto testing. ![]() |
|
|
|
|
#7 (permalink) | ||
|
Forum Expert
Join Date: Feb 2004
Age: 27
Posts: 1,834
|
I got a nice Crash report for you:
Quote:
Well got another 1 occured after server restart with saved PBL corpses when lifting a brain from a PBL corpse - accesslevel Player.Quote:
|
||
|
|
|
|
#8 (permalink) |
|
Forum Expert
Join Date: Feb 2003
Location: East Coast USA
Posts: 1,382
|
Kamuflaro, I had a huge reply for you, so of course it got lost when I tried to submit it. =/
Basically, I need some more information on what is causing the crashes.
__________________
![]() the-retelling.org : scripts and tech demo |
|
|
|
|
#9 (permalink) |
|
Forum Expert
Join Date: Feb 2004
Age: 27
Posts: 1,834
|
I honestly do not know, what exactly is crashing me... tCan you try to para a PBL, then knife it and just try to get the core, but dont actually succeed. Then when the PBL died by his inner injuries open the corpse and loot evey organ you see there. That should result in a crash. :/
Well, if you can't figure it out I will have a look at it, but it's your script, so I'll let you have the fun. ![]() |
|
|
|
|
#10 (permalink) | |
|
Forum Expert
Join Date: Feb 2003
Location: East Coast USA
Posts: 1,382
|
Quote:
Edit: Okay, I updated the script to fix the problems you reported.
__________________
![]() the-retelling.org : scripts and tech demo |
|
|
|
|
|
#12 (permalink) |
|
Forum Expert
Join Date: Feb 2004
Age: 27
Posts: 1,834
|
go to PlagueBrain.cs line 100 and replace the whole void with:
Code:
public void Sangrar(Mobile from)
{
Plague_Blood blood_= sangre as Plague_Blood;
if ( blood_ != null )
blood_.Hemorragia(from);
}
![]() |
|
|
|
|
#15 (permalink) | |
|
Forum Expert
Join Date: Feb 2003
Location: East Coast USA
Posts: 1,382
|
Quote:
And to anyone who feels 60 seconds is way too short, feel free to modify the PlagueBeastLord.cs file, it's right up near the top of that. Personally, I increased it to 600 while testing. :> (Of course, that's way too long instead of way too short) I'll be testing the script a bit more, to figure out how long it takes on average for me to complete the puzzle. Just keep in mind I am in no way shape or form an "uber" gamer, so my suggested time will be an eternity to a skilled player.
__________________
![]() the-retelling.org : scripts and tech demo |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|