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

Possess Command

Tru

Knight
awakenlands said:
Okay my friend whom got this command and tested it on his test shard, he went in and tested it on both, a NPC MObile*With BodyValue 400 and 401 both* which is male and female.... it did everything it was spose to do... Now when he did it for NPC Monster a dog for example it did it 100% too... The only problem is when i put it on my shard, with custom PlayerMobiles, and over 200 custom NPC mobiles on my shard, when it came to known to try it on a bran custom npc that i happen to try my Barbrian Shaman whom is a Custom script i made for my shard and players to fight, i happen to get into them but everything on my original Administrator was exact Dupe of what i nromally looked and basically showing and it was not working for Regular Bodyvalue 400-401 and so i did try a dog on my shard aand i happen to possess him verly good... Thats what i found odd about it...
I havent actually looked at this code but I know the last one was set up to not dupe command characters items. Morxeton is it the same with this one?
 

Morxeton

Sorceror
awakenlands, did you mean that when you possessed a custom NPC, it only copied their bodyvalue/hue etc... and nothing they are wearing? This possess command only copies certain properties of the character for appearance only (and stats too). It doesn't dupe anything in the target's backpack. I need to modify it to copy anything the target is holding in their hands and any armor/clothing they may be wearing as well...
 

nerun

Sorceror
Morxeton said:
awakenlands, did you mean that when you possessed a custom NPC, it only copied their bodyvalue/hue etc... and nothing they are wearing? This possess command only copies certain properties of the character for appearance only (and stats too). It doesn't dupe anything in the target's backpack. I need to modify it to copy anything the target is holding in their hands and any armor/clothing they may be wearing as well...

Yes, pls do it. And dupe the horse if mobile are ride pls.

The same problem appear when [possess Brigands...
 

Morxeton

Sorceror
nerun said:
Yes, pls do it. And dupe the horse if mobile are ride pls.

The same problem appear when [possess Brigands...
Oh yeah, I almost forgot about duping mounts. Thanks for reminding me.
 

Ravenal

Knight
custom NPC or even vendors :p it doesn't dupe nothing of avendors atm not what i mean about the bag duping i careless of that hehe, it is just the vendors or any NPC will not possess at all :p *command works fine* it does allow me to control that vendor or npc but it does not give me the full ability to umm get their armor or whatever :p
 

Morxeton

Sorceror
awakenlands said:
custom NPC or even vendors :p it doesn't dupe nothing of avendors atm not what i mean about the bag duping i careless of that hehe, it is just the vendors or any NPC will not possess at all :p *command works fine* it does allow me to control that vendor or npc but it does not give me the full ability to umm get their armor or whatever :p
Ahh, yeah, I forgot about copying over clothing/armor... I will fix that soon :)
 

Takhaar

Wanderer
Morxeton said:
awakenlands, did you mean that when you possessed a custom NPC, it only copied their bodyvalue/hue etc... and nothing they are wearing? This possess command only copies certain properties of the character for appearance only (and stats too). It doesn't dupe anything in the target's backpack. I need to modify it to copy anything the target is holding in their hands and any armor/clothing they may be wearing as well...

Please do!

Bugreport: When I try to possess an unmounted noble, while mounted myself, the possessed noble will be mounted as well. This will probably be fixed when you check if the target is mounted or not - just wanted to make sure you are aware of this ;)

In the meantime I'll use the original Possess command, but can't wait for your functional version since it's written pretty elegantly.

*Two thumbs up*
 

Morxeton

Sorceror
Sorry for not responding sooner.

I have been really busy not just with the Mega Spawner System, but with IRL as well. I have not been able to work on this script, but I will however make some time in the future to update this script to fix all the bugs and improve it further.

Until then, I apologize.
 

Slim52

Wanderer
Maybe im just dump anyways found era with possess comand

Me and budy were messing around with the possess comand on the shard i made he loged out still possed everthing worked fine i saved the shard and loged out went back and tried to restart the shard and i got this crash message
erver Crash Report
===================

Operating System: Microsoft Windows NT 5.0.2195.0
.NET Framework: 1.1.4322.573
Time: 4/22/2004 3:30:10 PM
Mobiles: 2347
Items: 87737
Clients:
- Count: 0

Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Mobiles.PossessCommand.SetMobile(String accountName, String name)
at Server.Mobiles.PossessCommand.LoadMobile(XmlElement mobile, String FileName)
at Server.Mobiles.PossessCommand.LoadFile()
at Server.Mobiles.PossessCommand.Initialize()
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Server.ScriptCompiler.Compile(Boolean debug)
at Server.Core.Main(String[] args)

im also runing run uo 1.0 if helps thanks alot :)
 

Termax

Wanderer
Server Crash at restart

Had too take this script out because my staff was just getting stupid with it. I had taken in out before I shutdown now everytime I try to restart the server I get this error. (running Beta 36)

==================================

Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling VB.net scripts...no files found.
Scripts: Verifying...done (1612 items, 426 mobiles)
World: Loading...done (981907 items, 20948 mobiles) (23.2 seconds)
Error:
System.Reflection.TargetInvocationException: Exception has been thrown by the ta
rget of an invocation. ---> System.NullReferenceException: Object reference not
set to an instance of an object.
at Server.Mobiles.PossessCommand.SetMobile(String accountName, String name)
at Server.Mobiles.PossessCommand.LoadMobile(XmlElement mobile, String FileNam
e)
at Server.Mobiles.PossessCommand.LoadFile()
at Server.Mobiles.PossessCommand.Initialize()
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlag
s invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean i
sBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlag
s invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean v
erifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at Server.ScriptCompiler.Compile(Boolean debug)
at Server.Core.Main(String[] args)
Crash: Backing up...


Any help would be a great, need to get the shard backup thanks ...Termax
 

Morxeton

Sorceror
Either of you two that just reported that error could please run the server in debug mode, it'll help me identify whats wrong faster. All you have to do is edit the shortcut for RunUO and after RunUO.exe put in -debug. So the target field will look something like this for example:
"C:\RunUO\RunUO.exe" -debug

The server will take longer to load, but when it crashes it will report the exact cause of the crash.

Thanks.
 

Termax

Wanderer
Shard is back up but...

Well I found that the script had left a Possessed XML file in the distro folder. I pulled the XML file out and the shard loads up fine. Only problem I see now is it seems after doing a save & shutdown with the script back in I still cant pull it out without errors on the next restart. Could it be because I have a staff member still possessed and need to wait for them to log back to thier original body value?
I loved the script and thought it would be great for events. When you have Staff like mine who feel they need to run around at the bank possessing a Dragons an such just to show off in frount of players its time to take the new toy away from the Kiddies. Though now Im almost thinking it may be easier to get rid of the staff than the script :p
Thanks again.......Termax
 

Dracarus

Wanderer
Termax ever think about just changing the access level to a level higher than your current power abusing staff. I personally had the same problem with my staff so I changed it to
Line :15
public static AccessLevel accessLevel = AccessLevel.Administrator;


Believe me I know how some staff members can be. I changed almost all the access levels on all my commands to suit the staff I trust the most. Seers and Admins.
 

Greystar

Wanderer
Arkryal said:
I like it, but still I see much more potential in this script.

Imagine this...

A Necromancer with skill 110+ has an approximate 20% chance that his ghost can possess an NPC/Monster. If he fails to possess, then he can not try again for 2 min. If he succeeds, he possess the npc/monster for a period of 5 min., during wich, the possesed creatures hp will deminish over time down to zero. If the creature he is possessing dies before 5 min. is up, the necromancer returns to ghost form. When 5min is up, and the HP is at zero, the necromancer is revived, all items in tact, and the monster is killed. The necromancer has no credit for the kill and the monster will have no items on it's corpse. ( to prevent abuse, like killing an ancient wyrm or champions ect. in this way. )

A script like this would be a lot of work, but the first to write something like that, I'm sure would gain notariety on these fourms.

Just an Idea I had, ( these scripts have a way of inspiring us, don't they).

I like that Idea as well. I might just take a stab at it. IE puting in some extra checks on command use and what not.. Like if AccessLevel.Player && Necromancy >= 110 then attempt to Possess. Although I think I might add a spirit speak check in there too. Make it so that the NPC can do a resistmagic check too to attempt to block the possession. IE if resistmagic is successfull send a message saying "NPC NAME HERE" has resisted your possession. If its an all out failure just say "You failed." If your a GM make it override that by putting another if state before that one "maybe" these are all theoretical right now anyway. But just some things that If I dont do it might give others at Ideas on what might be able to be done.
 

Dagor

Wanderer
Updates?

First, thanks, Morxeton for this feature. Has there been any recent updates to these scripts? I really need this functionality but the version I downloaded has some problems, like not being able to attack players after possessing an evil monster, etc.
 

Clanthia

Wanderer
Anyone Else

I have been trying to get this thing working to dupe magic items in the targets backpack and the mount, if any.
I am having a huge amount of difficulty in figuring out either, though.
Anyone have a starting place for duping the contents of a backpack, including the item properties?
 
Top