Command script help please

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Mephisto
New User
Posts: 13
Joined: Mon Mar 06, 2006 10:28 pm

Command script help please

Post by Mephisto »

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
DevGIB
Grandmaster Poster
Posts: 248
Joined: Mon Feb 06, 2006 6:12 am

Post by DevGIB »

Code: Select all

//targets henchman
var target := target(who);
if(getobjproperty(target, "masterserial") == who.serial)
...
else
sendsysmessage(who, "This is not your henchmen.");
endif
havent done anything with the sanc scripts so im not really sure how they set everything up... i can only presume thats how it would be done :)
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

The only thing that would have to be changed is:

Code: Select all

GetObjProperty (me, "master");
That property stores their masters serial number on them.
XtehseA
New User
Posts: 22
Joined: Thu Feb 23, 2006 8:33 pm

Post by XtehseA »

something along the lings of what GIB said will work, i aswell havent used sanc scripts before and GIB knows alot more about escript then i do but im pretty sure around what he said will help.
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

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.

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
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.
Mephisto
New User
Posts: 13
Joined: Mon Mar 06, 2006 10:28 pm

Post by Mephisto »

I'll have to get back to you Tritan, I've been busy with work, thus have not had much time to play with the new commands I'm working on... Thanks for the info everyone :P
Post Reply