Command script help please
Command script help please
I'm working on a few new dotcommands that I want to only affect warriors/henchmen following a player. I'm using the sanctuary scripts as a base. As I said, I want this to be a player command, that will only affect their personal henchmen/warriors. Any suggestions? please post here, or priv. msg me. Thanks
Code: Select all
//targets henchman
var target := target(who);
if(getobjproperty(target, "masterserial") == who.serial)
...
else
sendsysmessage(who, "This is not your henchmen.");
endifThe only thing that would have to be changed is:
That property stores their masters serial number on them.
Code: Select all
GetObjProperty (me, "master");I am currently using a modified or tweaked version of those scripts. What DevGib has will work with the one modification I posted. The property has to be called out correctly.
So your code would be this.
There are other ways to do this also but it really depends on what you are wanting these commands to do. Feel free to PM me on these boards if you need more help with this.
So your code would be this.
Code: Select all
//targets henchman
var target := target(who);
if(getobjproperty(target, "master") == who.serial)
...<execute code for command here>...
else
sendsysmessage(who, "This is not your henchmen.");
endif