PenUltima Online

It is currently Sun Sep 07, 2008 1:29 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Command script help please
PostPosted: Tue Mar 28, 2006 1:19 am 
Offline

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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 1:30 am 
Offline

Joined: Mon Feb 06, 2006 6:12 am
Posts: 93
Code:
//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 :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 6:59 pm 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 137
Location: Illinois, USA
The only thing that would have to be changed is:
Code:
GetObjProperty (me, "master");


That property stores their masters serial number on them.

_________________
2nd place is the 1st loser.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 29, 2006 2:40 am 
Offline

Joined: Thu Feb 23, 2006 8:33 pm
Posts: 22
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 29, 2006 4:11 am 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 137
Location: Illinois, USA
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:
//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.

_________________
2nd place is the 1st loser.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 31, 2006 10:26 pm 
Offline

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl