Props

Archive of posts related to former distro versions. Be aware that posts here do not refer to the current distro and may not work.
Locked
cow1234
New User
Posts: 1
Joined: Tue Sep 25, 2007 12:54 pm

Props

Post by cow1234 »

Hey guys, Im needing a little hand with using the .setobjproperty (yeah, must be with this command)

I'd REAAALLY apreciate if anyone could tell me how to:

edit stack amounts ( I mean, is .setobjproperty what?? for blankscrolls for example)

need help also in cursing and removing cursing with the setobjproperty

also in changing color and name... and in setting items to decrease skills, raise i already know (with the skilladvamount prop)

it MUST be with the .setobjproperty

thanks a lot buddys, u saved me life :)
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

Editing amounts of items in a stack is done by editing the member amount not by a Custom Property (CProp).

Example:

stacked_item.amount := stacked_item.amount -1;
will reduce the amount of the stacked item by one.

Colour and name are handled the same way.
item.color := 33;
colour number 33 is a shade of red so the item will now have the hue of red.

You can use the SetName() function or use the name member in the same way as I did above with color.

item.name := "new name";

The methods I described above are for editing those values from within a script. You would have to write them into a command if you want them to be done with a <dot> command.

As far as cursed items and skilld ropping is concerned that will depend on the scripts you are running.

A couple last thoughts: the GM command .propedit is another way to edit CProps and as a GM you also have access to the .info command which may let you edit a lot of the member properties depending on which version of scripts you are running.


Here's a copy of a command I wrote to allow changing a colour of an item. You can modify it to chanmge other properties such name, desc, and amount.

Code: Select all

use uo;
use os;

include "include/client";


program color(who, textline)
        if (!textline)
            SendSysMessage (who, "Usage is: color [integer] or 'none' (without the quotes)", color := 88);
            return;
        endif
	var item := target(who);
        if (textline == "none")
            item.color := 0;
            return;
        endif
        item.color := CINT (textline) + 2; // We add 2 because the colour numbers in Inside UO are off by 2
        return;
        

endprogram
Locked