item.usescript

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.
Locked
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

item.usescript

Post by mr bubbles »

This doesn't seem to be working on 90% of the objects ive tried it on.

I've had a good look at itemdesc for items to see if there are any major differences in the items that DO report a usescript and those that DON"T.

Cant find anything though, its not particular to type (Container, item, weapon, etc) or how the Script is declared (ie, Script :pkgname:script).

Edit:

oh, read documentation... seems a bit weird only making it report the usescript for items that have had it set via script. Can i ask why this is?
FreeSoul
Master Poster
Posts: 90
Joined: Sat Feb 04, 2006 9:14 am

Post by FreeSoul »

use just
script
not usescript
:)
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles »

script is for the ai script on mobiles, usescript is the (doubleclick) script on items.
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce »

You use the .usescript member to override an existing script or to set a script on an item which normally doesn't have one.

If you search an example you can take a look at the tinker traps or the secure containers which are normally in every script base.
If you place a trap on a container you set the usescript of the container to the script which handles what has to be done if someone double clicks that container. If the trap explodes or someone removes the trap you set the container.usescript := ""; and the container is handled normally again.

So that is not a bug, it's a feature :D
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

Mr. Bubbles,

I am not sure exactly what you are referencing here. Are you referring to the entry in an itemdesc.cfg file for the 'use script'?
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

mr bubbles wrote:script is for the ai script on mobiles, usescript is the (doubleclick) script on items.
In the itemdesc.cfg file you define the script, not the use script, for what script will run when double clicked. .usescript <scriptname> is a text command that will override the script entry in the configuration file for the targetted item only.
Locked