Making Items Static

Open discussion forum. For topics that do not fit anywhere else.

Moderator: POL Developer

Post Reply
Zaksmeer
Grandmaster Poster
Posts: 187
Joined: Mon Nov 19, 2012 8:32 pm

Making Items Static

Post by Zaksmeer »

Ok, as I am laying down stuff in my world, I can make it non-movable, but when I lay the cursor over it, it lights up as yellow, as if I can move it. How can I, when I put something, such as a wall, as a static item?

BTW--using 099.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Re: Making Items Static

Post by Austin »

If you set it to not be movable and it highlights as movable, then your character probably has the 'moveany' privilege enabled.


If you want to write the item to the client static files (taking it out of POL's items.txt) you will have a couple options

1. If its a live shard, you need to make a custom property on the items to write and extract those items out of the items.txt
2. If its a shard specifically for building you can use the items.txt

Either way make sure to not write interactive items like doors, levers, containers, etc.

There are a few utilities out there. I think even fiddler can directly import the items.txt
Zaksmeer
Grandmaster Poster
Posts: 187
Joined: Mon Nov 19, 2012 8:32 pm

Re: Making Items Static

Post by Zaksmeer »

Did have moveany set, changed that. But still does it which means that at a later time, when I get my world set the way I want, I will need to static all items to the files.
Zaksmeer
Grandmaster Poster
Posts: 187
Joined: Mon Nov 19, 2012 8:32 pm

Re: Making Items Static

Post by Zaksmeer »

I correct myself, if I make anything now they are fine.
Zaksmeer
Grandmaster Poster
Posts: 187
Joined: Mon Nov 19, 2012 8:32 pm

Re: Making Items Static

Post by Zaksmeer »

How would I add color to a script?
I modified a conceal script and i would like to add color to it, how would I word it.

I looked in the Recalac's Guide, but either I didn't find it or I skipped over it because i didn't think it was what I was looking for.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Re: Making Items Static

Post by Austin »

http://docs.polserver.com/pol099/objref.php#UObject
http://docs.polserver.com/pol099/objref.php#Item

Item inherits the color property from the UObject class.

You would use something like ListItemsNearLocation() from uo.em
http://docs.polserver.com/pol099/fullfu ... lfile=uoem

It will give you an array of item references and from there you can modify their color properties.

If you just wanted to do one item at a time, you could use the Target() function in UO.em and modify the color property of the item clicked.
Just make sure to do something like object.IsA(POLCLASS_ITEM) in an if statement to verify it is an item.


Most script bases also have smoe sort of .setprop or .setproperty command in a textcommand/commands package folder (or pol/scripts/textcmd for old school setups) and allow you to do .setprop color #
Zaksmeer
Grandmaster Poster
Posts: 187
Joined: Mon Nov 19, 2012 8:32 pm

Re: Making Items Static

Post by Zaksmeer »

I have a gm effect for hiding and unhiding, and I would like to set it to a particular color.
Can someone give me a quick example or where should I look.
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Making Items Static

Post by RusseL »

Zaksmeer wrote:I have a gm effect for hiding and unhiding, and I would like to set it to a particular color.
Can someone give me a quick example or where should I look.
effect.color = 1153;
Zaksmeer
Grandmaster Poster
Posts: 187
Joined: Mon Nov 19, 2012 8:32 pm

Re: Making Items Static

Post by Zaksmeer »

thanks for the help everybody, but I am getting this error----
variable effect has not been declared
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm

Re: Making Items Static

Post by CWO »

Well "effect" would be whatever the reference to your effect is named (if it's an object). If the effect is made by PlayStationaryEffect(), try using PlayStationaryEffectEx() and change the hue parameter.
Post Reply