PenUltima Online

It is currently Fri Oct 10, 2008 4:32 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: item.usescript
PostPosted: Fri Apr 27, 2007 6:42 pm 
Offline

Joined: Thu Jan 18, 2007 2:34 am
Posts: 91
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?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 28, 2007 12:09 am 
Offline

Joined: Sat Feb 04, 2006 9:14 am
Posts: 90
Location: Aman
use just
script
not usescript
:)

_________________
Ash nazg durbatuluk, ash nazg gimbatul, ash nazg thrakatuluk agh burzum-ishi krimpatul


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 28, 2007 12:30 am 
Offline

Joined: Thu Jan 18, 2007 2:34 am
Posts: 91
script is for the ai script on mobiles, usescript is the (doubleclick) script on items.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 28, 2007 2:55 am 
Offline
Packet Maintainer

Joined: Thu Feb 02, 2006 8:33 am
Posts: 300
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 01, 2007 8:57 pm 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1154
Location: Southern Central USA
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'?

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 02, 2007 3:56 am 
Offline
User avatar

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

_________________
2nd place is the 1st loser.


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl