PenUltima Online

It is currently Mon Oct 06, 2008 4:01 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: putting item in random position in metallic chest
PostPosted: Wed Aug 30, 2006 8:19 am 
Offline

Joined: Sat Jul 22, 2006 8:25 am
Posts: 29
Location: Italy
I have tryed to create an intem into a chest un random positions, but all attempts are failed:

item.x := RandomInt(150) + 20 + 1;
item.y := RandomInt(130) + 20 + 1;
fail


MoveItemToContainer(item, container, RandomInt(150) + 20 + 1, RandomInt(120) + 20 + 1);

fail

all fails.

_________________
--------------------------
ZuluHotelItalia Admin


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 30, 2006 11:13 am 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1154
Location: Southern Central USA
Are you certain that the range is within the bounds of the container into which you are trying to drop the item? Also if you read the docs for the function it says "If the default values for x and y are passed, or if x or y does not fall within the legal bounds for a container as found in ITEMDESC.CFG, then a random location within the container will be chosen. " So if you don't send any values for x and y then the function automatically chooses a random location.

_________________
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 Aug 30, 2006 11:41 am 
Offline

Joined: Sat Jul 22, 2006 8:25 am
Posts: 29
Location: Italy
I have tryed and

CreateItemInContainer(container, objname, quantity);

or

CreateItemInContainer(container, objname, quantity);
+
MoveItemToContainer(item, container);

put all items in the same position..... one over one.

_________________
--------------------------
ZuluHotelItalia Admin


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

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users 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