Massapequa submitted a new resource:

Shields that allow you to taunt foes - Be the party tank

Directions: Simply replace the default version of BaseShield.cs with the modified BaseShield.cs and have fun.

Description: This tiny edit allows UO players to tank enemies like they do in other MMOs.
Players can now double click any shield and target an enemy they wish to taunt. If the taunt is successful, the enemy will attack the player wielding the shield.

Currently, the chance of taunting an enemy is the players parry skill vs the creature's barding difficulty.
This means that...

Read more about this resource...
 
Two years ago, I also made a script of mocking function, but I did it on anatomical skills, not on shields
:)
 

Attachments

  • Anatomy嘲讽.cs
    5.5 KB · Views: 11
any way of making this targetable towards other players
You could, but I don't think it would work out too well. It would essentially just shift the player target's current combatant to the shield wielder. It might be useful in pvp to get somebody to stop attacking your buddy for a moment, but they could just swap back to their previous target. The reason I didn't do it is because there's a lot of potential for griefing.
But if you really wanted to:
You could go to line 368 in BaseShield.cs where it says:
Code:
            }
            else
                from.SendMessage("You can't taunt that!");
That ends the "if(target is BaseCreature)" statement. Then change the "else" to
Code:
 else if(target is PlayerMobile)
Then replace the "you can't taunt that" with something like:
Code:
{
    PlayerMobile pm = (PlayerMobile)target;
    if( pm.Combatant != from)
        pm.Combatant = from;
}
You'd have to add some bells and whistles to make it look good or add a form of counter play so it doesn't on every player 100% of the time. but that's the general idea of it
 
You could, but I don't think it would work out too well. It would essentially just shift the player target's current combatant to the shield wielder. It might be useful in pvp to get somebody to stop attacking your buddy for a moment, but they could just swap back to their previous target. The reason I didn't do it is because there's a lot of potential for griefing.
But if you really wanted to:
You could go to line 368 in BaseShield.cs where it says:
Code:
            }
            else
                from.SendMessage("You can't taunt that!");
That ends the "if(target is BaseCreature)" statement. Then change the "else" to
Code:
 else if(target is PlayerMobile)
Then replace the "you can't taunt that" with something like:
Code:
{
    PlayerMobile pm = (PlayerMobile)target;
    if( pm.Combatant != from)
        pm.Combatant = from;
}
You'd have to add some bells and whistles to make it look good or add a form of counter play so it doesn't on every player 100% of the time. but that's the general idea of it
thanks for taking a look at this revisions and explanation thanks!
 
This is the errore that the Compile win debug gives to me.
Failed with: 1 errors, 0 warnings
Errors:
+ Items/Equipment/Armor/BaseShield.cs:
CS1501: Line 266: No overload for method 'CanBeHarmful' takes 4 arguments
Scripts: One or more scripts failed to compile or no script files were found.
 
This is the errore that the Compile win debug gives to me.
Failed with: 1 errors, 0 warnings
Errors:
+ Items/Equipment/Armor/BaseShield.cs:
CS1501: Line 266: No overload for method 'CanBeHarmful' takes 4 arguments
Scripts: One or more scripts failed to compile or no script files were found.
Hey, thanks for the comment! I'm pretty sure I was running this on the previous version of ServUO for this script.
Are you using 57.1?
If so, this should work:
go to line 266 and change the line from
Code:
if(target is BaseCreature && from.CanBeHarmful((Mobile)target, true, false, true))

to this:
Code:
if(target is BaseCreature && from.CanBeHarmful((Mobile)target, true))

It looks like CanBeHarmful uses 2 args instead of 4.

Hope this helps!
 
I'm using the 57.3 version, i'll try as you say, thank you.
Hey, thanks for the comment! I'm pretty sure I was running this on the previous version of ServUO for this script.
Are you using 57.1?
If so, this should work:
go to line 266 and change the line from
Code:
if(target is BaseCreature && from.CanBeHarmful((Mobile)target, true, false, true))

to this:
Code:
if(target is BaseCreature && from.CanBeHarmful((Mobile)target, true))

It looks like CanBeHarmful uses 2 args instead of 4.

Hope this helps!
 
Back